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
* @var string
13
*/
14
protected $id;
15
16
/**
17
* @var int
18
*/
19
protected $maximumLoad;
20
21
/**
22
* @param string $id
23
* @param string $manufacturer
24
* @param string $model
25
* @param int $maximumLoad
26
*/
27
public function __construct(string $id, string $manufacturer, string $model, int $maximumLoad)
28
{
29
parent::__construct($id, $manufacturer, $model);
30
31
$this->maximumLoad = $maximumLoad;
32
}
33
34
/**
35
* @return int
36
*/
37
public function getMaximumLoad(): int
38
{
39
return $this->maximumLoad;
40
}
41
42
/**
43
* @param Argument $argument
44
* @return TruckInput
45
*/
46
public static function createFromArgument(Argument $argument): TruckInput
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.