We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 50 | public static function shortenClassFromCode($code, callable $callback = null) |
|
| 31 | { |
||
| 32 | 50 | if (null === $callback) { |
|
| 33 | $callback = function ($matches) { |
||
| 34 | 2 | return static::shortenClassName($matches[1]); |
|
| 35 | 2 | }; |
|
| 36 | } |
||
| 37 | |||
| 38 | 50 | $codeParsed = \preg_replace_callback('@((?:\\\\{1,2}\w+|\w+\\\\{1,2})(?:\w+\\\\{0,2})+)@', $callback, $code); |
|
| 39 | |||
| 40 | 50 | return $codeParsed; |
|
| 41 | } |
||
| 48 |