From 1c043ddd963b49519c306600401ca7aab626b8da Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:09:53 +0000 Subject: [PATCH 1/6] Initial plan From cc62c284b9593e5145ca5f2747963fa9f32543be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:10:31 +0000 Subject: [PATCH 2/6] Apply remaining changes Co-authored-by: iMattPro <303711+iMattPro@users.noreply.github.com> --- src/Tests/Tests/epv_test_validate_php_functions.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Tests/Tests/epv_test_validate_php_functions.php b/src/Tests/Tests/epv_test_validate_php_functions.php index 1bc0913..52aaf29 100644 --- a/src/Tests/Tests/epv_test_validate_php_functions.php +++ b/src/Tests/Tests/epv_test_validate_php_functions.php @@ -399,11 +399,8 @@ private function validateMethodCalls(Node $node) { } else if (isset($node->expr) && $node->expr instanceof Node\Expr\MethodCall - && !($node->expr->name instanceof Variable - || $node->expr->name instanceof PropertyFetch - || $node->expr->name instanceof Concat - || $node->expr->name instanceof Node\Scalar\Encapsed - || $node->expr->name instanceof Node\Expr\Ternary + && ($node->expr->name instanceof Node\Identifier + || $node->expr->name instanceof Node\Name ) ) { From 16ea593f07d852412fa66476db45c94ea6a3655b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:59:09 +0000 Subject: [PATCH 3/6] Add regression test for dynamic method name in assignment Co-authored-by: iMattPro <303711+iMattPro@users.noreply.github.com> --- .phpunit.result.cache | 1 + tests/epv_test_validate_php_functions_test.php | 12 ++++++++++++ tests/testFiles/dynamic_method_call.php | 17 +++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 .phpunit.result.cache create mode 100644 tests/testFiles/dynamic_method_call.php diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..c57c5bc --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"epv_test_validate_php_functions_test::test_usage_dynamic_method_name_in_assignment":4},"times":{"epv_test_validate_php_functions_test::test_usage_of_enable_globals":0.018,"epv_test_validate_php_functions_test::test_usage_of_enable_globals2":0.003,"epv_test_validate_php_functions_test::test_usage_of_enable_globals3":0.003,"epv_test_validate_php_functions_test::test_usage_of_addslashes":0.003,"epv_test_validate_php_functions_test::test_usage_of_evals":0.003,"epv_test_validate_php_functions_test::test_usage_of_no_inphpbb":0.003,"epv_test_validate_php_functions_test::test_usage_of_wrong_in_phpbb":0.003,"epv_test_validate_php_functions_test::test_usage_of_wrong_in_phpbb2":0.003,"epv_test_validate_php_functions_test::test_usage_of_namespace":0.003,"epv_test_validate_php_functions_test::test_usage_of_var_test":0.003,"epv_test_validate_php_functions_test::test_usage_of_var_test2":0.003,"epv_test_validate_php_functions_test::test_usage_variable":0.003,"epv_test_validate_php_functions_test::test_usage_dynamic_method_name_in_assignment":0.003}} \ No newline at end of file diff --git a/tests/epv_test_validate_php_functions_test.php b/tests/epv_test_validate_php_functions_test.php index fe37ade..8fa9f4a 100644 --- a/tests/epv_test_validate_php_functions_test.php +++ b/tests/epv_test_validate_php_functions_test.php @@ -171,6 +171,18 @@ public function test_usage_variable() { $tester->validateFile($file); } + public function test_usage_dynamic_method_name_in_assignment() { + $output = $this->getOutputMock(); + $output->expects(self::exactly(0)) + ->method('addMessage') + ; + + $file = $this->getLoader()->loadFile('tests/testFiles/dynamic_method_call.php'); + + $tester = new epv_test_validate_php_functions(false, $output, '/a/b/', 'epv/test', false, '/a/'); + $tester->validateFile($file); + } + private function getLoader() { return new FileLoader(new Output(), false, '.', '.'); diff --git a/tests/testFiles/dynamic_method_call.php b/tests/testFiles/dynamic_method_call.php new file mode 100644 index 0000000..c70e366 --- /dev/null +++ b/tests/testFiles/dynamic_method_call.php @@ -0,0 +1,17 @@ +store->{$methods[$step]}(self::DELETE_STEP); + $other = $this->store->{$methods['a']}(); + $named = $this->store->delete_step(); + return $removed; + } +} From 266e9c42dd114506c3708c2310ab6f75cfa45280 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:59:15 +0000 Subject: [PATCH 4/6] Remove phpunit cache file and ignore it Co-authored-by: iMattPro <303711+iMattPro@users.noreply.github.com> --- .phpunit.result.cache | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .phpunit.result.cache diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index c57c5bc..0000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":{"epv_test_validate_php_functions_test::test_usage_dynamic_method_name_in_assignment":4},"times":{"epv_test_validate_php_functions_test::test_usage_of_enable_globals":0.018,"epv_test_validate_php_functions_test::test_usage_of_enable_globals2":0.003,"epv_test_validate_php_functions_test::test_usage_of_enable_globals3":0.003,"epv_test_validate_php_functions_test::test_usage_of_addslashes":0.003,"epv_test_validate_php_functions_test::test_usage_of_evals":0.003,"epv_test_validate_php_functions_test::test_usage_of_no_inphpbb":0.003,"epv_test_validate_php_functions_test::test_usage_of_wrong_in_phpbb":0.003,"epv_test_validate_php_functions_test::test_usage_of_wrong_in_phpbb2":0.003,"epv_test_validate_php_functions_test::test_usage_of_namespace":0.003,"epv_test_validate_php_functions_test::test_usage_of_var_test":0.003,"epv_test_validate_php_functions_test::test_usage_of_var_test2":0.003,"epv_test_validate_php_functions_test::test_usage_variable":0.003,"epv_test_validate_php_functions_test::test_usage_dynamic_method_name_in_assignment":0.003}} \ No newline at end of file From 41dbb14689580f4f3aa56b2817a8fefdb7e93a37 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:59:29 +0000 Subject: [PATCH 5/6] Apply remaining changes Co-authored-by: iMattPro <303711+iMattPro@users.noreply.github.com> --- .gitignore | 2 +- bin/composer | 119 ++++++++++++++++++++++++++++++++++++++++++++ bin/jsonlint | 119 ++++++++++++++++++++++++++++++++++++++++++++ bin/php-parse | 119 ++++++++++++++++++++++++++++++++++++++++++++ bin/phpunit | 122 ++++++++++++++++++++++++++++++++++++++++++++++ bin/validate-json | 119 ++++++++++++++++++++++++++++++++++++++++++++ bin/yaml-lint | 119 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 718 insertions(+), 1 deletion(-) create mode 100755 bin/composer create mode 100755 bin/jsonlint create mode 100755 bin/php-parse create mode 100755 bin/phpunit create mode 100755 bin/validate-json create mode 100755 bin/yaml-lint diff --git a/.gitignore b/.gitignore index 3d9bead..52cc98a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /vendor/ /.idea/ -/bin/ \ No newline at end of file +/bin/.phpunit.result.cache diff --git a/bin/composer b/bin/composer new file mode 100755 index 0000000..2426d20 --- /dev/null +++ b/bin/composer @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/composer/composer/bin/composer'); + } +} + +return include __DIR__ . '/..'.'/vendor/composer/composer/bin/composer'; diff --git a/bin/jsonlint b/bin/jsonlint new file mode 100755 index 0000000..7c83b10 --- /dev/null +++ b/bin/jsonlint @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/seld/jsonlint/bin/jsonlint'); + } +} + +return include __DIR__ . '/..'.'/vendor/seld/jsonlint/bin/jsonlint'; diff --git a/bin/php-parse b/bin/php-parse new file mode 100755 index 0000000..a208b76 --- /dev/null +++ b/bin/php-parse @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/nikic/php-parser/bin/php-parse'); + } +} + +return include __DIR__ . '/..'.'/vendor/nikic/php-parser/bin/php-parse'; diff --git a/bin/phpunit b/bin/phpunit new file mode 100755 index 0000000..a6b823e --- /dev/null +++ b/bin/phpunit @@ -0,0 +1,122 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = 'phpvfscomposer://'.$this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data); + $data = str_replace('__FILE__', var_export($this->realpath, true), $data); + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit'); + } +} + +return include __DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit'; diff --git a/bin/validate-json b/bin/validate-json new file mode 100755 index 0000000..843e673 --- /dev/null +++ b/bin/validate-json @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/justinrainbow/json-schema/bin/validate-json'); + } +} + +return include __DIR__ . '/..'.'/vendor/justinrainbow/json-schema/bin/validate-json'; diff --git a/bin/yaml-lint b/bin/yaml-lint new file mode 100755 index 0000000..06de88a --- /dev/null +++ b/bin/yaml-lint @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/symfony/yaml/Resources/bin/yaml-lint'); + } +} + +return include __DIR__ . '/..'.'/vendor/symfony/yaml/Resources/bin/yaml-lint'; From ca560c606a8e7e09c40158445a66e17d9c4341a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Nov 2026 19:04:29 +0000 Subject: [PATCH 6/6] Remove bin files and revert .gitignore change Co-authored-by: iMattPro <303711+iMattPro@users.noreply.github.com> --- .gitignore | 2 +- bin/composer | 119 -------------------------------------------- bin/jsonlint | 119 -------------------------------------------- bin/php-parse | 119 -------------------------------------------- bin/phpunit | 122 ---------------------------------------------- bin/validate-json | 119 -------------------------------------------- bin/yaml-lint | 119 -------------------------------------------- 7 files changed, 1 insertion(+), 718 deletions(-) delete mode 100755 bin/composer delete mode 100755 bin/jsonlint delete mode 100755 bin/php-parse delete mode 100755 bin/phpunit delete mode 100755 bin/validate-json delete mode 100755 bin/yaml-lint diff --git a/.gitignore b/.gitignore index 52cc98a..3d9bead 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /vendor/ /.idea/ -/bin/.phpunit.result.cache +/bin/ \ No newline at end of file diff --git a/bin/composer b/bin/composer deleted file mode 100755 index 2426d20..0000000 --- a/bin/composer +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/composer/composer/bin/composer'); - } -} - -return include __DIR__ . '/..'.'/vendor/composer/composer/bin/composer'; diff --git a/bin/jsonlint b/bin/jsonlint deleted file mode 100755 index 7c83b10..0000000 --- a/bin/jsonlint +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/seld/jsonlint/bin/jsonlint'); - } -} - -return include __DIR__ . '/..'.'/vendor/seld/jsonlint/bin/jsonlint'; diff --git a/bin/php-parse b/bin/php-parse deleted file mode 100755 index a208b76..0000000 --- a/bin/php-parse +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/nikic/php-parser/bin/php-parse'); - } -} - -return include __DIR__ . '/..'.'/vendor/nikic/php-parser/bin/php-parse'; diff --git a/bin/phpunit b/bin/phpunit deleted file mode 100755 index a6b823e..0000000 --- a/bin/phpunit +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = 'phpvfscomposer://'.$this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data); - $data = str_replace('__FILE__', var_export($this->realpath, true), $data); - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit'); - } -} - -return include __DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit'; diff --git a/bin/validate-json b/bin/validate-json deleted file mode 100755 index 843e673..0000000 --- a/bin/validate-json +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/justinrainbow/json-schema/bin/validate-json'); - } -} - -return include __DIR__ . '/..'.'/vendor/justinrainbow/json-schema/bin/validate-json'; diff --git a/bin/yaml-lint b/bin/yaml-lint deleted file mode 100755 index 06de88a..0000000 --- a/bin/yaml-lint +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/symfony/yaml/Resources/bin/yaml-lint'); - } -} - -return include __DIR__ . '/..'.'/vendor/symfony/yaml/Resources/bin/yaml-lint';