cq tools fixes
This commit is contained in:
parent
232c22a557
commit
0d747fa1e7
@ -10,4 +10,7 @@
|
||||
|
||||
<file>src/</file>
|
||||
<file>tests/</file>
|
||||
|
||||
<exclude-pattern>src/Component/Serializer/Generator/*</exclude-pattern>
|
||||
<exclude-pattern>src/Component/Serializer/Parser/*</exclude-pattern>
|
||||
</ruleset>
|
||||
|
@ -44,4 +44,6 @@
|
||||
</rule>
|
||||
|
||||
<exclude-pattern>tests/*</exclude-pattern>
|
||||
<exclude-pattern>src/Component/Serializer/Generator/*</exclude-pattern>
|
||||
<exclude-pattern>src/Component/Serializer/Parser/*</exclude-pattern>
|
||||
</ruleset>
|
||||
|
191
phpstan-baseline-serializer.neon
Normal file
191
phpstan-baseline-serializer.neon
Normal file
@ -0,0 +1,191 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$config of static method Liip\\\\Serializer\\\\Configuration\\\\GeneratorConfiguration\\:\\:createFomArray\\(\\) expects array\\{default_group_combinations\\?\\: array\\<int, array\\<int, string\\>\\>\\|null, default_versions\\?\\: array\\<int, string\\>\\|null, classes\\?\\: array\\<class\\-string, array\\<string, mixed\\>\\>\\|null, options\\?\\: array\\<string, mixed\\>\\}, array\\{default_group_combinations\\: array\\{\\}, default_versions\\: array\\{\\}, classes\\: non\\-empty\\-array\\<string, array\\{\\}\\>\\} given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/ModelsGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$classesToGenerate of class RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Generator\\\\DeserializerGenerator constructor expects array\\<int, class\\-string\\>, array\\<string\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/ModelsGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$method of method Liip\\\\Serializer\\\\Template\\\\Deserialization\\:\\:renderSetter\\(\\) expects string, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/DeserializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$stack of method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Generator\\\\DeserializerGenerator\\:\\:generateCodeForClass\\(\\) expects array\\<string, int\\<1, max\\>\\>, array given\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Generator/DeserializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Generator\\\\SerializerGenerator\\:\\:buildSerializerFunctionName\\(\\) should return string but returns string\\|null\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$method of method Liip\\\\Serializer\\\\Template\\\\Serialization\\:\\:renderGetter\\(\\) expects string, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$serializerGroups of method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Generator\\\\SerializerGenerator\\:\\:generateCodeForClass\\(\\) expects array\\<int, string\\>, array given\\.$#"
|
||||
count: 4
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Class RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Lexer extends generic class Doctrine\\\\Common\\\\Lexer\\\\AbstractLexer but does not specify its types\\: T, V$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Lexer.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Lexer\\:\\:getType\\(\\) has parameter \\$value with no type specified\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Lexer.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Lexer\\:\\:parse\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Lexer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$haystack of function stripos expects string, float\\|int\\|string given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Lexer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$haystack of function strpos expects string, float\\|int\\|string given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Lexer.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$value on Doctrine\\\\Common\\\\Lexer\\\\Token\\<int\\|string\\|UnitEnum, int\\|string\\>\\|null\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:getConstant\\(\\) should return string but returns string\\|false\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:parse\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:parse\\(\\) should return array but returns mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:visitArrayType\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:visitCompoundType\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:visitSimpleType\\(\\) never returns string so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:getConstant\\(\\) expects int, int\\<min, 0\\>\\|int\\<4, 8\\>\\|int\\<11, max\\>\\|string\\|UnitEnum\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\Parser\\:\\:getConstant\\(\\) expects int, int\\|string\\|UnitEnum\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/Parser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSCore\\\\Type\\\\ParserInterface\\:\\:parse\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSCore/Type/ParserInterface.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:gatherClassAnnotations\\(\\) has parameter \\$reflectionClass with generic class ReflectionClass but does not specify its types\\: T$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:getMethodName\\(\\) has parameter \\$annotations with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:getProperty\\(\\) has parameter \\$annotations with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:getReturnType\\(\\) has parameter \\$reflClass with generic class ReflectionClass but does not specify its types\\: T$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:getSerializedName\\(\\) has parameter \\$annotations with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:isPostDeserializeMethod\\(\\) has parameter \\$annotations with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:isVirtualProperty\\(\\) has parameter \\$annotations with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:parseClass\\(\\) has parameter \\$reflClass with generic class ReflectionClass but does not specify its types\\: T$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:parseMethods\\(\\) has parameter \\$reflClass with generic class ReflectionClass but does not specify its types\\: T$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:parseProperties\\(\\) has parameter \\$reflClass with generic class ReflectionClass but does not specify its types\\: T$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSParser\\:\\:parsePropertyAnnotations\\(\\) has parameter \\$annotations with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection not found\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Class Doctrine\\\\Common\\\\Collections\\\\Collection not found\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSTypeParser\\:\\:parseType\\(\\) has parameter \\$typeInfo with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$traversableClass of class Liip\\\\MetadataParser\\\\Metadata\\\\PropertyTypeIterable constructor expects class\\-string\\<Traversable\\>\\|null, string\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
@ -210,36 +210,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Component/Serializer/ArraySupportDecorator.php
|
||||
|
||||
-
|
||||
message: "#^Unsafe access to private constant RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Generator\\\\DeserializerGenerator\\:\\:FILENAME_PREFIX through static\\:\\:\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/DeserializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getClassName\\(\\) on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getGroups\\(\\) on mixed\\.$#"
|
||||
count: 3
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getVersions\\(\\) on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Unsafe access to private constant RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Generator\\\\SerializerGenerator\\:\\:FILENAME_PREFIX through static\\:\\:\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Generator/SerializerGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\ModelsChecksumGenerator\\:\\:getStoredChecksums\\(\\) should return array\\<string, string\\> but returns mixed\\.$#"
|
||||
count: 1
|
||||
@ -250,41 +220,6 @@ parameters:
|
||||
count: 4
|
||||
path: src/Component/Serializer/ModelsChecksumGenerator.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to float\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/BaseJMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/BaseJMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\BaseJMSParser\\:\\:parse\\(\\) should return array but returns mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/BaseJMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Parser/BaseJMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Class RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSLexer extends generic class Doctrine\\\\Common\\\\Lexer\\\\AbstractLexer but does not specify its types\\: T, V$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSLexer.php
|
||||
|
||||
-
|
||||
message: "#^Method RetailCrm\\\\Api\\\\Component\\\\Serializer\\\\Parser\\\\JMSLexer\\:\\:parse\\(\\) should return int\\|string\\|null but returns int\\|string\\|UnitEnum\\|null\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSLexer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of function get_class expects object, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$string2 of function strncmp expects string, class\\-string\\|false given\\.$#"
|
||||
count: 1
|
||||
@ -295,36 +230,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$className of class Liip\\\\MetadataParser\\\\Metadata\\\\PropertyTypeClass constructor expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$className of static method Liip\\\\MetadataParser\\\\Metadata\\\\PropertyTypeDateTime\\:\\:fromDateTimeClass\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$typeName of class Liip\\\\MetadataParser\\\\Metadata\\\\PropertyTypePrimitive constructor expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$typeName of static method Liip\\\\MetadataParser\\\\Metadata\\\\PropertyTypeDateTime\\:\\:isTypeDateTime\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$typeName of static method Liip\\\\MetadataParser\\\\Metadata\\\\PropertyTypePrimitive\\:\\:isTypePrimitive\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Component/Serializer/Parser/JMSTypeParser.php
|
||||
|
||||
-
|
||||
message: "#^Unsafe call to private method RetailCrm\\\\Api\\\\Component\\\\Transformer\\\\DateTimeTransformer\\:\\:createFromFormat\\(\\) through static\\:\\:\\.$#"
|
||||
count: 3
|
||||
|
@ -1,4 +1,5 @@
|
||||
includes:
|
||||
- phpstan-baseline-serializer.neon
|
||||
- phpstan-baseline.neon # TODO: This should be removed eventually.
|
||||
|
||||
parameters:
|
||||
|
@ -16,6 +16,8 @@ use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
||||
*
|
||||
* @category Currency
|
||||
* @package RetailCrm\Api\Model\Entity\References
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.LongVariable)
|
||||
*/
|
||||
class Currency
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user