if( $foo->is_ready() and $foo->needs_munging() ) { $status = $foo->munge(); } else { $status = $foo->status(); }