Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 11 |
Ratio | 100 % |
1 | <?php |
||
25 | View Code Duplication | public function testConfigurationException() |
|
26 | { |
||
27 | try { |
||
28 | throw new ConfigurationException($this->client, 'Configuration error'); |
||
29 | } catch (ConfigurationException $e) { |
||
30 | $client = $e->getInstance(); |
||
31 | $this->assertTrue($client instanceof Client); |
||
32 | $this->assertEquals('Configuration error', $e->getMessage()); |
||
33 | return; |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 |
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.