Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 20 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
17 | View Code Duplication | function it_should_build() |
|
|
|||
18 | { |
||
19 | $this->setFirstName('Example'); |
||
20 | $this->setLastName(''); |
||
21 | $this->setEmail('[email protected]'); |
||
22 | $this->setPlainPassword('12345'); |
||
23 | $this->setPhone('+1 234 567 890'); |
||
24 | $this->setDefaultLocale('en'); |
||
25 | |||
26 | $data = [ |
||
27 | 'firstName' => 'Example', |
||
28 | 'lastName' => '', |
||
29 | 'email' => '[email protected]', |
||
30 | 'plainPassword' => '12345', |
||
31 | 'phone' => '+1 234 567 890', |
||
32 | 'defaultLocale' => 'en', |
||
33 | ]; |
||
34 | |||
35 | $this->build()->shouldReturn($data); |
||
36 | } |
||
37 | |||
49 |
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.