Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Propaganistas\LaravelPhone\Traits; |
||
33 | protected static function parseFormat($format) |
||
34 | { |
||
35 | static::loadFormats(); |
||
36 | |||
37 | // If the format equals a constant's value, just return it. |
||
38 | if (in_array($format, static::$formats)) { |
||
39 | return $format; |
||
40 | } |
||
41 | |||
42 | // Otherwise we'll assume the format is the constant's name. |
||
43 | return Arr::get(static::$formats, strtoupper($format)); |
||
44 | } |
||
45 | |||
55 | } |