[
https://issues.apache.org/jira/browse/NETBEANS-6083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432442#comment-17432442
]
frkinta edited comment on NETBEANS-6083 at 10/21/21, 1:14 PM:
--------------------------------------------------------------
*Class1.php*
{code:php}
<?php
declare(strict_types=1);
namespace Issue;
use Exception;
use Issue\Class2;
class Class1
{
public function __construct()
{
}
public function doitAction(): Class2
{
return new Class2();
}
public function doNothingAction(): void
{
throw new Exception('nothing to do');
}
}
{code}
*Class2.php*
{code:php}
<?php
declare(strict_types=1);
namespace Issue;
class Class2
{
public function __construct()
{
}
}
{code}
In `Class1.php` file, add a docblock comment before `declare` statement as
recommenced [here (section 3)|https://www.php-fig.org/psr/psr-12/] and fix
import
was (Author: frkinta):
*Class1.php*
{code:php}
<?php
declare(strict_types=1);
namespace Issue;
use Exception;
use Issue\Class2;
class Class1
{
public function __construct()
{
}
public function doitAction(): Class2
{
return new Class2();
}
public function doNothingAction(): Class2
{
throw new Exception('nothing to do');
}
}
{code}
*Class2.php*
{code:php}
<?php
declare(strict_types=1);
namespace Issue;
class Class2
{
public function __construct()
{
}
}
{code}
In `Class1.php` file, add a docblock comment before `declare` statement as
recommenced [here (section 3)|https://www.php-fig.org/psr/psr-12/] and fix
import
> Fix Imports move use statement before namespace and file-level docblock
> -----------------------------------------------------------------------
>
> Key: NETBEANS-6083
> URL: https://issues.apache.org/jira/browse/NETBEANS-6083
> Project: NetBeans
> Issue Type: Bug
> Components: php - Editor
> Affects Versions: 12.4, 12.5
> Reporter: frkinta
> Priority: Minor
> Attachments: fix_import.gif
>
>
> As you can see in the video, when I first hit _{{"Ctrl+Shift-I}}"_, all
> 'Exception' class of the project are not listed in dropdown.
> Then, when I hit again _{{"Ctrl+Shift-I}}"_ after file-level docblock added,
> all 'Exception' class of the project are listed except the PHP core Exception
> class. After validation, all use statements are moved to the top of the file
> and previously imported 'Exception' class disappear
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists