diff --git a/composer.json b/composer.json index 3785bc0..dcd92e5 100644 --- a/composer.json +++ b/composer.json @@ -10,27 +10,33 @@ "homepage": "http://www.slevomat.cz" } ], + "repositories": [ + { + "type": "vcs", + "url": "git@github.com:slevomat/consistence-consistence.git" + } + ], "require": { - "php-64bit": "~7.2", - "consistence/consistence": "^2.0.0", - "nette/di": "^3.0", - "nette/mail": "^3.0", - "psr/log": "^1.0.2", - "react/event-loop": "^1.0.0", - "react/promise": "^2.7.0", - "react/socket": "^1.0.0" + "php": "^7.2.0 || ^8.0.0", + "consistence/consistence": "dev-master", + "nette/di": "^3.0.7", + "nette/mail": "^3.1.5", + "psr/log": "^1.1.3", + "react/event-loop": "^1.1.1", + "react/promise": "^2.8.0", + "react/socket": "^1.6.0" }, "require-dev": { - "consistence/coding-standard": "^3.10.1", "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phing/phing": "^2.16.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phing/phing": "^2.16.3", + "phpstan/phpstan": "^0.12.68", + "phpstan/phpstan-phpunit": "^0.12.17", "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^9.4.2", + "phpunit/phpunit": "^9.5.1", "slevomat/coding-standard": "^6.4.1", - "spell-checker/spell-checker": "v0.3.16", - "spell-checker/dictionary-en": "v0.1.1" + "spell-checker/spell-checker": "v0.3.17", + "spell-checker/dictionary-en": "v0.1.1", + "squizlabs/php_codesniffer": "^3.5.8" }, "config": { "bin-dir": "bin" diff --git a/phpcs.xml b/phpcs.xml index 38539ec..6cd456f 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,75 +1,242 @@ - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - + + - - + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + build/PHPStan/get-container.php + + + + + + + + + + + + + + + + + + + + + + + tests/stubs/Doctrine/DBAL/Platforms/MockPlatform.php + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tests/ + + + + + + + + + + + + + + + + + + + + Only 1 @return annotation is allowed in a function comment + + + Extra @param annotation + + + Function has no return statement, but annotation @return is present + app/model/Doctrine/DbalQueryResultSet.php + app/model/Doctrine/DQL/QueryBuilder.php + app/model/Enum/Enum.php + app/services/Product/Validation/ProductValidationCheckTypes.php + + + @param annotation for parameter "%s" missing + + + + + + + + + + + + + + + + + + + + + error + + + + app/model/Elasticsearch/Query/ElasticsearchAggregation.php + app/model/Elasticsearch/Query/ElasticsearchFilter.php + app/model/RabbitMq/Consumer.php + app/services/PdfGenerator/DocumentFactory.php + tests/services/Credits/LimitedCredits/LimitedCreditsCalculatorTest.php + + + + + + + + + + + Variable "%s" not allowed in double quoted string; use sprintf() instead + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -89,21 +256,37 @@ + + + + + + + - + - + - + - + + + + + + + + + + @@ -118,6 +301,22 @@ @internal, @see, "/> + @@ -169,7 +369,10 @@ + + + @@ -177,6 +380,9 @@ + + + @@ -195,6 +401,8 @@ + + @@ -206,6 +414,8 @@ + + @@ -217,22 +427,40 @@ + + + + + + + + + + + + + + + + + + @@ -240,22 +468,87 @@ - z + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - tests/ + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + tests/ + + + + + + + + + tests/build/PHPStan/*/data diff --git a/tests/AsyncMessageQueueManagerTest.php b/tests/AsyncMessageQueueManagerTest.php index 822167a..73d64f1 100644 --- a/tests/AsyncMessageQueueManagerTest.php +++ b/tests/AsyncMessageQueueManagerTest.php @@ -5,7 +5,7 @@ use AsyncConnection\Timer\PromiseTimer; use Closure; use Exception; -use PHPUnit_Framework_MockObject_MockObject; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; use React\EventLoop\Factory; use React\EventLoop\LoopInterface; @@ -25,13 +25,13 @@ class AsyncMessageQueueManagerTest extends TestCase use AsyncTestTrait; - /** @var AsyncConnectionManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var AsyncConnectionManager|MockObject */ private $connectionManagerMock; - /** @var AsyncConnectionWriter|PHPUnit_Framework_MockObject_MockObject */ + /** @var AsyncConnectionWriter|MockObject */ private $writerMock; - /** @var AsyncMessageSender|PHPUnit_Framework_MockObject_MockObject */ + /** @var AsyncMessageSender|MockObject */ private $senderMock; private LoopInterface $loop; diff --git a/tests/Smtp/AsyncSmtpConnectionWriterTest.php b/tests/Smtp/AsyncSmtpConnectionWriterTest.php index c01e99b..009ae6a 100644 --- a/tests/Smtp/AsyncSmtpConnectionWriterTest.php +++ b/tests/Smtp/AsyncSmtpConnectionWriterTest.php @@ -169,10 +169,6 @@ public function dataSuccessfulWrites(): array /** * @dataProvider dataSuccessfulWrites - * - * @param AsyncMessage $message - * @param string|null $actualFirstResponse - * @param string|null $actualSecondResponse */ public function testSuccessfulWrites( AsyncMessage $message, @@ -240,11 +236,6 @@ public function dataFailedWrites(): array /** * @dataProvider dataFailedWrites - * - * @param AsyncMessage $message - * @param string|null $actualFirstResponse - * @param string|null $actualSecondResponse - * @param string|null $expectedExceptionMessage */ public function testFailedWrites( AsyncMessage $message, diff --git a/tests/Smtp/AsyncSmtpMessageSenderTest.php b/tests/Smtp/AsyncSmtpMessageSenderTest.php index e16113f..803cc18 100644 --- a/tests/Smtp/AsyncSmtpMessageSenderTest.php +++ b/tests/Smtp/AsyncSmtpMessageSenderTest.php @@ -7,7 +7,7 @@ use AsyncConnection\TestCase; use Closure; use Nette\Utils\Strings; -use PHPUnit_Framework_MockObject_MockObject; +use PHPUnit\Framework\MockObject\MockObject; use React\EventLoop\Factory; use React\EventLoop\LoopInterface; use React\Promise\ExtendedPromiseInterface; @@ -20,7 +20,7 @@ class AsyncSmtpMessageSenderTest extends TestCase use AsyncTestTrait; - /** @var AsyncSmtpConnectionWriter|PHPUnit_Framework_MockObject_MockObject */ + /** @var AsyncSmtpConnectionWriter|MockObject */ private $writerMock; private LoopInterface $loop; @@ -30,7 +30,7 @@ class AsyncSmtpMessageSenderTest extends TestCase protected function setUp(): void { - /** @var AsyncSmtpConnectionWriter|PHPUnit_Framework_MockObject_MockObject $writerMock */ + /** @var AsyncSmtpConnectionWriter|MockObject $writerMock */ $writerMock = $this->createMock(AsyncSmtpConnectionWriter::class); $writerMock->method('isValid')->willReturn(true); $this->writerMock = $writerMock; @@ -61,8 +61,6 @@ public function dataFailedSendingThrowsException(): array /** * @dataProvider dataFailedSendingThrowsException - * - * @param string $messageToFail */ public function testFailedSendingThrowsException(string $messageToFail): void {