| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 33 | 6 | public static function getProvidersList($type = 'Document') |
|
| 34 | { |
||
| 35 | 6 | $traitsList = static::getTraitsList($type); |
|
| 36 | |||
| 37 | 6 | $providers = array(); |
|
| 38 | |||
| 39 | 6 | foreach ($traitsList as $trait) { |
|
| 40 | 6 | $class = preg_replace_callback('/(.*\\\)([a-z0-9]+)(Trait)/i', function ($match) { |
|
| 41 | 6 | return strtolower($match[2]); |
|
| 42 | 6 | }, $trait); |
|
| 43 | |||
| 44 | // special case |
||
| 45 | 6 | if ('signals' === $class) { |
|
| 46 | 6 | $class = sprintf('37%s', $class); |
|
| 47 | 6 | } |
|
| 48 | |||
| 49 | 6 | $providers[$trait] = $class; |
|
| 50 | 6 | } |
|
| 51 | |||
| 52 | 6 | return $providers; |
|
| 53 | } |
||
| 54 | } |
||
| 55 |