mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Add Safe PHP functions
This commit is contained in:
parent
04a956886a
commit
58cc098058
260 changed files with 49458 additions and 45 deletions
5
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/fopen.php
vendored
Normal file
5
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/fopen.php
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
function foo() {
|
||||
$fp = fopen('foobar', 'r');
|
||||
}
|
6
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/safe_fopen.php
vendored
Normal file
6
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/safe_fopen.php
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
use function Safe\fopen;
|
||||
|
||||
function foo() {
|
||||
$fp = fopen('foobar', 'r');
|
||||
}
|
7
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/safe_pregreplace.php
vendored
Normal file
7
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/safe_pregreplace.php
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
use function Safe\preg_replace;
|
||||
|
||||
$x = preg_replace('/foo/', 'bar', 'baz');
|
||||
$y = stripos($x, 'foo');
|
||||
|
||||
$x = preg_replace(['/foo/'], ['bar'], ['baz']);
|
5
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/undirect_call.php
vendored
Normal file
5
vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/undirect_call.php
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
function foo() {
|
||||
$toto = 'fopen';
|
||||
$toto('foobar', 'r');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue