From 111895a34211bb58d64797edd17e9b335874c1da Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 3 Nov 2021 09:57:45 +0300 Subject: require phpstan 1.0 with some related fixes (2) --- vendor/bin/phpstan | 1 + vendor/bin/phpstan.phar | 1 + vendor/composer/autoload_files.php | 10 +++ vendor/phpstan/phpstan/LICENSE | 21 ++++++ vendor/phpstan/phpstan/README.md | 91 ++++++++++++++++++++++++++ vendor/phpstan/phpstan/bootstrap.php | 60 +++++++++++++++++ vendor/phpstan/phpstan/composer.json | 23 +++++++ vendor/phpstan/phpstan/conf/bleedingEdge.neon | 2 + vendor/phpstan/phpstan/phpstan | 8 +++ vendor/phpstan/phpstan/phpstan.phar | Bin 0 -> 19119967 bytes vendor/phpstan/phpstan/phpstan.phar.asc | 16 +++++ 11 files changed, 233 insertions(+) create mode 120000 vendor/bin/phpstan create mode 120000 vendor/bin/phpstan.phar create mode 100644 vendor/composer/autoload_files.php create mode 100644 vendor/phpstan/phpstan/LICENSE create mode 100644 vendor/phpstan/phpstan/README.md create mode 100644 vendor/phpstan/phpstan/bootstrap.php create mode 100644 vendor/phpstan/phpstan/composer.json create mode 100644 vendor/phpstan/phpstan/conf/bleedingEdge.neon create mode 100644 vendor/phpstan/phpstan/phpstan create mode 100644 vendor/phpstan/phpstan/phpstan.phar create mode 100644 vendor/phpstan/phpstan/phpstan.phar.asc diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan new file mode 120000 index 0000000..959384f --- /dev/null +++ b/vendor/bin/phpstan @@ -0,0 +1 @@ +../phpstan/phpstan/phpstan \ No newline at end of file diff --git a/vendor/bin/phpstan.phar b/vendor/bin/phpstan.phar new file mode 120000 index 0000000..502769b --- /dev/null +++ b/vendor/bin/phpstan.phar @@ -0,0 +1 @@ +../phpstan/phpstan/phpstan.phar \ No newline at end of file diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000..989a5e5 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,10 @@ + $vendorDir . '/phpstan/phpstan/bootstrap.php', +); diff --git a/vendor/phpstan/phpstan/LICENSE b/vendor/phpstan/phpstan/LICENSE new file mode 100644 index 0000000..7c0f2b7 --- /dev/null +++ b/vendor/phpstan/phpstan/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Ondřej Mirtes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/phpstan/phpstan/README.md b/vendor/phpstan/phpstan/README.md new file mode 100644 index 0000000..b90c0d4 --- /dev/null +++ b/vendor/phpstan/phpstan/README.md @@ -0,0 +1,91 @@ +

PHPStan - PHP Static Analysis Tool

+ +

+ PHPStan +

+ +

+ Build Status + Latest Stable Version + Total Downloads + License + PHPStan Enabled +

