21
21
abstract class DataTransferObject implements Contract
22
22
{
23
23
use Castable;
24
-
25
24
use From;
26
-
27
25
use Makeable;
28
-
29
26
use Reflection;
30
-
31
27
use To;
32
28
33
29
protected const DISALLOW = ['map ' , 'only ' , 'except ' ];
@@ -39,8 +35,6 @@ abstract class DataTransferObject implements Contract
39
35
protected $ except = [];
40
36
41
37
/**
42
- * @param array $items
43
- *
44
38
* @throws ReflectionException
45
39
*/
46
40
public function __construct (array $ items = [])
@@ -69,8 +63,6 @@ public function set(string $key, $value): DataTransferObject
69
63
}
70
64
71
65
/**
72
- * @param array $items
73
- *
74
66
* @throws ReflectionException
75
67
*
76
68
* @return \DragonCode\SimpleDataTransferObject\DataTransferObject
@@ -87,8 +79,6 @@ public function merge(array $items): DataTransferObject
87
79
88
80
/**
89
81
* @throws ReflectionException
90
- *
91
- * @return array
92
82
*/
93
83
public function toArray (): array
94
84
{
@@ -121,8 +111,6 @@ protected function filterExcept(array $items): array
121
111
}
122
112
123
113
/**
124
- * @param array $items
125
- *
126
114
* @throws ReflectionException
127
115
*/
128
116
protected function setMap (array $ items ): void
@@ -139,8 +127,6 @@ protected function setMap(array $items): void
139
127
}
140
128
141
129
/**
142
- * @param array $items
143
- *
144
130
* @throws ReflectionException
145
131
*/
146
132
protected function setItems (array $ items ): void
@@ -160,9 +146,6 @@ protected function getValueByKey(array $items, string $key, string $default)
160
146
}
161
147
162
148
/**
163
- * @param string $key
164
- * @param mixed $value
165
- *
166
149
* @throws ReflectionException
167
150
*/
168
151
protected function setValue (string $ key , $ value ): void
@@ -173,23 +156,15 @@ protected function setValue(string $key, $value): void
173
156
}
174
157
175
158
/**
176
- * @param string $key
177
- *
178
159
* @throws ReflectionException
179
- *
180
- * @return bool
181
160
*/
182
161
protected function isAllow (string $ key ): bool
183
162
{
184
163
return $ this ->isAllowKey ($ key ) && $ this ->isAllowProperty ($ key );
185
164
}
186
165
187
166
/**
188
- * @param string $key
189
- *
190
167
* @throws ReflectionException
191
- *
192
- * @return bool
193
168
*/
194
169
protected function isAllowProperty (string $ key ): bool
195
170
{
0 commit comments