Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 16 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
12 | View Code Duplication | public function success() |
|
|
|||
13 | { |
||
14 | $command = new Command(); |
||
15 | |||
16 | $result = $command->execute(new Clear()); |
||
17 | |||
18 | $expectedArray = [ |
||
19 | [ |
||
20 | 'type' => 'info', |
||
21 | 'content' => 'Output text...', |
||
22 | ] |
||
23 | ]; |
||
24 | |||
25 | $this->assertNotNull($result['timestamp']); |
||
26 | $this->assertEquals($result['lines'], $expectedArray); |
||
27 | } |
||
28 | |||
51 |
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.