You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Ádám Turcsán (JIRA)" <ji...@apache.org> on 2017/08/17 09:56:06 UTC

[jira] [Created] (NETBEANS-52) PHP7.1 Nullable type's use statement unrecognized

Ádám Turcsán created NETBEANS-52:
------------------------------------

             Summary: PHP7.1 Nullable type's use statement unrecognized
                 Key: NETBEANS-52
                 URL: https://issues.apache.org/jira/browse/NETBEANS-52
             Project: NetBeans
          Issue Type: Improvement
          Components: php - Code
    Affects Versions: 9.0, Next
         Environment: Ubuntu 16.04.3 - Linux 4.4.0-92-generic
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
            Reporter: Ádám Turcsán


There's a new PHP7.1 implementation in the nightly builds.
As I was using the new features I recognized that if a used type is used only in nullable cases, like below, NetBeans marks it as "Unused Use Statement":

use \Psr\Log\LoggerInterface as Logger;

{code:php}
class Example {

    /**
     * @var ?Logger
     */
    private $logger;

    public function __construct(?Logger $logger)
    {
        $this->logger = $logger;
    }

    private function getLogger(): ?Logger
    {
        return $this->logger;
    }

}
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)