Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.0218 |
Changes | 0 |
1 | <?php |
||
14 | 1 | public function parseProviderReference($value) |
|
15 | { |
||
16 | 1 | if (strpos($value, 'vimeo.com')) { |
|
17 | 1 | $urlParts = explode('/', parse_url($value, PHP_URL_PATH)); |
|
18 | 1 | foreach ($urlParts as $urlPart) { |
|
19 | 1 | if (ctype_digit($urlPart)) { |
|
20 | 1 | return $urlPart; |
|
21 | } |
||
22 | 1 | } |
|
23 | } |
||
24 | |||
25 | 1 | return $value; |
|
26 | } |
||
27 | |||
61 |