Skip to content

Commit

Permalink
Merge pull request #13 from ergebnis/fix/status-array-type
Browse files Browse the repository at this point in the history
Fix: Remove StatusArrayType
  • Loading branch information
localheinz committed Mar 8, 2020
2 parents 17e4f1f + 84cd0eb commit 76133e3
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 376 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integrate.yaml
Expand Up @@ -10,7 +10,7 @@ on: # yamllint disable-line rule:truthy


env: env:
MIN_COVERED_MSI: 91 MIN_COVERED_MSI: 91
MIN_MSI: 54 MIN_MSI: 52
REQUIRED_PHP_EXTENSIONS: "mbstring" REQUIRED_PHP_EXTENSIONS: "mbstring"


jobs: jobs:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -16,11 +16,13 @@ For a full diff see [`fa9c564...master`][fa9c564...master].
### Changed ### Changed


* Removed possibility to set the entity namespace on the `FixtureFactory` ([#3]), by [@localheinz] * Removed possibility to set the entity namespace on the `FixtureFactory` ([#3]), by [@localheinz]
* Removed `StatusArrayType` ([#13]), by [@localheinz]


[fa9c564...master]: https://github.com/ergebnis/factory-bot/compare/fa9c564...master [fa9c564...master]: https://github.com/ergebnis/factory-bot/compare/fa9c564...master


[#1]: https://github.com/ergebnis/factory-bot/pull/1 [#1]: https://github.com/ergebnis/factory-bot/pull/1
[#3]: https://github.com/ergebnis/factory-bot/pull/3 [#3]: https://github.com/ergebnis/factory-bot/pull/3
[#6]: https://github.com/ergebnis/factory-bot/pull/6 [#6]: https://github.com/ergebnis/factory-bot/pull/6
[#13]: https://github.com/ergebnis/factory-bot/pull/13


[@localheinz]: https://github.com/localheinz [@localheinz]: https://github.com/localheinz
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
MIN_COVERED_MSI:=91 MIN_COVERED_MSI:=91
MIN_MSI:=54 MIN_MSI:=52


.PHONY: it .PHONY: it
it: coding-standards dependency-analysis static-code-analysis tests ## Runs the coding-standards, dependency-analysis, static-code-analysis, and tests targets it: coding-standards dependency-analysis static-code-analysis tests ## Runs the coding-standards, dependency-analysis, static-code-analysis, and tests targets
Expand Down
130 changes: 0 additions & 130 deletions phpstan-baseline.neon
@@ -1,30 +1,5 @@
parameters: parameters:
ignoreErrors: ignoreErrors:
-
message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#"
count: 1
path: src/Doctrine/DBAL/Types/StatusArrayType.php

-
message: "#^Class \"FactoryGirl\\\\Provider\\\\Doctrine\\\\DBAL\\\\Types\\\\StatusArrayType\" is not allowed to extend \"Doctrine\\\\DBAL\\\\Types\\\\Type\"\\.$#"
count: 1
path: src/Doctrine/DBAL/Types/StatusArrayType.php

-
message: "#^Class FactoryGirl\\\\Provider\\\\Doctrine\\\\DBAL\\\\Types\\\\StatusArrayType is neither abstract nor final\\.$#"
count: 1
path: src/Doctrine/DBAL/Types/StatusArrayType.php

-
message: "#^Only booleans are allowed in a negated boolean, int\\|false given\\.$#"
count: 1
path: src/Doctrine/DBAL/Types/StatusArrayType.php

-
message: "#^Anonymous function should have native return typehint \"void\"\\.$#"
count: 2
path: src/Doctrine/DBAL/Types/StatusArrayType.php

- -
message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#"
count: 1 count: 1
Expand Down Expand Up @@ -1390,111 +1365,6 @@ parameters:
count: 1 count: 1
path: test/Doctrine/TestDb.php path: test/Doctrine/TestDb.php


-
message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Class \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\" is not allowed to extend \"FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Fixtures\\\\TestCase\"\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Class FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest is neither abstract nor final\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Property FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:\\$platform has no typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Property FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:\\$type \\(FactoryGirl\\\\Provider\\\\Doctrine\\\\DBAL\\\\Types\\\\StatusArrayType\\) does not accept Doctrine\\\\DBAL\\\\Types\\\\Type\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:getNameShouldReturnExpectedName\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\)\\.$#"
count: 3
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:nullShouldAlwaysConvertToNull\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNull\\(\\)\\.$#"
count: 2
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:nonArrayOrNotNullShouldFailDatabaseConversion\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:provideStupidValues\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:provideAcceptableValues\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:invalidCharactersShouldFailDatabaseConversion\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:invalidCharactersShouldFailDatabaseConversion\\(\\) has parameter \\$stupidValue with no typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:acceptableCharactersShouldPassDatabaseConversionAndReturnExpectedSerialization\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:acceptableCharactersShouldPassDatabaseConversionAndReturnExpectedSerialization\\(\\) has parameter \\$acceptableValue with no typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:acceptableCharactersShouldPassDatabaseConversionAndReturnExpectedSerialization\\(\\) has parameter \\$expectedSerialization with no typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:provideSerializedValues\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:valuesShouldDeserializeProperly\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:valuesShouldDeserializeProperly\\(\\) has parameter \\$expected with no typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

-
message: "#^Method FactoryGirl\\\\Tests\\\\Provider\\\\Doctrine\\\\Types\\\\StatusArrayTest\\:\\:valuesShouldDeserializeProperly\\(\\) has parameter \\$serialized with no typehint specified\\.$#"
count: 1
path: test/Doctrine/Types/StatusArrayTest.php

- -
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\Entity\\\\Artist\\:\\:\\$id has no typehint specified\\.$#" message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\Entity\\\\Artist\\:\\:\\$id has no typehint specified\\.$#"
count: 1 count: 1
Expand Down
54 changes: 0 additions & 54 deletions psalm-baseline.xml
@@ -1,22 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="3.9.4@352bd3f5c5789db04e4010856c2f4e01ed354f4e"> <files psalm-version="3.9.4@352bd3f5c5789db04e4010856c2f4e01ed354f4e">
<file src="src/Doctrine/DBAL/Types/StatusArrayType.php">
<MissingClosureParamType occurrences="2">
<code>$walker</code>
<code>$unwashed</code>
</MissingClosureParamType>
<MixedArgument occurrences="3">
<code>$val</code>
<code>$value</code>
<code>$unwashed</code>
</MixedArgument>
<MixedAssignment occurrences="1">
<code>$val</code>
</MixedAssignment>
<MixedOperand occurrences="1">
<code>$walker</code>
</MixedOperand>
</file>
<file src="src/Doctrine/DateIntervalHelper.php"> <file src="src/Doctrine/DateIntervalHelper.php">
<MissingReturnType occurrences="2"> <MissingReturnType occurrences="2">
<code>modify</code> <code>modify</code>
Expand Down Expand Up @@ -571,43 +554,6 @@
<code>createSchema</code> <code>createSchema</code>
</MissingReturnType> </MissingReturnType>
</file> </file>
<file src="test/Doctrine/Types/StatusArrayTest.php">
<MissingParamType occurrences="5">
<code>$stupidValue</code>
<code>$expectedSerialization</code>
<code>$acceptableValue</code>
<code>$expected</code>
<code>$serialized</code>
</MissingParamType>
<MissingPropertyType occurrences="1">
<code>$platform</code>
</MissingPropertyType>
<MissingReturnType occurrences="9">
<code>getNameShouldReturnExpectedName</code>
<code>nullShouldAlwaysConvertToNull</code>
<code>nonArrayOrNotNullShouldFailDatabaseConversion</code>
<code>provideStupidValues</code>
<code>provideAcceptableValues</code>
<code>invalidCharactersShouldFailDatabaseConversion</code>
<code>acceptableCharactersShouldPassDatabaseConversionAndReturnExpectedSerialization</code>
<code>provideSerializedValues</code>
<code>valuesShouldDeserializeProperly</code>
</MissingReturnType>
<MixedArgument occurrences="5">
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
<code>$this-&gt;platform</code>
</MixedArgument>
<MixedAssignment occurrences="2">
<code>$serialization</code>
<code>$deserialized</code>
</MixedAssignment>
<PropertyTypeCoercion occurrences="1">
<code>Type::getType('statusarray')</code>
</PropertyTypeCoercion>
</file>
<file src="test/Fixture/Entity/Badge.php"> <file src="test/Fixture/Entity/Badge.php">
<MissingParamType occurrences="1"> <MissingParamType occurrences="1">
<code>$label</code> <code>$label</code>
Expand Down
69 changes: 0 additions & 69 deletions src/Doctrine/DBAL/Types/StatusArrayType.php

This file was deleted.

1 change: 0 additions & 1 deletion test/AutoReview/SrcCodeTest.php
Expand Up @@ -34,7 +34,6 @@ public function testSrcClassesHaveUnitTests(): void
'Ergebnis\\FactoryBot\\Test\\Unit', 'Ergebnis\\FactoryBot\\Test\\Unit',
[ [
Doctrine\DateIntervalHelper::class, Doctrine\DateIntervalHelper::class,
Doctrine\DBAL\Types\StatusArrayType::class,
Doctrine\EntityDef::class, Doctrine\EntityDef::class,
Doctrine\EntityDefinitionUnavailable::class, Doctrine\EntityDefinitionUnavailable::class,
Doctrine\FieldDef::class, Doctrine\FieldDef::class,
Expand Down

0 comments on commit 76133e3

Please sign in to comment.