Skip to content

Commit

Permalink
php74 syntax update
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Jan 5, 2022
1 parent 50d8f19 commit 16b486d
Show file tree
Hide file tree
Showing 172 changed files with 525 additions and 1,449 deletions.
2 changes: 1 addition & 1 deletion Block/Adminhtml/Action/Edit/BackButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class BackButton implements ButtonProviderInterface
/**
* @var UrlInterface
*/
private $urlBuilder;
private UrlInterface $urlBuilder;

public function __construct(
UrlInterface $urlBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class OptionSourceSelect extends Select
/**
* @var OptionSourceInterface
*/
private $optionSource;
private OptionSourceInterface $optionSource;

public function __construct(
Context $context,
Expand Down
12 changes: 3 additions & 9 deletions Block/Adminhtml/Customer/Edit/EraseButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@

final class EraseButton extends GenericButton implements ButtonProviderInterface
{
/**
* @var EraseEntityCheckerInterface
*/
private $eraseCustomerChecker;

/**
* @var Config
*/
private $config;
private EraseEntityCheckerInterface $eraseCustomerChecker;

private Config $config;

public function __construct(
Context $context,
Expand Down
5 changes: 1 addition & 4 deletions Block/Adminhtml/Customer/Edit/ExportButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

final class ExportButton extends GenericButton implements ButtonProviderInterface
{
/**
* @var Config
*/
private $config;
private Config $config;

public function __construct(
Context $context,
Expand Down
5 changes: 1 addition & 4 deletions Block/Adminhtml/Order/Edit/EraseButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

class EraseButton extends AbstractBlock
{
/**
* @var EraseEntityCheckerInterface
*/
private $eraseEntityChecker;
private EraseEntityCheckerInterface $eraseEntityChecker;

public function __construct(
Context $context,
Expand Down
20 changes: 4 additions & 16 deletions Console/Command/EraseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,13 @@ class EraseCommand extends Command
private const INPUT_ARGUMENT_ENTITY_ID = 'entity_id';
private const INPUT_ARGUMENT_ENTITY_TYPE = 'entity_type';

/**
* @var State
*/
private $appState;
private State $appState;

/**
* @var Registry
*/
private $registry;
private Registry $registry;

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
State $appState,
Expand Down
15 changes: 3 additions & 12 deletions Console/Command/ExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,11 @@ class ExportCommand extends Command
private const INPUT_ARGUMENT_ENTITY_TYPE = 'entity_type';
private const INPUT_OPTION_FILENAME = 'filename';

/**
* @var State
*/
private $appState;
private State $appState;

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
State $appState,
Expand Down
20 changes: 4 additions & 16 deletions Controller/AbstractAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,13 @@

abstract class AbstractAction implements ActionInterface
{
/**
* @var RequestInterface
*/
protected $request;
protected RequestInterface $request;

/**
* @var ResultFactory
*/
protected $resultFactory;
protected ResultFactory $resultFactory;

/**
* @var ManagerInterface
*/
protected $messageManager;
protected ManagerInterface $messageManager;

/**
* @var Config
*/
protected $config;
protected Config $config;

public function __construct(
RequestInterface $request,
Expand Down
7 changes: 2 additions & 5 deletions Controller/AbstractGuest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ abstract class AbstractGuest extends AbstractAction
/**
* @var OrderLoaderInterface
*/
protected $orderLoader;
protected OrderLoaderInterface $orderLoader;

/**
* @var Registry
*/
protected $registry;
protected Registry $registry;

public function __construct(
RequestInterface $request,
Expand Down
4 changes: 2 additions & 2 deletions Controller/AbstractPrivacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ abstract class AbstractPrivacy extends AbstractAction
/**
* @var Session
*/
protected $customerSession;
protected Session $customerSession;

/**
* @var Http
*/
private $response;
private Http $response;

public function __construct(
RequestInterface $request,
Expand Down
5 changes: 1 addition & 4 deletions Controller/Adminhtml/AbstractAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

abstract class AbstractAction extends Action
{
/**
* @var Config
*/
protected $config;
protected Config $config;

public function __construct(
Context $context,
Expand Down
14 changes: 4 additions & 10 deletions Controller/Adminhtml/Action/Execute.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@ class Execute extends Action implements HttpPostActionInterface
/**
* @var ActionFactory
*/
private $actionFactory;
private ActionFactory $actionFactory;

/**
* @var ContextBuilder
*/
private $contextBuilder;
private ContextBuilder $contextBuilder;

/**
* @var ActionStates
*/
private $actionStates;
private ActionStates $actionStates;

public function __construct(
Context $context,
Expand All @@ -52,7 +46,7 @@ public function __construct(
parent::__construct($context);
}

public function execute()
public function execute(): Redirect
{
/** @var Redirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
Expand Down
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Action/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Index extends Action implements HttpGetActionInterface
{
public const ADMIN_RESOURCE = 'Opengento_Gdpr::gdpr_action';

public function execute()
public function execute(): Page
{
/** @var Page $resultPage */
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
Expand Down
17 changes: 4 additions & 13 deletions Controller/Adminhtml/Action/InlineEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,16 @@ class InlineEdit extends Action implements HttpPostActionInterface
{
public const ADMIN_RESOURCE = 'Opengento_Gdpr::gdpr_actions_edit';

/**
* @var ActionEntityRepositoryInterface
*/
private $actionRepository;
private ActionEntityRepositoryInterface $actionRepository;

/**
* @var HydratorPool
*/
private $hydratorPool;
private HydratorPool $hydratorPool;

/**
* @var LoggerInterface
*/
private $logger;
private LoggerInterface $logger;

/**
* @var string[]
*/
private $allowedAttributes;
private array $allowedAttributes;

public function __construct(
Context $context,
Expand Down
14 changes: 4 additions & 10 deletions Controller/Adminhtml/Action/MassDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@ class MassDelete extends Action implements HttpPostActionInterface
/**
* @var Filter
*/
private $filter;
private Filter $filter;

/**
* @var CollectionFactory
*/
private $collectionFactory;
private CollectionFactory $collectionFactory;

/**
* @var ActionEntityRepositoryInterface
*/
private $actionRepository;
private ActionEntityRepositoryInterface $actionRepository;

public function __construct(
Context $context,
Expand All @@ -54,7 +48,7 @@ public function __construct(
parent::__construct($context);
}

public function execute()
public function execute(): Redirect
{
/** @var Redirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
Expand Down
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Action/NewAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class NewAction extends Action implements HttpGetActionInterface
{
public const ADMIN_RESOURCE = 'Opengento_Gdpr::gdpr_actions_execute';

public function execute()
public function execute(): Page
{
/** @var Page $resultPage */
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
Expand Down
10 changes: 2 additions & 8 deletions Controller/Adminhtml/Guest/Erase.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ class Erase extends AbstractAction implements HttpPostActionInterface
{
public const ADMIN_RESOURCE = 'Opengento_Gdpr::order_erase';

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
Context $context,
Expand Down
12 changes: 3 additions & 9 deletions Controller/Adminhtml/Guest/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@ class Export extends AbstractAction
/**
* @var FileFactory
*/
private $fileFactory;
private FileFactory $fileFactory;

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
Context $context,
Expand Down
10 changes: 2 additions & 8 deletions Controller/Adminhtml/Privacy/Erase.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ class Erase extends AbstractAction implements HttpPostActionInterface
{
public const ADMIN_RESOURCE = 'Opengento_Gdpr::customer_erase';

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
Context $context,
Expand Down
12 changes: 3 additions & 9 deletions Controller/Adminhtml/Privacy/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@ class Export extends AbstractAction
/**
* @var FileFactory
*/
private $fileFactory;
private FileFactory $fileFactory;

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
Context $context,
Expand Down
10 changes: 2 additions & 8 deletions Controller/Adminhtml/Privacy/MassErase.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,9 @@ class MassErase extends AbstractMassAction
{
public const ADMIN_RESOURCE = 'Opengento_Gdpr::customer_erase';

/**
* @var ActionInterface
*/
private $action;
private ActionInterface $action;

/**
* @var ContextBuilder
*/
private $actionContextBuilder;
private ContextBuilder $actionContextBuilder;

public function __construct(
Context $context,
Expand Down
Loading

0 comments on commit 16b486d

Please sign in to comment.