Completed
Push — master ( 2d9e7d...e8a8b9 )
by Samuel
8s
created

Car   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSeatsNumber() 0 4 1
A setSeatsNumber() 0 6 1
1
<?php
2
3
namespace App\Vehicle\Domain;
4
5
class Car extends VehicleAbstract
6
{
7
    /**
8
     * @var int
9
     */
10
    private $seatsNumber;
11
12
    /**
13
     * @param string $id
14
     * @param string $manufacturer
15
     * @param string $model
16
     * @param int $seatsNumber
17
     */
18
    public function __construct(string $id, string $manufacturer, string $model, int $seatsNumber)
19
    {
20
        parent::__construct($id, $manufacturer, $model);
21
22
        $this->seatsNumber = $seatsNumber;
23
    }
24
25
    /**
26
     * @return int
27
     */
28
    public function getSeatsNumber(): int
29
    {
30
        return $this->seatsNumber;
31
    }
32
33
    /**
34
     * @param int $seatsNumber
35
     * @return Car
36
     */
37
    public function setSeatsNumber(int $seatsNumber): Car
38
    {
39
        $this->seatsNumber = $seatsNumber;
40
41
        return $this;
42
    }
43
}
44