Total Complexity | 9 |
Total Lines | 73 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class JavaTransformerArgument |
||
8 | { |
||
9 | private string $type; |
||
10 | |||
11 | private string $columnValue; |
||
12 | private string $stringValue; |
||
13 | private string $mixedKey; |
||
14 | private string $mixedVal; |
||
15 | |||
16 | /** |
||
17 | * JavaTransformerArgument constructor. |
||
18 | * |
||
19 | * @param array $options |
||
20 | * @throws SourceWatcherException |
||
21 | */ |
||
22 | public function __construct ( array $options ) |
||
23 | { |
||
24 | switch ( $options["type"] ) { |
||
25 | case JavaTransformerArgumentType::ARG_TYPE_COLUMN: |
||
26 | $this->columnValue = $options["columnValue"]; |
||
27 | break; |
||
28 | case JavaTransformerArgumentType::ARG_TYPE_STRING: |
||
29 | $this->stringValue = $options["stringValue"]; |
||
30 | break; |
||
31 | case JavaTransformerArgumentType::ARG_TYPE_MIXED: |
||
32 | $this->mixedKey = $options["mixedKey"]; |
||
33 | $this->mixedVal = $options["mixedVal"]; |
||
34 | break; |
||
35 | default: |
||
36 | throw new SourceWatcherException( "Type not supported" ); |
||
37 | } |
||
38 | |||
39 | $this->type = $options["type"]; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return mixed|string |
||
44 | */ |
||
45 | public function getType () : string |
||
46 | { |
||
47 | return $this->type; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return mixed|string |
||
52 | */ |
||
53 | public function getColumnValue () : string |
||
54 | { |
||
55 | return $this->columnValue; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return mixed|string |
||
60 | */ |
||
61 | public function getStringValue () : string |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @return mixed|string |
||
68 | */ |
||
69 | public function getMixedKey () : string |
||
70 | { |
||
71 | return $this->mixedKey; |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * @return mixed|string |
||
76 | */ |
||
77 | public function getMixedVal () : string |
||
80 | } |
||
81 | } |
||
82 |