|
18 | 18 | use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\DateTimeTypePropertyExpander; |
19 | 19 | use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\EnumTypePropertyExpander; |
20 | 20 | use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\NullablePropertyExpander; |
| 21 | +use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\NumberTypePropertyExpander; |
21 | 22 | use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\PropertyExpanderInterface; |
22 | 23 | use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\ProtectedPropertyExpander; |
23 | 24 | use Picamator\TransferObject\TransferGenerator\Definition\Parser\Expander\TransferTypePropertyExpander; |
|
34 | 35 | use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\DateTimeTypePropertyValidator; |
35 | 36 | use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\EnumTypePropertyValidator; |
36 | 37 | use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\NamePropertyValidator; |
| 38 | +use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\NumberTypePropertyValidator; |
37 | 39 | use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\PropertyValidatorInterface; |
38 | 40 | use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\RequiredTypePropertyValidator; |
39 | 41 | use Picamator\TransferObject\TransferGenerator\Definition\Validator\Property\ReservedNamePropertyValidator; |
@@ -91,9 +93,15 @@ protected function createPropertyValidators(): ArrayObject |
91 | 93 | $this->createCollectionTypePropertyValidator(), |
92 | 94 | $this->createEnumTypePropertyValidator(), |
93 | 95 | $this->createDateTimeTypePropertyValidator(), |
| 96 | + $this->createNumberTypePropertyValidator(), |
94 | 97 | ]); |
95 | 98 | } |
96 | 99 |
|
| 100 | + protected function createNumberTypePropertyValidator(): PropertyValidatorInterface |
| 101 | + { |
| 102 | + return new NumberTypePropertyValidator(); |
| 103 | + } |
| 104 | + |
97 | 105 | protected function createDateTimeTypePropertyValidator(): PropertyValidatorInterface |
98 | 106 | { |
99 | 107 | return new DateTimeTypePropertyValidator(); |
@@ -173,11 +181,17 @@ protected function createPropertyExpander(): PropertyExpanderInterface |
173 | 181 | ->setNextExpander($this->createTransferTypePropertyExpander()) |
174 | 182 | ->setNextExpander($this->createEnumTypePropertyExpander()) |
175 | 183 | ->setNextExpander($this->createProtectedPropertyExpander()) |
176 | | - ->setNextExpander($this->createDateTimeTypePropertyExpander()); |
| 184 | + ->setNextExpander($this->createDateTimeTypePropertyExpander()) |
| 185 | + ->setNextExpander($this->createNumberTypePropertyExpander()); |
177 | 186 |
|
178 | 187 | return $propertyExpander; |
179 | 188 | } |
180 | 189 |
|
| 190 | + protected function createNumberTypePropertyExpander(): PropertyExpanderInterface |
| 191 | + { |
| 192 | + return new NumberTypePropertyExpander(); |
| 193 | + } |
| 194 | + |
181 | 195 | protected function createDateTimeTypePropertyExpander(): PropertyExpanderInterface |
182 | 196 | { |
183 | 197 | return new DateTimeTypePropertyExpander(); |
|
0 commit comments