Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 12 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
31 | View Code Duplication | public function testIfWillPassVariableToViewWithRendererDetection() |
|
32 | { |
||
33 | $var = 'New Variable'; |
||
34 | |||
35 | $view = new MiniView($this); |
||
36 | |||
37 | $result = $view->render('passVariable2.latte', ['var' => $var], true); |
||
38 | |||
39 | $this->assertInstanceOf(PhpRenderer::class, $view->getRenderer(), 'That renderer was reverted back to default renderer'); |
||
40 | |||
41 | $this->assertSame($var, $result); |
||
42 | } |
||
43 | |||
45 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.