This class seems to be duplicated in your project.
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.
Loading history...
10
{
11
/**
12
* @test
13
*/
14
public function itShouldReturnIpv4Address(): void
15
{
16
$ipAddress = $this->faker()->ipv4;
17
18
$ipv4 = new Ipv4($ipAddress);
19
20
$this->assertSame($ipAddress, $ipv4->value());
21
}
22
23
public function invalidIpv4AddressProvider(): array
24
{
25
return [
26
[$this->faker()->ipv6]
27
];
28
}
29
30
/**
31
* @test
32
* @dataProvider invalidIpv4AddressProvider
33
*/
34
public function itShouldThrowsException(string $data): void
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.