-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If you have a non namespaced function call without a use statement or preceding \
it's usage does not appear to be detected, per the README I expect this to work:
Any function that is used, but not defined during runtime gets reported as we cannot say if that one is shadowed or not
Given the code:
<?php
declare(strict_types=1);
namespace Test;
use function also_reported_and_not_defined;
not_reported_or_defined();
\reported_and_not_defined();
also_reported_and_not_defined();
The following is reported:
Found 2 unknown functions!
(those are not declared, so we cannot check them)
• also_reported_and_not_defined
in test.php:9
• reported_and_not_defined
in test.php:8
(scanned 1 files in 0.001 s)
Notice not_reported_or_defined()
is not reported as an unknown function. If I add a use statement or leading slash then the function is reported as not defined as expected.
Finally thanks for this incredible tool, the speed is impressive. 🤯
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working