From 280fcaa6be0a9d3702ca8c3df442c844edd628ca Mon Sep 17 00:00:00 2001 From: Olha Livitchuk Date: Tue, 11 Aug 2026 11:30:09 +0200 Subject: [PATCH 1/2] FRW-11837 Added PHP 8.5 Support --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- architector.php | 22 +++++++++---------- composer.json | 2 +- phpstan.neon | 2 +- src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php | 2 -- .../AsyncApi/AsyncApi/AsyncApiInterface.php | 2 -- .../AsyncApi/Channel/AsyncApiChannel.php | 4 ---- .../Channel/AsyncApiChannelCollection.php | 2 -- .../AsyncApiChannelCollectionInterface.php | 2 -- .../Channel/AsyncApiChannelInterface.php | 4 ---- .../AsyncApi/Loader/AsyncApiLoader.php | 4 +++- .../Message/AsyncApiMessageCollection.php | 2 -- .../AsyncApiMessageCollectionInterface.php | 2 -- src/SprykerSdk/AsyncApi/AsyncApiConfig.php | 6 +++-- .../AsyncApi/Code/Builder/AsyncApiBuilder.php | 1 - .../Code/Builder/AsyncApiCodeBuilder.php | 2 -- .../AsyncApi/Console/AbstractConsole.php | 2 +- 18 files changed, 23 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1327a1c8..73034758 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1' + '8.5' ] steps: - uses: actions/checkout@v3 @@ -78,7 +78,7 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1' + '8.3' ] steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index ba08f898..24844f14 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://github.com/spryker-sdk/async-api/workflows/CI/badge.svg?branch=master)](https://github.com/spryker-sdk/async-api/actions?query=workflow%3ACI+branch%3Amaster) [![Latest Stable Version](https://poser.pugx.org/spryker-sdk/async-api/v/stable.svg)](https://packagist.org/packages/spryker-sdk/async-api) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg)](https://php.net/) +[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.3-8892BF.svg)](https://php.net/) [![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://phpstan.org/) This library provides an AsyncAPI parser. diff --git a/architector.php b/architector.php index fa3a43b0..4c0e0a69 100644 --- a/architector.php +++ b/architector.php @@ -5,18 +5,14 @@ * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. */ -use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector; +use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; use Rector\Config\RectorConfig; -use Rector\Core\Configuration\Option; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; +use Rector\DeadCode\Rector\Property\RemoveDefaultValueFromAssignedPropertyRector; use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector; -use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector; -use Rector\EarlyReturn\Rector\If_\ChangeOrIfReturnToEarlyReturnRector; -use Rector\EarlyReturn\Rector\Return_\ReturnBinaryAndToEarlyReturnRector; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; -use Rector\Php74\Rector\Property\TypedPropertyRector; use Rector\Set\ValueObject\SetList; defined('APPLICATION_ROOT_DIR') || define('APPLICATION_ROOT_DIR', __DIR__); @@ -26,16 +22,18 @@ $rectorConfig->import(SetList::EARLY_RETURN); $rectorConfig->import(SetList::PHP_74); - $rectorConfig->parameters()->set(Option::SKIP, [ - ChangeAndIfToEarlyReturnRector::class, - ChangeOrIfReturnToEarlyReturnRector::class, + $rectorConfig->skip([ ClosureToArrowFunctionRector::class, RemoveUselessParamTagRector::class, RemoveUnusedPromotedPropertyRector::class, RemoveUselessReturnTagRector::class, - ReturnBinaryAndToEarlyReturnRector::class, SimplifyUselessVariableRector::class, - TypedPropertyRector::class, - RemoveUselessVarTagRector::class + RemoveUselessVarTagRector::class, + // $isWindows is a static property only ever assigned inside the instance + // constructor; removing its default breaks any static-only access path + // that happens before the class is first instantiated. + RemoveDefaultValueFromAssignedPropertyRector::class => [ + __DIR__ . '/src/SprykerSdk/AsyncApi/Message/AbstractAsyncApiMessage.php', + ], ]); }; diff --git a/composer.json b/composer.json index 9f2800eb..ff7ab23e 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "SDK for AsyncAPI.", "license": "proprietary", "require": { - "php": ">=8.0", + "php": ">=8.3", "doctrine/inflector": "~1.4.2 || ~2.0.0", "symfony/console": "^4.0.0 || ^5.3 || ^6.0", "symfony/finder": "^4.0.0 || ^5.3 || ^6.0", diff --git a/phpstan.neon b/phpstan.neon index bc4abc82..523317b2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,5 @@ parameters: level: 8 - checkMissingIterableValueType: false bootstrapFiles: - phpstan-bootstrap.php @@ -8,5 +7,6 @@ parameters: ignoreErrors: - '#Parameter .+ of method .+Transfer::.+\(\).+ given.#' - '#Binary operation .+ results in an error.#' + - '#no value type specified in iterable type#' reportUnmatchedIgnoredErrors: false diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php index 8c2f9174..455bba99 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php @@ -35,8 +35,6 @@ public function getChannels(): iterable /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php index 2011cb23..e5405c13 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php @@ -18,8 +18,6 @@ public function getChannels(): iterable; /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php index 41b68d99..5bc95878 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php @@ -57,8 +57,6 @@ public function getPublishMessages(): iterable /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getPublishMessage(string $messageName): ?AsyncApiMessageInterface { @@ -75,8 +73,6 @@ public function getSubscribeMessages(): iterable /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getSubscribeMessage(string $messageName): ?AsyncApiMessageInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php index 73f2e299..930c328b 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php @@ -34,8 +34,6 @@ public function getChannels(): iterable /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php index 78593dc4..cce38ff9 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php @@ -16,8 +16,6 @@ public function getChannels(): iterable; /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php index cb4a1e22..d8da113f 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php @@ -23,8 +23,6 @@ public function getPublishMessages(): iterable; /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getPublishMessage(string $messageName): ?AsyncApiMessageInterface; @@ -35,8 +33,6 @@ public function getSubscribeMessages(): iterable; /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getSubscribeMessage(string $messageName): ?AsyncApiMessageInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php index a9e74a6a..4927c911 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php @@ -55,7 +55,9 @@ protected function validateRemotePath(string $asyncApiPath): void { // phpcs:disable if (@file_get_contents($asyncApiPath) === false) { - throw new InvalidFilePathException(sprintf('The remote file "%s" could not be loaded. Error: "%s"', $asyncApiPath, error_get_last() ? error_get_last()['message'] : 'Unknown error')); + $lastError = error_get_last(); + + throw new InvalidFilePathException(sprintf('The remote file "%s" could not be loaded. Error: "%s"', $asyncApiPath, $lastError ? $lastError['message'] : 'Unknown error')); } } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php index 033560f3..121d1495 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php @@ -34,8 +34,6 @@ public function getMessages(): iterable /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getMessage(string $messageName): ?AsyncApiMessageInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php index 1c8d49a1..589f9195 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php @@ -16,8 +16,6 @@ public function getMessages(): iterable; /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getMessage(string $messageName): ?AsyncApiMessageInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApiConfig.php b/src/SprykerSdk/AsyncApi/AsyncApiConfig.php index e51bb4e6..ab217bbb 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApiConfig.php +++ b/src/SprykerSdk/AsyncApi/AsyncApiConfig.php @@ -46,8 +46,10 @@ public function getProjectRootPath(): string */ public function getSprykRunExecutablePath(): string { - if (getenv('INSTALLED_ROOT_DIRECTORY')) { - return getenv('INSTALLED_ROOT_DIRECTORY'); + $installedRootDirectory = getenv('INSTALLED_ROOT_DIRECTORY'); + + if ($installedRootDirectory) { + return $installedRootDirectory; } return (string)getcwd(); diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php index 662e7aab..1c151cc4 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php @@ -389,7 +389,6 @@ protected function getMessageAttributes( $transferObject = new $transferObjectClassName(); $transferObjectReflection = new ReflectionClass($transferObjectClassName); $transferMetadataProperty = $transferObjectReflection->getProperty('transferMetadata'); - $transferMetadataProperty->setAccessible(true); $transferProperties = $transferMetadataProperty->getValue($transferObject); diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php index 339a6bf2..4f9ed035 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php @@ -363,8 +363,6 @@ protected function normalizeTransferType(string $type): string /** * @param string $propertyName - * - * @return string|null */ protected function getSingularized(string $propertyName): ?string { diff --git a/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php b/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php index 6092e3d1..878e441e 100644 --- a/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php @@ -29,7 +29,7 @@ class AbstractConsole extends Command /** * @var \SprykerSdk\AsyncApi\AsyncApiConfig|null */ - protected ?AsyncApiConfig $config = null; + protected ?AsyncApiConfig $config; /** * @var \SprykerSdk\AsyncApi\AsyncApiFacadeInterface|null From f80439a7c2c59b0d2148285290df0b412f7e2f23 Mon Sep 17 00:00:00 2001 From: Olha Livitchuk Date: Thu, 20 Aug 2026 16:32:28 +0200 Subject: [PATCH 2/2] FRW-11837 Fixed CS --- .../AsyncApi/Channel/AsyncApiChannel.php | 3 - .../Channel/AsyncApiChannelInterface.php | 3 - .../AsyncApi/AsyncApi/Cli/AsyncApiCli.php | 9 --- .../AsyncApi/Cli/AsyncApiCliInterface.php | 2 - .../AsyncApi/Loader/AsyncApiLoader.php | 4 -- .../Loader/AsyncApiLoaderInterface.php | 2 - .../AsyncApi/Message/AsyncApiMessage.php | 3 - .../Message/AsyncApiMessageInterface.php | 3 - .../Attributes/AsyncApiMessageAttribute.php | 3 - .../AsyncApiMessageAttributeInterface.php | 3 - src/SprykerSdk/AsyncApi/AsyncApiConfig.php | 6 -- src/SprykerSdk/AsyncApi/AsyncApiFacade.php | 5 -- .../AsyncApi/AsyncApiFacadeInterface.php | 8 --- src/SprykerSdk/AsyncApi/AsyncApiFactory.php | 33 --------- .../AsyncApi/Code/Builder/AsyncApiBuilder.php | 42 ------------ .../Code/Builder/AsyncApiBuilderInterface.php | 4 -- .../Code/Builder/AsyncApiCodeBuilder.php | 22 ------ .../Builder/AsyncApiCodeBuilderInterface.php | 2 - .../AsyncApi/Console/AbstractConsole.php | 10 --- .../AsyncApi/Console/CodeGenerateConsole.php | 5 -- .../AsyncApi/Console/SchemaCreateConsole.php | 5 -- .../Console/SchemaMessageAddConsole.php | 5 -- .../Console/SchemaValidateConsole.php | 5 -- .../AsyncApi/Message/AsyncApiError.php | 24 ------- .../AsyncApi/Message/AsyncApiInfo.php | 17 ----- .../AsyncApi/Message/MessageBuilder.php | 2 - .../Message/MessageBuilderInterface.php | 2 - .../AsyncApi/Validator/AsyncApiValidator.php | 4 -- .../Rule/AsyncApiChannelValidatorRule.php | 4 -- .../Rule/AsyncApiMessageValidatorRule.php | 6 -- .../Rule/AsyncApiModuleNameValidatorRule.php | 2 - .../Validator/Rule/ValidatorRuleInterface.php | 2 - .../AsyncApi/Validator/ValidatorInterface.php | 2 - .../AsyncApi/AsyncApi/Cli/AsyncApiCliTest.php | 12 ---- .../AsyncApi/Loader/AsyncApiLoaderTest.php | 15 ----- .../AsyncApi/Message/AsyncApiErrorTest.php | 6 -- .../AsyncApi/Message/AsyncApiInfoTest.php | 6 -- .../AsyncApi/AsyncApiConfigTest.php | 4 -- .../AsyncApi/AsyncApiFacadeTest.php | 33 --------- .../AsyncApi/AsyncApiFactoryTest.php | 3 - .../AsyncApi/AsyncApiValidatorFacadeTest.php | 15 ----- .../Console/CodeGenerateConsoleTest.php | 21 ------ .../Console/SchemaCreateConsoleTest.php | 3 - .../Console/SchemaMessageAddConsoleTest.php | 13 ---- .../Console/SchemaValidateConsoleTest.php | 6 -- .../AsyncApi/Parser/AsyncApiTest.php | 36 ---------- .../Validator/AsyncApiValidatorTest.php | 3 - tests/_support/AsyncApiTester.php | 3 - tests/_support/Helper/AsyncApiHelper.php | 67 ------------------- tests/_support/Helper/AsyncApiHelperTrait.php | 5 -- .../Helper/AsyncApiValidatorHelper.php | 25 ------- tests/_support/Helper/CommandHelper.php | 2 - tests/_support/Helper/ValidatorHelper.php | 8 --- 53 files changed, 538 deletions(-) diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php index 5bc95878..cd15c532 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php @@ -39,9 +39,6 @@ public function __construct(string $name, AsyncApiMessageCollectionInterface $pu $this->subscribeMessages = $subscribeMessages; } - /** - * @return string - */ public function getName(): string { return $this->name; diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php index d8da113f..be853be4 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php @@ -11,9 +11,6 @@ interface AsyncApiChannelInterface { - /** - * @return string - */ public function getName(): string; /** diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCli.php b/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCli.php index cfd2daf0..eecbada1 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCli.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCli.php @@ -54,8 +54,6 @@ public function __construct(AsyncApiConfig $config, MessageBuilderInterface $mes /** * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param string $asyncApiFilePath - * - * @return \Transfer\ValidateResponseTransfer */ public function validate(ValidateResponseTransfer $validateResponseTransfer, string $asyncApiFilePath): ValidateResponseTransfer { @@ -78,9 +76,6 @@ public function validate(ValidateResponseTransfer $validateResponseTransfer, str return $validateResponseTransfer; } - /** - * @return bool - */ protected function isCliInstalled(): bool { if (!$this->runProcess([static::ASYNCAPI_CLI, static::ASYNCAPI_CLI_VERSION])) { @@ -94,8 +89,6 @@ protected function isCliInstalled(): bool /** * @param array $command - * - * @return bool */ protected function runProcess(array $command): bool { @@ -109,8 +102,6 @@ protected function runProcess(array $command): bool /** * @param string $errorMessage - * - * @return void */ protected function triggerError(string $errorMessage): void { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCliInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCliInterface.php index 7ec64b59..91ad8105 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCliInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCliInterface.php @@ -14,8 +14,6 @@ interface AsyncApiCliInterface /** * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param string $asyncApiFilePath - * - * @return \Transfer\ValidateResponseTransfer */ public function validate(ValidateResponseTransfer $validateResponseTransfer, string $asyncApiFilePath): ValidateResponseTransfer; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php index 4927c911..ff96afa7 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php @@ -25,8 +25,6 @@ class AsyncApiLoader implements AsyncApiLoaderInterface { /** * @param string $asyncApiPath - * - * @return \SprykerSdk\AsyncApi\AsyncApi\AsyncApiInterface */ public function load(string $asyncApiPath): AsyncApiInterface { @@ -37,8 +35,6 @@ public function load(string $asyncApiPath): AsyncApiInterface /** * @param string $asyncApiPath - * - * @return array */ protected function getYmlArray(string $asyncApiPath): array { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoaderInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoaderInterface.php index ae271a0c..0de47ff5 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoaderInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoaderInterface.php @@ -13,8 +13,6 @@ interface AsyncApiLoaderInterface { /** * @param string $asyncApiPath - * - * @return \SprykerSdk\AsyncApi\AsyncApi\AsyncApiInterface */ public function load(string $asyncApiPath): AsyncApiInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessage.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessage.php index 615676d4..757b81f4 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessage.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessage.php @@ -31,9 +31,6 @@ public function __construct(string $name, AsyncApiMessageAttributeCollectionInte $this->attributes = $attributes; } - /** - * @return string - */ public function getName(): string { return $this->name; diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageInterface.php index 57f56a3b..2a113393 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageInterface.php @@ -9,9 +9,6 @@ interface AsyncApiMessageInterface { - /** - * @return string - */ public function getName(): string; /** diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttribute.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttribute.php index d3dbb1fa..d546f997 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttribute.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttribute.php @@ -29,9 +29,6 @@ public function __construct(string $name, $value) $this->value = $value; } - /** - * @return string - */ public function getName(): string { return $this->name; diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttributeInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttributeInterface.php index d382a9f1..ae741370 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttributeInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/Attributes/AsyncApiMessageAttributeInterface.php @@ -9,9 +9,6 @@ interface AsyncApiMessageAttributeInterface { - /** - * @return string - */ public function getName(): string; /** diff --git a/src/SprykerSdk/AsyncApi/AsyncApiConfig.php b/src/SprykerSdk/AsyncApi/AsyncApiConfig.php index ab217bbb..0918b510 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApiConfig.php +++ b/src/SprykerSdk/AsyncApi/AsyncApiConfig.php @@ -13,8 +13,6 @@ class AsyncApiConfig * @api * * @throws \SprykerSdk\AsyncApi\Exception\AsyncApiException - * - * @return string */ public function getDefaultAsyncApiFile(): string { @@ -30,8 +28,6 @@ public function getDefaultAsyncApiFile(): string /** * @api - * - * @return string */ public function getProjectRootPath(): string { @@ -41,8 +37,6 @@ public function getProjectRootPath(): string /** * Returns the current working directory or `INSTALLED_ROOT_DIRECTORY` (when INSTALLED_ROOT_DIRECTORY is defined). * This is needed to be able to execute this tool within the SprykerSdk and not inside of a project directly. - * - * @return string */ public function getSprykRunExecutablePath(): string { diff --git a/src/SprykerSdk/AsyncApi/AsyncApiFacade.php b/src/SprykerSdk/AsyncApi/AsyncApiFacade.php index ed9aa175..43018a17 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApiFacade.php +++ b/src/SprykerSdk/AsyncApi/AsyncApiFacade.php @@ -21,17 +21,12 @@ class AsyncApiFacade implements AsyncApiFacadeInterface /** * @param \SprykerSdk\AsyncApi\AsyncApiFactory $asyncApiFactory - * - * @return void */ public function setFactory(AsyncApiFactory $asyncApiFactory): void { $this->asyncApiFactory = $asyncApiFactory; } - /** - * @return \SprykerSdk\AsyncApi\AsyncApiFactory - */ protected function getFactory(): AsyncApiFactory { if (!$this->asyncApiFactory) { diff --git a/src/SprykerSdk/AsyncApi/AsyncApiFacadeInterface.php b/src/SprykerSdk/AsyncApi/AsyncApiFacadeInterface.php index b9bf4e9e..52874b65 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApiFacadeInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApiFacadeInterface.php @@ -21,8 +21,6 @@ interface AsyncApiFacadeInterface * @api * * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer; @@ -34,8 +32,6 @@ public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): A * @api * * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer; @@ -46,8 +42,6 @@ public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTrans * @api * * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function buildFromAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer; @@ -61,8 +55,6 @@ public function buildFromAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransf * @api * * @param \Transfer\ValidateRequestTransfer $validateRequestTransfer - * - * @return \Transfer\ValidateResponseTransfer */ public function validateAsyncApi(ValidateRequestTransfer $validateRequestTransfer): ValidateResponseTransfer; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApiFactory.php b/src/SprykerSdk/AsyncApi/AsyncApiFactory.php index da3339d6..46f6cbd5 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApiFactory.php +++ b/src/SprykerSdk/AsyncApi/AsyncApiFactory.php @@ -30,9 +30,6 @@ class AsyncApiFactory */ protected ?AsyncApiConfig $config = null; - /** - * @return \SprykerSdk\AsyncApi\AsyncApiConfig - */ protected function getConfig(): AsyncApiConfig { if (!$this->config) { @@ -42,33 +39,21 @@ protected function getConfig(): AsyncApiConfig return $this->config; } - /** - * @return \SprykerSdk\AsyncApi\Code\Builder\AsyncApiBuilderInterface - */ public function createAsyncApiBuilder(): AsyncApiBuilderInterface { return new AsyncApiBuilder($this->createMessageBuilder()); } - /** - * @return \SprykerSdk\AsyncApi\Code\Builder\AsyncApiCodeBuilderInterface - */ public function createAsyncApiCodeBuilder(): AsyncApiCodeBuilderInterface { return new AsyncApiCodeBuilder($this->getConfig(), $this->createMessageBuilder(), $this->createAsyncApiLoader()); } - /** - * @return \SprykerSdk\AsyncApi\AsyncApi\Loader\AsyncApiLoaderInterface - */ public function createAsyncApiLoader(): AsyncApiLoaderInterface { return new AsyncApiLoader(); } - /** - * @return \SprykerSdk\AsyncApi\Validator\AsyncApiValidator - */ public function createAsyncApiValidator(): AsyncApiValidator { return new AsyncApiValidator( @@ -79,9 +64,6 @@ public function createAsyncApiValidator(): AsyncApiValidator ); } - /** - * @return array - */ public function getAsyncApiValidatorRules(): array { return [ @@ -91,41 +73,26 @@ public function getAsyncApiValidatorRules(): array ]; } - /** - * @return \SprykerSdk\AsyncApi\Validator\Rule\ValidatorRuleInterface - */ protected function createAsyncApiMessageValidatorRule(): ValidatorRuleInterface { return new AsyncApiMessageValidatorRule($this->createMessageBuilder()); } - /** - * @return \SprykerSdk\AsyncApi\Validator\Rule\ValidatorRuleInterface - */ protected function createAsyncApiModuleNameValidatorRule(): ValidatorRuleInterface { return new AsyncApiModuleNameValidatorRule($this->createMessageBuilder()); } - /** - * @return \SprykerSdk\AsyncApi\Validator\Rule\ValidatorRuleInterface - */ protected function createAsyncApiChannelValidatorRule(): ValidatorRuleInterface { return new AsyncApiChannelValidatorRule($this->createMessageBuilder()); } - /** - * @return \SprykerSdk\AsyncApi\Message\MessageBuilderInterface - */ public function createMessageBuilder(): MessageBuilderInterface { return new MessageBuilder(); } - /** - * @return \SprykerSdk\AsyncApi\AsyncApi\Cli\AsyncApiCliInterface - */ public function createAsyncApiCli(): AsyncApiCliInterface { return new AsyncApiCli($this->getConfig(), $this->createMessageBuilder()); diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php index 20e05e17..c8d2097f 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilder.php @@ -41,8 +41,6 @@ public function __construct(MessageBuilderInterface $messageBuilder) /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer { @@ -79,8 +77,6 @@ public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): A /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer { @@ -121,8 +117,6 @@ public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTrans * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer * * @throws \SprykerSdk\AsyncApi\Exception\InvalidConfigurationException - * - * @return void */ protected function validateRequest(AsyncApiRequestTransfer $asyncApiRequestTransfer): void { @@ -147,8 +141,6 @@ protected function validateRequest(AsyncApiRequestTransfer $asyncApiRequestTrans /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return bool */ protected function isPropertyOptionEmpty(AsyncApiRequestTransfer $asyncApiRequestTransfer): bool { @@ -157,8 +149,6 @@ protected function isPropertyOptionEmpty(AsyncApiRequestTransfer $asyncApiReques /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return bool */ protected function isTransferOptionEmpty(AsyncApiRequestTransfer $asyncApiRequestTransfer): bool { @@ -167,8 +157,6 @@ protected function isTransferOptionEmpty(AsyncApiRequestTransfer $asyncApiReques /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return bool */ protected function isModuleNameEmpty(AsyncApiRequestTransfer $asyncApiRequestTransfer): bool { @@ -184,8 +172,6 @@ protected function isModuleNameEmpty(AsyncApiRequestTransfer $asyncApiRequestTra * @param string $messageName * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return array */ protected function addComponentMessage( array $asyncApi, @@ -212,8 +198,6 @@ protected function addComponentMessage( * @param string $messageName * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return array */ protected function addComponentSchemaMessage( array $asyncApi, @@ -231,8 +215,6 @@ protected function addComponentSchemaMessage( * @param array $messageProperties * @param array $requiredFields * @param string $messageName - * - * @return array */ protected function buildComponentSchemaMessage(array $asyncApi, array $messageProperties, array $requiredFields, string $messageName): array { @@ -254,8 +236,6 @@ protected function buildComponentSchemaMessage(array $asyncApi, array $messagePr * @param array $asyncApi * @param string $messageName * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer - * - * @return array */ protected function addMessageToChannel(array $asyncApi, string $messageName, AsyncApiMessageTransfer $asyncApiMessageTransfer): array { @@ -277,8 +257,6 @@ protected function addMessageToChannel(array $asyncApi, string $messageName, Asy * @param string $messageName * @param string $channelName * @param string $channelType - * - * @return array */ protected function addMessageToChannelType(array $asyncApi, string $messageName, string $channelName, string $channelType): array { @@ -322,8 +300,6 @@ protected function addMessageToChannelType(array $asyncApi, string $messageName, * @param array $asyncApi * @param string $messageName * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer - * - * @return array */ protected function addComponentMessageHeader(array $asyncApi, string $messageName, AsyncApiMessageTransfer $asyncApiMessageTransfer): array { @@ -338,8 +314,6 @@ protected function addComponentMessageHeader(array $asyncApi, string $messageNam /** * @param string $type - * - * @return string */ protected function mapTransferTypeToAsyncyApiType(string $type): string { @@ -353,8 +327,6 @@ protected function mapTransferTypeToAsyncyApiType(string $type): string /** * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return string */ protected function getMessageName(AsyncApiMessageTransfer $asyncApiMessageTransfer, AsyncApiRequestTransfer $asyncApiRequestTransfer): string { @@ -371,8 +343,6 @@ protected function getMessageName(AsyncApiMessageTransfer $asyncApiMessageTransf /** * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiMessageTransfer */ protected function getMessageAttributes( AsyncApiMessageTransfer $asyncApiMessageTransfer, @@ -422,8 +392,6 @@ protected function getMessageAttributes( /** * @param array $asyncApi - * - * @return array */ protected function addDefaults(array $asyncApi): array { @@ -468,8 +436,6 @@ protected function addDefaults(array $asyncApi): array /** * @param string $targetFile * @param array $asyncApi - * - * @return bool */ protected function writeToFile(string $targetFile, array $asyncApi): bool { @@ -488,8 +454,6 @@ protected function writeToFile(string $targetFile, array $asyncApi): bool /** * @param array $asyncApi - * - * @return array */ protected function orderAsyncApiElements(array $asyncApi): array { @@ -520,8 +484,6 @@ protected function orderAsyncApiElements(array $asyncApi): array /** * @param \Transfer\AsyncApiMessageTransfer $asyncApiMessageTransfer * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiMessageTransfer */ protected function formatProperty( AsyncApiMessageTransfer $asyncApiMessageTransfer, @@ -550,8 +512,6 @@ protected function formatProperty( /** * @param string $targetFile * @param array $asyncApi - * - * @return bool */ protected function updateAsyncApi(string $targetFile, array $asyncApi): bool { @@ -564,8 +524,6 @@ protected function updateAsyncApi(string $targetFile, array $asyncApi): bool /** * @param string $messageName * @param array $messages - * - * @return bool */ protected function messageNameExists(string $messageName, array $messages): bool { diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilderInterface.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilderInterface.php index 38d9c2ba..424076f1 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilderInterface.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiBuilderInterface.php @@ -14,15 +14,11 @@ interface AsyncApiBuilderInterface { /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer; /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer; } diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php index 4f9ed035..a23da463 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php @@ -58,8 +58,6 @@ public function __construct(AsyncApiConfig $config, MessageBuilderInterface $mes /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function build(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer { @@ -94,8 +92,6 @@ public function build(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncAp * @param \SprykerSdk\AsyncApi\AsyncApi\AsyncApiInterface $asyncApi * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer * @param string $projectNamespace - * - * @return \Transfer\AsyncApiResponseTransfer */ protected function buildCodeForPublishMessagesChannels( AsyncApiInterface $asyncApi, @@ -113,8 +109,6 @@ protected function buildCodeForPublishMessagesChannels( * @param \SprykerSdk\AsyncApi\AsyncApi\AsyncApiInterface $asyncApi * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer * @param string $projectNamespace - * - * @return \Transfer\AsyncApiResponseTransfer */ protected function buildCodeForSubscribeMessagesChannels( AsyncApiInterface $asyncApi, @@ -132,8 +126,6 @@ protected function buildCodeForSubscribeMessagesChannels( * @param \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface $asyncApiChannel * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer * @param string $projectNamespace - * - * @return \Transfer\AsyncApiResponseTransfer */ protected function buildCodeForPublishMessages( AsyncApiChannelInterface $asyncApiChannel, @@ -152,8 +144,6 @@ protected function buildCodeForPublishMessages( * @param \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface $asyncApiMessage * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer * @param string $projectNamespace - * - * @return \Transfer\AsyncApiResponseTransfer */ protected function runAddAsyncApiPublishMessage( AsyncApiChannelInterface $asyncApiChannel, @@ -186,8 +176,6 @@ protected function runAddAsyncApiPublishMessage( * @param \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface $asyncApiChannel * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer * @param string $projectNamespace - * - * @return \Transfer\AsyncApiResponseTransfer */ protected function buildCodeForSubscribeMessages( AsyncApiChannelInterface $asyncApiChannel, @@ -206,8 +194,6 @@ protected function buildCodeForSubscribeMessages( * @param \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface $asyncApiMessage * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer * @param string $projectNamespace - * - * @return \Transfer\AsyncApiResponseTransfer */ protected function runAddAsyncApiSubscribeMessage( AsyncApiChannelInterface $asyncApiChannel, @@ -239,8 +225,6 @@ protected function runAddAsyncApiSubscribeMessage( /** * @param \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface $asyncApiMessage * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer - * - * @return array */ protected function getMessagesProperties( AsyncApiMessageInterface $asyncApiMessage, @@ -268,8 +252,6 @@ protected function getMessagesProperties( * @param \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface $asyncApiMessage * * @throws \SprykerSdk\AsyncApi\Exception\InvalidConfigurationException - * - * @return string */ protected function getModuleNameForMessage(AsyncApiMessageInterface $asyncApiMessage): string { @@ -350,8 +332,6 @@ protected function recursiveAddTransferProperty( /** * @param string $type - * - * @return string */ protected function normalizeTransferType(string $type): string { @@ -376,8 +356,6 @@ protected function getSingularized(string $propertyName): ?string * @codeCoverageIgnore * * @param array $commandLine - * - * @return void */ protected function runCommandLine(array $commandLine): void { diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilderInterface.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilderInterface.php index 08ccbd92..2a33debd 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilderInterface.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilderInterface.php @@ -14,8 +14,6 @@ interface AsyncApiCodeBuilderInterface { /** * @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer - * - * @return \Transfer\AsyncApiResponseTransfer */ public function build(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer; } diff --git a/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php b/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php index 878e441e..a3e6c536 100644 --- a/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php @@ -47,9 +47,6 @@ public function __construct(?string $name = null, ?AsyncApiConfig $config = null parent::__construct($name); } - /** - * @return \SprykerSdk\AsyncApi\AsyncApiConfig - */ protected function getConfig(): AsyncApiConfig { if ($this->config === null) { @@ -61,17 +58,12 @@ protected function getConfig(): AsyncApiConfig /** * @param \SprykerSdk\AsyncApi\AsyncApiFacadeInterface $asyncApiFacade - * - * @return void */ public function setFacade(AsyncApiFacadeInterface $asyncApiFacade): void { $this->facade = $asyncApiFacade; } - /** - * @return \SprykerSdk\AsyncApi\AsyncApiFacadeInterface - */ protected function getFacade(): AsyncApiFacadeInterface { if ($this->facade === null) { @@ -84,8 +76,6 @@ protected function getFacade(): AsyncApiFacadeInterface /** * @param \Symfony\Component\Console\Output\OutputInterface $output * @param \ArrayObject $messageTransfers - * - * @return void */ protected function printMessages(OutputInterface $output, ArrayObject $messageTransfers): void { diff --git a/src/SprykerSdk/AsyncApi/Console/CodeGenerateConsole.php b/src/SprykerSdk/AsyncApi/Console/CodeGenerateConsole.php index 2217fda4..b7d0de64 100644 --- a/src/SprykerSdk/AsyncApi/Console/CodeGenerateConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/CodeGenerateConsole.php @@ -34,9 +34,6 @@ class CodeGenerateConsole extends AbstractConsole */ public const OPTION_ORGANIZATION_SHORT = 'o'; - /** - * @return void - */ protected function configure(): void { $this->setName('code:asyncapi:generate') @@ -48,8 +45,6 @@ protected function configure(): void /** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return int */ public function execute(InputInterface $input, OutputInterface $output): int { diff --git a/src/SprykerSdk/AsyncApi/Console/SchemaCreateConsole.php b/src/SprykerSdk/AsyncApi/Console/SchemaCreateConsole.php index e73d6758..4145b557 100644 --- a/src/SprykerSdk/AsyncApi/Console/SchemaCreateConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/SchemaCreateConsole.php @@ -36,9 +36,6 @@ class SchemaCreateConsole extends AbstractConsole */ public const OPTION_API_VERSION = 'api-version'; - /** - * @return void - */ protected function configure(): void { $this->setName('schema:asyncapi:create') @@ -51,8 +48,6 @@ protected function configure(): void /** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return int */ public function execute(InputInterface $input, OutputInterface $output): int { diff --git a/src/SprykerSdk/AsyncApi/Console/SchemaMessageAddConsole.php b/src/SprykerSdk/AsyncApi/Console/SchemaMessageAddConsole.php index 522904dc..e666b0ff 100644 --- a/src/SprykerSdk/AsyncApi/Console/SchemaMessageAddConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/SchemaMessageAddConsole.php @@ -94,9 +94,6 @@ class SchemaMessageAddConsole extends AbstractConsole */ public const VALUE_SUBSCRIBE = 'subscribe'; - /** - * @return void - */ protected function configure(): void { $this->setName('schema:asyncapi:message:add') @@ -116,8 +113,6 @@ protected function configure(): void * @param \Symfony\Component\Console\Output\OutputInterface $output * * @throws \SprykerSdk\AsyncApi\Exception\InvalidConfigurationException - * - * @return int */ public function execute(InputInterface $input, OutputInterface $output): int { diff --git a/src/SprykerSdk/AsyncApi/Console/SchemaValidateConsole.php b/src/SprykerSdk/AsyncApi/Console/SchemaValidateConsole.php index 963e2d12..9f095a24 100644 --- a/src/SprykerSdk/AsyncApi/Console/SchemaValidateConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/SchemaValidateConsole.php @@ -24,9 +24,6 @@ class SchemaValidateConsole extends AbstractConsole */ public const ASYNC_API_FILE_SHORT = 'a'; - /** - * @return void - */ protected function configure(): void { $this->setName('schema:asyncapi:validate') @@ -37,8 +34,6 @@ protected function configure(): void /** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return int */ public function execute(InputInterface $input, OutputInterface $output): int { diff --git a/src/SprykerSdk/AsyncApi/Message/AsyncApiError.php b/src/SprykerSdk/AsyncApi/Message/AsyncApiError.php index ae8435f2..5023fe67 100644 --- a/src/SprykerSdk/AsyncApi/Message/AsyncApiError.php +++ b/src/SprykerSdk/AsyncApi/Message/AsyncApiError.php @@ -21,8 +21,6 @@ class AsyncApiError extends AbstractAsyncApiMessage /** * @param string $path - * - * @return string */ public static function couldNotGenerateCodeFromAsyncApi(string $path): string { @@ -37,8 +35,6 @@ public static function couldNotGenerateCodeFromAsyncApi(string $path): string /** * @param string $path - * - * @return string */ public static function asyncApiDoesNotDefineChannels(string $path): string { @@ -53,8 +49,6 @@ public static function asyncApiDoesNotDefineChannels(string $path): string /** * @param string $path - * - * @return string */ public static function asyncApiDoesNotDefineMessages(string $path): string { @@ -70,8 +64,6 @@ public static function asyncApiDoesNotDefineMessages(string $path): string /** * @param string $messageName * @param string $path - * - * @return string */ public static function messageDoesNotHaveAModuleName(string $messageName, string $path): string { @@ -88,8 +80,6 @@ public static function messageDoesNotHaveAModuleName(string $messageName, string /** * @param string $messageName * @param string $path - * - * @return string */ public static function messageNameUsedMoreThanOnce(string $messageName, string $path): string { @@ -105,8 +95,6 @@ public static function messageNameUsedMoreThanOnce(string $messageName, string $ /** * @param string $path - * - * @return string */ public static function asyncApiFileDoesNotExist(string $path): string { @@ -122,8 +110,6 @@ public static function asyncApiFileDoesNotExist(string $path): string /** * @param string $path * @param string $message - * - * @return string */ public static function couldNotParseAsyncApiFile(string $path, string $message): string { @@ -141,8 +127,6 @@ public static function couldNotParseAsyncApiFile(string $path, string $message): * @param string $messageTypeOption * @param array $availableValues * @param string $path - * - * @return string */ public static function messageTypeHasWrongValue( string $messageTypeOption, @@ -162,8 +146,6 @@ public static function messageTypeHasWrongValue( /** * @param string $messageName - * - * @return string */ public static function couldNotFindAnSprykerExtension( string $messageName @@ -178,8 +160,6 @@ public static function couldNotFindAnSprykerExtension( /** * @param string $messageName - * - * @return string */ public static function couldNotFindAModulePropertyInTheSprykerExtension( string $messageName @@ -194,8 +174,6 @@ public static function couldNotFindAModulePropertyInTheSprykerExtension( /** * @param string $path - * - * @return string */ public static function asyncApiCliValidationFailed(string $path): string { @@ -213,8 +191,6 @@ public static function asyncApiCliValidationFailed(string $path): string * Error text will be in red, everything in double quotes will be yellow, and quotes will be removed. * * @param string $message - * - * @return string */ protected static function format(string $message): string { diff --git a/src/SprykerSdk/AsyncApi/Message/AsyncApiInfo.php b/src/SprykerSdk/AsyncApi/Message/AsyncApiInfo.php index 8a115668..83f04979 100644 --- a/src/SprykerSdk/AsyncApi/Message/AsyncApiInfo.php +++ b/src/SprykerSdk/AsyncApi/Message/AsyncApiInfo.php @@ -9,17 +9,11 @@ class AsyncApiInfo extends AbstractAsyncApiMessage { - /** - * @return string - */ public static function asyncApiSchemaFileIsValid(): string { return static::format('Async API file doesn\'t contain any errors.'); } - /** - * @return string - */ public static function generatedCodeFromAsyncApiSchema(): string { return static::format('Successfully generated code to work with asynchronous messages.'); @@ -27,8 +21,6 @@ public static function generatedCodeFromAsyncApiSchema(): string /** * @param string $fileName - * - * @return string */ public static function asyncApiFileCreated(string $fileName): string { @@ -37,8 +29,6 @@ public static function asyncApiFileCreated(string $fileName): string /** * @param string $fileName - * - * @return string */ public static function asyncApiFileUpdated(string $fileName): string { @@ -48,17 +38,12 @@ public static function asyncApiFileUpdated(string $fileName): string /** * @param string $messageName * @param string $channelName - * - * @return string */ public static function addedMessageToChannel(string $messageName, string $channelName): string { return static::format(sprintf('Successfully added the message "%s" to the channel "%s".', $messageName, $channelName)); } - /** - * @return string - */ public static function asyncApiCliNotFound(): string { return static::format( @@ -76,8 +61,6 @@ public static function asyncApiCliNotFound(): string * Info text will be in green, everything in double quotes will be yellow, and quotes will be removed. * * @param string $message - * - * @return string */ protected static function format(string $message): string { diff --git a/src/SprykerSdk/AsyncApi/Message/MessageBuilder.php b/src/SprykerSdk/AsyncApi/Message/MessageBuilder.php index 2f87f8fe..921df4f2 100644 --- a/src/SprykerSdk/AsyncApi/Message/MessageBuilder.php +++ b/src/SprykerSdk/AsyncApi/Message/MessageBuilder.php @@ -13,8 +13,6 @@ class MessageBuilder implements MessageBuilderInterface { /** * @param string $message - * - * @return \Transfer\MessageTransfer */ public function buildMessage(string $message): MessageTransfer { diff --git a/src/SprykerSdk/AsyncApi/Message/MessageBuilderInterface.php b/src/SprykerSdk/AsyncApi/Message/MessageBuilderInterface.php index d2c6303d..a0356c0e 100644 --- a/src/SprykerSdk/AsyncApi/Message/MessageBuilderInterface.php +++ b/src/SprykerSdk/AsyncApi/Message/MessageBuilderInterface.php @@ -13,8 +13,6 @@ interface MessageBuilderInterface { /** * @param string $message - * - * @return \Transfer\MessageTransfer */ public function buildMessage(string $message): MessageTransfer; } diff --git a/src/SprykerSdk/AsyncApi/Validator/AsyncApiValidator.php b/src/SprykerSdk/AsyncApi/Validator/AsyncApiValidator.php index 20644e5d..2f187d43 100644 --- a/src/SprykerSdk/AsyncApi/Validator/AsyncApiValidator.php +++ b/src/SprykerSdk/AsyncApi/Validator/AsyncApiValidator.php @@ -56,8 +56,6 @@ public function __construct(AsyncApiConfig $config, MessageBuilderInterface $mes /** * @param \Transfer\ValidateRequestTransfer $validateRequestTransfer * @param \Transfer\ValidateResponseTransfer|null $validateResponseTransfer - * - * @return \Transfer\ValidateResponseTransfer */ public function validate( ValidateRequestTransfer $validateRequestTransfer, @@ -100,8 +98,6 @@ public function validate( * @param string $fileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param array|null $context - * - * @return \Transfer\ValidateResponseTransfer */ protected function executeValidatorRules( array $fileData, diff --git a/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiChannelValidatorRule.php b/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiChannelValidatorRule.php index a3c341eb..c60a5c77 100644 --- a/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiChannelValidatorRule.php +++ b/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiChannelValidatorRule.php @@ -33,8 +33,6 @@ public function __construct(MessageBuilderInterface $messageBuilder) * @param string $asyncApiFileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param array|null $context - * - * @return \Transfer\ValidateResponseTransfer */ public function validate( array $asyncApi, @@ -49,8 +47,6 @@ public function validate( * @param array $asyncApi * @param string $asyncApiFileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer - * - * @return \Transfer\ValidateResponseTransfer */ protected function validateAtLeastOneChannelExists( array $asyncApi, diff --git a/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiMessageValidatorRule.php b/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiMessageValidatorRule.php index 519279f8..884b1574 100644 --- a/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiMessageValidatorRule.php +++ b/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiMessageValidatorRule.php @@ -33,8 +33,6 @@ public function __construct(MessageBuilderInterface $messageBuilder) * @param string $asyncApiFileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param array|null $context - * - * @return \Transfer\ValidateResponseTransfer */ public function validate( array $asyncApi, @@ -51,8 +49,6 @@ public function validate( * @param array $asyncApi * @param string $asyncApiFileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer - * - * @return \Transfer\ValidateResponseTransfer */ protected function validateAtLeastOneMessageExists( array $asyncApi, @@ -72,8 +68,6 @@ protected function validateAtLeastOneMessageExists( * @param array $asyncApi * @param string $asyncApiFileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer - * - * @return \Transfer\ValidateResponseTransfer */ protected function validateMessageNamesAreOnlyUsedOnce( array $asyncApi, diff --git a/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiModuleNameValidatorRule.php b/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiModuleNameValidatorRule.php index 96836232..133dd0e2 100644 --- a/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiModuleNameValidatorRule.php +++ b/src/SprykerSdk/AsyncApi/Validator/Rule/AsyncApiModuleNameValidatorRule.php @@ -31,8 +31,6 @@ public function __construct(MessageBuilderInterface $messageBuilder) * @param string $asyncApiFileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param array|null $context - * - * @return \Transfer\ValidateResponseTransfer */ public function validate( array $asyncApi, diff --git a/src/SprykerSdk/AsyncApi/Validator/Rule/ValidatorRuleInterface.php b/src/SprykerSdk/AsyncApi/Validator/Rule/ValidatorRuleInterface.php index 0289f5e5..92ffe3b6 100644 --- a/src/SprykerSdk/AsyncApi/Validator/Rule/ValidatorRuleInterface.php +++ b/src/SprykerSdk/AsyncApi/Validator/Rule/ValidatorRuleInterface.php @@ -16,8 +16,6 @@ interface ValidatorRuleInterface * @param string $fileName * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer * @param array|null $context - * - * @return \Transfer\ValidateResponseTransfer */ public function validate( array $data, diff --git a/src/SprykerSdk/AsyncApi/Validator/ValidatorInterface.php b/src/SprykerSdk/AsyncApi/Validator/ValidatorInterface.php index 08e94b40..a3a9485c 100644 --- a/src/SprykerSdk/AsyncApi/Validator/ValidatorInterface.php +++ b/src/SprykerSdk/AsyncApi/Validator/ValidatorInterface.php @@ -15,8 +15,6 @@ interface ValidatorInterface /** * @param \Transfer\ValidateRequestTransfer $validateRequestTransfer * @param \Transfer\ValidateResponseTransfer|null $validateResponseTransfer - * - * @return \Transfer\ValidateResponseTransfer */ public function validate( ValidateRequestTransfer $validateRequestTransfer, diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Cli/AsyncApiCliTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Cli/AsyncApiCliTest.php index 478838ac..a549e96a 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Cli/AsyncApiCliTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Cli/AsyncApiCliTest.php @@ -29,9 +29,6 @@ class AsyncApiCliTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testNoAsyncApiInstalledWhenIRunTheValidationThenISeeAMessageWithInstallInstructions(): void { // Arrange @@ -48,9 +45,6 @@ public function testNoAsyncApiInstalledWhenIRunTheValidationThenISeeAMessageWith $this->assertSame(AsyncApiInfo::asyncApiCliNotFound(), $validateResponseTransferMessages->offsetGet(0)->getMessage()); } - /** - * @return void - */ public function testAsyncApiIsInstalledWhenIRunTheValidationOnAnInvalidFileThenISeeAnErrorMessage(): void { // Arrange @@ -67,9 +61,6 @@ public function testAsyncApiIsInstalledWhenIRunTheValidationOnAnInvalidFileThenI $this->assertSame(AsyncApiError::asyncApiCliValidationFailed('somePath'), $validateResponseTransferErrors->offsetGet(0)->getMessage()); } - /** - * @return void - */ public function testNoAsyncApiInstalledWhenIRunTheValidationTriggerDeprecationWarning(): void { // Arrange @@ -83,9 +74,6 @@ public function testNoAsyncApiInstalledWhenIRunTheValidationTriggerDeprecationWa $asyncApiCliMock->validate((new ValidateResponseTransfer()), '/'); } - /** - * @return void - */ public function testAsyncApiIsInstalledWhenIRunTheValidationOnAnValidFileThenIDontSeeAnErrorMessage(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Loader/AsyncApiLoaderTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Loader/AsyncApiLoaderTest.php index 57c328b2..5b1968ff 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Loader/AsyncApiLoaderTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Loader/AsyncApiLoaderTest.php @@ -26,9 +26,6 @@ class AsyncApiLoaderTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testLoadResolvesReferencesToTransfersInPayload(): void { // Arrange @@ -51,9 +48,6 @@ public function testLoadResolvesReferencesToTransfersInPayload(): void $this->assertSame('string', $items->getAttribute('bar')->getAttribute('type')->getValue()); } - /** - * @return void - */ public function testLoadResolvesReferencesToRemoteReferencedFiles(): void { // Arrange @@ -77,9 +71,6 @@ public function testLoadResolvesReferencesToRemoteReferencedFiles(): void $this->assertSame('string', $headerProperties->getAttribute('tenantIdentifier')->getAttribute('type')->getValue()); } - /** - * @return void - */ public function testLoadDoesNotResolvesReferencesToRemoteReferencedWhenInvalidUrlIsGiven(): void { // Arrange @@ -100,9 +91,6 @@ public function testLoadDoesNotResolvesReferencesToRemoteReferencedWhenInvalidUr $this->assertNull($headerProperties); } - /** - * @return void - */ public function testLoadResolvesReferencesToRemoteReferencedFilesWithVariablePath(): void { // Arrange @@ -126,9 +114,6 @@ public function testLoadResolvesReferencesToRemoteReferencedFilesWithVariablePat $this->assertSame('string', $headerProperties->getAttribute('tenantIdentifier')->getAttribute('type')->getValue()); } - /** - * @return void - */ public function testLoadThrowsAnExceptionWhenAsyncApiFileCanNotBeLoadedFromRemotePath(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiErrorTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiErrorTest.php index fdeb761e..71c8b4fe 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiErrorTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiErrorTest.php @@ -17,9 +17,6 @@ class AsyncApiErrorTest extends Unit */ protected const TEST_PATH = 'test/path'; - /** - * @return void - */ public function testErrorMessageIsFormattedWhenOSIsNotWindows(): void { $class = new AsyncApiError(false); @@ -29,9 +26,6 @@ public function testErrorMessageIsFormattedWhenOSIsNotWindows(): void $this->assertStringContainsString('[', $message); } - /** - * @return void - */ public function testErrorMessageIsNotFormattedWhenOSIsWindows(): void { $class = new AsyncApiError(true); diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiInfoTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiInfoTest.php index 0216184b..6f0a7649 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiInfoTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApi/Message/AsyncApiInfoTest.php @@ -17,9 +17,6 @@ class AsyncApiInfoTest extends Unit */ protected const TEST_FILE_NAME = 'fileName'; - /** - * @return void - */ public function testInfoMessageIsFormattedWhenOSIsNotWindows(): void { $class = new AsyncApiInfo(false); @@ -29,9 +26,6 @@ public function testInfoMessageIsFormattedWhenOSIsNotWindows(): void $this->assertStringContainsString('[', $message); } - /** - * @return void - */ public function testInfoMessageIsNotFormattedWhenOSIsWindows(): void { $class = new AsyncApiInfo(true); diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApiConfigTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApiConfigTest.php index af668cc7..ed648932 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApiConfigTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApiConfigTest.php @@ -24,8 +24,6 @@ class AsyncApiConfigTest extends Unit /** * Tests that ensures we get the default executable path when installed the "normal" way. - * - * @return void */ public function testGetSprykRunExecutableReturnsDefaultExecutable(): void { @@ -42,8 +40,6 @@ public function testGetSprykRunExecutableReturnsDefaultExecutable(): void /** * Tests that ensures we get a path to where this SDK is installed. Usually only when used within the SprykerSDK. - * - * @return void */ public function testGetSprykRunExecutableReturnsExternalDefinedExecutable(): void { diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApiFacadeTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApiFacadeTest.php index 2173d9a0..d8e6ccce 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApiFacadeTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApiFacadeTest.php @@ -28,9 +28,6 @@ class AsyncApiFacadeTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testAddAsyncApiAddsANewAsyncApiFile(): void { // Arrange @@ -46,9 +43,6 @@ public function testAddAsyncApiAddsANewAsyncApiFile(): void $this->assertFileExists($asyncApiRequestTransfer->getTargetFile()); } - /** - * @return void - */ public function testAddAsyncApiUpdatesTheVersionOfAnExistingAsyncApiFile(): void { // Arrange @@ -65,9 +59,6 @@ public function testAddAsyncApiUpdatesTheVersionOfAnExistingAsyncApiFile(): void $this->tester->assertAsyncApiVersionIsUpdated($asyncApiRequestTransfer->getTargetFile(), '1.0.0'); } - /** - * @return void - */ public function testAddAsyncApiMessageReturnsFailedResponseWhenAsyncApiFileDoesNotExists(): void { // Arrange @@ -84,9 +75,6 @@ public function testAddAsyncApiMessageReturnsFailedResponseWhenAsyncApiFileDoesN $this->assertSame(AsyncApiError::asyncApiFileDoesNotExist('not existing file'), $asyncApiResponseTransfer->getErrors()[0]->getMessage()); } - /** - * @return void - */ public function testAddAsyncApiMessageFromTransferObjectAddsAPublishMessageToTheAsyncApiFile(): void { // Arrange @@ -104,9 +92,6 @@ public function testAddAsyncApiMessageFromTransferObjectAddsAPublishMessageToThe $this->tester->assertAsyncApiHasPublishMessageInChannel($asyncApiRequestTransfer->getTargetFile(), 'AsyncApiMessage', $asyncApiMessageTransfer->getChannel()->getName()); } - /** - * @return void - */ public function testAddAsyncApiMessageFromTransferObjectAddsASubscribeMessageToTheAsyncApiFile(): void { // Arrange @@ -124,9 +109,6 @@ public function testAddAsyncApiMessageFromTransferObjectAddsASubscribeMessageToT $this->tester->assertAsyncApiHasSubscribeMessageInChannel($asyncApiRequestTransfer->getTargetFile(), 'AsyncApiMessage', $asyncApiMessageTransfer->getChannel()->getName()); } - /** - * @return void - */ public function testAddAsyncApiMessageFromTransferObjectAddsAnAdditionalPublishMessageWhenChannelHasAlreadyAMessage(): void { // Arrange @@ -148,9 +130,6 @@ public function testAddAsyncApiMessageFromTransferObjectAddsAnAdditionalPublishM $this->tester->assertAsyncApiHasPublishMessageInChannel($asyncApiRequestTransfer->getTargetFile(), 'AdditionalMessage', $asyncApiMessageTransfer->getChannel()->getName()); } - /** - * @return void - */ public function testAddAsyncApiMessageFromTransferObjectAddsAnAdditionalPublishMessageWhenChannelHasAlreadyMessages(): void { // Arrange @@ -179,9 +158,6 @@ public function testAddAsyncApiMessageFromTransferObjectAddsAnAdditionalPublishM $this->tester->assertAsyncApiHasPublishMessageInChannel($asyncApiRequestTransfer->getTargetFile(), 'AsyncApiBuilderTest3', $asyncApiMessageTransfer->getChannel()->getName()); } - /** - * @return void - */ public function testAddAsyncApiMessageAddsMessageWithDefinedProperties(): void { // Arrange @@ -201,9 +177,6 @@ public function testAddAsyncApiMessageAddsMessageWithDefinedProperties(): void $this->tester->assertMessageInChannelHasProperty($asyncApiRequestTransfer->getTargetFile(), $asyncApiMessageTransfer->getChannel()->getName(), 'publish', $asyncApiMessageTransfer->getName(), ['phoneNumber', 'int', true]); } - /** - * @return void - */ public function testAddAsyncApiThrowsExceptionWhenTransferObjectAndPropertiesGivenInAsyncApiRequest(): void { // Arrange @@ -221,9 +194,6 @@ public function testAddAsyncApiThrowsExceptionWhenTransferObjectAndPropertiesGiv ); } - /** - * @return void - */ public function testAddAsyncApiThrowsExceptionWhenNeitherTransferObjectOrPropertiesGivenInAsyncApiRequest(): void { // Arrange @@ -242,9 +212,6 @@ public function testAddAsyncApiThrowsExceptionWhenNeitherTransferObjectOrPropert ); } - /** - * @return void - */ public function testAddAsyncApiThrowsExceptionWhenOperationIdIsMissionInAsyncApiRequest(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApiFactoryTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApiFactoryTest.php index 65b5a951..cee44a19 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApiFactoryTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApiFactoryTest.php @@ -23,9 +23,6 @@ class AsyncApiFactoryTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testCreateAsyncApiCodeBuilder(): void { // Act diff --git a/tests/SprykerSdkTest/AsyncApi/AsyncApiValidatorFacadeTest.php b/tests/SprykerSdkTest/AsyncApi/AsyncApiValidatorFacadeTest.php index 885695b5..aa026f9f 100644 --- a/tests/SprykerSdkTest/AsyncApi/AsyncApiValidatorFacadeTest.php +++ b/tests/SprykerSdkTest/AsyncApi/AsyncApiValidatorFacadeTest.php @@ -23,9 +23,6 @@ class AsyncApiValidatorFacadeTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testValidateAsyncApiReturnsFailedResponseWhenFileNotFound(): void { // Act @@ -38,9 +35,6 @@ public function testValidateAsyncApiReturnsFailedResponseWhenFileNotFound(): voi $this->assertEquals(AsyncApiError::asyncApiFileDoesNotExist('vfs://root/resources/api/asyncapi.yml'), $expectedErrorMessage->getMessage(), 'Async API file "vfs://root/resources/api/asyncapi.yml" not found'); } - /** - * @return void - */ public function testValidateAsyncApiReturnsFailedResponseWhenFileHasSyntaxError(): void { // Arrange @@ -66,9 +60,6 @@ public function testValidateAsyncApiReturnsFailedResponseWhenFileHasSyntaxError( ); } - /** - * @return void - */ public function testValidateAsyncApiReturnsFailedResponseWhenFileDoNotContainMessages(): void { // Arrange @@ -88,9 +79,6 @@ public function testValidateAsyncApiReturnsFailedResponseWhenFileDoNotContainMes ); } - /** - * @return void - */ public function testValidateAsyncApiReturnsFailedResponseWhenFileExistsButARequiredFieldIsMissing(): void { // Arrange @@ -110,9 +98,6 @@ public function testValidateAsyncApiReturnsFailedResponseWhenFileExistsButARequi ); } - /** - * @return void - */ public function testValidateAsyncApiReturnsFailedResponseWhenMessageNameIsUsedMoreThanOnce(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/Console/CodeGenerateConsoleTest.php b/tests/SprykerSdkTest/AsyncApi/Console/CodeGenerateConsoleTest.php index b6360058..518aed9a 100644 --- a/tests/SprykerSdkTest/AsyncApi/Console/CodeGenerateConsoleTest.php +++ b/tests/SprykerSdkTest/AsyncApi/Console/CodeGenerateConsoleTest.php @@ -27,9 +27,6 @@ class CodeGenerateConsoleTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testBuildFromAsyncApiReturnsSuccessCodeWhenProcessIsDone(): void { // Arrange @@ -47,9 +44,6 @@ public function testBuildFromAsyncApiReturnsSuccessCodeWhenProcessIsDone(): void $this->assertSame(AbstractConsole::CODE_SUCCESS, $commandTester->getStatusCode()); } - /** - * @return void - */ public function testBuildFromAsyncApiRendersReferencedTransferProperties(): void { // Arrange @@ -70,9 +64,6 @@ public function testBuildFromAsyncApiRendersReferencedTransferProperties(): void // $this->assertStringContainsString(AsyncApiInfo::addedPropertyWithTypeTo('bar', 'string', 'Message', 'ModuleName'), $commandTester->getDisplay()); } - /** - * @return void - */ public function testBuildFromAsyncApiPrintsResultToConsoleInVerboseMode(): void { // Arrange @@ -91,9 +82,6 @@ public function testBuildFromAsyncApiPrintsResultToConsoleInVerboseMode(): void // $this->assertStringContainsString(AsyncApiInfo::addedMessageHandlerPluginForMessageTo('IncomingMessage', 'Module'), $commandTester->getDisplay()); } - /** - * @return void - */ public function testBuildFromAsyncApiReturnsErrorCodeWhenAnErrorOccurred(): void { // Arrange @@ -110,9 +98,6 @@ public function testBuildFromAsyncApiReturnsErrorCodeWhenAnErrorOccurred(): void $this->assertSame(AbstractConsole::CODE_ERROR, $commandTester->getStatusCode()); } - /** - * @return void - */ public function testBuildFromAsyncApiReturnsErrorCodeWhenAnErrorOccurredAndPrintsResultToConsoleInVerboseMode(): void { // Arrange @@ -133,9 +118,6 @@ public function testBuildFromAsyncApiReturnsErrorCodeWhenAnErrorOccurredAndPrint ); } - /** - * @return void - */ public function testBuildFromAsyncApiWithoutAnSprykerExtensionThrowsAnException(): void { // Arrange @@ -152,9 +134,6 @@ public function testBuildFromAsyncApiWithoutAnSprykerExtensionThrowsAnException( ], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); } - /** - * @return void - */ public function testBuildFromAsyncApiWithoutAModuleInTheSprykerExtensionThrowsAnException(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/Console/SchemaCreateConsoleTest.php b/tests/SprykerSdkTest/AsyncApi/Console/SchemaCreateConsoleTest.php index 04a87589..b22bc969 100644 --- a/tests/SprykerSdkTest/AsyncApi/Console/SchemaCreateConsoleTest.php +++ b/tests/SprykerSdkTest/AsyncApi/Console/SchemaCreateConsoleTest.php @@ -26,9 +26,6 @@ class SchemaCreateConsoleTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testAsyncApiCreateConsole(): void { $schemaCreateConsole = new SchemaCreateConsole(null, $this->tester->getConfig()); diff --git a/tests/SprykerSdkTest/AsyncApi/Console/SchemaMessageAddConsoleTest.php b/tests/SprykerSdkTest/AsyncApi/Console/SchemaMessageAddConsoleTest.php index 6c9d0fdd..277903a9 100644 --- a/tests/SprykerSdkTest/AsyncApi/Console/SchemaMessageAddConsoleTest.php +++ b/tests/SprykerSdkTest/AsyncApi/Console/SchemaMessageAddConsoleTest.php @@ -30,9 +30,6 @@ class SchemaMessageAddConsoleTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testAddMessageReturnsSuccessCodeWhenMessageWasAdded(): void { // Arrange @@ -53,9 +50,6 @@ public function testAddMessageReturnsSuccessCodeWhenMessageWasAdded(): void $this->assertSame(AbstractConsole::CODE_SUCCESS, $commandTester->getStatusCode()); } - /** - * @return void - */ public function testAddMessageReturnsErrorCodeAndPrintsErrorMessagesWhenMessageCouldNotBeAddedWhenAsyncApiDoesNotExists(): void { $commandTester = $this->tester->getConsoleTester(SchemaMessageAddConsole::class, false); @@ -76,9 +70,6 @@ public function testAddMessageReturnsErrorCodeAndPrintsErrorMessagesWhenMessageC $this->assertNotEmpty($commandTester->getDisplay()); } - /** - * @return void - */ public function testAddMessageReturnsErrorCodeAndPrintsErrorMessagesWhenMessageTypeIsNotPublishAndNotSubscribe(): void { $commandTester = $this->tester->getConsoleTester(SchemaMessageAddConsole::class, false); @@ -106,8 +97,6 @@ public function testAddMessageReturnsErrorCodeAndPrintsErrorMessagesWhenMessageT /** * This test ensures that a message can only be added once per channel. * The given API file already has the message that should be added and thus adding it again will be skipped. - * - * @return void */ public function testAddMessageOnlyWhenMessageNameDoesNotExistInChannel(): void { @@ -140,8 +129,6 @@ public function testAddMessageOnlyWhenMessageNameDoesNotExistInChannel(): void * if ($this->messageNameExists($messageName, $messages) === true) { * return $asyncApi; * } - * - * @return void */ public function testAddExistingMessageToChannelWithOneMessageDoesNotCreateOneOfArray(): void { diff --git a/tests/SprykerSdkTest/AsyncApi/Console/SchemaValidateConsoleTest.php b/tests/SprykerSdkTest/AsyncApi/Console/SchemaValidateConsoleTest.php index 87efeb3c..4395988f 100644 --- a/tests/SprykerSdkTest/AsyncApi/Console/SchemaValidateConsoleTest.php +++ b/tests/SprykerSdkTest/AsyncApi/Console/SchemaValidateConsoleTest.php @@ -26,9 +26,6 @@ class SchemaValidateConsoleTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testValidateAsyncApiReturnsSuccessCodeWhenValidationIsSuccessful(): void { // Arrange @@ -41,9 +38,6 @@ public function testValidateAsyncApiReturnsSuccessCodeWhenValidationIsSuccessful $this->assertSame(AbstractConsole::CODE_SUCCESS, $commandTester->getStatusCode()); } - /** - * @return void - */ public function testValidateAsyncApiReturnsErrorCodeAndPrintsErrorMessagesWhenValidationFailed(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/Parser/AsyncApiTest.php b/tests/SprykerSdkTest/AsyncApi/Parser/AsyncApiTest.php index bf36d160..c07fa0b2 100644 --- a/tests/SprykerSdkTest/AsyncApi/Parser/AsyncApiTest.php +++ b/tests/SprykerSdkTest/AsyncApi/Parser/AsyncApiTest.php @@ -20,9 +20,6 @@ */ class AsyncApiTest extends Unit { - /** - * @return void - */ public function testLoadReturnsAsyncApiWithManyReferences(): void { // Arrange @@ -35,9 +32,6 @@ public function testLoadReturnsAsyncApiWithManyReferences(): void $this->assertInstanceOf(AsyncApiInterface::class, $asyncApi); } - /** - * @return void - */ public function testLoadReturnsAsyncApiWithSingleReference(): void { // Arrange @@ -50,9 +44,6 @@ public function testLoadReturnsAsyncApiWithSingleReference(): void $this->assertInstanceOf(AsyncApiInterface::class, $asyncApi); } - /** - * @return void - */ public function testLoadReturnsAsyncApi(): void { // Arrange @@ -65,9 +56,6 @@ public function testLoadReturnsAsyncApi(): void $this->assertInstanceOf(AsyncApiInterface::class, $asyncApi); } - /** - * @return void - */ public function testGetChannelsReturnsIterable(): void { // Arrange @@ -83,9 +71,6 @@ public function testGetChannelsReturnsIterable(): void } } - /** - * @return void - */ public function testGetChannelByNameReturnsChannel(): void { // Arrange @@ -101,9 +86,6 @@ public function testGetChannelByNameReturnsChannel(): void $this->assertInstanceOf(AsyncApiChannelInterface::class, $channel); } - /** - * @return void - */ public function testGetPublishMessageByNameFromChannelReturnsMessage(): void { // Arrange @@ -120,9 +102,6 @@ public function testGetPublishMessageByNameFromChannelReturnsMessage(): void $this->assertInstanceOf(AsyncApiMessageInterface::class, $publishMessage); } - /** - * @return void - */ public function testGetSubscribeMessageByNameFromChannelReturnsMessage(): void { // Arrange @@ -139,9 +118,6 @@ public function testGetSubscribeMessageByNameFromChannelReturnsMessage(): void $this->assertInstanceOf(AsyncApiMessageInterface::class, $subscribeMessage); } - /** - * @return void - */ public function testGetPublishMessagesFromChannelReturnsIterable(): void { // Arrange @@ -159,9 +135,6 @@ public function testGetPublishMessagesFromChannelReturnsIterable(): void } } - /** - * @return void - */ public function testGetSubscribeMessagesFromChannelReturnsIterable(): void { // Arrange @@ -179,9 +152,6 @@ public function testGetSubscribeMessagesFromChannelReturnsIterable(): void } } - /** - * @return void - */ public function testGetAttributesFromSubscribeMessagesReturnsIterable(): void { // Arrange @@ -199,9 +169,6 @@ public function testGetAttributesFromSubscribeMessagesReturnsIterable(): void } } - /** - * @return void - */ public function testGetAttributeFromSubscribeMessagesReturnsIterable(): void { // Arrange @@ -219,9 +186,6 @@ public function testGetAttributeFromSubscribeMessagesReturnsIterable(): void $this->assertSame('OutgoingMessage', $attribute->getValue()); } - /** - * @return void - */ public function testLoadDefinitionFromAnInvalidFileDoesNotThrowAnException(): void { // Arrange diff --git a/tests/SprykerSdkTest/AsyncApi/Validator/AsyncApiValidatorTest.php b/tests/SprykerSdkTest/AsyncApi/Validator/AsyncApiValidatorTest.php index b061c99f..c237f0ee 100644 --- a/tests/SprykerSdkTest/AsyncApi/Validator/AsyncApiValidatorTest.php +++ b/tests/SprykerSdkTest/AsyncApi/Validator/AsyncApiValidatorTest.php @@ -27,9 +27,6 @@ class AsyncApiValidatorTest extends Unit */ protected AsyncApiTester $tester; - /** - * @return void - */ public function testValidateAsyncApiReturnsErrorMessageWhenNoChannelsDefined(): void { // Arrange diff --git a/tests/_support/AsyncApiTester.php b/tests/_support/AsyncApiTester.php index 78f00493..3b635354 100644 --- a/tests/_support/AsyncApiTester.php +++ b/tests/_support/AsyncApiTester.php @@ -36,9 +36,6 @@ class AsyncApiTester extends Actor */ protected ?AsyncApiFacadeInterface $asyncApiFacade = null; - /** - * @return \SprykerSdk\AsyncApi\AsyncApiFacadeInterface - */ public function getFacade(): AsyncApiFacadeInterface { if (!$this->asyncApiFacade) { diff --git a/tests/_support/Helper/AsyncApiHelper.php b/tests/_support/Helper/AsyncApiHelper.php index b060cd1e..11c3d549 100644 --- a/tests/_support/Helper/AsyncApiHelper.php +++ b/tests/_support/Helper/AsyncApiHelper.php @@ -36,8 +36,6 @@ class AsyncApiHelper extends Module /** * @param \Codeception\TestInterface $test - * - * @return void */ public function _before(TestInterface $test): void { @@ -49,25 +47,17 @@ public function _before(TestInterface $test): void /** * @param \Codeception\TestInterface $test - * - * @return void */ public function _after(TestInterface $test): void { $this->rootPath = null; } - /** - * @return \SprykerSdk\AsyncApi\AsyncApiFacadeInterface - */ public function getFacade(): AsyncApiFacadeInterface { return new AsyncApiFacade(); } - /** - * @return \SprykerSdk\AsyncApi\AsyncApiConfig - */ public function getConfig(): AsyncApiConfig { if ($this->rootPath === null) { // This will always be set, check if a test fails as it expects the normal filesystem @@ -81,9 +71,6 @@ public function getConfig(): AsyncApiConfig ]); } - /** - * @return string - */ public function getRootPath(): string { return $this->rootPath; @@ -93,8 +80,6 @@ public function getRootPath(): string * This will ensure that the AopSdkConfig::getProjectRootPath() will return the passed path. * * @param string $rootPath - * - * @return void */ public function mockRoot(string $rootPath): void { @@ -105,8 +90,6 @@ public function mockRoot(string $rootPath): void * Sets up an expected directory structure in the virtual filesystem * * @param array $structure - * - * @return void */ public function mockDirectoryStructure(array $structure): void { @@ -120,9 +103,6 @@ public function mockDirectoryStructure(array $structure): void */ public const CHANNEL_NAME = 'foo/bar'; - /** - * @return \Transfer\AsyncApiRequestTransfer - */ public function haveAsyncApiAddRequest(): AsyncApiRequestTransfer { $asyncApiTransfer = new AsyncApiTransfer(); @@ -141,8 +121,6 @@ public function haveAsyncApiAddRequest(): AsyncApiRequestTransfer /** * We assume that an AsyncApi file with version 0.1.0 exists when `\SprykerSdkTest\Helper\AsyncApiHelper::haveAsyncApiFile()` * was called before `\SprykerSdk\Zed\AopSdk\Business\AopSdkFacadeInterface::addAsyncApi()` is executed. - * - * @return \Transfer\AsyncApiRequestTransfer */ public function haveAsyncApiUpdateVersionRequest(): AsyncApiRequestTransfer { @@ -159,9 +137,6 @@ public function haveAsyncApiUpdateVersionRequest(): AsyncApiRequestTransfer return $asyncApiRequestTransfer; } - /** - * @return \Transfer\AsyncApiRequestTransfer - */ public function haveAsyncApiAddRequestWithExistingAsyncApi(): AsyncApiRequestTransfer { $this->haveAsyncApiFile(); @@ -179,9 +154,6 @@ public function haveAsyncApiAddRequestWithExistingAsyncApi(): AsyncApiRequestTra return $asyncApiRequestTransfer; } - /** - * @return \Transfer\AsyncApiRequestTransfer - */ public function haveAsyncApiAddRequestWithExistingAsyncApiAndPayloadTransferObject(): AsyncApiRequestTransfer { $asyncApiRequestTransfer = $this->haveAsyncApiAddRequestWithExistingAsyncApi(); @@ -196,8 +168,6 @@ public function haveAsyncApiAddRequestWithExistingAsyncApiAndPayloadTransferObje * This simulates a CLI command execution where properties are set in the AsyncApiRequestTransfer. * * @param array|null $properties - * - * @return \Transfer\AsyncApiRequestTransfer */ public function haveAsyncApiAddRequestWithExistingAsyncApiAndProperties(?array $properties = null): AsyncApiRequestTransfer { @@ -211,8 +181,6 @@ public function haveAsyncApiAddRequestWithExistingAsyncApiAndProperties(?array $ /** * return void - * - * @return void */ public function haveAsyncApiFile(): void { @@ -221,8 +189,6 @@ public function haveAsyncApiFile(): void /** * @param string $pathToAsyncApi - * - * @return void */ protected function prepareAsyncApiFile(string $pathToAsyncApi): void { @@ -237,8 +203,6 @@ protected function prepareAsyncApiFile(string $pathToAsyncApi): void /** * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer - * - * @return array */ public function getMessagesFromAsyncApiResponseTransfer(AsyncApiResponseTransfer $asyncApiResponseTransfer): array { @@ -255,8 +219,6 @@ public function getMessagesFromAsyncApiResponseTransfer(AsyncApiResponseTransfer * @param string $targetFile * @param string $messageName * @param string $channelName - * - * @return void */ public function assertAsyncApiHasPublishMessageInChannel(string $targetFile, string $messageName, string $channelName): void { @@ -270,8 +232,6 @@ public function assertAsyncApiHasPublishMessageInChannel(string $targetFile, str * @param string $targetFile * @param string $messageName * @param string $channelName - * - * @return void */ public function assertAsyncApiHasSubscribeMessageInChannel(string $targetFile, string $messageName, string $channelName): void { @@ -284,8 +244,6 @@ public function assertAsyncApiHasSubscribeMessageInChannel(string $targetFile, s /** * @param string $targetFile * @param string $expectedVersion - * - * @return void */ public function assertAsyncApiVersionIsUpdated(string $targetFile, string $expectedVersion): void { @@ -300,8 +258,6 @@ public function assertAsyncApiVersionIsUpdated(string $targetFile, string $expec * @param string $messageName * @param string $channelName * @param string $channelType - * - * @return void */ protected function assertMessageInChannelType(array $asyncApi, string $messageName, string $channelName, string $channelType): void { @@ -322,8 +278,6 @@ protected function assertMessageInChannelType(array $asyncApi, string $messageNa * @param string $messageName * @param string $channelName * @param string $channelType - * - * @return string|null */ protected function getExpectedMessageReference(array $asyncApi, string $messageName, string $channelName, string $channelType): ?string { @@ -347,8 +301,6 @@ protected function getExpectedMessageReference(array $asyncApi, string $messageN /** * @param array $messages * @param string $expectedMessageReference - * - * @return string|null */ protected function getExpectedMessageReferenceFromOneOf(array $messages, string $expectedMessageReference): ?string { @@ -365,8 +317,6 @@ protected function getExpectedMessageReferenceFromOneOf(array $messages, string * @param array $asyncApi * @param string $channelName * @param string $channelType - * - * @return void */ protected function assertChannelType(array $asyncApi, string $channelName, string $channelType): void { @@ -389,8 +339,6 @@ protected function assertChannelType(array $asyncApi, string $channelName, strin /** * @param \Transfer\AsyncApiResponseTransfer $asyncApiResponseTransfer - * - * @return void */ public function assertAsyncApiResponseHasNoErrors(AsyncApiResponseTransfer $asyncApiResponseTransfer): void { @@ -402,8 +350,6 @@ public function assertAsyncApiResponseHasNoErrors(AsyncApiResponseTransfer $asyn /** * @param string|null $messageName When $messageName is passed the message will not have a PayloadTransferObjectName. - * - * @return \Transfer\AsyncApiMessageTransfer */ public function havePublishMessageWithMetadata(?string $messageName = null): AsyncApiMessageTransfer { @@ -412,8 +358,6 @@ public function havePublishMessageWithMetadata(?string $messageName = null): Asy /** * @param string|null $messageName When $messageName is passed the message will not have a PayloadTransferObjectName. - * - * @return \Transfer\AsyncApiMessageTransfer */ public function haveSubscribeMessageWithMetadata(?string $messageName = null): AsyncApiMessageTransfer { @@ -424,8 +368,6 @@ public function haveSubscribeMessageWithMetadata(?string $messageName = null): A * @param bool $withMetadata * @param string $channelType * @param string|null $messageName - * - * @return \Transfer\AsyncApiMessageTransfer */ protected function createMessage(bool $withMetadata, string $channelType, ?string $messageName = null): AsyncApiMessageTransfer { @@ -457,9 +399,6 @@ protected function createMessage(bool $withMetadata, string $channelType, ?strin return $asyncApiMessageTransfer; } - /** - * @return \SprykerSdk\AsyncApi\Console\CodeGenerateConsole - */ public function getAsyncApiBuilderConsoleMock(): CodeGenerateConsole { $asyncApiCodeBuilderStub = Stub::construct( @@ -492,8 +431,6 @@ public function getAsyncApiBuilderConsoleMock(): CodeGenerateConsole * @param string $channelType * @param string $messageName * @param array $property - * - * @return void */ public function assertMessageInChannelHasProperty(string $targetFile, string $channelName, string $channelType, string $messageName, array $property): void { @@ -528,8 +465,6 @@ public function assertMessageInChannelHasProperty(string $targetFile, string $ch * @param string $channelName * @param string $channelType * @param string $messageName - * - * @return void */ public function assertMessageInChannelHasAModuleName(string $targetFile, string $channelName, string $channelType, string $messageName): void { @@ -553,8 +488,6 @@ public function assertMessageInChannelHasAModuleName(string $targetFile, string * @param string $messageName * @param string $channelName * @param string $channelType - * - * @return void */ public function assertMessageExistsOnlyOnceInChannel(array $asyncApi, string $messageName, string $channelName, string $channelType): void { diff --git a/tests/_support/Helper/AsyncApiHelperTrait.php b/tests/_support/Helper/AsyncApiHelperTrait.php index 7342b5f1..b601cc36 100644 --- a/tests/_support/Helper/AsyncApiHelperTrait.php +++ b/tests/_support/Helper/AsyncApiHelperTrait.php @@ -11,9 +11,6 @@ trait AsyncApiHelperTrait { - /** - * @return \SprykerSdkTest\Helper\AsyncApiHelper - */ protected function getAsyncApiHelper(): AsyncApiHelper { /** @var \SprykerSdkTest\Helper\AsyncApiHelper $asyncApiHelper */ @@ -24,8 +21,6 @@ protected function getAsyncApiHelper(): AsyncApiHelper /** * @param string $name - * - * @return \Codeception\Module */ abstract protected function getModule(string $name): Module; } diff --git a/tests/_support/Helper/AsyncApiValidatorHelper.php b/tests/_support/Helper/AsyncApiValidatorHelper.php index 191b6033..543a50fa 100644 --- a/tests/_support/Helper/AsyncApiValidatorHelper.php +++ b/tests/_support/Helper/AsyncApiValidatorHelper.php @@ -18,9 +18,6 @@ class AsyncApiValidatorHelper extends Module */ protected const ASYNC_API_FILE_NAME = 'asyncapi.yml'; - /** - * @return void - */ public function haveValidAsyncApiFile(): void { $files = [ @@ -30,9 +27,6 @@ public function haveValidAsyncApiFile(): void $this->prepareAsyncApiSchema($files); } - /** - * @return void - */ public function haveDefaultCreatedAsyncApiFile(): void { $files = [ @@ -42,9 +36,6 @@ public function haveDefaultCreatedAsyncApiFile(): void $this->prepareAsyncApiSchema($files); } - /** - * @return void - */ public function haveAsyncApiFileSyntaxError(): void { $files = [ @@ -54,9 +45,6 @@ public function haveAsyncApiFileSyntaxError(): void $this->prepareAsyncApiSchema($files); } - /** - * @return void - */ public function haveAsyncApiFileWithMissingRequiredFields(): void { $files = [ @@ -66,9 +54,6 @@ public function haveAsyncApiFileWithMissingRequiredFields(): void $this->prepareAsyncApiSchema($files); } - /** - * @return void - */ public function haveAsyncApiFileWithDuplicatedMessageNames(): void { $files = [ @@ -80,8 +65,6 @@ public function haveAsyncApiFileWithDuplicatedMessageNames(): void /** * @param array $files - * - * @return void */ protected function prepareAsyncApiSchema(array $files): void { @@ -90,9 +73,6 @@ protected function prepareAsyncApiSchema(array $files): void ); } - /** - * @return string - */ protected function getOpenApiSchemaPath(): string { return 'resources/api'; @@ -101,8 +81,6 @@ protected function getOpenApiSchemaPath(): string /** * @param string $path * @param array $files - * - * @return array */ protected function buildStructureByPath(string $path, array $files): array { @@ -119,9 +97,6 @@ protected function buildStructureByPath(string $path, array $files): array return $structure; } - /** - * @return string - */ public function getDefaultAsyncApiFilePath(): string { return sprintf( diff --git a/tests/_support/Helper/CommandHelper.php b/tests/_support/Helper/CommandHelper.php index fd0ca815..aa659343 100644 --- a/tests/_support/Helper/CommandHelper.php +++ b/tests/_support/Helper/CommandHelper.php @@ -18,8 +18,6 @@ class CommandHelper extends Module /** * @param \SprykerSdk\AsyncApi\Console\AbstractConsole|string $command - * - * @return \Symfony\Component\Console\Tester\CommandTester */ public function getConsoleTester($command): CommandTester { diff --git a/tests/_support/Helper/ValidatorHelper.php b/tests/_support/Helper/ValidatorHelper.php index fdba5feb..c50bf217 100644 --- a/tests/_support/Helper/ValidatorHelper.php +++ b/tests/_support/Helper/ValidatorHelper.php @@ -15,9 +15,6 @@ class ValidatorHelper extends Module { use AsyncApiHelperTrait; - /** - * @return void - */ public function haveValidConfigurations(): void { $structure = $this->getValidBaseStructure(); @@ -39,9 +36,6 @@ protected function getValidBaseStructure(): array ]; } - /** - * @return \Transfer\ValidateRequestTransfer - */ public function haveValidateRequest(): ValidateRequestTransfer { $config = $this->getAsyncApiHelper()->getConfig(); @@ -54,8 +48,6 @@ public function haveValidateRequest(): ValidateRequestTransfer /** * @param \Transfer\ValidateResponseTransfer $validateResponseTransfer - * - * @return array */ public function getMessagesFromValidateResponseTransfer(ValidateResponseTransfer $validateResponseTransfer): array {