1 | <?php |
||
2 | /** |
||
3 | * Copyright © Wirecard Brasil. All rights reserved. |
||
4 | * |
||
5 | * @author Bruno Elisei <[email protected]> |
||
6 | * See COPYING.txt for license details. |
||
7 | */ |
||
8 | |||
9 | namespace Moip\Magento2\Model\Ui; |
||
10 | |||
11 | use Magento\Vault\Api\Data\PaymentTokenInterface; |
||
0 ignored issues
–
show
|
|||
12 | use Magento\Vault\Model\Ui\TokenUiComponentInterface; |
||
0 ignored issues
–
show
The type
Magento\Vault\Model\Ui\TokenUiComponentInterface was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
13 | use Magento\Vault\Model\Ui\TokenUiComponentInterfaceFactory; |
||
0 ignored issues
–
show
The type
Magento\Vault\Model\Ui\T...mponentInterfaceFactory was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
14 | use Magento\Vault\Model\Ui\TokenUiComponentProviderInterface; |
||
0 ignored issues
–
show
The type
Magento\Vault\Model\Ui\T...ponentProviderInterface was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
15 | |||
16 | class TokenUiComponentProvider implements TokenUiComponentProviderInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var TokenUiComponentInterfaceFactory |
||
20 | */ |
||
21 | private $componentFactory; |
||
22 | |||
23 | /** |
||
24 | * @param TokenUiComponentInterfaceFactory $componentFactory |
||
25 | */ |
||
26 | public function __construct( |
||
27 | TokenUiComponentInterfaceFactory $componentFactory |
||
28 | ) { |
||
29 | $this->componentFactory = $componentFactory; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Get UI component for token. |
||
34 | * |
||
35 | * @param PaymentTokenInterface $paymentToken |
||
36 | * |
||
37 | * @return TokenUiComponentInterface |
||
38 | */ |
||
39 | public function getComponentForToken(PaymentTokenInterface $paymentToken) |
||
40 | { |
||
41 | $jsonDetails = json_decode($paymentToken->getTokenDetails() ?: '{}', true); |
||
42 | $component = $this->componentFactory->create( |
||
43 | [ |
||
44 | 'config' => [ |
||
45 | // phpcs:ignore Generic.Files.LineLength |
||
46 | 'code' => ConfigProviderBase::METHOD_CODE_CC_VAULT, |
||
47 | TokenUiComponentProviderInterface::COMPONENT_DETAILS => $jsonDetails, |
||
48 | TokenUiComponentProviderInterface::COMPONENT_PUBLIC_HASH => $paymentToken->getPublicHash(), |
||
49 | ], |
||
50 | 'name' => 'Moip_Magento2/js/view/payment/method-renderer/vault', |
||
51 | ] |
||
52 | ); |
||
53 | |||
54 | return $component; |
||
55 | } |
||
56 | } |
||
57 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths