1 | <?php |
||
17 | class GraphOptions { |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $graphName; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $graphSize; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $nodeShape; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | private $nodeLabel; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $rankDir; |
||
43 | |||
44 | /** |
||
45 | * @var int |
||
46 | */ |
||
47 | private $wordWrapLimit; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | private $parentRelation; |
||
53 | |||
54 | /** |
||
55 | * @var boolean |
||
56 | */ |
||
57 | private $enableGraphLink; |
||
58 | |||
59 | /** |
||
60 | * @var boolean |
||
61 | */ |
||
62 | private $showGraphLabel; |
||
63 | |||
64 | /** |
||
65 | * @var boolean |
||
66 | */ |
||
67 | private $showGraphColor; |
||
68 | |||
69 | /** |
||
70 | * @var boolean |
||
71 | */ |
||
72 | private $showGraphLegend; |
||
73 | |||
74 | public function __construct( $options ) { |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getGraphName(): string { |
||
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getGraphSize(): string { |
||
102 | |||
103 | /** |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getNodeShape(): string { |
||
109 | |||
110 | /** |
||
111 | * @return string |
||
112 | */ |
||
113 | public function getNodeLabel(): string { |
||
116 | |||
117 | /** |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getRankDir(): string { |
||
123 | |||
124 | /** |
||
125 | * @return int |
||
126 | */ |
||
127 | public function getWordWrapLimit(): int { |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getParentRelation(): string { |
||
137 | |||
138 | /** |
||
139 | * @return bool |
||
140 | */ |
||
141 | public function isGraphLink(): bool { |
||
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | public function isGraphLabel(): bool { |
||
151 | |||
152 | /** |
||
153 | * @return bool |
||
154 | */ |
||
155 | public function isGraphColor(): bool { |
||
158 | |||
159 | /** |
||
160 | * @return bool |
||
161 | */ |
||
162 | public function isGraphLegend(): bool { |
||
165 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.