| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 4 | private static function getClassName(string $name): string |
|
| 45 | { |
||
| 46 | // If the class starts with \ or Omnipay\, assume it's a FQCN |
||
| 47 | /*if (str_starts_with($name, '\\') || str_starts_with($name, 'Shipping\\Adapter\\')) { |
||
| 48 | return $name; |
||
| 49 | }*/ |
||
| 50 | |||
| 51 | 4 | if (0 === strpos($name, '\\') || 0 === strpos($name, 'VasilDakov\\Shipping\\Adapter\\')) { |
|
| 52 | 2 | return $name; |
|
| 53 | } |
||
| 54 | |||
| 55 | 2 | return '\\VasilDakov\\Shipping\\Adapter\\' . $name . 'Adapter'; |
|
| 56 | } |
||
| 58 |