Skip to content

Commit 12e6a38

Browse files
authored
Merge pull request #79 from vladsolntsev/feat/ban-empty-function
feat(ban): add empty to list of banned functions
2 parents d132c2a + 62a9602 commit 12e6a38

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ master
1111
* Updated nikic/php-parser to 5.4
1212
* Updated phpunit/phpunit to 10.5
1313
* Updated symfony/var-dumper to 6.4
14+
* Added empty() to the list of banned functions
1415

1516
v3.0.0
1617
------

extension.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ parameters:
5252
type: Expr_ShellExec
5353
functions: null
5454

55+
# enable detection of empty()
56+
-
57+
type: Expr_Empty
58+
functions: null
59+
5560
# enable detection of `use Tests\Foo\Bar` in a non-test file
5661
use_from_tests: true
5762

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
empty(['test empty']);

0 commit comments

Comments
 (0)