Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class SourceConfig extends AbstractConfig |
||
14 | { |
||
15 | /** |
||
16 | * @var string $type |
||
17 | */ |
||
18 | private $type; |
||
19 | |||
20 | /** |
||
21 | * @return array |
||
22 | */ |
||
23 | public function defaults() |
||
27 | ]; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param string $type The type of source. |
||
32 | * @throws InvalidArgumentException If parameter is not a string. |
||
33 | * @return self |
||
34 | */ |
||
35 | public function setType($type) |
||
36 | { |
||
37 | if (!is_string($type)) { |
||
|
|||
38 | throw new InvalidArgumentException( |
||
39 | 'Source type must be a string.' |
||
40 | ); |
||
41 | } |
||
42 | $this->type = $type; |
||
43 | return $this; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function type() |
||
52 | } |
||
53 | } |
||
54 |