| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | * |
||
| 8 | * (c) Eugene Leonovich <[email protected]> |
||
| 9 | * |
||
| 10 | * For the full copyright and license information, please view the LICENSE |
||
| 11 | * file that was distributed with this source code. |
||
| 12 | */ |
||
| 13 | |||
| 14 | namespace ArgumentsResolver; |
||
| 15 | |||
| 16 | class UnresolvableArgumentException extends \InvalidArgumentException |
||
| 17 | { |
||
| 18 | 7 | public static function fromParameter(\ReflectionParameter $parameter) : self |
|
| 19 | { |
||
| 20 | 7 | return new self(\sprintf( |
|
| 44 |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClassto useselfinstead: