Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74650 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40392 invoked from network); 30 May 2014 01:08:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2014 01:08:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.171 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.171 mail-ob0-f171.google.com Received: from [209.85.214.171] ([209.85.214.171:47284] helo=mail-ob0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/95-07154-B1AD7835 for ; Thu, 29 May 2014 21:08:44 -0400 Received: by mail-ob0-f171.google.com with SMTP id wn1so1155833obc.16 for ; Thu, 29 May 2014 18:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=/yCX67mXTriUFZFS0BzOE29SjZTTB9Sc6Tk1YskoO54=; b=PZ1O9Cu9cmCf0J6GaQdZVvUpgMAewelycd4wXnPifMkZbBrOMbZ73EbeQRSSwaiwKm h3LCje3rR7pIVdSBD7hco+2qbOr8cSbtMFkG1ofgddPPSSnXR7Jp4jKOLZWiZ4MTQ7dZ hXg6UNT5gdVcy8p06XVpJcnOHZYk129FV+Sv/v8oEK2bPtgA0mQW1lrrz4nRLaD8CPWl lQfKlKZ7AXqeZMV0YcQ1NnXg5oHFQXgZRB91NVVcMoFqL9cz3rWXI7FJelrSAZJM+UBz mRbDbW9BLngK+ZYG4RFb+LDclL70SA36Atyidf4BKu3DOSi9KeJpjpUbvWLnmP4BMrN7 SiMQ== MIME-Version: 1.0 X-Received: by 10.182.97.97 with SMTP id dz1mr13063182obb.13.1401412121103; Thu, 29 May 2014 18:08:41 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.76.77.100 with HTTP; Thu, 29 May 2014 18:08:41 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 May 2014 19:08:41 -0600 X-Google-Sender-Auth: 49QNt5_W2VUys66tOcO6ULh0IWA Message-ID: To: Derick Rethans Cc: Sara Golemon , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] ReflectionParameter::hasTypehint() / getTypehintText() From: levim@php.net (Levi Morrison) On Thu, May 29, 2014 at 4:54 PM, Derick Rethans wrote: > On Thu, 29 May 2014, Sara Golemon wrote: > >> Pretty straight-forward. Makes it easier to recreate a function >> signature from PHP (Mocking) >> https://wiki.php.net/rfc/reflectionparameter.typehint > > I don't think it should return an empty string when hasTypehint has > failed (the 4th "test") in your test case (for $d). IMO, it should > return NULL. If it doesn't have type information I think an empty string should be returned. Since you can't have an empty type hint there really isn't a conflict there. This means the function can always return a string. That's my $0.02.