@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | function get_private_property($object, $property) |
| 13 | 13 | { |
| 14 | 14 | $reflObj = is_object($object) ? |
| 15 | - new \ReflectionObject($object) : |
|
| 16 | - new \ReflectionClass($object); |
|
| 15 | + new \ReflectionObject($object) : new \ReflectionClass($object); |
|
| 17 | 16 | |
| 18 | 17 | $reflProp = $reflObj->getProperty($property); |
| 19 | 18 | $reflProp->setAccessible(true); |
@@ -46,8 +45,7 @@ discard block |
||
| 46 | 45 | function call_private_method_array($object, $method, array $args) |
| 47 | 46 | { |
| 48 | 47 | $reflObj = is_object($object) ? |
| 49 | - new \ReflectionObject($object) : |
|
| 50 | - new \ReflectionClass($object); |
|
| 48 | + new \ReflectionObject($object) : new \ReflectionClass($object); |
|
| 51 | 49 | |
| 52 | 50 | $reflMethod = $reflObj->getMethod($method); |
| 53 | 51 | $reflMethod->setAccessible(true); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $step1 = strtr($quoted, ['\?' => '[^/]', '\*' => '[^/]*', '/\*\*' => '(?:/.*)?', '#' => '\d+', '\[' => '[', |
| 49 | 49 | '\]' => ']', '\-' => '-', '\{' => '{', '\}' => '}']); |
| 50 | 50 | |
| 51 | - $step2 = preg_replace_callback('~{[^}]+}~', function ($part) { |
|
| 51 | + $step2 = preg_replace_callback('~{[^}]+}~', function($part) { |
|
| 52 | 52 | return '(?:' . substr(strtr($part[0], ',', '|'), 1, -1) . ')'; |
| 53 | 53 | }, $step1); |
| 54 | 54 | |