File tree 4 files changed +13
-5
lines changed
4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ composer.lock
2
2
/vendor /
3
3
/tmp /
4
4
phpcs.xml
5
+ phpstan.neon
5
6
phpunit.xml
Original file line number Diff line number Diff line change 1
1
includes:
2
2
- vendor/phpstan/phpstan-phpunit/extension.neon
3
3
- vendor/phpstan/phpstan-phpunit/rules.neon
4
+
4
5
parameters:
5
- level: 1
6
- paths:
7
- - src
8
- - tests
6
+ level: 5
7
+ paths:
8
+ - src
9
+ - tests
10
+
11
+ universalObjectCratesClasses:
12
+ - gapple\StructuredFields\Dictionary
13
+ - gapple\StructuredFields\Parameters
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ private static function serializeInteger(int $value): string
170
170
if ($ value > 999999999999999 || $ value < -999999999999999 ) {
171
171
throw new SerializeException ("Integers are limited to 15 digits " );
172
172
}
173
- return $ value ;
173
+ return ( string ) $ value ;
174
174
}
175
175
176
176
private static function serializeDecimal (float $ value ): string
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ protected function rulesetDataProvider(): array
32
32
}
33
33
34
34
$ dataset = [];
35
+ /** @var \stdClass $rule */
35
36
foreach ($ rules as $ rule ) {
36
37
if (isset ($ rule ->expected )) {
37
38
try {
@@ -166,6 +167,7 @@ private static function convertExpectedDictionary(array $dictionary): Dictionary
166
167
private static function convertValue ($ data )
167
168
{
168
169
if (is_object ($ data ) && property_exists ($ data , '__type ' )) {
170
+ /** @var \stdClass $data */
169
171
switch ($ data ->__type ) {
170
172
case 'token ' :
171
173
return new Token ($ data ->value );
You can’t perform that action at this time.
0 commit comments