Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 9 |
Ratio | 100 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | View Code Duplication | public function __construct($wi) { |
|
|
|||
23 | if (!($wi instanceof WrapIt)) { |
||
24 | throw new WrapItParameterException("WrapIt class required"); |
||
25 | } |
||
26 | |||
27 | $this->client_id = $wi->getClientId(); |
||
28 | $this->client_secret = $wi->getClientSecret(); |
||
29 | $this->requester = new WrapItApiRequester($wi->getDomain()); |
||
30 | } |
||
31 | |||
39 |
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.