+ +------ + +PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs +even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code +can be checked before you run the actual line. + +**[Read more about PHPStan in an introductory article »](https://phpstan.org/blog/find-bugs-in-your-code-without-writing-tests)** + +**[Try out PHPStan on the on-line playground! »](https://phpstan.org/)** + +## Sponsors + +TheCodingMachine +    +Private Packagist +
+Musement +    +Blackfire.io +
+Intracto +    +TicketSwap +
+ShipMonk +    +Togetter +
+RightCapital +    +ContentKing +
+ZOL +    +Stepan Kocourek +
+Shopware +    +Craft CMS + +[**You can now sponsor my open-source work on PHPStan through GitHub Sponsors.**](https://github.com/sponsors/ondrejmirtes) + +Does GitHub already have your 💳? Do you use PHPStan to find 🐛 before they reach production? [Send a couple of 💸 a month my way too.](https://github.com/sponsors/ondrejmirtes) Thank you! + +One-time donations [through PayPal](https://paypal.me/phpstan) are also accepted. To request an invoice, [contact me](mailto:ondrej@mirtes.cz) through e-mail. + +## Documentation + +All the documentation lives on the [phpstan.org website](https://phpstan.org/): + +* [Getting Started & User Guide](https://phpstan.org/user-guide/getting-started) +* [Config Reference](https://phpstan.org/config-reference) +* [PHPDocs Basics](https://phpstan.org/writing-php-code/phpdocs-basics) & [PHPDoc Types](https://phpstan.org/writing-php-code/phpdoc-types) +* [Extension Library](https://phpstan.org/user-guide/extension-library) +* [Developing Extensions](https://phpstan.org/developing-extensions/extension-types) + +## PHPStan Pro + +PHPStan Pro is a paid add-on on top of open-source PHPStan Static Analysis Tool with these premium features: + +* Web UI for browsing found errors, you can click and open your editor of choice on the offending line. +* Continuous analysis (watch mode): scans changed files in the background, refreshes the UI automatically. +* Interactive fixer: lets you choose the right fix for found errors :blush: + +Try it on PHPStan 0.12.45 or later by running it with the `--pro` option. You can create an account either by following the on-screen instructions, or by visiting [account.phpstan.com](https://account.phpstan.com/). + +After 30-day free trial period it costs 7 EUR for individuals monthly, 70 EUR for teams (up to 25 members). By paying for PHPStan Pro, you're supporting the development of open-source PHPStan. + +You can read more about it on [PHPStan's website](https://phpstan.org/blog/introducing-phpstan-pro). + +## Code of Conduct + +This project adheres to a [Contributor Code of Conduct](https://github.com/phpstan/phpstan/blob/master/CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code. + +## Contributing + +Any contributions are welcome. PHPStan's source code open to pull requests lives at [`phpstan/phpstan-src`](https://github.com/phpstan/phpstan-src). diff --git a/vendor/phpstan/phpstan/bootstrap.php b/vendor/phpstan/phpstan/bootstrap.php new file mode 100644 index 0000000..e8b9431 --- /dev/null +++ b/vendor/phpstan/phpstan/bootstrap.php @@ -0,0 +1,60 @@ +loadClass($class); + + return; + } + if (strpos($class, 'PHPStan\\') !== 0 || strpos($class, 'PHPStan\\PhpDocParser\\') === 0) { + return; + } + + if (!in_array('phar', stream_get_wrappers(), true)) { + throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.'); + } + + $filename = str_replace('\\', DIRECTORY_SEPARATOR, $class); + if (strpos($class, 'PHPStan\\BetterReflection\\') === 0) { + $filename = substr($filename, strlen('PHPStan\\BetterReflection\\')); + $filepath = 'phar://' . __DIR__ . '/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/' . $filename . '.php'; + } else { + $filename = substr($filename, strlen('PHPStan\\')); + $filepath = 'phar://' . __DIR__ . '/phpstan.phar/src/' . $filename . '.php'; + } + + if (!file_exists($filepath)) { + return; + } + + require $filepath; + } +} + +spl_autoload_register([PharAutoloader::class, 'loadClass']); diff --git a/vendor/phpstan/phpstan/composer.json b/vendor/phpstan/phpstan/composer.json new file mode 100644 index 0000000..2c9e279 --- /dev/null +++ b/vendor/phpstan/phpstan/composer.json @@ -0,0 +1,23 @@ +{ + "name": "phpstan/phpstan", + "description": "PHPStan - PHP Static Analysis Tool", + "license": ["MIT"], + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": ["bootstrap.php"] + } +} diff --git a/vendor/phpstan/phpstan/conf/bleedingEdge.neon b/vendor/phpstan/phpstan/conf/bleedingEdge.neon new file mode 100644 index 0000000..01fee97 --- /dev/null +++ b/vendor/phpstan/phpstan/conf/bleedingEdge.neon @@ -0,0 +1,2 @@ +includes: + - phar://phpstan.phar/conf/bleedingEdge.neon diff --git a/vendor/phpstan/phpstan/phpstan b/vendor/phpstan/phpstan/phpstan new file mode 100644 index 0000000..7a08ef4 --- /dev/null +++ b/vendor/phpstan/phpstan/phpstan @@ -0,0 +1,8 @@ +#!/usr/bin/env php +