diff --git a/Notifier/Command/SendMessage.php b/Notifier/Command/SendMessage.php index 16cf6373..a9063a59 100755 --- a/Notifier/Command/SendMessage.php +++ b/Notifier/Command/SendMessage.php @@ -15,6 +15,9 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +/** + * @inheritdoc + */ class SendMessage extends Command { /** @@ -24,6 +27,7 @@ class SendMessage extends Command /** * SendMessage constructor. + * * @param ObjectManagerInterface $sendMessage */ public function __construct( @@ -49,7 +53,6 @@ protected function configure() /** * @inheritdoc - * @SuppressWarnings("PHPMD.UnusedFormalParameter") */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/Notifier/Model/Channel.php b/Notifier/Model/Channel.php index 7a980806..0bb43d11 100755 --- a/Notifier/Model/Channel.php +++ b/Notifier/Model/Channel.php @@ -13,7 +13,7 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class Channel extends AbstractExtensibleModel implements ChannelInterface { diff --git a/Notifier/Model/Channel/Command/GetList.php b/Notifier/Model/Channel/Command/GetList.php index e4c8eca0..d26ea0c4 100755 --- a/Notifier/Model/Channel/Command/GetList.php +++ b/Notifier/Model/Channel/Command/GetList.php @@ -46,7 +46,6 @@ class GetList implements GetListInterface * @param ChannelSearchResultsInterfaceFactory $searchResultsFactory * @param SearchCriteriaBuilder $searchCriteriaBuilder * @param CollectionProcessorInterface $collectionProcessor - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( CollectionFactory $collectionFactory, diff --git a/Notifier/Model/Channel/Command/GetListInterface.php b/Notifier/Model/Channel/Command/GetListInterface.php index d3b19c04..c7db0f38 100755 --- a/Notifier/Model/Channel/Command/GetListInterface.php +++ b/Notifier/Model/Channel/Command/GetListInterface.php @@ -25,6 +25,7 @@ interface GetListInterface { /** * Find Channel by given SearchCriteria + * * SearchCriteria is not required because load all sources is useful case * * @param SearchCriteriaInterface|null $searchCriteria diff --git a/Notifier/Model/Channel/Validator/ValidateAdapter.php b/Notifier/Model/Channel/Validator/ValidateAdapter.php index d64a5ac7..aea81b9d 100755 --- a/Notifier/Model/Channel/Validator/ValidateAdapter.php +++ b/Notifier/Model/Channel/Validator/ValidateAdapter.php @@ -15,6 +15,9 @@ use Magento\NotifierApi\Model\Channel\Validator\ValidateChannelInterface; use Magento\NotifierApi\Model\SerializerInterface; +/** + * @inheritdoc + */ class ValidateAdapter implements ValidateChannelInterface { /** @@ -41,7 +44,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(ChannelInterface $channel): void { diff --git a/Notifier/Model/Channel/Validator/ValidateCode.php b/Notifier/Model/Channel/Validator/ValidateCode.php index f6524dfb..a1013d9b 100755 --- a/Notifier/Model/Channel/Validator/ValidateCode.php +++ b/Notifier/Model/Channel/Validator/ValidateCode.php @@ -12,10 +12,13 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; use Magento\NotifierApi\Model\Channel\Validator\ValidateChannelInterface; +/** + * @inheritdoc + */ class ValidateCode implements ValidateChannelInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(ChannelInterface $channel): void { diff --git a/Notifier/Model/Channel/Validator/ValidateName.php b/Notifier/Model/Channel/Validator/ValidateName.php index 9c124f7b..146c46b9 100755 --- a/Notifier/Model/Channel/Validator/ValidateName.php +++ b/Notifier/Model/Channel/Validator/ValidateName.php @@ -12,10 +12,13 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; use Magento\NotifierApi\Model\Channel\Validator\ValidateChannelInterface; +/** + * @inheritdoc + */ class ValidateName implements ValidateChannelInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(ChannelInterface $channel): void { diff --git a/Notifier/Model/ChannelRepository.php b/Notifier/Model/ChannelRepository.php index 33ec3f57..c0161cf6 100755 --- a/Notifier/Model/ChannelRepository.php +++ b/Notifier/Model/ChannelRepository.php @@ -19,8 +19,7 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; /** - * @SuppressWarnings(PHPMD.LongVariable) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @inheritdoc */ class ChannelRepository implements ChannelRepositoryInterface { diff --git a/Notifier/Model/ChannelSearchResults.php b/Notifier/Model/ChannelSearchResults.php index 464e2804..10061677 100755 --- a/Notifier/Model/ChannelSearchResults.php +++ b/Notifier/Model/ChannelSearchResults.php @@ -10,6 +10,9 @@ use Magento\Framework\Api\SearchResults; +/** + * @inheritdoc + */ class ChannelSearchResults extends SearchResults implements \Magento\NotifierApi\Api\ChannelSearchResultsInterface { diff --git a/Notifier/Model/IsEnabled.php b/Notifier/Model/IsEnabled.php index e4a31a39..738f56a1 100755 --- a/Notifier/Model/IsEnabled.php +++ b/Notifier/Model/IsEnabled.php @@ -11,6 +11,9 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\NotifierApi\Api\IsEnabledInterface; +/** + * @inheritdoc + */ class IsEnabled implements IsEnabledInterface { /** @@ -25,6 +28,7 @@ class IsEnabled implements IsEnabledInterface /** * IsEnabled constructor. + * * @param ScopeConfigInterface $scopeConfig */ public function __construct( @@ -35,6 +39,7 @@ public function __construct( /** * Return true if module is enabled + * * @return bool */ public function execute(): bool diff --git a/Notifier/Model/ResourceModel/Channel.php b/Notifier/Model/ResourceModel/Channel.php index cf8f7062..4050e691 100755 --- a/Notifier/Model/ResourceModel/Channel.php +++ b/Notifier/Model/ResourceModel/Channel.php @@ -12,7 +12,7 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class Channel extends AbstractDb { diff --git a/Notifier/Model/ResourceModel/Channel/Collection.php b/Notifier/Model/ResourceModel/Channel/Collection.php index 0440c2e5..1da7d4eb 100755 --- a/Notifier/Model/ResourceModel/Channel/Collection.php +++ b/Notifier/Model/ResourceModel/Channel/Collection.php @@ -12,7 +12,7 @@ use Magento\Notifier\Model\ResourceModel\Channel; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class Collection extends AbstractCollection { diff --git a/Notifier/Model/SendMessage.php b/Notifier/Model/SendMessage.php index f3f510b8..552ec847 100755 --- a/Notifier/Model/SendMessage.php +++ b/Notifier/Model/SendMessage.php @@ -14,6 +14,9 @@ use Magento\NotifierApi\Model\SendMessageInterface; use Magento\NotifierApi\Model\SerializerInterface; +/** + * @inheritdoc + */ class SendMessage implements SendMessageInterface { /** diff --git a/Notifier/Model/Serializer.php b/Notifier/Model/Serializer.php index 5e083dcf..9d970c43 100755 --- a/Notifier/Model/Serializer.php +++ b/Notifier/Model/Serializer.php @@ -11,6 +11,9 @@ use Magento\Framework\Serialize\SerializerInterface as FrameworkSerializerInterface; use Magento\NotifierApi\Model\SerializerInterface; +/** + * @inheritdoc + */ class Serializer implements SerializerInterface { /** @@ -29,6 +32,7 @@ public function __construct( /** * Serialize value + * * @param array $value * @return string * @throws \InvalidArgumentException @@ -40,6 +44,7 @@ public function serialize(array $value): string /** * Unserialize value + * * @param string $value * @return array * @throws \InvalidArgumentException diff --git a/Notifier/Test/Integration/Channel/Validator/ValidateAdapterTest.php b/Notifier/Test/Integration/Channel/Validator/ValidateAdapterTest.php index e2a0fc66..edc797cc 100644 --- a/Notifier/Test/Integration/Channel/Validator/ValidateAdapterTest.php +++ b/Notifier/Test/Integration/Channel/Validator/ValidateAdapterTest.php @@ -31,7 +31,7 @@ class ValidateAdapterTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/Notifier/Test/Integration/Channel/Validator/ValidateCodeTest.php b/Notifier/Test/Integration/Channel/Validator/ValidateCodeTest.php index bcc526d6..622f8764 100644 --- a/Notifier/Test/Integration/Channel/Validator/ValidateCodeTest.php +++ b/Notifier/Test/Integration/Channel/Validator/ValidateCodeTest.php @@ -30,7 +30,7 @@ class ValidateCodeTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/Notifier/Test/Integration/Channel/Validator/ValidateNameTest.php b/Notifier/Test/Integration/Channel/Validator/ValidateNameTest.php index 3585508b..e91d2a38 100644 --- a/Notifier/Test/Integration/Channel/Validator/ValidateNameTest.php +++ b/Notifier/Test/Integration/Channel/Validator/ValidateNameTest.php @@ -30,7 +30,7 @@ class ValidateNameTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/Notifier/Test/Integration/ChannelRepositoryTest.php b/Notifier/Test/Integration/ChannelRepositoryTest.php index e3e0ba27..3f01cf13 100644 --- a/Notifier/Test/Integration/ChannelRepositoryTest.php +++ b/Notifier/Test/Integration/ChannelRepositoryTest.php @@ -29,7 +29,7 @@ class ChannelRepositoryTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/Notifier/Test/Integration/IsEnabledTest.php b/Notifier/Test/Integration/IsEnabledTest.php index e8b5717e..b10529d1 100644 --- a/Notifier/Test/Integration/IsEnabledTest.php +++ b/Notifier/Test/Integration/IsEnabledTest.php @@ -26,7 +26,7 @@ class IsEnabledTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/Notifier/Test/Integration/Mock/FakeAdapterEngine.php b/Notifier/Test/Integration/Mock/FakeAdapterEngine.php index aa71b892..e5488747 100644 --- a/Notifier/Test/Integration/Mock/FakeAdapterEngine.php +++ b/Notifier/Test/Integration/Mock/FakeAdapterEngine.php @@ -13,8 +13,7 @@ class FakeAdapterEngine implements AdapterEngineInterface { /** - * @inheritDoc - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @inheritdoc */ public function execute(string $message, array $configParams = [], array $params = []): bool { diff --git a/Notifier/Test/Integration/SendMessageTest.php b/Notifier/Test/Integration/SendMessageTest.php index eefe96f3..b5ea2b0c 100644 --- a/Notifier/Test/Integration/SendMessageTest.php +++ b/Notifier/Test/Integration/SendMessageTest.php @@ -27,7 +27,7 @@ class SendMessageTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierAdminUi/Controller/Adminhtml/Channel/Delete.php b/NotifierAdminUi/Controller/Adminhtml/Channel/Delete.php index 47149ccd..03d83951 100755 --- a/NotifierAdminUi/Controller/Adminhtml/Channel/Delete.php +++ b/NotifierAdminUi/Controller/Adminhtml/Channel/Delete.php @@ -14,6 +14,9 @@ use Magento\NotifierApi\Api\ChannelRepositoryInterface; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class Delete extends Action implements HttpGetActionInterface { /** @@ -28,6 +31,7 @@ class Delete extends Action implements HttpGetActionInterface /** * Delete constructor. + * * @param Action\Context $context * @param ChannelRepositoryInterface $channelRepository */ diff --git a/NotifierAdminUi/Controller/Adminhtml/Channel/Edit.php b/NotifierAdminUi/Controller/Adminhtml/Channel/Edit.php index aeabd36b..ea35e89f 100755 --- a/NotifierAdminUi/Controller/Adminhtml/Channel/Edit.php +++ b/NotifierAdminUi/Controller/Adminhtml/Channel/Edit.php @@ -16,6 +16,9 @@ use Magento\NotifierApi\Api\ChannelRepositoryInterface; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class Edit extends Action implements HttpGetActionInterface { /** @@ -30,6 +33,7 @@ class Edit extends Action implements HttpGetActionInterface /** * Edit constructor. + * * @param Action\Context $context * @param ChannelRepositoryInterface $channelRepository */ diff --git a/NotifierAdminUi/Controller/Adminhtml/Channel/Save.php b/NotifierAdminUi/Controller/Adminhtml/Channel/Save.php index 18274102..656d148a 100755 --- a/NotifierAdminUi/Controller/Adminhtml/Channel/Save.php +++ b/NotifierAdminUi/Controller/Adminhtml/Channel/Save.php @@ -17,6 +17,9 @@ use Magento\NotifierApi\Api\ChannelRepositoryInterface; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class Save extends Action implements HttpPostActionInterface { /** @@ -46,12 +49,12 @@ class Save extends Action implements HttpPostActionInterface /** * Save constructor. + * * @param Action\Context $context * @param ChannelRepositoryInterface $channelRepository * @param SerializerInterface $channelParamsSerializer * @param ChannelFactory $channelFactory * @param DataObjectHelper $dataObjectHelper - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( Action\Context $context, @@ -100,6 +103,7 @@ public function execute(): ResultInterface /** * Save channel + * * @param int $channelId * @param array $data * @return ChannelInterface @@ -131,6 +135,7 @@ private function save(int $channelId, array $data): ChannelInterface /** * Return a redirect result + * * @param int $channelId * @return ResultInterface */ @@ -149,6 +154,7 @@ private function redirectAfterFailure(int $channelId): ResultInterface /** * Return a redirect result after a successful save + * * @return ResultInterface */ private function redirectAfterSave(): ResultInterface diff --git a/NotifierAdminUi/Model/Channel/ModifierInterface.php b/NotifierAdminUi/Model/Channel/ModifierInterface.php index ccba1f84..8351de75 100755 --- a/NotifierAdminUi/Model/Channel/ModifierInterface.php +++ b/NotifierAdminUi/Model/Channel/ModifierInterface.php @@ -15,6 +15,7 @@ interface ModifierInterface extends \Magento\Ui\DataProvider\Modifier\ModifierIn { /** * Return adapter code for this modifier + * * @return string */ public function getAdapterCode(): string; diff --git a/NotifierAdminUi/Model/Source/Channel/Adapter.php b/NotifierAdminUi/Model/Source/Channel/Adapter.php index 3b86ea6a..07c76376 100755 --- a/NotifierAdminUi/Model/Source/Channel/Adapter.php +++ b/NotifierAdminUi/Model/Source/Channel/Adapter.php @@ -11,6 +11,9 @@ use Magento\Framework\Data\OptionSourceInterface; use Magento\NotifierApi\Api\AdaptersPoolInterface; +/** + * @inheritdoc + */ class Adapter implements OptionSourceInterface { /** diff --git a/NotifierAdminUi/Model/Source/Channel/Enabled.php b/NotifierAdminUi/Model/Source/Channel/Enabled.php index 4babc936..e6a6ceb0 100755 --- a/NotifierAdminUi/Model/Source/Channel/Enabled.php +++ b/NotifierAdminUi/Model/Source/Channel/Enabled.php @@ -10,6 +10,9 @@ use Magento\Framework\Data\OptionSourceInterface; +/** + * @inheritdoc + */ class Enabled implements OptionSourceInterface { /** diff --git a/NotifierAdminUi/Ui/Component/Form/Channel/BackButton.php b/NotifierAdminUi/Ui/Component/Form/Channel/BackButton.php index bf5e297b..6849125b 100755 --- a/NotifierAdminUi/Ui/Component/Form/Channel/BackButton.php +++ b/NotifierAdminUi/Ui/Component/Form/Channel/BackButton.php @@ -11,6 +11,9 @@ use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; +/** + * @inheritdoc + */ class BackButton extends GenericButton implements ButtonProviderInterface { /** diff --git a/NotifierAdminUi/Ui/Component/Form/Channel/SaveButton.php b/NotifierAdminUi/Ui/Component/Form/Channel/SaveButton.php index 3975456c..83f23851 100755 --- a/NotifierAdminUi/Ui/Component/Form/Channel/SaveButton.php +++ b/NotifierAdminUi/Ui/Component/Form/Channel/SaveButton.php @@ -11,6 +11,9 @@ use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; +/** + * @inheritdoc + */ class SaveButton extends GenericButton implements ButtonProviderInterface { /** diff --git a/NotifierAdminUi/Ui/Component/Listing/Channel/Actions.php b/NotifierAdminUi/Ui/Component/Listing/Channel/Actions.php index a4eb2a5d..cd7fc7cb 100755 --- a/NotifierAdminUi/Ui/Component/Listing/Channel/Actions.php +++ b/NotifierAdminUi/Ui/Component/Listing/Channel/Actions.php @@ -11,6 +11,9 @@ use Magento\Ui\Component\Listing\Columns\Column; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class Actions extends Column { /** @@ -18,6 +21,7 @@ class Actions extends Column */ public function prepareDataSource(array $dataSource): array { + // phpcs:disable Generic.Files.LineLength if (isset($dataSource['data']['items'])) { foreach ($dataSource['data']['items'] as &$item) { $name = $this->getData('name'); diff --git a/NotifierAdminUi/Ui/Component/Listing/Channel/NewButton.php b/NotifierAdminUi/Ui/Component/Listing/Channel/NewButton.php index 0c0d0ac8..d76dd58a 100755 --- a/NotifierAdminUi/Ui/Component/Listing/Channel/NewButton.php +++ b/NotifierAdminUi/Ui/Component/Listing/Channel/NewButton.php @@ -15,6 +15,9 @@ use Magento\NotifierApi\Api\AdaptersPoolInterface; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class NewButton extends Generic { /** @@ -24,6 +27,7 @@ class NewButton extends Generic /** * NewButton constructor. + * * @param Context $context * @param Registry $registry * @param AdaptersPoolInterface $adapterRepository @@ -52,6 +56,7 @@ public function getButtonData(): array /** * Get adapters list + * * @return array */ private function getOptions(): array diff --git a/NotifierAdminUi/Ui/DataProvider/Form/Channel/Modifier/Configuration.php b/NotifierAdminUi/Ui/DataProvider/Form/Channel/Modifier/Configuration.php index 056fbeeb..93d4e564 100755 --- a/NotifierAdminUi/Ui/DataProvider/Form/Channel/Modifier/Configuration.php +++ b/NotifierAdminUi/Ui/DataProvider/Form/Channel/Modifier/Configuration.php @@ -11,6 +11,9 @@ use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier; use Magento\NotifierApi\Model\SerializerInterface; +/** + * @inheritdoc + */ class Configuration extends AbstractModifier { /** @@ -21,7 +24,6 @@ class Configuration extends AbstractModifier /** * Params constructor. * @param SerializerInterface $serializer - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( SerializerInterface $serializer diff --git a/NotifierAdminUi/Ui/DataProvider/Form/ChannelDataProvider.php b/NotifierAdminUi/Ui/DataProvider/Form/ChannelDataProvider.php index 225f3c90..4ce027e8 100755 --- a/NotifierAdminUi/Ui/DataProvider/Form/ChannelDataProvider.php +++ b/NotifierAdminUi/Ui/DataProvider/Form/ChannelDataProvider.php @@ -20,6 +20,9 @@ use Magento\NotifierApi\Api\ChannelRepositoryInterface; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class ChannelDataProvider extends DataProvider { /** @@ -44,6 +47,7 @@ class ChannelDataProvider extends DataProvider /** * ChannelDataProvider constructor. + * * @param string $name * @param string $primaryFieldName * @param string $requestFieldName @@ -56,7 +60,6 @@ class ChannelDataProvider extends DataProvider * @param UrlInterface $url * @param array $meta * @param array $data - * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -92,6 +95,7 @@ public function __construct( /** * Get current channel + * * @return string * @throws NoSuchEntityException */ diff --git a/NotifierAdminUi/Ui/DataProvider/Listing/ChannelDataProvider.php b/NotifierAdminUi/Ui/DataProvider/Listing/ChannelDataProvider.php index 4914c254..b9673154 100755 --- a/NotifierAdminUi/Ui/DataProvider/Listing/ChannelDataProvider.php +++ b/NotifierAdminUi/Ui/DataProvider/Listing/ChannelDataProvider.php @@ -15,6 +15,9 @@ use Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider; use Magento\Ui\DataProvider\Modifier\PoolInterface; +/** + * @inheritdoc + */ class ChannelDataProvider extends DataProvider { /** @@ -33,7 +36,6 @@ class ChannelDataProvider extends DataProvider * @param PoolInterface $modifierPool * @param array $meta * @param array $data - * @SuppressWarnings(PHPMD.LongVariables) * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( diff --git a/NotifierApi/Api/AdapterInterface.php b/NotifierApi/Api/AdapterInterface.php index ed49eef5..89c142af 100755 --- a/NotifierApi/Api/AdapterInterface.php +++ b/NotifierApi/Api/AdapterInterface.php @@ -10,24 +10,28 @@ /** * Interface AdapterInterface + * * @api */ interface AdapterInterface { /** * Get adapter code + * * @return string */ public function getCode(): string; /** * Get adapter description + * * @return string */ public function getDescription(): string; /** * Validate message without sending it. Return true on success, throws exception on failure. + * * @param string $message * @return bool * @throws \Magento\Framework\Exception\ValidatorException @@ -36,6 +40,7 @@ public function validateMessage(string $message): bool; /** * Validate message without sending it. Return true on success, throws exception on failure. + * * @param array $params * @return bool * @throws \Magento\Framework\Exception\ValidatorException @@ -44,6 +49,7 @@ public function validateParams(array $params = []): bool; /** * Send message to adapter. Return true on success, throws exception on failure. + * * @param string $message * @param array $configParams * @param array $params diff --git a/NotifierApi/Api/AdaptersPoolInterface.php b/NotifierApi/Api/AdaptersPoolInterface.php index 1d8d6a87..2a85805c 100755 --- a/NotifierApi/Api/AdaptersPoolInterface.php +++ b/NotifierApi/Api/AdaptersPoolInterface.php @@ -16,12 +16,14 @@ interface AdaptersPoolInterface { /** * Get adapters list + * * @return \Magento\NotifierApi\Api\AdapterInterface[] */ public function getAdapters(): array; /** * Get adapter by code + * * @param string $code * @return \Magento\NotifierApi\Api\AdapterInterface * @throws \Magento\Framework\Exception\NoSuchEntityException diff --git a/NotifierApi/Api/ChannelRepositoryInterface.php b/NotifierApi/Api/ChannelRepositoryInterface.php index a46d14f7..b93724b0 100755 --- a/NotifierApi/Api/ChannelRepositoryInterface.php +++ b/NotifierApi/Api/ChannelRepositoryInterface.php @@ -9,13 +9,15 @@ namespace Magento\NotifierApi\Api; /** - * Channel repository interface + * Channel repository interface for Notifier + * * @api */ interface ChannelRepositoryInterface { /** * Save Channel + * * @param \Magento\NotifierApi\Api\Data\ChannelInterface $channel * @return int */ @@ -23,6 +25,7 @@ public function save(\Magento\NotifierApi\Api\Data\ChannelInterface $channel): i /** * Get Channel by id + * * @param int $channelIid * @return \Magento\NotifierApi\Api\Data\ChannelInterface * @throws \Magento\Framework\Exception\NoSuchEntityException @@ -31,6 +34,7 @@ public function get(int $channelIid): \Magento\NotifierApi\Api\Data\ChannelInter /** * Get Channel by code + * * @param string $code * @return \Magento\NotifierApi\Api\Data\ChannelInterface * @throws \Magento\Framework\Exception\NoSuchEntityException @@ -39,6 +43,7 @@ public function getByCode(string $code): \Magento\NotifierApi\Api\Data\ChannelIn /** * Delete Channel + * * @param int $channelId * @return void */ @@ -46,6 +51,7 @@ public function deleteById(int $channelId): void; /** * Get a list of Channel + * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Magento\NotifierApi\Api\ChannelSearchResultsInterface */ diff --git a/NotifierApi/Api/ChannelSearchResultsInterface.php b/NotifierApi/Api/ChannelSearchResultsInterface.php index d1439b2a..84be7087 100755 --- a/NotifierApi/Api/ChannelSearchResultsInterface.php +++ b/NotifierApi/Api/ChannelSearchResultsInterface.php @@ -10,18 +10,21 @@ /** * Channel results interface + * * @api */ interface ChannelSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface { /** * Get an array of objects + * * @return \Magento\NotifierApi\Api\Data\ChannelInterface[] */ public function getItems(); /** * Set objects list + * * @param \Magento\NotifierApi\Api\Data\ChannelInterface[] $items * @return $this */ diff --git a/NotifierApi/Api/Data/ChannelInterface.php b/NotifierApi/Api/Data/ChannelInterface.php index 00600372..70d5abef 100755 --- a/NotifierApi/Api/Data/ChannelInterface.php +++ b/NotifierApi/Api/Data/ChannelInterface.php @@ -12,6 +12,7 @@ /** * Channel Data Interface + * * @api */ interface ChannelInterface extends ExtensibleDataInterface @@ -33,12 +34,14 @@ interface ChannelInterface extends ExtensibleDataInterface /** * Get value for channel_id + * * @return int */ public function getId(); /** * Set value for channel_id + * * @param int $value * @return void */ @@ -46,12 +49,14 @@ public function setId($value); /** * Get value for name + * * @return string */ public function getName(): string; /** * Set value for name + * * @param string $value * @return void */ @@ -59,12 +64,14 @@ public function setName(string $value): void; /** * Get value for code + * * @return string */ public function getCode(): string; /** * Set value for code + * * @param string $value * @return void */ @@ -72,12 +79,14 @@ public function setCode(string $value): void; /** * Get value for adapter_code + * * @return string */ public function getAdapterCode(): string; /** * Set value for adapter_code + * * @param string $value * @return void */ @@ -85,12 +94,15 @@ public function setAdapterCode(string $value): void; /** * Get value for enabled + * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnabled(): bool; /** * Set value for enabled + * * @param bool $value * @return void */ @@ -98,12 +110,14 @@ public function setEnabled(bool $value): void; /** * Get value for configuration_json + * * @return string */ public function getConfigurationJson(): string; /** * Set value for configuration_json + * * @param string $value * @return void */ @@ -111,12 +125,14 @@ public function setConfigurationJson(string $value): void; /** * Retrieve existing extension attributes object or create a new one + * * @return \Magento\NotifierApi\Api\Data\ChannelExtensionInterface|null */ public function getExtensionAttributes(): ?\Magento\NotifierApi\Api\Data\ChannelExtensionInterface; /** * Set an extension attributes object + * * @param \Magento\NotifierApi\Api\Data\ChannelExtensionInterface $extensionAttributes * @return void */ diff --git a/NotifierApi/Api/IsEnabledInterface.php b/NotifierApi/Api/IsEnabledInterface.php index d7ee4ccd..922127d9 100755 --- a/NotifierApi/Api/IsEnabledInterface.php +++ b/NotifierApi/Api/IsEnabledInterface.php @@ -10,12 +10,14 @@ /** * Interface to check if the service is enabled or not + * * @api */ interface IsEnabledInterface { /** * Return true if module is enabled + * * @return bool */ public function execute(): bool; diff --git a/NotifierApi/Model/Adapter.php b/NotifierApi/Model/Adapter.php index c490dbe2..26e9dee1 100755 --- a/NotifierApi/Model/Adapter.php +++ b/NotifierApi/Model/Adapter.php @@ -12,6 +12,9 @@ use Magento\NotifierApi\Model\AdapterEngine\AdapterValidatorInterface; use Magento\NotifierApi\Api\AdapterInterface; +/** + * @inheritdoc + */ class Adapter implements AdapterInterface { /** diff --git a/NotifierApi/Model/AdapterEngine/AdapterEngineInterface.php b/NotifierApi/Model/AdapterEngine/AdapterEngineInterface.php index edb84ca9..4cf0a2f1 100755 --- a/NotifierApi/Model/AdapterEngine/AdapterEngineInterface.php +++ b/NotifierApi/Model/AdapterEngine/AdapterEngineInterface.php @@ -17,6 +17,7 @@ interface AdapterEngineInterface { /** * Execute engine and return true on success. Throw exception on failure. + * * @param string $message * @param array $configParams * @param array $params diff --git a/NotifierApi/Model/AdapterEngine/AdapterValidator.php b/NotifierApi/Model/AdapterEngine/AdapterValidator.php index b76efcb1..b87212fd 100755 --- a/NotifierApi/Model/AdapterEngine/AdapterValidator.php +++ b/NotifierApi/Model/AdapterEngine/AdapterValidator.php @@ -10,6 +10,9 @@ use InvalidArgumentException; +/** + * @inheritdoc + */ class AdapterValidator implements AdapterValidatorInterface { /** diff --git a/NotifierApi/Model/AdapterEngine/AdapterValidatorInterface.php b/NotifierApi/Model/AdapterEngine/AdapterValidatorInterface.php index e11954e3..7a019bf3 100755 --- a/NotifierApi/Model/AdapterEngine/AdapterValidatorInterface.php +++ b/NotifierApi/Model/AdapterEngine/AdapterValidatorInterface.php @@ -19,6 +19,7 @@ interface AdapterValidatorInterface { /** * Validate a message + * * @param string $message * @return bool * @throws ValidatorException @@ -27,6 +28,7 @@ public function validateMessage(string $message): bool; /** * Validate parameters + * * @param array $params * @return bool * @throws ValidatorException diff --git a/NotifierApi/Model/AdaptersPool.php b/NotifierApi/Model/AdaptersPool.php index 2e563443..012a3897 100755 --- a/NotifierApi/Model/AdaptersPool.php +++ b/NotifierApi/Model/AdaptersPool.php @@ -13,6 +13,9 @@ use Magento\NotifierApi\Api\AdapterInterface; use Magento\NotifierApi\Api\AdaptersPoolInterface; +/** + * @inheritdoc + */ class AdaptersPool implements AdaptersPoolInterface { /** diff --git a/NotifierApi/Model/Channel/Validator/ValidateChannel.php b/NotifierApi/Model/Channel/Validator/ValidateChannel.php index 7be10fde..f95a218c 100755 --- a/NotifierApi/Model/Channel/Validator/ValidateChannel.php +++ b/NotifierApi/Model/Channel/Validator/ValidateChannel.php @@ -11,6 +11,9 @@ use InvalidArgumentException; use Magento\NotifierApi\Api\Data\ChannelInterface; +/** + * @inheritdoc + */ class ValidateChannel implements ValidateChannelInterface { /** @@ -35,7 +38,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(ChannelInterface $channel): void { diff --git a/NotifierApi/Model/Channel/Validator/ValidateChannelInterface.php b/NotifierApi/Model/Channel/Validator/ValidateChannelInterface.php index f5fe286e..957f8c77 100755 --- a/NotifierApi/Model/Channel/Validator/ValidateChannelInterface.php +++ b/NotifierApi/Model/Channel/Validator/ValidateChannelInterface.php @@ -20,6 +20,7 @@ interface ValidateChannelInterface { /** * Execute validation. Return true on success or trigger an exception on failure + * * @param ChannelInterface $channel * @return void * @throws ValidatorException; diff --git a/NotifierApi/Model/SendMessageInterface.php b/NotifierApi/Model/SendMessageInterface.php index e62cdd6e..a62a55cf 100755 --- a/NotifierApi/Model/SendMessageInterface.php +++ b/NotifierApi/Model/SendMessageInterface.php @@ -16,6 +16,7 @@ interface SendMessageInterface { /** * Send a message, return true, Exception on failure + * * @param string $channelCode * @param string $message * @param array $params diff --git a/NotifierApi/Model/SerializerInterface.php b/NotifierApi/Model/SerializerInterface.php index 40257019..91d84445 100755 --- a/NotifierApi/Model/SerializerInterface.php +++ b/NotifierApi/Model/SerializerInterface.php @@ -18,6 +18,7 @@ interface SerializerInterface { /** * Serialize value + * * @param array $value * @return string */ @@ -25,6 +26,7 @@ public function serialize(array $value): string; /** * Unserialize value + * * @param string $value * @return array */ diff --git a/NotifierApi/Test/Unit/Model/AdapterEngine/MessageValidator/RequiredTest.php b/NotifierApi/Test/Unit/Model/AdapterEngine/MessageValidator/RequiredTest.php index c06159bb..d658b1e1 100644 --- a/NotifierApi/Test/Unit/Model/AdapterEngine/MessageValidator/RequiredTest.php +++ b/NotifierApi/Test/Unit/Model/AdapterEngine/MessageValidator/RequiredTest.php @@ -21,7 +21,7 @@ class RequiredTest extends TestCase private $subject; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierApi/Test/Unit/Model/AdapterEngine/ParamsValidator/RequiredTest.php b/NotifierApi/Test/Unit/Model/AdapterEngine/ParamsValidator/RequiredTest.php index 43f565f1..2bf413c5 100644 --- a/NotifierApi/Test/Unit/Model/AdapterEngine/ParamsValidator/RequiredTest.php +++ b/NotifierApi/Test/Unit/Model/AdapterEngine/ParamsValidator/RequiredTest.php @@ -21,7 +21,7 @@ class RequiredTest extends TestCase private $subject; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierAsync/Model/BypassFlag.php b/NotifierAsync/Model/BypassFlag.php index d8b0d755..1a8dd9f7 100644 --- a/NotifierAsync/Model/BypassFlag.php +++ b/NotifierAsync/Model/BypassFlag.php @@ -8,6 +8,9 @@ namespace Magento\NotifierAsync\Model; +/** + * Class for Bypass Flag + */ class BypassFlag { /** @@ -16,6 +19,8 @@ class BypassFlag private $status = false; /** + * Set Status + * * @param bool $status */ public function setStatus(bool $status): void @@ -24,7 +29,10 @@ public function setStatus(bool $status): void } /** + * Get Status + * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getStatus(): bool { diff --git a/NotifierAsync/Model/Consumer.php b/NotifierAsync/Model/Consumer.php index bfa2fdb2..d903d35c 100644 --- a/NotifierAsync/Model/Consumer.php +++ b/NotifierAsync/Model/Consumer.php @@ -47,6 +47,8 @@ public function __construct( } /** + * Process + * * @param string $channelCode * @param string $message * @param string $params diff --git a/NotifierAsync/Model/EnqueueMessage.php b/NotifierAsync/Model/EnqueueMessage.php index cdfd9dcf..d799ecd6 100644 --- a/NotifierAsync/Model/EnqueueMessage.php +++ b/NotifierAsync/Model/EnqueueMessage.php @@ -11,6 +11,9 @@ use Magento\Framework\MessageQueue\PublisherInterface; use Magento\NotifierApi\Model\SerializerInterface; +/** + * Class for Enqueue Message + */ class EnqueueMessage { /** @@ -36,6 +39,8 @@ public function __construct( } /** + * Publish a message + * * @param string $channelCode * @param string $message * @param array $params diff --git a/NotifierAsync/Model/ResourceModel/GetChannelExtensionAttributes.php b/NotifierAsync/Model/ResourceModel/GetChannelExtensionAttributes.php index ceede922..e6c4cb1e 100644 --- a/NotifierAsync/Model/ResourceModel/GetChannelExtensionAttributes.php +++ b/NotifierAsync/Model/ResourceModel/GetChannelExtensionAttributes.php @@ -10,6 +10,9 @@ use Magento\Framework\App\ResourceConnection; +/** + * Class for get Channel Extension attributes + */ class GetChannelExtensionAttributes { /** @@ -26,6 +29,8 @@ public function __construct(ResourceConnection $resourceConnection) } /** + * Get Channel Extension attributes + * * @param int $channelId * @return array */ diff --git a/NotifierAsync/Model/ResourceModel/SaveChannelExtensionAttributes.php b/NotifierAsync/Model/ResourceModel/SaveChannelExtensionAttributes.php index a03c81c5..ed5d17bf 100644 --- a/NotifierAsync/Model/ResourceModel/SaveChannelExtensionAttributes.php +++ b/NotifierAsync/Model/ResourceModel/SaveChannelExtensionAttributes.php @@ -10,6 +10,9 @@ use Magento\Framework\App\ResourceConnection; +/** + * Class for Save Channel Extension attributes + */ class SaveChannelExtensionAttributes { /** @@ -26,6 +29,8 @@ public function __construct(ResourceConnection $resourceConnection) } /** + * Save Channel Extension attributes + * * @param int $channelId * @param array $data */ diff --git a/NotifierAsync/Plugin/AddExtensionAttributesToChannel.php b/NotifierAsync/Plugin/AddExtensionAttributesToChannel.php index ead72b03..8611ade4 100644 --- a/NotifierAsync/Plugin/AddExtensionAttributesToChannel.php +++ b/NotifierAsync/Plugin/AddExtensionAttributesToChannel.php @@ -13,6 +13,9 @@ use Magento\NotifierApi\Api\Data\ChannelExtensionFactory; use Magento\NotifierAsync\Model\ResourceModel\GetChannelExtensionAttributes; +/** + * Class for Add Extension attributes to Channel + */ class AddExtensionAttributesToChannel { /** @@ -38,6 +41,8 @@ public function __construct( } /** + * Add Extension attributes + * * @param ChannelInterface $channel */ private function addExtensionAttributes(ChannelInterface $channel): void @@ -52,6 +57,8 @@ private function addExtensionAttributes(ChannelInterface $channel): void } /** + * After execute plugin + * * @param ChannelRepositoryInterface $subject * @param ChannelInterface $result * @return ChannelInterface @@ -64,6 +71,8 @@ public function afterGet(ChannelRepositoryInterface $subject, ChannelInterface $ } /** + * After execute plugin + * * @param ChannelRepositoryInterface $subject * @param ChannelInterface $result * @return ChannelInterface diff --git a/NotifierAsync/Plugin/SaveExtensionAttributesForChannel.php b/NotifierAsync/Plugin/SaveExtensionAttributesForChannel.php index 903724dd..ce436673 100644 --- a/NotifierAsync/Plugin/SaveExtensionAttributesForChannel.php +++ b/NotifierAsync/Plugin/SaveExtensionAttributesForChannel.php @@ -12,6 +12,9 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; use Magento\NotifierAsync\Model\ResourceModel\SaveChannelExtensionAttributes; +/** + * Class for Save Extension attributes for Channel + */ class SaveExtensionAttributesForChannel { /** @@ -29,10 +32,13 @@ public function __construct( } /** + * After execute plugin + * * @param ChannelRepositoryInterface $subject * @param int $result * @param ChannelInterface $channel * @return int + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterSave(ChannelRepositoryInterface $subject, int $result, ChannelInterface $channel): int { diff --git a/NotifierAsync/Plugin/SendMessageAsynchronously.php b/NotifierAsync/Plugin/SendMessageAsynchronously.php index 4fb9ae64..74fbfdf3 100644 --- a/NotifierAsync/Plugin/SendMessageAsynchronously.php +++ b/NotifierAsync/Plugin/SendMessageAsynchronously.php @@ -15,6 +15,9 @@ use Magento\NotifierAsync\Model\BypassFlag; use Magento\NotifierAsync\Model\EnqueueMessage; +/** + * Class for Send Message Asynchronously + */ class SendMessageAsynchronously { /** @@ -56,6 +59,8 @@ public function __construct( } /** + * Around execute plugin + * * @param SendMessageInterface $subject * @param callable $proceed * @param string $channelCode @@ -63,6 +68,7 @@ public function __construct( * @param array $params * @return bool * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundExecute( SendMessageInterface $subject, diff --git a/NotifierAsync/Test/Integration/ExtensionAttributesTest.php b/NotifierAsync/Test/Integration/ExtensionAttributesTest.php index 29207e80..b4d698fe 100644 --- a/NotifierAsync/Test/Integration/ExtensionAttributesTest.php +++ b/NotifierAsync/Test/Integration/ExtensionAttributesTest.php @@ -26,7 +26,7 @@ class ExtensionAttributesTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierAsyncAdminUi/Model/DecorateChannelDataProvider.php b/NotifierAsyncAdminUi/Model/DecorateChannelDataProvider.php index 24dde299..77fbf385 100644 --- a/NotifierAsyncAdminUi/Model/DecorateChannelDataProvider.php +++ b/NotifierAsyncAdminUi/Model/DecorateChannelDataProvider.php @@ -10,6 +10,9 @@ use Magento\NotifierAsync\Model\ResourceModel\GetChannelExtensionAttributes; +/** + * @inheritdoc + */ class DecorateChannelDataProvider { /** @@ -26,6 +29,8 @@ public function __construct(GetChannelExtensionAttributes $getChannelExtensionAt } /** + * @inheritdoc + * * @param int $channelId * @param array $data * @return array diff --git a/NotifierAsyncAdminUi/Model/Source/Channel/SendAsync.php b/NotifierAsyncAdminUi/Model/Source/Channel/SendAsync.php index a44c3e45..7e44f39b 100755 --- a/NotifierAsyncAdminUi/Model/Source/Channel/SendAsync.php +++ b/NotifierAsyncAdminUi/Model/Source/Channel/SendAsync.php @@ -10,6 +10,9 @@ use Magento\Framework\Data\OptionSourceInterface; +/** + * @inheritdoc + */ class SendAsync implements OptionSourceInterface { /** diff --git a/NotifierAsyncAdminUi/Ui/DataProvider/Form/Channel/Modifier/ExtensionAttributes.php b/NotifierAsyncAdminUi/Ui/DataProvider/Form/Channel/Modifier/ExtensionAttributes.php index f7de408e..a071f086 100755 --- a/NotifierAsyncAdminUi/Ui/DataProvider/Form/Channel/Modifier/ExtensionAttributes.php +++ b/NotifierAsyncAdminUi/Ui/DataProvider/Form/Channel/Modifier/ExtensionAttributes.php @@ -12,6 +12,9 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; use Magento\NotifierAsyncAdminUi\Model\DecorateChannelDataProvider; +/** + * @inheritdoc + */ class ExtensionAttributes implements ModifierInterface { /** diff --git a/NotifierAsyncAdminUi/Ui/DataProvider/Listing/Channel/Modifier/ExtensionAttributes.php b/NotifierAsyncAdminUi/Ui/DataProvider/Listing/Channel/Modifier/ExtensionAttributes.php index 4d36366e..0f511f7f 100755 --- a/NotifierAsyncAdminUi/Ui/DataProvider/Listing/Channel/Modifier/ExtensionAttributes.php +++ b/NotifierAsyncAdminUi/Ui/DataProvider/Listing/Channel/Modifier/ExtensionAttributes.php @@ -12,6 +12,9 @@ use Magento\NotifierApi\Api\Data\ChannelInterface; use Magento\NotifierAsyncAdminUi\Model\DecorateChannelDataProvider; +/** + * @inheritdoc + */ class ExtensionAttributes implements ModifierInterface { /** diff --git a/NotifierEmailAdapter/Model/AdapterEngine/Email.php b/NotifierEmailAdapter/Model/AdapterEngine/Email.php index d546e625..44592d4b 100755 --- a/NotifierEmailAdapter/Model/AdapterEngine/Email.php +++ b/NotifierEmailAdapter/Model/AdapterEngine/Email.php @@ -14,6 +14,9 @@ use Magento\Framework\Mail\TransportInterfaceFactory; use Magento\NotifierApi\Model\AdapterEngine\AdapterEngineInterface; +/** + * @inheritdoc + */ class Email implements AdapterEngineInterface { /** @@ -49,7 +52,6 @@ class Email implements AdapterEngineInterface /** * @param MailMessageInterfaceFactory $messageFactory * @param TransportInterfaceFactory $transportFactory - * @SuppressWarnings(PHPMD.LongVariables) */ public function __construct( MailMessageInterfaceFactory $messageFactory, @@ -61,11 +63,13 @@ public function __construct( /** * Execute engine and return true on success. Throw exception on failure. + * * @param string $message * @param array $configParams * @param array $params * @return bool * @throws MailException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute(string $message, array $configParams = [], array $params = []): bool { diff --git a/NotifierEmailAdapter/Model/AdapterEngine/ParamsValidator/IsEmail.php b/NotifierEmailAdapter/Model/AdapterEngine/ParamsValidator/IsEmail.php index 3e2d21d4..662cbd5f 100755 --- a/NotifierEmailAdapter/Model/AdapterEngine/ParamsValidator/IsEmail.php +++ b/NotifierEmailAdapter/Model/AdapterEngine/ParamsValidator/IsEmail.php @@ -11,6 +11,9 @@ use Magento\Framework\Exception\ValidatorException; use Magento\NotifierApi\Model\AdapterEngine\ParamsValidatorInterface; +/** + * @inheritdoc + */ class IsEmail implements ParamsValidatorInterface { /** diff --git a/NotifierEmailAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Email.php b/NotifierEmailAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Email.php index d4277aa3..6b7975c8 100755 --- a/NotifierEmailAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Email.php +++ b/NotifierEmailAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Email.php @@ -13,6 +13,9 @@ use Magento\NotifierAdminUi\Model\Channel\ModifierInterface; use Magento\NotifierEmailAdapter\Model\AdapterEngine\Email as EmailAdapter; +/** + * @inheritdoc + */ class Email implements ModifierInterface { /** diff --git a/NotifierEvent/Model/CaptureEvent.php b/NotifierEvent/Model/CaptureEvent.php index d1548ee2..9b87f3c0 100755 --- a/NotifierEvent/Model/CaptureEvent.php +++ b/NotifierEvent/Model/CaptureEvent.php @@ -13,6 +13,9 @@ use Magento\NotifierEventApi\Model\GetRulesIdsByEventInterface\Proxy as GetRulesIdsByEventInterface; use Magento\NotifierEventApi\Model\IsEventExcludedInterface\Proxy as IsEventExcludedInterface; +/** + * @inheritdoc + */ class CaptureEvent implements CaptureEventInterface { /** diff --git a/NotifierEvent/Model/FireRule.php b/NotifierEvent/Model/FireRule.php index c6c2f912..db8bd541 100755 --- a/NotifierEvent/Model/FireRule.php +++ b/NotifierEvent/Model/FireRule.php @@ -18,6 +18,9 @@ use Magento\NotifierTemplateApi\Model\SendMessageInterface; use Psr\Log\LoggerInterface; +/** + * @inheritdoc + */ class FireRule implements FireRuleInterface { /** @@ -57,7 +60,6 @@ class FireRule implements FireRuleInterface * @param ThrottleInterface $throttle * @param GetAutomaticTemplateIdInterface $getAutomaticTemplateId * @param LoggerInterface $logger - * @SuppressWarnings(PHPMD.LongVariables) */ public function __construct( RuleRepositoryInterface $ruleRepository, diff --git a/NotifierEvent/Model/GetAutomaticTemplateId.php b/NotifierEvent/Model/GetAutomaticTemplateId.php index 9abf3cf3..f9519755 100755 --- a/NotifierEvent/Model/GetAutomaticTemplateId.php +++ b/NotifierEvent/Model/GetAutomaticTemplateId.php @@ -13,6 +13,9 @@ use Magento\NotifierEventApi\Model\GetAutomaticTemplateIdInterface; use Magento\NotifierTemplateApi\Model\TemplateGetter\TemplateGetterInterface; +/** + * @inheritdoc + */ class GetAutomaticTemplateId implements GetAutomaticTemplateIdInterface { /** @@ -40,8 +43,7 @@ public function __construct( } /** - * @inheritDoc - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @inheritdoc */ public function execute(RuleInterface $rule, string $eventName, array $data = []): string { diff --git a/NotifierEvent/Model/GetRulesIdsByEvent.php b/NotifierEvent/Model/GetRulesIdsByEvent.php index 4422fa22..c62e9fc1 100755 --- a/NotifierEvent/Model/GetRulesIdsByEvent.php +++ b/NotifierEvent/Model/GetRulesIdsByEvent.php @@ -22,7 +22,6 @@ class GetRulesIdsByEvent implements GetRulesIdsByEventInterface /** * @param GetRulesIdsByEventRegistry $getRulesIdsByEventRegistry - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( GetRulesIdsByEventRegistry $getRulesIdsByEventRegistry @@ -31,6 +30,8 @@ public function __construct( } /** + * @inheritdoc + * * @param string $eventName * @return array */ diff --git a/NotifierEvent/Model/GetRulesIdsByEventRegistry.php b/NotifierEvent/Model/GetRulesIdsByEventRegistry.php index c85d56d3..ec45ea79 100755 --- a/NotifierEvent/Model/GetRulesIdsByEventRegistry.php +++ b/NotifierEvent/Model/GetRulesIdsByEventRegistry.php @@ -12,6 +12,9 @@ use Magento\NotifierEvent\Model\ResourceModel\Rule\CollectionFactory; use Magento\NotifierEventApi\Api\Data\RuleInterface; +/** + * Class for Get RulesIds by Event Registry + */ class GetRulesIdsByEventRegistry { /** @@ -80,6 +83,8 @@ public function clearRegistry(): void } /** + * Get Rules + * * @param string $eventName * @return array */ diff --git a/NotifierEvent/Model/IsEventExcludedRegex.php b/NotifierEvent/Model/IsEventExcludedRegex.php index f45311b1..19c9c6d8 100755 --- a/NotifierEvent/Model/IsEventExcludedRegex.php +++ b/NotifierEvent/Model/IsEventExcludedRegex.php @@ -10,6 +10,9 @@ use Magento\NotifierEventApi\Model\IsEventExcludedInterface; +/** + * @inheritdoc + */ class IsEventExcludedRegex implements IsEventExcludedInterface { /** @@ -28,7 +31,6 @@ public function __construct( /** * @inheritdoc - * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute(string $eventName, array $data = []): bool { diff --git a/NotifierEvent/Model/ResourceModel/Rule.php b/NotifierEvent/Model/ResourceModel/Rule.php index a31754dd..cda2e4b2 100755 --- a/NotifierEvent/Model/ResourceModel/Rule.php +++ b/NotifierEvent/Model/ResourceModel/Rule.php @@ -12,7 +12,7 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class Rule extends AbstractDb { @@ -21,6 +21,9 @@ class Rule extends AbstractDb */ private const TABLE_NAME = 'notifier_event_rule'; + /** + * @inheritdoc + */ protected function _construct() { $this->_init( diff --git a/NotifierEvent/Model/ResourceModel/Rule/Collection.php b/NotifierEvent/Model/ResourceModel/Rule/Collection.php index 9f8d8be3..f1eaaca5 100755 --- a/NotifierEvent/Model/ResourceModel/Rule/Collection.php +++ b/NotifierEvent/Model/ResourceModel/Rule/Collection.php @@ -12,12 +12,15 @@ use Magento\NotifierEvent\Model\ResourceModel\Rule; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class Collection extends AbstractCollection { protected $_idFieldName = 'rule_id'; + /** + * @inheritdoc + */ protected function _construct() { $this->_init( diff --git a/NotifierEvent/Model/Rule.php b/NotifierEvent/Model/Rule.php index 8c0624d7..e725c23c 100755 --- a/NotifierEvent/Model/Rule.php +++ b/NotifierEvent/Model/Rule.php @@ -12,6 +12,9 @@ use Magento\NotifierEventApi\Api\Data\RuleExtensionInterface; use Magento\NotifierEventApi\Api\Data\RuleInterface; +/** + * @inheritdoc + */ class Rule extends AbstractExtensibleModel implements RuleInterface { /** diff --git a/NotifierEvent/Model/Rule/Command/GetList.php b/NotifierEvent/Model/Rule/Command/GetList.php index 0f9d1797..7347afb7 100755 --- a/NotifierEvent/Model/Rule/Command/GetList.php +++ b/NotifierEvent/Model/Rule/Command/GetList.php @@ -46,7 +46,6 @@ class GetList implements GetListInterface * @param RuleSearchResultsInterfaceFactory $searchResultsFactory * @param SearchCriteriaBuilder $searchCriteriaBuilder * @param CollectionProcessorInterface $collectionProcessor - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( CollectionFactory $collectionFactory, diff --git a/NotifierEvent/Model/Rule/Command/GetListInterface.php b/NotifierEvent/Model/Rule/Command/GetListInterface.php index d9d08e57..e035ad7e 100755 --- a/NotifierEvent/Model/Rule/Command/GetListInterface.php +++ b/NotifierEvent/Model/Rule/Command/GetListInterface.php @@ -25,6 +25,7 @@ interface GetListInterface { /** * Find Rule by given SearchCriteria + * * SearchCriteria is not required because load all sources is useful case * * @param SearchCriteriaInterface|null $searchCriteria diff --git a/NotifierEvent/Model/Rule/Validator/ValidateChannel.php b/NotifierEvent/Model/Rule/Validator/ValidateChannel.php index 7e457ac1..344bc96e 100755 --- a/NotifierEvent/Model/Rule/Validator/ValidateChannel.php +++ b/NotifierEvent/Model/Rule/Validator/ValidateChannel.php @@ -14,6 +14,9 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; use Magento\NotifierEventApi\Model\Rule\Validator\ValidateRuleInterface; +/** + * @inheritdoc + */ class ValidateChannel implements ValidateRuleInterface { /** @@ -30,7 +33,7 @@ public function __construct(SerializerInterface $serializer) } /** - * @inheritDoc + * @inheritdoc */ public function execute(RuleInterface $rule): bool { diff --git a/NotifierEvent/Model/Rule/Validator/ValidateEvent.php b/NotifierEvent/Model/Rule/Validator/ValidateEvent.php index d771e08e..526597c6 100755 --- a/NotifierEvent/Model/Rule/Validator/ValidateEvent.php +++ b/NotifierEvent/Model/Rule/Validator/ValidateEvent.php @@ -14,6 +14,9 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; use Magento\NotifierEventApi\Model\Rule\Validator\ValidateRuleInterface; +/** + * @inheritdoc + */ class ValidateEvent implements ValidateRuleInterface { /** @@ -30,7 +33,7 @@ public function __construct(SerializerInterface $serializer) } /** - * @inheritDoc + * @inheritdoc */ public function execute(RuleInterface $rule): bool { diff --git a/NotifierEvent/Model/Rule/Validator/ValidateName.php b/NotifierEvent/Model/Rule/Validator/ValidateName.php index b5746d8f..7da826ce 100755 --- a/NotifierEvent/Model/Rule/Validator/ValidateName.php +++ b/NotifierEvent/Model/Rule/Validator/ValidateName.php @@ -12,10 +12,13 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; use Magento\NotifierEventApi\Model\Rule\Validator\ValidateRuleInterface; +/** + * @inheritdoc + */ class ValidateName implements ValidateRuleInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(RuleInterface $rule): bool { diff --git a/NotifierEvent/Model/Rule/Validator/ValidateTemplateId.php b/NotifierEvent/Model/Rule/Validator/ValidateTemplateId.php index 835eef0f..0e934213 100755 --- a/NotifierEvent/Model/Rule/Validator/ValidateTemplateId.php +++ b/NotifierEvent/Model/Rule/Validator/ValidateTemplateId.php @@ -16,6 +16,9 @@ use Magento\NotifierEventApi\Model\Rule\Validator\ValidateRuleInterface; use Magento\NotifierTemplateApi\Model\TemplateGetter\TemplateGetterInterface; +/** + * @inheritdoc + */ class ValidateTemplateId implements ValidateRuleInterface { /** @@ -41,7 +44,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(RuleInterface $rule): bool { diff --git a/NotifierEvent/Model/Rule/Validator/ValidateThrottle.php b/NotifierEvent/Model/Rule/Validator/ValidateThrottle.php index 2717c900..97351917 100755 --- a/NotifierEvent/Model/Rule/Validator/ValidateThrottle.php +++ b/NotifierEvent/Model/Rule/Validator/ValidateThrottle.php @@ -12,10 +12,13 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; use Magento\NotifierEventApi\Model\Rule\Validator\ValidateRuleInterface; +/** + * @inheritdoc + */ class ValidateThrottle implements ValidateRuleInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(RuleInterface $rule): bool { diff --git a/NotifierEvent/Model/RuleRepository.php b/NotifierEvent/Model/RuleRepository.php index 6dc35830..20b4e06f 100755 --- a/NotifierEvent/Model/RuleRepository.php +++ b/NotifierEvent/Model/RuleRepository.php @@ -18,9 +18,8 @@ use Magento\NotifierEventApi\Api\RuleSearchResultsInterface; /** - * @SuppressWarnings(PHPMD.ShortVariable) - * @SuppressWarnings(PHPMD.LongVariable) - */ + * @inheritdoc + */ class RuleRepository implements RuleRepositoryInterface { /** diff --git a/NotifierEvent/Model/RuleSearchResults.php b/NotifierEvent/Model/RuleSearchResults.php index 814b9a2f..a0150a27 100755 --- a/NotifierEvent/Model/RuleSearchResults.php +++ b/NotifierEvent/Model/RuleSearchResults.php @@ -10,6 +10,9 @@ use Magento\Framework\Api\SearchResults; +/** + * @inheritdoc + */ class RuleSearchResults extends SearchResults implements \Magento\NotifierEventApi\Api\RuleSearchResultsInterface { diff --git a/NotifierEvent/Model/Throttle.php b/NotifierEvent/Model/Throttle.php index 50d14fa4..361348a3 100755 --- a/NotifierEvent/Model/Throttle.php +++ b/NotifierEvent/Model/Throttle.php @@ -12,6 +12,9 @@ use Magento\NotifierEventApi\Api\RuleRepositoryInterface; use Magento\NotifierEventApi\Model\ThrottleInterface; +/** + * @inheritdoc + */ class Throttle implements ThrottleInterface { /** diff --git a/NotifierEvent/Plugin/Event/CaptureEvent.php b/NotifierEvent/Plugin/Event/CaptureEvent.php index 6e9a98c6..d2a0c10e 100755 --- a/NotifierEvent/Plugin/Event/CaptureEvent.php +++ b/NotifierEvent/Plugin/Event/CaptureEvent.php @@ -12,6 +12,9 @@ use Magento\Framework\Event\ManagerInterface; use Magento\NotifierEventApi\Model\CaptureEventInterface\Proxy as CaptureEventInterface; +/** + * Class for Capture Event + */ class CaptureEvent { /** @@ -26,6 +29,7 @@ class CaptureEvent /** * ManagerInterfacePlugin constructor. + * * @param CaptureEventInterface $captureEvent */ public function __construct( @@ -35,6 +39,8 @@ public function __construct( } /** + * Capture Event + * * @param ManagerInterface $subject * @param string $eventName * @param array $data diff --git a/NotifierEvent/Test/Integration/GetAutomaticTemplateIdTest.php b/NotifierEvent/Test/Integration/GetAutomaticTemplateIdTest.php index 9c6d91c0..142381e0 100644 --- a/NotifierEvent/Test/Integration/GetAutomaticTemplateIdTest.php +++ b/NotifierEvent/Test/Integration/GetAutomaticTemplateIdTest.php @@ -30,7 +30,7 @@ class GetAutomaticTemplateIdTest extends TestCase private $subject; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/GetRuleIdsByEventTest.php b/NotifierEvent/Test/Integration/GetRuleIdsByEventTest.php index 9053519e..7f6e6b21 100644 --- a/NotifierEvent/Test/Integration/GetRuleIdsByEventTest.php +++ b/NotifierEvent/Test/Integration/GetRuleIdsByEventTest.php @@ -28,7 +28,7 @@ class GetRuleIdsByEventTest extends TestCase private $subject; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/IsEventExcludedRegexTest.php b/NotifierEvent/Test/Integration/IsEventExcludedRegexTest.php index a4284fc4..21b0372a 100644 --- a/NotifierEvent/Test/Integration/IsEventExcludedRegexTest.php +++ b/NotifierEvent/Test/Integration/IsEventExcludedRegexTest.php @@ -12,7 +12,6 @@ use Magento\Framework\ObjectManagerInterface; use Magento\TestFramework\Helper\Bootstrap; -use Magento\NotifierEvent\Model\GetAutomaticTemplateId; use Magento\NotifierEvent\Model\IsEventExcludedRegex; use PHPUnit\Framework\TestCase; @@ -24,12 +23,7 @@ class IsEventExcludedRegexTest extends TestCase private $objectManager; /** - * @var GetAutomaticTemplateId - */ - private $subject; - - /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/Mock/MockTemplateGetter.php b/NotifierEvent/Test/Integration/Mock/MockTemplateGetter.php index 8afe0ed3..69cc8ea1 100644 --- a/NotifierEvent/Test/Integration/Mock/MockTemplateGetter.php +++ b/NotifierEvent/Test/Integration/Mock/MockTemplateGetter.php @@ -14,7 +14,7 @@ class MockTemplateGetter implements TemplateGetterInterface { /** - * @inheritDoc + * @inheritdoc * @throws FileSystemException */ public function getTemplate(string $channelCode, string $templateId): ?string @@ -27,7 +27,7 @@ public function getTemplate(string $channelCode, string $templateId): ?string } /** - * @inheritDoc + * @inheritdoc */ public function getList(): array { diff --git a/NotifierEvent/Test/Integration/Rule/Validator/ValidateChannelTest.php b/NotifierEvent/Test/Integration/Rule/Validator/ValidateChannelTest.php index 75063889..5f715770 100644 --- a/NotifierEvent/Test/Integration/Rule/Validator/ValidateChannelTest.php +++ b/NotifierEvent/Test/Integration/Rule/Validator/ValidateChannelTest.php @@ -30,7 +30,7 @@ class ValidateChannelTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/Rule/Validator/ValidateEventTest.php b/NotifierEvent/Test/Integration/Rule/Validator/ValidateEventTest.php index f2a243d6..a2bbfa4b 100644 --- a/NotifierEvent/Test/Integration/Rule/Validator/ValidateEventTest.php +++ b/NotifierEvent/Test/Integration/Rule/Validator/ValidateEventTest.php @@ -30,7 +30,7 @@ class ValidateEventTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/Rule/Validator/ValidateNameTest.php b/NotifierEvent/Test/Integration/Rule/Validator/ValidateNameTest.php index 6a43c5f9..0a0b951e 100644 --- a/NotifierEvent/Test/Integration/Rule/Validator/ValidateNameTest.php +++ b/NotifierEvent/Test/Integration/Rule/Validator/ValidateNameTest.php @@ -30,7 +30,7 @@ class ValidateNameTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/Rule/Validator/ValidateTemplateIdTest.php b/NotifierEvent/Test/Integration/Rule/Validator/ValidateTemplateIdTest.php index 22adff42..f10a4da2 100644 --- a/NotifierEvent/Test/Integration/Rule/Validator/ValidateTemplateIdTest.php +++ b/NotifierEvent/Test/Integration/Rule/Validator/ValidateTemplateIdTest.php @@ -32,7 +32,7 @@ class ValidateTemplateIdTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/Rule/Validator/ValidateThrottleTest.php b/NotifierEvent/Test/Integration/Rule/Validator/ValidateThrottleTest.php index 398c930a..cf602df5 100644 --- a/NotifierEvent/Test/Integration/Rule/Validator/ValidateThrottleTest.php +++ b/NotifierEvent/Test/Integration/Rule/Validator/ValidateThrottleTest.php @@ -30,7 +30,7 @@ class ValidateThrottleTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierEvent/Test/Integration/RuleRepositoryTest.php b/NotifierEvent/Test/Integration/RuleRepositoryTest.php index 842986fd..b4c21589 100644 --- a/NotifierEvent/Test/Integration/RuleRepositoryTest.php +++ b/NotifierEvent/Test/Integration/RuleRepositoryTest.php @@ -29,7 +29,7 @@ class RuleRepositoryTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { @@ -53,7 +53,7 @@ public function testShouldGetList(): void public function testShouldGetById(): void { $firstItem = current($this->subject->getList()->getItems()); - + /** @noinspection PhpUnhandledExceptionInspection */ $rule = $this->subject->get((int) $firstItem->getId()); $this->assertSame((int) $firstItem->getId(), (int) $rule->getId()); diff --git a/NotifierEvent/Test/Integration/ThrottleTest.php b/NotifierEvent/Test/Integration/ThrottleTest.php index 00f9b9b6..cc3aaed0 100644 --- a/NotifierEvent/Test/Integration/ThrottleTest.php +++ b/NotifierEvent/Test/Integration/ThrottleTest.php @@ -38,7 +38,7 @@ class ThrottleTest extends TestCase private $ruleRepository; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { @@ -55,6 +55,7 @@ public function testShouldThrottle(): void /** @var Rule $rule */ $rule = current($this->ruleRepository->getList()->getItems()); + //phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall for ($i = 0; $i < $rule->getThrottleLimit(); $i++) { $this->assertTrue($this->subject->execute($rule)); } diff --git a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Delete.php b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Delete.php index 1910424f..22e19d87 100755 --- a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Delete.php +++ b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Delete.php @@ -14,6 +14,9 @@ use Magento\NotifierEventApi\Api\RuleRepositoryInterface; use Magento\NotifierEventApi\Api\Data\RuleInterface; +/** + * @inheritdoc + */ class Delete extends Action implements HttpGetActionInterface { /** diff --git a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Edit.php b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Edit.php index 06655619..5efa1e46 100755 --- a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Edit.php +++ b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Edit.php @@ -16,6 +16,9 @@ use Magento\NotifierEventApi\Api\RuleRepositoryInterface; use Magento\NotifierEventApi\Api\Data\RuleInterface; +/** + * @inheritdoc + */ class Edit extends Action implements HttpGetActionInterface { /** diff --git a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Index.php b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Index.php index a2135ed9..f2e35ec9 100755 --- a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Index.php +++ b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Index.php @@ -14,6 +14,9 @@ use Magento\Framework\Controller\ResultFactory; use Magento\Framework\Controller\ResultInterface; +/** + * @inheritdoc + */ class Index extends Action implements HttpGetActionInterface { /** diff --git a/NotifierEventAdminUi/Controller/Adminhtml/Rule/NewAction.php b/NotifierEventAdminUi/Controller/Adminhtml/Rule/NewAction.php index ba372001..f0fd20a5 100755 --- a/NotifierEventAdminUi/Controller/Adminhtml/Rule/NewAction.php +++ b/NotifierEventAdminUi/Controller/Adminhtml/Rule/NewAction.php @@ -14,6 +14,9 @@ use Magento\Framework\Controller\ResultFactory; use Magento\Framework\Controller\ResultInterface; +/** + * @inheritdoc + */ class NewAction extends Action implements HttpGetActionInterface { /** diff --git a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Save.php b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Save.php index a33c9990..733da284 100755 --- a/NotifierEventAdminUi/Controller/Adminhtml/Rule/Save.php +++ b/NotifierEventAdminUi/Controller/Adminhtml/Rule/Save.php @@ -21,6 +21,9 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; use Magento\NotifierEventApi\Model\GetAutomaticTemplateIdInterface; +/** + * @inheritdoc + */ class Save extends Action implements HttpPostActionInterface { /** @@ -60,7 +63,6 @@ class Save extends Action implements HttpPostActionInterface * @param SerializerInterface $serializer * @param RuleFactory $ruleFactory * @param DataObjectHelper $dataObjectHelper - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( Action\Context $context, @@ -107,6 +109,7 @@ public function execute(): ResultInterface /** * Save rule + * * @param int $ruleId * @param array $data * @return RuleInterface @@ -154,6 +157,7 @@ private function save(int $ruleId, array $data): RuleInterface /** * Return a redirect result + * * @param int $ruleId * @return ResultInterface */ @@ -172,6 +176,7 @@ private function redirectAfterFailure(int $ruleId): ResultInterface /** * Return a redirect result after a successful save + * * @return ResultInterface */ private function redirectAfterSave(): ResultInterface diff --git a/NotifierEventAdminUi/Model/Source/Rule/Channel.php b/NotifierEventAdminUi/Model/Source/Rule/Channel.php index b6987f24..279bb450 100755 --- a/NotifierEventAdminUi/Model/Source/Rule/Channel.php +++ b/NotifierEventAdminUi/Model/Source/Rule/Channel.php @@ -10,6 +10,9 @@ use Magento\NotifierApi\Api\ChannelRepositoryInterface; +/** + * @inheritdoc + */ class Channel implements \Magento\Framework\Data\OptionSourceInterface { /** diff --git a/NotifierEventAdminUi/Model/Source/Rule/Enabled.php b/NotifierEventAdminUi/Model/Source/Rule/Enabled.php index 789958b3..15150b86 100755 --- a/NotifierEventAdminUi/Model/Source/Rule/Enabled.php +++ b/NotifierEventAdminUi/Model/Source/Rule/Enabled.php @@ -10,6 +10,9 @@ use Magento\Framework\Data\OptionSourceInterface; +/** + * @inheritdoc + */ class Enabled implements OptionSourceInterface { /** diff --git a/NotifierEventAdminUi/Model/Source/Rule/Listing/Template.php b/NotifierEventAdminUi/Model/Source/Rule/Listing/Template.php index 30f2666b..9ebf38d3 100755 --- a/NotifierEventAdminUi/Model/Source/Rule/Listing/Template.php +++ b/NotifierEventAdminUi/Model/Source/Rule/Listing/Template.php @@ -11,6 +11,9 @@ use Magento\Framework\Data\OptionSourceInterface; use Magento\NotifierEventApi\Model\GetAutomaticTemplateIdInterface; +/** + * @inheritdoc + */ class Template implements OptionSourceInterface { /** diff --git a/NotifierEventAdminUi/Model/Source/Rule/Template.php b/NotifierEventAdminUi/Model/Source/Rule/Template.php index e061b18a..2e6f915c 100755 --- a/NotifierEventAdminUi/Model/Source/Rule/Template.php +++ b/NotifierEventAdminUi/Model/Source/Rule/Template.php @@ -11,6 +11,9 @@ use Magento\Framework\Data\OptionSourceInterface; use Magento\NotifierTemplateApi\Model\TemplateGetter\TemplateGetterInterface; +/** + * @inheritdoc + */ class Template implements OptionSourceInterface { /** diff --git a/NotifierEventAdminUi/Ui/Component/Form/Rule/BackButton.php b/NotifierEventAdminUi/Ui/Component/Form/Rule/BackButton.php index 227ab7d7..f29cf281 100755 --- a/NotifierEventAdminUi/Ui/Component/Form/Rule/BackButton.php +++ b/NotifierEventAdminUi/Ui/Component/Form/Rule/BackButton.php @@ -11,6 +11,9 @@ use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; +/** + * @inheritdoc + */ class BackButton extends GenericButton implements ButtonProviderInterface { /** diff --git a/NotifierEventAdminUi/Ui/Component/Form/Rule/SaveButton.php b/NotifierEventAdminUi/Ui/Component/Form/Rule/SaveButton.php index 7e559f33..192da361 100755 --- a/NotifierEventAdminUi/Ui/Component/Form/Rule/SaveButton.php +++ b/NotifierEventAdminUi/Ui/Component/Form/Rule/SaveButton.php @@ -11,6 +11,9 @@ use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; +/** + * @inheritdoc + */ class SaveButton extends GenericButton implements ButtonProviderInterface { /** diff --git a/NotifierEventAdminUi/Ui/Component/Listing/Rule/Actions.php b/NotifierEventAdminUi/Ui/Component/Listing/Rule/Actions.php index 270e4d83..06a942f4 100755 --- a/NotifierEventAdminUi/Ui/Component/Listing/Rule/Actions.php +++ b/NotifierEventAdminUi/Ui/Component/Listing/Rule/Actions.php @@ -11,6 +11,9 @@ use Magento\Ui\Component\Listing\Columns\Column; use Magento\NotifierEventApi\Api\Data\RuleInterface; +/** + * @inheritdoc + */ class Actions extends Column { /** diff --git a/NotifierEventAdminUi/Ui/Component/Listing/Rule/NewButton.php b/NotifierEventAdminUi/Ui/Component/Listing/Rule/NewButton.php index 94dc543b..4d8d29f9 100755 --- a/NotifierEventAdminUi/Ui/Component/Listing/Rule/NewButton.php +++ b/NotifierEventAdminUi/Ui/Component/Listing/Rule/NewButton.php @@ -10,6 +10,9 @@ use Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Generic; +/** + * @inheritdoc + */ class NewButton extends Generic { /** diff --git a/NotifierEventAdminUi/Ui/DataProvider/Form/RuleDataProvider.php b/NotifierEventAdminUi/Ui/DataProvider/Form/RuleDataProvider.php index b333e543..8abfcc1d 100755 --- a/NotifierEventAdminUi/Ui/DataProvider/Form/RuleDataProvider.php +++ b/NotifierEventAdminUi/Ui/DataProvider/Form/RuleDataProvider.php @@ -16,6 +16,9 @@ use Magento\NotifierApi\Model\SerializerInterface; use Magento\NotifierEventApi\Model\GetAutomaticTemplateIdInterface; +/** + * @inheritdoc + */ class RuleDataProvider extends DataProvider { /** @@ -34,7 +37,6 @@ class RuleDataProvider extends DataProvider * @param SerializerInterface $serializer * @param array $meta * @param array $data - * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( diff --git a/NotifierEventAdminUi/Ui/DataProvider/Listing/RuleDataProvider.php b/NotifierEventAdminUi/Ui/DataProvider/Listing/RuleDataProvider.php index c5133f60..53a0d470 100755 --- a/NotifierEventAdminUi/Ui/DataProvider/Listing/RuleDataProvider.php +++ b/NotifierEventAdminUi/Ui/DataProvider/Listing/RuleDataProvider.php @@ -10,6 +10,9 @@ use Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider; +/** + * @inheritdoc + */ class RuleDataProvider extends DataProvider { diff --git a/NotifierEventApi/Api/Data/RuleInterface.php b/NotifierEventApi/Api/Data/RuleInterface.php index 53e5177c..a4bf7aa3 100755 --- a/NotifierEventApi/Api/Data/RuleInterface.php +++ b/NotifierEventApi/Api/Data/RuleInterface.php @@ -17,12 +17,14 @@ interface RuleInterface extends ExtensibleDataInterface { /** * Get value for rule_id + * * @return int */ public function getId(); /** * Set value for rule_id + * * @param int $value * @return void */ @@ -30,12 +32,14 @@ public function setId($value); /** * Get value for name + * * @return string */ public function getName(): string; /** * Set value for name + * * @param string $value * @return void */ @@ -43,12 +47,14 @@ public function setName(string $value): void; /** * Get value for events + * * @return string */ public function getEvents(): string; /** * Set value for events + * * @param string $value * @return void */ @@ -56,12 +62,14 @@ public function setEvents(string $value): void; /** * Get value for channels_codes + * * @return string */ public function getChannelsCodes(): string; /** * Set value for channels_codes + * * @param string $value * @return void */ @@ -69,12 +77,14 @@ public function setChannelsCodes(string $value): void; /** * Get value for template_id + * * @return string */ public function getTemplateId(): string; /** * Set value for template_id + * * @param string $value * @return void */ @@ -82,12 +92,14 @@ public function setTemplateId(string $value): void; /** * Get value for throttle_limit + * * @return int */ public function getThrottleLimit(): int; /** * Set value for template_id + * * @param int $value * @return void */ @@ -95,12 +107,14 @@ public function setThrottleLimit(int $value): void; /** * Get value for throttle_interval + * * @return int */ public function getThrottleInterval(): int; /** * Set value for throttle_interval + * * @param int $value * @return void */ @@ -108,12 +122,14 @@ public function setThrottleInterval(int $value): void; /** * Get value for last_fired_at + * * @return int */ public function getLastFiredAt(): int; /** * Set value for last_fired_at + * * @param int $value * @return void */ @@ -121,12 +137,14 @@ public function setLastFiredAt(int $value): void; /** * Get value for fire_count + * * @return int */ public function getFireCount(): int; /** * Set value for fire_count + * * @param int $value * @return void */ @@ -134,12 +152,15 @@ public function setFireCount(int $value): void; /** * Get value for enabled + * * @return bool + * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getEnabled(): bool; /** * Set value for enabled + * * @param bool $value * @return void */ @@ -147,12 +168,14 @@ public function setEnabled(bool $value): void; /** * Retrieve existing extension attributes object or create a new one + * * @return \Magento\NotifierEventApi\Api\Data\RuleExtensionInterface|null */ public function getExtensionAttributes(): ?\Magento\NotifierEventApi\Api\Data\RuleExtensionInterface; /** * Set an extension attributes object + * * @param \Magento\NotifierEventApi\Api\Data\RuleExtensionInterface $extensionAttributes * @return $this */ diff --git a/NotifierEventApi/Api/RuleRepositoryInterface.php b/NotifierEventApi/Api/RuleRepositoryInterface.php index dfce581d..7049f9a4 100755 --- a/NotifierEventApi/Api/RuleRepositoryInterface.php +++ b/NotifierEventApi/Api/RuleRepositoryInterface.php @@ -15,6 +15,7 @@ interface RuleRepositoryInterface { /** * Save Rule + * * @param \Magento\NotifierEventApi\Api\Data\RuleInterface $rule * @return int */ @@ -22,6 +23,7 @@ public function save(\Magento\NotifierEventApi\Api\Data\RuleInterface $rule): in /** * Get Rule by id + * * @param int $ruleId * @return \Magento\NotifierEventApi\Api\Data\RuleInterface * @throws \Magento\Framework\Exception\NoSuchEntityException @@ -30,6 +32,7 @@ public function get(int $ruleId): \Magento\NotifierEventApi\Api\Data\RuleInterfa /** * Delete Rule + * * @param int $ruleId * @return void */ @@ -37,6 +40,7 @@ public function deleteById(int $ruleId); /** * Get a list of Rule + * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Magento\NotifierEventApi\Api\RuleSearchResultsInterface */ diff --git a/NotifierEventApi/Api/RuleSearchResultsInterface.php b/NotifierEventApi/Api/RuleSearchResultsInterface.php index b6d62d97..e26541ff 100755 --- a/NotifierEventApi/Api/RuleSearchResultsInterface.php +++ b/NotifierEventApi/Api/RuleSearchResultsInterface.php @@ -15,12 +15,14 @@ interface RuleSearchResultsInterface extends \Magento\Framework\Api\SearchResult { /** * Get an array of objects + * * @return \Magento\NotifierEventApi\Api\Data\RuleInterface[] */ public function getItems(); /** * Set objects list + * * @param \Magento\NotifierEventApi\Api\Data\RuleInterface[] $items * @return $this */ diff --git a/NotifierEventApi/Model/CaptureEventInterface.php b/NotifierEventApi/Model/CaptureEventInterface.php index e0db6c98..f3680e71 100755 --- a/NotifierEventApi/Model/CaptureEventInterface.php +++ b/NotifierEventApi/Model/CaptureEventInterface.php @@ -18,6 +18,7 @@ interface CaptureEventInterface { /** * Capture event and return true if handled + * * @param string $eventName * @param array $data * @return bool diff --git a/NotifierEventApi/Model/FireRuleInterface.php b/NotifierEventApi/Model/FireRuleInterface.php index a9c7182f..84b392e9 100755 --- a/NotifierEventApi/Model/FireRuleInterface.php +++ b/NotifierEventApi/Model/FireRuleInterface.php @@ -16,6 +16,8 @@ interface FireRuleInterface { /** + * Fire a rule + * * @param int $ruleId * @param string $eventName * @param array $data diff --git a/NotifierEventApi/Model/GetRulesIdsByEventInterface.php b/NotifierEventApi/Model/GetRulesIdsByEventInterface.php index cce9c928..20beae95 100755 --- a/NotifierEventApi/Model/GetRulesIdsByEventInterface.php +++ b/NotifierEventApi/Model/GetRulesIdsByEventInterface.php @@ -19,6 +19,8 @@ interface GetRulesIdsByEventInterface { /** + * Get RulesIds by Event + * * @param string $eventName * @return array */ diff --git a/NotifierEventApi/Model/Rule/Validator/ValidateRule.php b/NotifierEventApi/Model/Rule/Validator/ValidateRule.php index ef7fd5a8..3c7dce3d 100755 --- a/NotifierEventApi/Model/Rule/Validator/ValidateRule.php +++ b/NotifierEventApi/Model/Rule/Validator/ValidateRule.php @@ -11,6 +11,7 @@ use Magento\NotifierEventApi\Api\Data\RuleInterface; /** + * @inheritdoc * @api */ class ValidateRule implements ValidateRuleInterface @@ -36,7 +37,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(RuleInterface $rule): bool { diff --git a/NotifierEventApi/Model/Rule/Validator/ValidateRuleInterface.php b/NotifierEventApi/Model/Rule/Validator/ValidateRuleInterface.php index 908c327a..a921e8d4 100755 --- a/NotifierEventApi/Model/Rule/Validator/ValidateRuleInterface.php +++ b/NotifierEventApi/Model/Rule/Validator/ValidateRuleInterface.php @@ -20,6 +20,7 @@ interface ValidateRuleInterface { /** * Execute validation. Return true on success or trigger an exception on failure + * * @param RuleInterface $rule * @return bool * @throws ValidatorException diff --git a/NotifierEventApi/Model/ThrottleInterface.php b/NotifierEventApi/Model/ThrottleInterface.php index 6a9e4d4e..97c7e442 100755 --- a/NotifierEventApi/Model/ThrottleInterface.php +++ b/NotifierEventApi/Model/ThrottleInterface.php @@ -19,6 +19,7 @@ interface ThrottleInterface { /** * Update throttle information and true if rule exceeded the throttle quota + * * @param RuleInterface $rule * @return bool */ diff --git a/NotifierSecurity/Model/NotifierInterface.php b/NotifierSecurity/Model/NotifierInterface.php index ee5431d2..dbe35f28 100644 --- a/NotifierSecurity/Model/NotifierInterface.php +++ b/NotifierSecurity/Model/NotifierInterface.php @@ -10,6 +10,8 @@ interface NotifierInterface { /** + * Notifier by Event + * * @param string $eventName * @param array $eventData * @return void diff --git a/NotifierSecurity/Model/NotifyByEvent.php b/NotifierSecurity/Model/NotifyByEvent.php index cd593bb1..819da3eb 100644 --- a/NotifierSecurity/Model/NotifyByEvent.php +++ b/NotifierSecurity/Model/NotifyByEvent.php @@ -9,6 +9,9 @@ use Psr\Log\LoggerInterface; +/** + * Class for Notify by Event + */ class NotifyByEvent implements NotifierInterface { /** diff --git a/NotifierSecurity/Model/NotifyByEvent/AdminForgotPassword.php b/NotifierSecurity/Model/NotifyByEvent/AdminForgotPassword.php index a6c80bb0..760e1a8e 100644 --- a/NotifierSecurity/Model/NotifyByEvent/AdminForgotPassword.php +++ b/NotifierSecurity/Model/NotifyByEvent/AdminForgotPassword.php @@ -11,6 +11,9 @@ use Magento\NotifierSecurity\Model\NotifierInterface; use Magento\NotifierTemplateApi\Model\SendMessageInterface; +/** + * Class for Admin Forgot Password + */ class AdminForgotPassword implements NotifierInterface { /** @@ -52,6 +55,8 @@ public function __construct( } /** + * Send message + * * @param string $eventName * @param array $eventData * @return void diff --git a/NotifierSecurity/Model/NotifyByEvent/AdminUserSave.php b/NotifierSecurity/Model/NotifyByEvent/AdminUserSave.php index 73205115..82c0db5f 100644 --- a/NotifierSecurity/Model/NotifyByEvent/AdminUserSave.php +++ b/NotifierSecurity/Model/NotifyByEvent/AdminUserSave.php @@ -11,6 +11,9 @@ use Magento\NotifierSecurity\Model\NotifierInterface; use Magento\NotifierTemplateApi\Model\SendMessageInterface; +/** + * Class for Admin User Save + */ class AdminUserSave implements NotifierInterface { /** @@ -68,6 +71,8 @@ public function __construct( } /** + * @inheritdoc + * * @param string $eventName * @param array $eventData * @return void diff --git a/NotifierSecurity/Model/NotifyByEvent/NotifyByConfig.php b/NotifierSecurity/Model/NotifyByEvent/NotifyByConfig.php index 7db27f0b..d76ba963 100644 --- a/NotifierSecurity/Model/NotifyByEvent/NotifyByConfig.php +++ b/NotifierSecurity/Model/NotifyByEvent/NotifyByConfig.php @@ -11,6 +11,9 @@ use Magento\NotifierSecurity\Model\NotifierInterface; use Magento\NotifierTemplateApi\Model\SendMessageInterface; +/** + * Class for Notify by Config + */ class NotifyByConfig implements NotifierInterface { /** @@ -52,6 +55,8 @@ public function __construct( } /** + * Send message + * * @param string $eventName * @param array $eventData * @return void diff --git a/NotifierSecurity/Model/Source/Channel.php b/NotifierSecurity/Model/Source/Channel.php index 2821ccf4..0c123ea1 100644 --- a/NotifierSecurity/Model/Source/Channel.php +++ b/NotifierSecurity/Model/Source/Channel.php @@ -11,6 +11,9 @@ use Magento\Framework\Option\ArrayInterface; use Magento\NotifierApi\Api\ChannelRepositoryInterface; +/** + * @inheritdoc + */ class Channel implements ArrayInterface { /** diff --git a/NotifierSecurity/Observer/OnEvent.php b/NotifierSecurity/Observer/OnEvent.php index 4d939d75..68a7ce85 100644 --- a/NotifierSecurity/Observer/OnEvent.php +++ b/NotifierSecurity/Observer/OnEvent.php @@ -11,6 +11,9 @@ use Magento\Framework\Event\ObserverInterface; use Magento\NotifierSecurity\Model\NotifyByEvent; +/** + * @inheritdoc + */ class OnEvent implements ObserverInterface { /** @@ -27,6 +30,8 @@ public function __construct(NotifyByEvent $notifyByEvent) } /** + * @inheritdoc + * * @param Observer $observer * @return void */ diff --git a/NotifierSlackAdapter/Model/AdapterEngine/Slack.php b/NotifierSlackAdapter/Model/AdapterEngine/Slack.php index 584797f1..1be761b1 100755 --- a/NotifierSlackAdapter/Model/AdapterEngine/Slack.php +++ b/NotifierSlackAdapter/Model/AdapterEngine/Slack.php @@ -13,6 +13,9 @@ use Magento\NotifierApi\Model\AdapterEngine\AdapterEngineInterface; use Magento\NotifierSlackAdapter\Model\AdapterEngine\Slack\ClientFactory; +/** + * @inheritdoc + */ class Slack implements AdapterEngineInterface { /** @@ -73,7 +76,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(string $message, array $configParams = [], array $params = []): bool { @@ -89,6 +92,8 @@ public function execute(string $message, array $configParams = [], array $params } /** + * Params to Settings + * * @param array $params * @return array */ @@ -102,6 +107,8 @@ private function paramsToSettings(array $params): array } /** + * Get Client + * * @param array $params * @return Client */ diff --git a/NotifierSlackAdapter/Model/AdapterEngine/Slack/ClientFactory.php b/NotifierSlackAdapter/Model/AdapterEngine/Slack/ClientFactory.php index b5ad392f..3c85c97c 100644 --- a/NotifierSlackAdapter/Model/AdapterEngine/Slack/ClientFactory.php +++ b/NotifierSlackAdapter/Model/AdapterEngine/Slack/ClientFactory.php @@ -10,9 +10,14 @@ use Maknz\Slack\Client; +/** + * Class for Client Factory + */ class ClientFactory { /** + * Client + * * @param string $webhook * @param array $settings * @return Client diff --git a/NotifierSlackAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Slack.php b/NotifierSlackAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Slack.php index cca736f7..9b9d9513 100755 --- a/NotifierSlackAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Slack.php +++ b/NotifierSlackAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Slack.php @@ -12,6 +12,9 @@ use Magento\Ui\Component\Form\Fieldset; use Magento\NotifierAdminUi\Model\Channel\ModifierInterface; +/** + * @inheritdoc + */ class Slack implements ModifierInterface { /** diff --git a/NotifierTelegramAdapter/Command/Telegram/GetChatIdsCommand.php b/NotifierTelegramAdapter/Command/Telegram/GetChatIdsCommand.php index 33cb4c02..c2c0be1c 100755 --- a/NotifierTelegramAdapter/Command/Telegram/GetChatIdsCommand.php +++ b/NotifierTelegramAdapter/Command/Telegram/GetChatIdsCommand.php @@ -16,6 +16,9 @@ use Symfony\Component\Console\Helper\Table; +/** + * @inheritdoc + */ class GetChatIdsCommand extends Command { /** @@ -48,7 +51,6 @@ protected function configure() /** * @inheritdoc - * @SuppressWarnings("PHPMD.UnusedFormalParameter") */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram.php b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram.php index a2578f50..5acea75a 100755 --- a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram.php +++ b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram.php @@ -13,6 +13,9 @@ use Magento\NotifierTelegramAdapter\Model\AdapterEngine\Telegram\ClientRepository; use Psr\Log\LoggerInterface; +/** + * @inheritdoc + */ class Telegram implements AdapterEngineInterface { /** @@ -53,7 +56,8 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc + * * @throws LocalizedException */ public function execute(string $message, array $configParams = [], array $params = []): bool diff --git a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/BotFactory.php b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/BotFactory.php index d2d17269..914afc46 100644 --- a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/BotFactory.php +++ b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/BotFactory.php @@ -10,8 +10,17 @@ use TelegramBot\Api\BotApi; +/** + * Class for Bot Factory + */ class BotFactory { + /** + * Create + * + * @param string $token + * @return BotApi + */ public function create(string $token): BotApi { return new BotApi($token); diff --git a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/ClientRepository.php b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/ClientRepository.php index ae7f2525..ee21c40d 100755 --- a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/ClientRepository.php +++ b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/ClientRepository.php @@ -10,6 +10,9 @@ use TelegramBot\Api\BotApi; +/** + * Class for Client Repository + */ class ClientRepository { /** @@ -24,6 +27,7 @@ class ClientRepository /** * ClientRepository constructor. + * * @param BotFactory $botFactory */ public function __construct(BotFactory $botFactory) @@ -33,6 +37,7 @@ public function __construct(BotFactory $botFactory) /** * Get a telegram client by token + * * @param string $token * @return BotApi */ diff --git a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/GetChatIds.php b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/GetChatIds.php index 0852ce02..afcd621e 100755 --- a/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/GetChatIds.php +++ b/NotifierTelegramAdapter/Model/AdapterEngine/Telegram/GetChatIds.php @@ -11,6 +11,9 @@ use TelegramBot\Api\Exception; use TelegramBot\Api\InvalidArgumentException; +/** + * Class for Get Telegram Chat Ids + */ class GetChatIds { /** @@ -30,6 +33,7 @@ public function __construct( /** * Get a telegram client by token + * * @param string $token * @return array * @throws Exception diff --git a/NotifierTelegramAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Telegram.php b/NotifierTelegramAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Telegram.php index 29e017d2..1e744ae5 100755 --- a/NotifierTelegramAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Telegram.php +++ b/NotifierTelegramAdapterAdminUi/Ui/DataProvider/Form/Channel/Modifier/Telegram.php @@ -12,6 +12,9 @@ use Magento\Ui\Component\Form\Fieldset; use Magento\NotifierAdminUi\Model\Channel\ModifierInterface; +/** + * @inheritdoc + */ class Telegram implements ModifierInterface { /** diff --git a/NotifierTemplate/Model/DatabaseTemplate.php b/NotifierTemplate/Model/DatabaseTemplate.php index 7eb38f2e..aa6bcdbe 100755 --- a/NotifierTemplate/Model/DatabaseTemplate.php +++ b/NotifierTemplate/Model/DatabaseTemplate.php @@ -13,7 +13,7 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class DatabaseTemplate extends AbstractExtensibleModel implements DatabaseTemplateInterface diff --git a/NotifierTemplate/Model/DatabaseTemplate/Command/GetList.php b/NotifierTemplate/Model/DatabaseTemplate/Command/GetList.php index 9a97b220..9c24c6f0 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Command/GetList.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Command/GetList.php @@ -46,7 +46,6 @@ class GetList implements GetListInterface * @param DatabaseTemplateSearchResultsInterfaceFactory $searchResultsFactory * @param SearchCriteriaBuilder $searchCriteriaBuilder * @param CollectionProcessorInterface $collectionProcessor - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( CollectionFactory $collectionFactory, diff --git a/NotifierTemplate/Model/DatabaseTemplate/Command/GetListInterface.php b/NotifierTemplate/Model/DatabaseTemplate/Command/GetListInterface.php index 0582aee8..03f5312d 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Command/GetListInterface.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Command/GetListInterface.php @@ -25,6 +25,7 @@ interface GetListInterface { /** * Find DatabaseTemplate by given SearchCriteria + * * SearchCriteria is not required because load all sources is useful case * * @param SearchCriteriaInterface|null $searchCriteria diff --git a/NotifierTemplate/Model/DatabaseTemplate/Command/Save.php b/NotifierTemplate/Model/DatabaseTemplate/Command/Save.php index e6556629..34fb5a42 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Command/Save.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Command/Save.php @@ -37,7 +37,7 @@ class Save implements SaveInterface /** * @param DatabaseTemplate $resource * @param ValidateDatabaseTemplateInterface $validateDatabaseTemplate - * @SuppressWarnings(PHPMD.LongVariables) + * @param LoggerInterface $logger */ public function __construct( DatabaseTemplate $resource, diff --git a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateAdapter.php b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateAdapter.php index 92de514a..f56e49eb 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateAdapter.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateAdapter.php @@ -14,6 +14,9 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; use Magento\NotifierTemplateApi\Model\DatabaseTemplate\Validator\ValidateDatabaseTemplateInterface; +/** + * @inheritdoc + */ class ValidateAdapter implements ValidateDatabaseTemplateInterface { /** @@ -31,7 +34,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(DatabaseTemplateInterface $template): bool { diff --git a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateCode.php b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateCode.php index 1623d5ba..d326e34d 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateCode.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateCode.php @@ -12,10 +12,13 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; use Magento\NotifierTemplateApi\Model\DatabaseTemplate\Validator\ValidateDatabaseTemplateInterface; +/** + * @inheritdoc + */ class ValidateCode implements ValidateDatabaseTemplateInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(DatabaseTemplateInterface $template): bool { @@ -24,8 +27,7 @@ public function execute(DatabaseTemplateInterface $template): bool } if (!preg_match('/^(\w+:)?[\w_]+$/', $template->getCode())) { - throw new ValidatorException(__('Invalid template identifier: Only alphanumeric chars + columns') - ); + throw new ValidatorException(__('Invalid template identifier: Only alphanumeric chars + columns')); } return true; diff --git a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateName.php b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateName.php index 9cb73978..901fa355 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateName.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateName.php @@ -12,10 +12,13 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; use Magento\NotifierTemplateApi\Model\DatabaseTemplate\Validator\ValidateDatabaseTemplateInterface; +/** + * @inheritdoc + */ class ValidateName implements ValidateDatabaseTemplateInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(DatabaseTemplateInterface $template): bool { diff --git a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateTemplate.php b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateTemplate.php index 5c0dfce2..7282d2ac 100755 --- a/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateTemplate.php +++ b/NotifierTemplate/Model/DatabaseTemplate/Validator/ValidateTemplate.php @@ -12,10 +12,13 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; use Magento\NotifierTemplateApi\Model\DatabaseTemplate\Validator\ValidateDatabaseTemplateInterface; +/** + * @inheritdoc + */ class ValidateTemplate implements ValidateDatabaseTemplateInterface { /** - * @inheritDoc + * @inheritdoc */ public function execute(DatabaseTemplateInterface $template): bool { diff --git a/NotifierTemplate/Model/DatabaseTemplateRepository.php b/NotifierTemplate/Model/DatabaseTemplateRepository.php index 33b2c189..9f66a9fd 100755 --- a/NotifierTemplate/Model/DatabaseTemplateRepository.php +++ b/NotifierTemplate/Model/DatabaseTemplateRepository.php @@ -20,9 +20,7 @@ use Magento\NotifierTemplateApi\Api\DatabaseTemplateSearchResultsInterface; /** - * @SuppressWarnings(PHPMD.ShortVariable) - * @SuppressWarnings(PHPMD.LongVariable) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @inheritdoc */ class DatabaseTemplateRepository implements DatabaseTemplateRepositoryInterface { diff --git a/NotifierTemplate/Model/DatabaseTemplateSearchResults.php b/NotifierTemplate/Model/DatabaseTemplateSearchResults.php index 1e4c0a7b..18f2b70e 100755 --- a/NotifierTemplate/Model/DatabaseTemplateSearchResults.php +++ b/NotifierTemplate/Model/DatabaseTemplateSearchResults.php @@ -11,6 +11,9 @@ use Magento\Framework\Api\SearchResults; use Magento\NotifierTemplateApi\Api\DatabaseTemplateSearchResultsInterface; +/** + * @inheritdoc + */ class DatabaseTemplateSearchResults extends SearchResults implements DatabaseTemplateSearchResultsInterface { diff --git a/NotifierTemplate/Model/FilesystemTemplateRepository.php b/NotifierTemplate/Model/FilesystemTemplateRepository.php index 5a2e291d..14c04076 100755 --- a/NotifierTemplate/Model/FilesystemTemplateRepository.php +++ b/NotifierTemplate/Model/FilesystemTemplateRepository.php @@ -11,6 +11,9 @@ use Magento\Framework\Config\Reader\Filesystem as ConfigReader; use Magento\Framework\Exception\NoSuchEntityException; +/** + * @inheritdoc + */ class FilesystemTemplateRepository implements FilesystemTemplateRepositoryInterface { /** diff --git a/NotifierTemplate/Model/FilesystemTemplateRepositoryInterface.php b/NotifierTemplate/Model/FilesystemTemplateRepositoryInterface.php index 21bd6775..1be9840f 100755 --- a/NotifierTemplate/Model/FilesystemTemplateRepositoryInterface.php +++ b/NotifierTemplate/Model/FilesystemTemplateRepositoryInterface.php @@ -19,12 +19,14 @@ interface FilesystemTemplateRepositoryInterface { /** * Get a list of available templates + * * @return array */ public function getList(): array; /** * Get template file by template ID + * * @param string $templateId * @return string * @throws NoSuchEntityException diff --git a/NotifierTemplate/Model/GetMessageText.php b/NotifierTemplate/Model/GetMessageText.php index ab0f2f92..fdabcea1 100755 --- a/NotifierTemplate/Model/GetMessageText.php +++ b/NotifierTemplate/Model/GetMessageText.php @@ -14,6 +14,9 @@ use Magento\NotifierTemplateApi\Model\VariablesDecorator\DecorateVariablesInterface; use Psr\Log\LoggerInterface; +/** + * @inheritdoc + */ class GetMessageText implements GetMessageTextInterface { /** @@ -41,7 +44,6 @@ class GetMessageText implements GetMessageTextInterface * @param TemplateGetterInterface $templateGetter * @param DecorateVariablesInterface $decorateVariables * @param LoggerInterface $logger - * @SuppressWarnings(PHPMD.LongVariables) */ public function __construct( Template $template, @@ -56,7 +58,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(string $channelCode, string $templateId, array $params = []): string { diff --git a/NotifierTemplate/Model/ResourceModel/DatabaseTemplate.php b/NotifierTemplate/Model/ResourceModel/DatabaseTemplate.php index c28b69c5..6b857eb5 100755 --- a/NotifierTemplate/Model/ResourceModel/DatabaseTemplate.php +++ b/NotifierTemplate/Model/ResourceModel/DatabaseTemplate.php @@ -12,7 +12,7 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class DatabaseTemplate extends AbstractDb { diff --git a/NotifierTemplate/Model/ResourceModel/DatabaseTemplate/Collection.php b/NotifierTemplate/Model/ResourceModel/DatabaseTemplate/Collection.php index 59f2495b..562f9403 100755 --- a/NotifierTemplate/Model/ResourceModel/DatabaseTemplate/Collection.php +++ b/NotifierTemplate/Model/ResourceModel/DatabaseTemplate/Collection.php @@ -13,7 +13,7 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; /** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) + * @inheritdoc */ class Collection extends AbstractCollection { @@ -32,6 +32,7 @@ protected function _construct() /** * Filter adapter candidates + * * @param string $adapterCode * @param string $templateId */ diff --git a/NotifierTemplate/Model/SendMessage.php b/NotifierTemplate/Model/SendMessage.php index 30ffe3cf..ca053ccf 100755 --- a/NotifierTemplate/Model/SendMessage.php +++ b/NotifierTemplate/Model/SendMessage.php @@ -12,6 +12,9 @@ use Magento\NotifierTemplateApi\Model\SendMessageInterface; use Magento\NotifierTemplateApi\Model\GetMessageTextInterface; +/** + * @inheritdoc + */ class SendMessage implements SendMessageInterface { /** @@ -38,7 +41,8 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc + * * @throws NoSuchEntityException */ public function execute(string $channelCode, string $template, array $params = []): bool diff --git a/NotifierTemplate/Model/Template/Config/Converter.php b/NotifierTemplate/Model/Template/Config/Converter.php index fdb27184..a74d0b80 100755 --- a/NotifierTemplate/Model/Template/Config/Converter.php +++ b/NotifierTemplate/Model/Template/Config/Converter.php @@ -10,6 +10,9 @@ use Magento\Framework\Config\ConverterInterface; +/** + * @inheritdoc + */ class Converter implements ConverterInterface { /** diff --git a/NotifierTemplate/Model/Template/Config/SchemaLocator.php b/NotifierTemplate/Model/Template/Config/SchemaLocator.php index fce80402..336b8e43 100755 --- a/NotifierTemplate/Model/Template/Config/SchemaLocator.php +++ b/NotifierTemplate/Model/Template/Config/SchemaLocator.php @@ -12,6 +12,9 @@ use Magento\Framework\Module\Dir; use Magento\Framework\Module\Dir\Reader; +/** + * @inheritdoc + */ class SchemaLocator implements SchemaLocatorInterface { private $schema; diff --git a/NotifierTemplate/Model/TemplateGetter/DatabaseTemplateGetter.php b/NotifierTemplate/Model/TemplateGetter/DatabaseTemplateGetter.php index f389941a..c0845ac1 100755 --- a/NotifierTemplate/Model/TemplateGetter/DatabaseTemplateGetter.php +++ b/NotifierTemplate/Model/TemplateGetter/DatabaseTemplateGetter.php @@ -15,6 +15,9 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; use Magento\NotifierTemplateApi\Model\TemplateGetter\TemplateGetterInterface; +/** + * @inheritdoc + */ class DatabaseTemplateGetter implements TemplateGetterInterface { /** @@ -27,6 +30,10 @@ class DatabaseTemplateGetter implements TemplateGetterInterface */ private $channelRepository; + /** + * @param CollectionFactory $collectionFactory + * @param ChannelRepositoryInterface $channelRepository + */ public function __construct( CollectionFactory $collectionFactory, ChannelRepositoryInterface $channelRepository diff --git a/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter.php b/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter.php index 43802d49..3f5c22f5 100755 --- a/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter.php +++ b/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter.php @@ -16,6 +16,9 @@ use Magento\NotifierTemplate\Model\TemplateGetter\FilesystemTemplateGetter\GetTemplateFile; use Magento\NotifierTemplateApi\Model\TemplateGetter\TemplateGetterInterface; +/** + * @inheritdoc + */ class FilesystemTemplateGetter implements TemplateGetterInterface { /** @@ -43,7 +46,6 @@ class FilesystemTemplateGetter implements TemplateGetterInterface * @param File $file * @param FilesystemTemplateRepositoryInterface $filesystemTemplateRepository * @param GetTemplateFile $getTemplateFile - * @SuppressWarnings(PHPMD.LongVariables) */ public function __construct( ChannelRepositoryInterface $channelRepository, @@ -59,6 +61,7 @@ public function __construct( /** * Get an adapter template + * * @param string $adapterCode * @param string $templateId * @return string @@ -81,6 +84,7 @@ public function getAdapterTemplate(string $adapterCode, string $templateId): ?st /** * @inheritdoc + * * @throws LocalizedException */ public function getTemplate(string $channelCode, string $templateId): ?string diff --git a/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter/GetTemplateFile.php b/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter/GetTemplateFile.php index 139213e1..b48d3b7a 100644 --- a/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter/GetTemplateFile.php +++ b/NotifierTemplate/Model/TemplateGetter/FilesystemTemplateGetter/GetTemplateFile.php @@ -17,6 +17,9 @@ use Magento\NotifierTemplate\Model\FilesystemTemplateRepository; use Magento\NotifierTemplate\Model\FilesystemTemplateRepositoryInterface; +/** + * Class for Get Template file + */ class GetTemplateFile { /** @@ -38,7 +41,6 @@ class GetTemplateFile * @param File $file * @param Reader $reader * @param FilesystemTemplateRepositoryInterface $filesystemTemplateRepository - * @SuppressWarnings(PHPMD.LongVariables) */ public function __construct( File $file, diff --git a/NotifierTemplate/Model/TemplateGetter/TemplateGetter.php b/NotifierTemplate/Model/TemplateGetter/TemplateGetter.php index d688ebf4..077aa628 100755 --- a/NotifierTemplate/Model/TemplateGetter/TemplateGetter.php +++ b/NotifierTemplate/Model/TemplateGetter/TemplateGetter.php @@ -10,6 +10,9 @@ use Magento\NotifierTemplateApi\Model\TemplateGetter\TemplateGetterInterface; +/** + * @inheritdoc + */ class TemplateGetter implements TemplateGetterInterface { /** diff --git a/NotifierTemplate/Model/VariablesDecorator/AdminVariables.php b/NotifierTemplate/Model/VariablesDecorator/AdminVariables.php index 71263c61..82a8f26e 100755 --- a/NotifierTemplate/Model/VariablesDecorator/AdminVariables.php +++ b/NotifierTemplate/Model/VariablesDecorator/AdminVariables.php @@ -11,6 +11,10 @@ use Magento\Backend\Model\Auth\Session; use Magento\NotifierTemplateApi\Model\VariablesDecorator\DecorateVariablesInterface; +/** + * @inheritdoc + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) + */ class AdminVariables implements DecorateVariablesInterface { /** diff --git a/NotifierTemplate/Model/VariablesDecorator/CoreVariables.php b/NotifierTemplate/Model/VariablesDecorator/CoreVariables.php index d7d53393..c8f8c16a 100755 --- a/NotifierTemplate/Model/VariablesDecorator/CoreVariables.php +++ b/NotifierTemplate/Model/VariablesDecorator/CoreVariables.php @@ -13,6 +13,9 @@ use Magento\Store\Model\StoreManagerInterface; use Magento\NotifierTemplateApi\Model\VariablesDecorator\DecorateVariablesInterface; +/** + * @inheritdoc + */ class CoreVariables implements DecorateVariablesInterface { /** diff --git a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateAdapterTest.php b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateAdapterTest.php index e15cf36c..b2c5274b 100644 --- a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateAdapterTest.php +++ b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateAdapterTest.php @@ -31,7 +31,7 @@ class ValidateAdapterTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateCodeTest.php b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateCodeTest.php index ee8c0fc8..05559de7 100644 --- a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateCodeTest.php +++ b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateCodeTest.php @@ -30,7 +30,7 @@ class ValidateCodeTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateNameTest.php b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateNameTest.php index 37caff58..1d2a339d 100644 --- a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateNameTest.php +++ b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateNameTest.php @@ -30,7 +30,7 @@ class ValidateNameTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateTemplateTest.php b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateTemplateTest.php index 3705eb8a..d1ff5cf3 100644 --- a/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateTemplateTest.php +++ b/NotifierTemplate/Test/Integration/DatabaseTemplate/Validator/ValidateTemplateTest.php @@ -30,7 +30,7 @@ class ValidateTemplateTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierTemplate/Test/Integration/DatabaseTemplateRepositoryTest.php b/NotifierTemplate/Test/Integration/DatabaseTemplateRepositoryTest.php index 0760ce69..063defab 100644 --- a/NotifierTemplate/Test/Integration/DatabaseTemplateRepositoryTest.php +++ b/NotifierTemplate/Test/Integration/DatabaseTemplateRepositoryTest.php @@ -29,7 +29,7 @@ class DatabaseTemplateRepositoryTest extends TestCase private $objectManager; /** - * @inheritDoc + * @inheritdoc */ protected function setUp() { diff --git a/NotifierTemplate/Test/Integration/Mock/FilesystemTemplateRepositoryMock.php b/NotifierTemplate/Test/Integration/Mock/FilesystemTemplateRepositoryMock.php index 4c681498..53ba1d93 100644 --- a/NotifierTemplate/Test/Integration/Mock/FilesystemTemplateRepositoryMock.php +++ b/NotifierTemplate/Test/Integration/Mock/FilesystemTemplateRepositoryMock.php @@ -13,7 +13,7 @@ class FilesystemTemplateRepositoryMock extends FilesystemTemplateRepository { /** - * @inheritDoc + * @inheritdoc */ public function get(string $templateId): string { diff --git a/NotifierTemplate/Test/Integration/Mock/ModuleDirReaderMock.php b/NotifierTemplate/Test/Integration/Mock/ModuleDirReaderMock.php index b82667ab..da061e3b 100644 --- a/NotifierTemplate/Test/Integration/Mock/ModuleDirReaderMock.php +++ b/NotifierTemplate/Test/Integration/Mock/ModuleDirReaderMock.php @@ -13,7 +13,7 @@ class ModuleDirReaderMock extends Reader { /** - * @inheritDoc + * @inheritdoc */ public function getModuleDir($type, $moduleName) { diff --git a/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Delete.php b/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Delete.php index b3908512..6aacea42 100755 --- a/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Delete.php +++ b/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Delete.php @@ -14,6 +14,9 @@ use Magento\NotifierTemplateApi\Api\DatabaseTemplateRepositoryInterface; use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; +/** + * @inheritdoc + */ class Delete extends Action implements HttpGetActionInterface { /** diff --git a/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Edit.php b/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Edit.php index 7b98599a..d0a5b3db 100755 --- a/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Edit.php +++ b/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Edit.php @@ -16,6 +16,9 @@ use Magento\NotifierTemplateApi\Api\DatabaseTemplateRepositoryInterface; use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; +/** + * @inheritdoc + */ class Edit extends Action implements HttpGetActionInterface { /** diff --git a/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Save.php b/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Save.php index 89e176fc..bfc5d53b 100755 --- a/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Save.php +++ b/NotifierTemplateAdminUi/Controller/Adminhtml/DatabaseTemplate/Save.php @@ -16,6 +16,9 @@ use Magento\NotifierTemplateApi\Api\DatabaseTemplateRepositoryInterface; use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; +/** + * @inheritdoc + */ class Save extends Action implements HttpPostActionInterface { /** @@ -44,7 +47,6 @@ class Save extends Action implements HttpPostActionInterface * @param DatabaseTemplateRepositoryInterface $templateRepository * @param DatabaseTemplateFactory $templateFactory * @param DataObjectHelper $dataObjectHelper - * @SuppressWarnings(PHPMD.LongVariable) */ public function __construct( Action\Context $context, @@ -87,6 +89,7 @@ public function execute(): ResultInterface /** * Save template + * * @param int $templateId * @param array $data * @return DatabaseTemplateInterface @@ -112,6 +115,7 @@ private function save(int $templateId, array $data): DatabaseTemplateInterface /** * Return a redirect result + * * @param int $templateId * @return ResultInterface */ @@ -130,6 +134,7 @@ private function redirectAfterFailure(int $templateId): ResultInterface /** * Return a redirect result after a successful save + * * @return ResultInterface */ private function redirectAfterSave(): ResultInterface diff --git a/NotifierTemplateAdminUi/Model/Source/DatabaseTemplate/Adapter.php b/NotifierTemplateAdminUi/Model/Source/DatabaseTemplate/Adapter.php index b9da24d2..1e9732fe 100755 --- a/NotifierTemplateAdminUi/Model/Source/DatabaseTemplate/Adapter.php +++ b/NotifierTemplateAdminUi/Model/Source/DatabaseTemplate/Adapter.php @@ -11,6 +11,9 @@ use Magento\Framework\Data\OptionSourceInterface; use Magento\NotifierApi\Api\AdaptersPoolInterface; +/** + * @inheritdoc + */ class Adapter implements OptionSourceInterface { /** @@ -18,6 +21,9 @@ class Adapter implements OptionSourceInterface */ private $adapterRepository; + /** + * @param AdaptersPoolInterface $adapterRepository + */ public function __construct( AdaptersPoolInterface $adapterRepository ) { diff --git a/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/BackButton.php b/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/BackButton.php index caccec24..01c0e5e4 100755 --- a/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/BackButton.php +++ b/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/BackButton.php @@ -11,6 +11,9 @@ use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; +/** + * @inheritdoc + */ class BackButton extends GenericButton implements ButtonProviderInterface { /** diff --git a/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/SaveButton.php b/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/SaveButton.php index b4aea683..d8c0c157 100755 --- a/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/SaveButton.php +++ b/NotifierTemplateAdminUi/Ui/Component/Form/DatabaseTemplate/SaveButton.php @@ -11,6 +11,9 @@ use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton; use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; +/** + * @inheritdoc + */ class SaveButton extends GenericButton implements ButtonProviderInterface { /** diff --git a/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/Actions.php b/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/Actions.php index 5b7d407a..dcc52681 100755 --- a/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/Actions.php +++ b/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/Actions.php @@ -11,6 +11,9 @@ use Magento\Ui\Component\Listing\Columns\Column; use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; +/** + * @inheritdoc + */ class Actions extends Column { /** diff --git a/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/NewButton.php b/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/NewButton.php index a535fe75..02298adc 100755 --- a/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/NewButton.php +++ b/NotifierTemplateAdminUi/Ui/Component/Listing/DatabaseTemplate/NewButton.php @@ -10,6 +10,9 @@ use Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Generic; +/** + * @inheritdoc + */ class NewButton extends Generic { /** diff --git a/NotifierTemplateAdminUi/Ui/DataProvider/Form/DatabaseTemplateDataProvider.php b/NotifierTemplateAdminUi/Ui/DataProvider/Form/DatabaseTemplateDataProvider.php index 9eb07181..6bb62244 100755 --- a/NotifierTemplateAdminUi/Ui/DataProvider/Form/DatabaseTemplateDataProvider.php +++ b/NotifierTemplateAdminUi/Ui/DataProvider/Form/DatabaseTemplateDataProvider.php @@ -20,6 +20,9 @@ use Magento\NotifierTemplate\Model\FilesystemTemplateRepositoryInterface; use Magento\NotifierTemplate\Model\TemplateGetter\FilesystemTemplateGetter; +/** + * @inheritdoc + */ class DatabaseTemplateDataProvider extends DataProvider { /** @@ -55,7 +58,6 @@ class DatabaseTemplateDataProvider extends DataProvider * @param AdaptersPoolInterface $adapterRepository * @param array $meta * @param array $data - * @SuppressWarnings(PHPMD.LongVariables) * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -91,6 +93,7 @@ public function __construct( /** * Get templates list + * * @return array */ private function getTemplates(): array @@ -103,6 +106,8 @@ private function getTemplates(): array } /** + * Get System Template by Adapter + * * @param AdapterInterface|null $adapter * @return array * @throws LocalizedException @@ -137,6 +142,7 @@ private function getSysTemplatesByAdapter($adapter): array /** * Get system templates + * * @return array * @throws LocalizedException */ diff --git a/NotifierTemplateAdminUi/Ui/DataProvider/Listing/DatabaseTemplateDataProvider.php b/NotifierTemplateAdminUi/Ui/DataProvider/Listing/DatabaseTemplateDataProvider.php index e034ff78..ad63d70f 100755 --- a/NotifierTemplateAdminUi/Ui/DataProvider/Listing/DatabaseTemplateDataProvider.php +++ b/NotifierTemplateAdminUi/Ui/DataProvider/Listing/DatabaseTemplateDataProvider.php @@ -10,6 +10,9 @@ use Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider; +/** + * @inheritdoc + */ class DatabaseTemplateDataProvider extends DataProvider { diff --git a/NotifierTemplateApi/Api/Data/DatabaseTemplateInterface.php b/NotifierTemplateApi/Api/Data/DatabaseTemplateInterface.php index 26ae4a86..3d4b8c30 100755 --- a/NotifierTemplateApi/Api/Data/DatabaseTemplateInterface.php +++ b/NotifierTemplateApi/Api/Data/DatabaseTemplateInterface.php @@ -17,12 +17,14 @@ interface DatabaseTemplateInterface extends ExtensibleDataInterface { /** * Get value for rule_id + * * @return int */ public function getId(); /** * Set value for rule_id + * * @param int $value * @return void */ @@ -30,12 +32,14 @@ public function setId($value); /** * Get value for code + * * @return string */ public function getCode(): string; /** * Set value for code + * * @param string $value * @return void */ @@ -43,12 +47,14 @@ public function setCode(string $value): void; /** * Get value for adapter_code + * * @return string */ public function getAdapterCode(): string; /** * Set value for adapter_code + * * @param string $value * @return void */ @@ -56,12 +62,14 @@ public function setAdapterCode(string $value): void; /** * Get value for name + * * @return string */ public function getName(): string; /** * Set value for name + * * @param string $value * @return void */ @@ -69,12 +77,14 @@ public function setName(string $value): void; /** * Get value for template + * * @return string */ public function getTemplate(): string; /** * Set value for template + * * @param string $value * @return void */ @@ -82,12 +92,14 @@ public function setTemplate(string $value): void; /** * Retrieve existing extension attributes object or create a new one + * * @return \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateExtensionInterface|null */ public function getExtensionAttributes(): ?\Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateExtensionInterface; /** * Set an extension attributes object + * * @param \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateExtensionInterface $extensionAttributes * @return $this */ diff --git a/NotifierTemplateApi/Api/DatabaseTemplateRepositoryInterface.php b/NotifierTemplateApi/Api/DatabaseTemplateRepositoryInterface.php index 5f96ce10..984d3bd9 100755 --- a/NotifierTemplateApi/Api/DatabaseTemplateRepositoryInterface.php +++ b/NotifierTemplateApi/Api/DatabaseTemplateRepositoryInterface.php @@ -8,6 +8,7 @@ namespace Magento\NotifierTemplateApi\Api; +// phpcs:disable Generic.Files.LineLength /** * @api */ @@ -15,6 +16,7 @@ interface DatabaseTemplateRepositoryInterface { /** * Save DatabaseTemplate + * * @param \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface $databaseTemplate * @return int */ @@ -22,6 +24,7 @@ public function save(\Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInter /** * Get DatabaseTemplate by id + * * @param int $databaseTemplateIid * @return \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface */ @@ -29,6 +32,7 @@ public function get(int $databaseTemplateIid): \Magento\NotifierTemplateApi\Api\ /** * Get by Code value + * * @param string $code * @return \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface * @throws \Magento\Framework\Exception\NoSuchEntityException @@ -37,6 +41,7 @@ public function getByCode(string $code): \Magento\NotifierTemplateApi\Api\Data\D /** * Get by AdapterCode value + * * @param string $adapterCode * @return \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface * @throws \Magento\Framework\Exception\NoSuchEntityException @@ -45,6 +50,7 @@ public function getByAdapterCode(string $adapterCode): \Magento\NotifierTemplate /** * Delete DatabaseTemplate + * * @param int $databaseTemplateIid * @return void */ @@ -52,6 +58,7 @@ public function deleteById(int $databaseTemplateIid): void; /** * Get a list of DatabaseTemplate + * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Magento\NotifierTemplateApi\Api\DatabaseTemplateSearchResultsInterface */ diff --git a/NotifierTemplateApi/Api/DatabaseTemplateSearchResultsInterface.php b/NotifierTemplateApi/Api/DatabaseTemplateSearchResultsInterface.php index a4559344..3ac2c37c 100755 --- a/NotifierTemplateApi/Api/DatabaseTemplateSearchResultsInterface.php +++ b/NotifierTemplateApi/Api/DatabaseTemplateSearchResultsInterface.php @@ -15,12 +15,14 @@ interface DatabaseTemplateSearchResultsInterface extends \Magento\Framework\Api\ { /** * Get an array of objects + * * @return \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface[] */ public function getItems(); /** * Set objects list + * * @param \Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface[] $items * @return $this */ diff --git a/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplate.php b/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplate.php index 1dd44665..386d267b 100755 --- a/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplate.php +++ b/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplate.php @@ -11,6 +11,7 @@ use Magento\NotifierTemplateApi\Api\Data\DatabaseTemplateInterface; /** + * @inheritdoc * @api */ class ValidateDatabaseTemplate implements ValidateDatabaseTemplateInterface @@ -22,6 +23,7 @@ class ValidateDatabaseTemplate implements ValidateDatabaseTemplateInterface /** * DatabaseTemplateValidatorChain constructor. + * * @param array $validators */ public function __construct( @@ -40,7 +42,7 @@ public function __construct( } /** - * @inheritDoc + * @inheritdoc */ public function execute(DatabaseTemplateInterface $template): bool { diff --git a/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplateInterface.php b/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplateInterface.php index 0e070d8a..01d0843f 100755 --- a/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplateInterface.php +++ b/NotifierTemplateApi/Model/DatabaseTemplate/Validator/ValidateDatabaseTemplateInterface.php @@ -20,6 +20,7 @@ interface ValidateDatabaseTemplateInterface { /** * Execute validation. Return true on success or trigger an exception on failure + * * @param DatabaseTemplateInterface $template * @return bool * @throws ValidatorException diff --git a/NotifierTemplateApi/Model/GetMessageTextInterface.php b/NotifierTemplateApi/Model/GetMessageTextInterface.php index f5fef29a..efd6fc71 100755 --- a/NotifierTemplateApi/Model/GetMessageTextInterface.php +++ b/NotifierTemplateApi/Model/GetMessageTextInterface.php @@ -19,6 +19,7 @@ interface GetMessageTextInterface { /** * Get a template formatted message + * * @param string $channelCode * @param string $templateId * @param array $params diff --git a/NotifierTemplateApi/Model/SendMessageInterface.php b/NotifierTemplateApi/Model/SendMessageInterface.php index 25161316..e5130474 100755 --- a/NotifierTemplateApi/Model/SendMessageInterface.php +++ b/NotifierTemplateApi/Model/SendMessageInterface.php @@ -15,6 +15,7 @@ interface SendMessageInterface { /** * Send a template formatted message + * * @param string $channelCode * @param string $template * @param array $params diff --git a/NotifierTemplateApi/Model/TemplateGetter/TemplateGetterInterface.php b/NotifierTemplateApi/Model/TemplateGetter/TemplateGetterInterface.php index 9d4e1f5e..f49c88f3 100755 --- a/NotifierTemplateApi/Model/TemplateGetter/TemplateGetterInterface.php +++ b/NotifierTemplateApi/Model/TemplateGetter/TemplateGetterInterface.php @@ -19,6 +19,7 @@ interface TemplateGetterInterface { /** * Get template content + * * @param string $channelCode * @param string $templateId * @return string|null @@ -28,6 +29,7 @@ public function getTemplate(string $channelCode, string $templateId): ?string; /** * Get a list of available templates + * * @return array */ public function getList(): array; diff --git a/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariables.php b/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariables.php index 149b9686..f4716178 100755 --- a/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariables.php +++ b/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariables.php @@ -9,6 +9,7 @@ namespace Magento\NotifierTemplateApi\Model\VariablesDecorator; /** + * @inheritdoc * @api */ class DecorateVariables implements DecorateVariablesInterface @@ -20,7 +21,6 @@ class DecorateVariables implements DecorateVariablesInterface /** * @param array $decorators - * @SuppressWarnings(PHPMD.LongVariables) */ public function __construct( array $decorators diff --git a/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariablesInterface.php b/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariablesInterface.php index bd6bd317..0b6af850 100755 --- a/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariablesInterface.php +++ b/NotifierTemplateApi/Model/VariablesDecorator/DecorateVariablesInterface.php @@ -18,6 +18,7 @@ interface DecorateVariablesInterface /** * Decorate array with variables + * * @param array $data * @return array */ diff --git a/ReCaptcha/Model/ValidationConfig.php b/ReCaptcha/Model/ValidationConfig.php index 8e332da5..5c0a4f73 100644 --- a/ReCaptcha/Model/ValidationConfig.php +++ b/ReCaptcha/Model/ValidationConfig.php @@ -10,7 +10,7 @@ use Magento\ReCaptchaApi\Api\Data\ValidationConfigInterface; /** - * @inheritDoc + * @inheritdoc */ class ValidationConfig implements ValidationConfigInterface { @@ -53,6 +53,8 @@ public function __construct( } /** + * Get Private key + * * @return string */ public function getPrivateKey(): string @@ -61,6 +63,8 @@ public function getPrivateKey(): string } /** + * Get Captcha type + * * @return string */ public function getCaptchaType(): string @@ -69,6 +73,8 @@ public function getCaptchaType(): string } /** + * Get Remote IP + * * @return string */ public function getRemoteIp(): string @@ -77,6 +83,8 @@ public function getRemoteIp(): string } /** + * Get Score threshold + * * @return float|null */ public function getScoreThreshold(): ?float diff --git a/ReCaptcha/Setup/Patch/Data/CopyConfigFromOldModule.php b/ReCaptcha/Setup/Patch/Data/CopyConfigFromOldModule.php index 2d6d9bf1..a97b5fdc 100644 --- a/ReCaptcha/Setup/Patch/Data/CopyConfigFromOldModule.php +++ b/ReCaptcha/Setup/Patch/Data/CopyConfigFromOldModule.php @@ -40,10 +40,7 @@ public function __construct( } /** - * {@inheritdoc} - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) + * @inheritdoc */ public function apply() { @@ -86,7 +83,7 @@ private function copyConfig(array $paths): void } /** - * {@inheritdoc} + * @inheritdoc */ public static function getDependencies() { @@ -94,7 +91,7 @@ public static function getDependencies() } /** - * {@inheritdoc} + * @inheritdoc */ public static function getVersion() { @@ -102,7 +99,7 @@ public static function getVersion() } /** - * {@inheritdoc} + * @inheritdoc */ public function getAliases() { diff --git a/ReCaptchaAdminUi/Block/ReCaptcha.php b/ReCaptchaAdminUi/Block/ReCaptcha.php index 81c24819..e09da3ff 100644 --- a/ReCaptchaAdminUi/Block/ReCaptcha.php +++ b/ReCaptchaAdminUi/Block/ReCaptcha.php @@ -11,6 +11,7 @@ use Magento\ReCaptchaApi\Api\CaptchaConfigInterface; /** + * @inheritdoc * @api */ class ReCaptcha extends Template @@ -36,6 +37,7 @@ public function __construct( /** * Get public reCaptcha key + * * @return string */ public function getPublicKey() @@ -45,6 +47,7 @@ public function getPublicKey() /** * Get backend theme + * @return string */ public function getTheme() @@ -54,6 +57,7 @@ public function getTheme() /** * Get backend size + * * @return string */ public function getSize() @@ -62,6 +66,8 @@ public function getSize() } /** + * @inheritdoc + * * @return string */ public function toHtml() diff --git a/ReCaptchaAdminUi/Model/CaptchaConfig.php b/ReCaptchaAdminUi/Model/CaptchaConfig.php index daa2c4db..0625c996 100644 --- a/ReCaptchaAdminUi/Model/CaptchaConfig.php +++ b/ReCaptchaAdminUi/Model/CaptchaConfig.php @@ -119,6 +119,8 @@ public function getErrorMessage(): Phrase } /** + * @inheritdoc + * * @return bool */ public function isInvisibleRecaptcha(): bool diff --git a/ReCaptchaAdminUi/Model/Config/Source/Position.php b/ReCaptchaAdminUi/Model/Config/Source/Position.php index 73d50b01..8ba41e35 100644 --- a/ReCaptchaAdminUi/Model/Config/Source/Position.php +++ b/ReCaptchaAdminUi/Model/Config/Source/Position.php @@ -15,7 +15,7 @@ class Position implements OptionSourceInterface { /** - * @inheritDoc + * @inheritdoc */ public function toOptionArray() { diff --git a/ReCaptchaAdminUi/Model/Config/Source/Size.php b/ReCaptchaAdminUi/Model/Config/Source/Size.php index f58b51c0..1c9c0389 100644 --- a/ReCaptchaAdminUi/Model/Config/Source/Size.php +++ b/ReCaptchaAdminUi/Model/Config/Source/Size.php @@ -15,7 +15,7 @@ class Size implements OptionSourceInterface { /** - * @inheritDoc + * @inheritdoc */ public function toOptionArray() { diff --git a/ReCaptchaAdminUi/Model/Config/Source/Theme.php b/ReCaptchaAdminUi/Model/Config/Source/Theme.php index 5ea5ba17..848b0c43 100644 --- a/ReCaptchaAdminUi/Model/Config/Source/Theme.php +++ b/ReCaptchaAdminUi/Model/Config/Source/Theme.php @@ -15,7 +15,7 @@ class Theme implements OptionSourceInterface { /** - * @inheritDoc + * @inheritdoc */ public function toOptionArray() { diff --git a/ReCaptchaAdminUi/Model/Config/Source/Type.php b/ReCaptchaAdminUi/Model/Config/Source/Type.php index 87779278..fb0058f2 100644 --- a/ReCaptchaAdminUi/Model/Config/Source/Type.php +++ b/ReCaptchaAdminUi/Model/Config/Source/Type.php @@ -15,7 +15,7 @@ class Type implements OptionSourceInterface { /** - * @inheritDoc + * @inheritdoc */ public function toOptionArray() { diff --git a/ReCaptchaAdminUi/view/adminhtml/templates/recaptcha.phtml b/ReCaptchaAdminUi/view/adminhtml/templates/recaptcha.phtml index 998ce83f..2dfe8cea 100644 --- a/ReCaptchaAdminUi/view/adminhtml/templates/recaptcha.phtml +++ b/ReCaptchaAdminUi/view/adminhtml/templates/recaptcha.phtml @@ -31,14 +31,14 @@ $class = $block->getSize() === 'invisible' ? 'field-invisible-recaptcha' : 'fiel 'size': 'escapeJs($block->getSize()) ?>', 'badge': 'inline', 'callback': function (token) { // jscs:ignore jsDoc - getSize() === 'invisible') : ?> + getSize() === 'invisible'): ?> this.token = token; $('#login-form').submit(); }.bind(this) }); - getSize() === 'invisible') : ?> + getSize() === 'invisible'): ?> $('#login-form').submit(function (event) { if (!this.token) { event.preventDefault(event); diff --git a/ReCaptchaApi/Api/CaptchaConfigInterface.php b/ReCaptchaApi/Api/CaptchaConfigInterface.php index e757fea0..36c0a274 100644 --- a/ReCaptchaApi/Api/CaptchaConfigInterface.php +++ b/ReCaptchaApi/Api/CaptchaConfigInterface.php @@ -19,70 +19,84 @@ interface CaptchaConfigInterface { /** * Get google recaptcha public key + * * @return string */ public function getPublicKey(): string; /** * Get google recaptcha private key + * * @return string */ public function getPrivateKey(): string; /** * Sugar method. Return true if captcha keys (public and private) are configured + * * @return bool */ public function areKeysConfigured(): bool; /** * Get reCaptcha type + * * @return string */ public function getCaptchaType(): string; /** + * Is Invisible Recaptcha + * * @return bool */ public function isInvisibleRecaptcha(): bool; /** * Get size + * * @return string */ public function getSize(): string; /** * Get theme + * * @return string */ public function getTheme(): ?string; /** * Get minimum frontend score + * * @return float */ public function getScoreThreshold(): float; /** * Get error message + * * @return Phrase */ public function getErrorMessage(): Phrase; /** * Get language code + * * @return string */ public function getLanguageCode(): string; /** * Get position + * * @return string */ public function getPosition(): ?string; /** + * Is Captcha Enabled + * * @param string $key * @return bool */ diff --git a/ReCaptchaContact/Observer/ContactFormObserver.php b/ReCaptchaContact/Observer/ContactFormObserver.php index 64836ce2..91a2450d 100644 --- a/ReCaptchaContact/Observer/ContactFormObserver.php +++ b/ReCaptchaContact/Observer/ContactFormObserver.php @@ -16,7 +16,7 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * ContactFormObserver + * Class for Contact Form Observer */ class ContactFormObserver implements ObserverInterface { @@ -51,6 +51,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaCustomer/Observer/AjaxLoginObserver.php b/ReCaptchaCustomer/Observer/AjaxLoginObserver.php index dbb25e27..cb8f8876 100644 --- a/ReCaptchaCustomer/Observer/AjaxLoginObserver.php +++ b/ReCaptchaCustomer/Observer/AjaxLoginObserver.php @@ -20,7 +20,7 @@ use Magento\ReCaptchaApi\Api\Data\ValidationConfigInterfaceFactory; /** - * AjaxLoginObserver + * Class for Ajax Login Observer */ class AjaxLoginObserver implements ObserverInterface { @@ -79,6 +79,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaCustomer/Observer/CreateCustomerObserver.php b/ReCaptchaCustomer/Observer/CreateCustomerObserver.php index fb6b85c1..a6b70b8d 100644 --- a/ReCaptchaCustomer/Observer/CreateCustomerObserver.php +++ b/ReCaptchaCustomer/Observer/CreateCustomerObserver.php @@ -15,7 +15,7 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * CreateCustomerObserver + * Class for Create Customer Observer */ class CreateCustomerObserver implements ObserverInterface { @@ -50,6 +50,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws \Magento\Framework\Exception\LocalizedException diff --git a/ReCaptchaCustomer/Observer/ForgotPasswordObserver.php b/ReCaptchaCustomer/Observer/ForgotPasswordObserver.php index 95554733..02e25c79 100644 --- a/ReCaptchaCustomer/Observer/ForgotPasswordObserver.php +++ b/ReCaptchaCustomer/Observer/ForgotPasswordObserver.php @@ -16,7 +16,7 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * ForgotPasswordObserver + * Class for Forgot Password Observer */ class ForgotPasswordObserver implements ObserverInterface { @@ -51,6 +51,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaCustomer/Observer/LoginObserver.php b/ReCaptchaCustomer/Observer/LoginObserver.php index fb1dd97b..dc71a915 100644 --- a/ReCaptchaCustomer/Observer/LoginObserver.php +++ b/ReCaptchaCustomer/Observer/LoginObserver.php @@ -17,7 +17,9 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * LoginObserver + * Class for Login Observer + * + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class LoginObserver implements ObserverInterface { @@ -60,6 +62,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaCustomer/Plugin/Block/Account/InjectRecaptchaInAuthenticationPopup.php b/ReCaptchaCustomer/Plugin/Block/Account/InjectRecaptchaInAuthenticationPopup.php index e9b8ee9b..70e47b78 100644 --- a/ReCaptchaCustomer/Plugin/Block/Account/InjectRecaptchaInAuthenticationPopup.php +++ b/ReCaptchaCustomer/Plugin/Block/Account/InjectRecaptchaInAuthenticationPopup.php @@ -40,6 +40,8 @@ public function __construct( } /** + * After execute plugin + * * @param AuthenticationPopup $subject * @param string $result * @return string diff --git a/ReCaptchaFrontendUi/Block/ReCaptcha.php b/ReCaptchaFrontendUi/Block/ReCaptcha.php index 14156c0e..faf2288e 100644 --- a/ReCaptchaFrontendUi/Block/ReCaptcha.php +++ b/ReCaptchaFrontendUi/Block/ReCaptcha.php @@ -13,6 +13,7 @@ use Magento\ReCaptchaFrontendUi\Model\LayoutSettings; /** + * @inheritdoc * @api */ class ReCaptcha extends Template @@ -54,6 +55,7 @@ public function __construct( /** * Get public reCaptcha key + * * @return string */ public function getPublicKey() @@ -97,6 +99,8 @@ public function getJsLayout() } /** + * @inheritdoc + * * @return string */ public function toHtml() diff --git a/ReCaptchaFrontendUi/Model/CaptchaConfig.php b/ReCaptchaFrontendUi/Model/CaptchaConfig.php index 44bcb9d9..fe3bc7b7 100644 --- a/ReCaptchaFrontendUi/Model/CaptchaConfig.php +++ b/ReCaptchaFrontendUi/Model/CaptchaConfig.php @@ -115,6 +115,7 @@ public function getTheme(): ?string /** * Get language code + * * @return string */ public function getLanguageCode(): string diff --git a/ReCaptchaFrontendUi/Plugin/ExcludeFromMinification.php b/ReCaptchaFrontendUi/Plugin/ExcludeFromMinification.php index d5c2994d..be5e7a02 100644 --- a/ReCaptchaFrontendUi/Plugin/ExcludeFromMinification.php +++ b/ReCaptchaFrontendUi/Plugin/ExcludeFromMinification.php @@ -15,9 +15,11 @@ class ExcludeFromMinification { /** + * Around execute plugin + * * @param Minification $subject * @param callable $proceed - * @param $contentType + * @param string[] $contentType * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/ReCaptchaNewsletter/Observer/NewsletterObserver.php b/ReCaptchaNewsletter/Observer/NewsletterObserver.php index ac14f118..0e17268d 100644 --- a/ReCaptchaNewsletter/Observer/NewsletterObserver.php +++ b/ReCaptchaNewsletter/Observer/NewsletterObserver.php @@ -17,7 +17,7 @@ use Magento\ReCaptchaNewsletter\Model\IsEnabledForNewsletterInterface; /** - * NewsletterObserver + * Class for Newsletter Observer */ class NewsletterObserver implements ObserverInterface { @@ -52,6 +52,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaReview/Observer/ReviewFormObserver.php b/ReCaptchaReview/Observer/ReviewFormObserver.php index b3136960..1e158b2c 100644 --- a/ReCaptchaReview/Observer/ReviewFormObserver.php +++ b/ReCaptchaReview/Observer/ReviewFormObserver.php @@ -16,7 +16,7 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * ReviewFormObserver + * Class for Review Form Observer */ class ReviewFormObserver implements ObserverInterface { @@ -51,6 +51,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaSendFriend/Observer/SendFriendObserver.php b/ReCaptchaSendFriend/Observer/SendFriendObserver.php index a2b541eb..8fd35d3e 100644 --- a/ReCaptchaSendFriend/Observer/SendFriendObserver.php +++ b/ReCaptchaSendFriend/Observer/SendFriendObserver.php @@ -16,7 +16,7 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * SendFriendObserver + * Class for Send Friend Observer */ class SendFriendObserver implements ObserverInterface { @@ -51,6 +51,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaUser/Command/DisableReCaptchaForUserForgotPasswordCommand.php b/ReCaptchaUser/Command/DisableReCaptchaForUserForgotPasswordCommand.php index dd7b57f2..6a39e14c 100644 --- a/ReCaptchaUser/Command/DisableReCaptchaForUserForgotPasswordCommand.php +++ b/ReCaptchaUser/Command/DisableReCaptchaForUserForgotPasswordCommand.php @@ -12,6 +12,9 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +/** + * @inheritdoc + */ class DisableReCaptchaForUserForgotPasswordCommand extends Command { /** @@ -42,7 +45,6 @@ protected function configure() /** * @inheritdoc - * @SuppressWarnings("PHPMD.UnusedFormalParameter") */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/ReCaptchaUser/Command/DisableReCaptchaForUserLoginCommand.php b/ReCaptchaUser/Command/DisableReCaptchaForUserLoginCommand.php index b5ed60f1..229ff1ea 100644 --- a/ReCaptchaUser/Command/DisableReCaptchaForUserLoginCommand.php +++ b/ReCaptchaUser/Command/DisableReCaptchaForUserLoginCommand.php @@ -12,6 +12,9 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +/** + * @inheritdoc + */ class DisableReCaptchaForUserLoginCommand extends Command { /** @@ -42,7 +45,6 @@ protected function configure() /** * @inheritdoc - * @SuppressWarnings("PHPMD.UnusedFormalParameter") */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/ReCaptchaUser/Observer/ForgotPasswordObserver.php b/ReCaptchaUser/Observer/ForgotPasswordObserver.php index b14d07a6..7f3daa96 100644 --- a/ReCaptchaUser/Observer/ForgotPasswordObserver.php +++ b/ReCaptchaUser/Observer/ForgotPasswordObserver.php @@ -16,7 +16,7 @@ use Magento\ReCaptchaApi\Api\RequestHandlerInterface; /** - * ForgotPasswordObserver + * Class for Forgot Password Observer */ class ForgotPasswordObserver implements ObserverInterface { @@ -51,6 +51,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws LocalizedException diff --git a/ReCaptchaUser/Observer/LoginObserver.php b/ReCaptchaUser/Observer/LoginObserver.php index e20a2a74..e31173b1 100644 --- a/ReCaptchaUser/Observer/LoginObserver.php +++ b/ReCaptchaUser/Observer/LoginObserver.php @@ -19,7 +19,7 @@ use Magento\ReCaptchaApi\Api\Data\ValidationConfigInterfaceFactory; /** - * LoginObserver + * Class for Login Observer */ class LoginObserver implements ObserverInterface { @@ -78,6 +78,8 @@ public function __construct( } /** + * @inheritdoc + * * @param Observer $observer * @return void * @throws AuthenticationException