We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function testService($name) |
||
| 20 | { |
||
| 21 | $object = new \stdClass(); |
||
| 22 | $container = $this->getDIContainerMock(['toto' => $object]); |
||
| 23 | $this->expressionLanguage->setContainer($container); |
||
| 24 | $this->assertEquals($object, eval('return '.$this->expressionLanguage->compile($name.'("toto")').';')); |
||
|
|
|||
| 25 | } |
||
| 26 | |||
| 35 |
On one hand,
evalmight be exploited by malicious users if they somehow manage to inject dynamic content. On the other hand, with the emergence of faster PHP runtimes like the HHVM,evalprevents some optimization that they perform.