From d34d01fd72abb07e0588c6d01247605646c7f256 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 4 Mar 2023 18:37:36 +0000 Subject: Bump PHPStan from 1.8.2 to 1.10.3 * https://phpstan.org/blog/phpstan-1-9-0-with-phpdoc-asserts-list-type * https://phpstan.org/blog/phpstan-1-10-comes-with-lie-detector --- vendor/bin/php-parse | 121 +++++++++++++++++++++++++++++++++++++++++++++++- vendor/bin/phpstan | 121 +++++++++++++++++++++++++++++++++++++++++++++++- vendor/bin/phpstan.phar | 121 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 360 insertions(+), 3 deletions(-) mode change 120000 => 100644 vendor/bin/php-parse mode change 120000 => 100644 vendor/bin/phpstan mode change 120000 => 100644 vendor/bin/phpstan.phar (limited to 'vendor/bin') diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse deleted file mode 120000 index 062d66a3e..000000000 --- a/vendor/bin/php-parse +++ /dev/null @@ -1 +0,0 @@ -../nikic/php-parser/bin/php-parse \ No newline at end of file diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse new file mode 100644 index 000000000..1bd2c838c --- /dev/null +++ b/vendor/bin/php-parse @@ -0,0 +1,120 @@ +#!/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')) + ) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'); + exit(0); + } +} + +include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'; diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan deleted file mode 120000 index 959384f7f..000000000 --- a/vendor/bin/phpstan +++ /dev/null @@ -1 +0,0 @@ -../phpstan/phpstan/phpstan \ No newline at end of file diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan new file mode 100644 index 000000000..20451337e --- /dev/null +++ b/vendor/bin/phpstan @@ -0,0 +1,120 @@ +#!/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')) + ) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan'); + exit(0); + } +} + +include __DIR__ . '/..'.'/phpstan/phpstan/phpstan'; diff --git a/vendor/bin/phpstan.phar b/vendor/bin/phpstan.phar deleted file mode 120000 index 502769bef..000000000 --- a/vendor/bin/phpstan.phar +++ /dev/null @@ -1 +0,0 @@ -../phpstan/phpstan/phpstan.phar \ No newline at end of file diff --git a/vendor/bin/phpstan.phar b/vendor/bin/phpstan.phar new file mode 100644 index 000000000..caa3e24f8 --- /dev/null +++ b/vendor/bin/phpstan.phar @@ -0,0 +1,120 @@ +#!/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')) + ) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar'); + exit(0); + } +} + +include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar'; -- cgit v1.2.3