Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
php-version: [
'8.3'
'8.5'
]
steps:
- uses: actions/checkout@v7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ public function __construct(string $name, AsyncApiMessageCollectionInterface $pu
$this->subscribeMessages = $subscribeMessages;
}

/**
* @return string
*/
public function getName(): string
{
return $this->name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

interface AsyncApiChannelInterface
{
/**
* @return string
*/
public function getName(): string;

/**
Expand Down
9 changes: 0 additions & 9 deletions src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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])) {
Expand All @@ -94,8 +89,6 @@ protected function isCliInstalled(): bool

/**
* @param array $command
*
* @return bool
*/
protected function runProcess(array $command): bool
{
Expand All @@ -109,8 +102,6 @@ protected function runProcess(array $command): bool

/**
* @param string $errorMessage
*
* @return void
*/
protected function triggerError(string $errorMessage): void
{
Expand Down
2 changes: 0 additions & 2 deletions src/SprykerSdk/AsyncApi/AsyncApi/Cli/AsyncApiCliInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ interface AsyncApiCliInterface
/**
* @param \Transfer\ValidateResponseTransfer $validateResponseTransfer
* @param string $asyncApiFilePath
*
* @return \Transfer\ValidateResponseTransfer
*/
public function validate(ValidateResponseTransfer $validateResponseTransfer, string $asyncApiFilePath): ValidateResponseTransfer;
}
4 changes: 0 additions & 4 deletions src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class AsyncApiLoader implements AsyncApiLoaderInterface
{
/**
* @param string $asyncApiPath
*
* @return \SprykerSdk\AsyncApi\AsyncApi\AsyncApiInterface
*/
public function load(string $asyncApiPath): AsyncApiInterface
{
Expand All @@ -37,8 +35,6 @@ public function load(string $asyncApiPath): AsyncApiInterface

/**
* @param string $asyncApiPath
*
* @return array
*/
protected function getYmlArray(string $asyncApiPath): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ interface AsyncApiLoaderInterface
{
/**
* @param string $asyncApiPath
*
* @return \SprykerSdk\AsyncApi\AsyncApi\AsyncApiInterface
*/
public function load(string $asyncApiPath): AsyncApiInterface;
}
3 changes: 0 additions & 3 deletions src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ public function __construct(string $name, AsyncApiMessageAttributeCollectionInte
$this->attributes = $attributes;
}

/**
* @return string
*/
public function getName(): string
{
return $this->name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

interface AsyncApiMessageInterface
{
/**
* @return string
*/
public function getName(): string;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public function __construct(string $name, $value)
$this->value = $value;
}

/**
* @return string
*/
public function getName(): string
{
return $this->name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

interface AsyncApiMessageAttributeInterface
{
/**
* @return string
*/
public function getName(): string;

/**
Expand Down
6 changes: 0 additions & 6 deletions src/SprykerSdk/AsyncApi/AsyncApiConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class AsyncApiConfig
* @api
*
* @throws \SprykerSdk\AsyncApi\Exception\AsyncApiException
*
* @return string
*/
public function getDefaultAsyncApiFile(): string
{
Expand All @@ -30,8 +28,6 @@ public function getDefaultAsyncApiFile(): string

/**
* @api
*
* @return string
*/
public function getProjectRootPath(): string
{
Expand All @@ -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
{
Expand Down
5 changes: 0 additions & 5 deletions src/SprykerSdk/AsyncApi/AsyncApiFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 0 additions & 8 deletions src/SprykerSdk/AsyncApi/AsyncApiFacadeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ interface AsyncApiFacadeInterface
* @api
*
* @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer
*
* @return \Transfer\AsyncApiResponseTransfer
*/
public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer;

Expand All @@ -34,8 +32,6 @@ public function addAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): A
* @api
*
* @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer
*
* @return \Transfer\AsyncApiResponseTransfer
*/
public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer;

Expand All @@ -46,8 +42,6 @@ public function addAsyncApiMessage(AsyncApiRequestTransfer $asyncApiRequestTrans
* @api
*
* @param \Transfer\AsyncApiRequestTransfer $asyncApiRequestTransfer
*
* @return \Transfer\AsyncApiResponseTransfer
*/
public function buildFromAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransfer): AsyncApiResponseTransfer;

Expand All @@ -61,8 +55,6 @@ public function buildFromAsyncApi(AsyncApiRequestTransfer $asyncApiRequestTransf
* @api
*
* @param \Transfer\ValidateRequestTransfer $validateRequestTransfer
*
* @return \Transfer\ValidateResponseTransfer
*/
public function validateAsyncApi(ValidateRequestTransfer $validateRequestTransfer): ValidateResponseTransfer;
}
33 changes: 0 additions & 33 deletions src/SprykerSdk/AsyncApi/AsyncApiFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ class AsyncApiFactory
*/
protected ?AsyncApiConfig $config = null;

/**
* @return \SprykerSdk\AsyncApi\AsyncApiConfig
*/
protected function getConfig(): AsyncApiConfig
{
if (!$this->config) {
Expand All @@ -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(
Expand All @@ -79,9 +64,6 @@ public function createAsyncApiValidator(): AsyncApiValidator
);
}

/**
* @return array
*/
public function getAsyncApiValidatorRules(): array
{
return [
Expand All @@ -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());
Expand Down
Loading
Loading