| Total Complexity | 6 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class CardRenderer extends AbstractCardRenderer |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Can render specified token. |
||
| 19 | * |
||
| 20 | * @param PaymentTokenInterface $token |
||
| 21 | * |
||
| 22 | * @return bool |
||
| 23 | */ |
||
| 24 | public function canRender(PaymentTokenInterface $token): bool |
||
| 25 | { |
||
| 26 | return $token->getPaymentMethodCode() === ConfigProviderBase::METHOD_CODE_CC; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getNumberLast4Digits(): string |
||
| 33 | { |
||
| 34 | return $this->getTokenDetails()['cc_last4']; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getExpDate(): string |
||
| 41 | { |
||
| 42 | return $this->getTokenDetails()['cc_exp_month'].'/'.$this->getTokenDetails()['cc_exp_year']; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getIconUrl(): string |
||
| 49 | { |
||
| 50 | return $this->getIconForType($this->getTokenDetails()['cc_type'])['url']; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return int |
||
| 55 | */ |
||
| 56 | public function getIconHeight(): int |
||
| 57 | { |
||
| 58 | return $this->getIconForType($this->getTokenDetails()['cc_type'])['height']; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return int |
||
| 63 | */ |
||
| 64 | public function getIconWidth(): int |
||
| 67 | } |
||
| 68 | } |
||
| 69 |
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