Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constitutional reform #56

Draft
wants to merge 5 commits into
base: v2.3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .jeeves.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Mygento:
type: smallint
nullable: false
comment: 'Operation type. Sell or Refund.'
length: 10
sales_entity_id:
type: int
nullable: false
Expand Down
4 changes: 4 additions & 0 deletions Api/Data/ResponseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

interface ResponseInterface
{
const STATUS_DONE = 'done';
const STATUS_FAIL = 'fail';
const STATUS_WAIT = 'wait';

/**
* @return string
*/
Expand Down
2 changes: 0 additions & 2 deletions Block/Adminhtml/Form/Field/Renderer/JurType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class JurType extends Select
private $source;

/**
* Constructor
*
* @param JurTypeSource $source
* @param Context $context
* @param array $data
Expand Down
1 change: 0 additions & 1 deletion Console/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class Report extends Command
private $output;

/**
* Report constructor.
* @param \Mygento\Kkm\Model\Report $report
* @param \Magento\Framework\App\State $state
*/
Expand Down
1 change: 0 additions & 1 deletion Console/SendRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class SendRefund extends Command
private $transactionHelper;

/**
* SendRefund constructor.
* @param \Mygento\Kkm\Api\ProcessorInterface $processor
* @param Transaction $transactionHelper
* @param \Magento\Framework\App\State $state
Expand Down
1 change: 0 additions & 1 deletion Console/SendSell.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class SendSell extends Command
private $transactionHelper;

/**
* SendSell constructor.
* @param \Mygento\Kkm\Api\ProcessorInterface $processor
* @param Transaction $transactionHelper
* @param \Magento\Framework\App\State $state
Expand Down
1 change: 0 additions & 1 deletion Console/UpdateStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class UpdateStatus extends Command
private $transactionHelper;

/**
* UpdateStatus constructor.
* @param \Mygento\Kkm\Model\VendorInterface $vendor
* @param \Mygento\Kkm\Helper\Transaction\Proxy $transactionHelper
* @param \Magento\Framework\App\State $state
Expand Down
1 change: 0 additions & 1 deletion Controller/Adminhtml/Cheque/CheckStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class CheckStatus extends \Magento\Backend\App\Action
private $vendor;

/**
* CheckStatus constructor.
* @param \Magento\Backend\App\Action\Context $context
* @param \Mygento\Kkm\Helper\Data $helper
* @param \Mygento\Kkm\Model\VendorInterface $vendor
Expand Down
1 change: 0 additions & 1 deletion Controller/Adminhtml/Cheque/Resend.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class Resend extends \Magento\Backend\App\Action
private $errorHelper;

/**
* Resend constructor.
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Mygento\Kkm\Helper\Error\Proxy $errorHelper
* @param \Mygento\Kkm\Api\ProcessorInterface $processor
Expand Down
1 change: 0 additions & 1 deletion Controller/Adminhtml/Logs/Clear.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Clear extends \Magento\Backend\App\Action
private $ioFile;

/**
* Clear constructor.
* @param \Magento\Backend\App\Action\Context $context
* @param DirectoryList $directoryList
* @param \Magento\Framework\Filesystem\Io\File $ioFile
Expand Down
1 change: 0 additions & 1 deletion Controller/Adminhtml/Logs/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Download extends \Magento\Backend\App\Action
private $fileFactory;

/**
* Download constructor.
* @param \Magento\Backend\App\Action\Context $context
* @param DirectoryList $directoryList
* @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
Expand Down
1 change: 0 additions & 1 deletion Controller/Frontend/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Callback extends \Magento\Framework\App\Action\Action implements CsrfAware
private $errorHelper;

/**
* Callback constructor.
* @param \Mygento\Kkm\Model\Atol\ResponseFactory $responseFactory
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Mygento\Kkm\Helper\Error\Proxy $errorHelper
Expand Down
1 change: 0 additions & 1 deletion Crontab/ProceedScheduledAttempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class ProceedScheduledAttempt
private $dateTime;

/**
* Update constructor.
* @param TransactionAttemptRepositoryInterface $attemptRepository
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Magento\Framework\MessageQueue\PublisherInterface $publisher
Expand Down
1 change: 0 additions & 1 deletion Crontab/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class Report
private $emailHelper;

/**
* Report constructor.
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Mygento\Kkm\Model\Report $report
* @param \Mygento\Kkm\Helper\Email $emailHelper
Expand Down
1 change: 0 additions & 1 deletion Crontab/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class Update
private $publisher;

/**
* Update constructor.
* @param UpdateRequestInterfaceFactory $updateRequestFactory
* @param \Mygento\Kkm\Helper\TransactionAttempt $attemptHelper
* @param \Mygento\Kkm\Helper\Data $kkmHelper
Expand Down
1 change: 0 additions & 1 deletion Exception/CreateDocumentFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class CreateDocumentFailedException extends \Exception
private $response;

/**
* CreateDocumentFailedException constructor.
* @param string $message
* @param ResponseInterface|null $response
* @param array $debugData
Expand Down
1 change: 0 additions & 1 deletion Helper/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class Email
private $storeManager;

/**
* Email constructor.
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
* @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
Expand Down
1 change: 0 additions & 1 deletion Helper/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Error
private $adminNotifier;

/**
* Error constructor.
* @param \Mygento\Kkm\Helper\Data $baseHelper
* @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository
* @param \Magento\Framework\Notification\NotifierInterface $adminNotifier
Expand Down
1 change: 0 additions & 1 deletion Helper/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class Request
private $orderRepository;

/**
* Request constructor.
* @param Transaction $transactionHelper
* @param \Magento\Sales\Api\InvoiceRepositoryInterface $invoiceRepository
* @param \Magento\Sales\Api\CreditmemoRepositoryInterface $creditmemoRepository
Expand Down
1 change: 0 additions & 1 deletion Helper/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class Transaction
private $creditmemoCollectionFactory;

/**
* Transaction constructor.
* @param \Magento\Sales\Api\TransactionRepositoryInterface $transactionRepo
* @param \Magento\Sales\Model\Order\Payment\TransactionFactory $transactionFactory
* @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
Expand Down
1 change: 0 additions & 1 deletion Helper/TransactionAttempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class TransactionAttempt
private $attemptRepository;

/**
* TransactionAttempt constructor.
* @param MessageEncoder $messageEncoder
* @param Request $requestHelper
* @param Data $kkmHelper
Expand Down
1 change: 0 additions & 1 deletion Model/Atol/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class Client
private $responseFactory;

/**
* Client constructor.
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param ResponseFactory $responseFactory
* @param \Magento\Framework\HTTP\Client\CurlFactory $curlFactory
Expand Down
1 change: 0 additions & 1 deletion Model/Atol/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ abstract class Request implements \JsonSerializable, RequestInterface
protected $ignoreTrialsNum = false;

/**
* Request constructor.
* @param \Magento\Framework\Stdlib\DateTime\Timezone $date
*/
public function __construct(
Expand Down
1 change: 0 additions & 1 deletion Model/Atol/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class RequestFactory
private $kkmHelper;

/**
* RequestFactory constructor.
* @param \Mygento\Kkm\Model\Atol\RequestForVersion3Factory $request3Factory
* @param \Mygento\Kkm\Model\Atol\RequestForVersion4Factory $request4Factory
* @param \Mygento\Kkm\Helper\Data $kkmHelper
Expand Down
5 changes: 0 additions & 5 deletions Model/Atol/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

class Response implements ResponseInterface
{
const STATUS_DONE = 'done';
const STATUS_FAIL = 'fail';
const STATUS_WAIT = 'wait';

// phpcs:disable
private $uuid;

Expand Down Expand Up @@ -44,7 +40,6 @@ class Response implements ResponseInterface
private $jsonResponse;

/**
* ReportResponse constructor.
* @param string $jsonRaw
* @throws \Exception
*/
Expand Down
1 change: 0 additions & 1 deletion Model/Atol/Vendor.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class Vendor implements \Mygento\Kkm\Model\VendorInterface
private $urlHelper;

/**
* Vendor constructor.
* @param \Mygento\Base\Helper\Discount $kkmDiscount
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Mygento\Kkm\Helper\Transaction $transactionHelper
Expand Down
1 change: 0 additions & 1 deletion Model/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class Processor implements ProcessorInterface
protected $publisher;

/**
* Processor constructor.
* @param VendorInterface $vendor
* @param \Mygento\Kkm\Helper\Data $helper
* @param \Magento\Framework\MessageQueue\PublisherInterface $publisher
Expand Down
1 change: 0 additions & 1 deletion Model/Queue/Consumer/AbstractConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ abstract class AbstractConsumer
protected $errorHelper;

/**
* Consumer constructor.
* @param \Mygento\Kkm\Helper\TransactionAttempt $attemptHelper
* @param \Mygento\Kkm\Model\VendorInterface $vendor
* @param \Mygento\Kkm\Helper\Data $helper
Expand Down
1 change: 0 additions & 1 deletion Model/Queue/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class Merger implements MergerInterface
private $mergedRequestFactory;

/**
* Merger constructor.
* @param \Mygento\Kkm\Api\Queue\MergedRequestInterfaceFactory $mergedRequestFactory
* @param \Magento\Framework\MessageQueue\MergedMessageInterfaceFactory $mergedMessageFactory
*/
Expand Down
1 change: 0 additions & 1 deletion Model/Queue/UpdateMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class UpdateMerger implements MergerInterface
private $mergedUpdateRequestFactory;

/**
* Merger constructor.
* @param \Mygento\Kkm\Api\Queue\MergedUpdateRequestInterfaceFactory $mergedUpdateRequestFactory
* @param \Magento\Framework\MessageQueue\MergedMessageInterfaceFactory $mergedMessageFactory
*/
Expand Down
1 change: 0 additions & 1 deletion Model/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class Report
private $attemptRepository;

/**
* Report constructor.
* @param StatisticsFactory $statisticsFactory
* @param TransactionAttemptRepositoryInterface $attemptRepository
* @param \Magento\Sales\Api\TransactionRepositoryInterface $transactionRepo
Expand Down
2 changes: 0 additions & 2 deletions Model/ResourceModel/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
class Log extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
/**
* Class constructor
*
* @return void
*/
protected function _construct()
Expand Down
4 changes: 0 additions & 4 deletions Model/ResourceModel/Log/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
/**
* Class constructor
*
* @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
* @param \Psr\Log\LoggerInterface $logger
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
Expand All @@ -42,8 +40,6 @@ public function __construct(
}

/**
* Class constructor
*
* @return void
*/
protected function _construct()
Expand Down
1 change: 0 additions & 1 deletion Model/Source/CustomerAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class CustomerAttributes implements OptionSourceInterface
private $customerResource;

/**
* CustomerAttributes constructor.
* @param CustomerResource $customerResource
*/
public function __construct(
Expand Down
38 changes: 38 additions & 0 deletions Model/Source/TransactionStatus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

/**
* @author Mygento Team
* @copyright 2017-2020 Mygento (https://www.mygento.ru)
* @package Mygento_Kkm
*/

namespace Mygento\Kkm\Model\Source;

use Mygento\Kkm\Api\Data\ResponseInterface;

class TransactionStatus implements \Magento\Framework\Data\OptionSourceInterface
{
const OPTIONS = [
ResponseInterface::STATUS_WAIT,
ResponseInterface::STATUS_DONE,
ResponseInterface::STATUS_FAIL,
];

/**
* Return option array
*
* @return array
*/
public function toOptionArray()
{
$options = [];
foreach (self::OPTIONS as $option) {
$options[] = [
'value' => $option,
'label' => __($option),
];
}

return $options;
}
}
1 change: 0 additions & 1 deletion Observer/Send.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class Send implements ObserverInterface
private $errorHelper;

/**
* Send constructor.
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Mygento\Kkm\Helper\Error\Proxy $errorHelper
* @param \Mygento\Kkm\Api\ProcessorInterface $processor
Expand Down
1 change: 0 additions & 1 deletion Plugin/ExtraSalesViewToolbarButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class ExtraSalesViewToolbarButtons
private $transactionHelper;

/**
* ExtraSalesViewToolbarButtons constructor.
* @param \Mygento\Kkm\Helper\Data $kkmHelper
* @param \Mygento\Kkm\Helper\Transaction $transactionHelper
* @param \Magento\Framework\AuthorizationInterface $authorization
Expand Down
1 change: 0 additions & 1 deletion Setup/Patch/Data/UpdateOrderStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class UpdateOrderStatuses implements DataPatchInterface
private $moduleDataSetup;

/**
* UpdateOrderStatuses constructor.
* @param \Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup
*/
public function __construct(
Expand Down
Loading