Skip to content
Permalink
Browse files

Merge pull request #41 from ergebnis/feature/phpstan-doctrine

Enhancement: Require and use phpstan/phpstan-doctrine
  • Loading branch information
localheinz committed Mar 14, 2020
2 parents 814d9bf + e36ba5a commit 19c38646dc1d91137202339d56d4ab210c6609fc
@@ -34,6 +34,7 @@
"phpstan/extension-installer": "^1.0.3",
"phpstan/phpstan": "~0.12.14",
"phpstan/phpstan-deprecation-rules": "~0.12.2",
"phpstan/phpstan-doctrine": "~0.12.10",
"phpstan/phpstan-phpunit": "~0.12.6",
"phpstan/phpstan-strict-rules": "~0.12.2",
"phpunit/phpunit": "^8.5.2",

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

/**
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-bot
*/

use Ergebnis\FactoryBot\Test\Util;

require_once __DIR__ . '/../vendor/autoload.php';

return Util\Doctrine\ORM\EntityManagerFactory::create();
@@ -146,42 +146,7 @@ parameters:
path: src/FixtureFactory.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Artist\\:\\:\\$id has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Artist.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:\\$id has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:\\$label has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:\\$owner has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:__construct\\(\\) has parameter \\$label with no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:getId\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:getLabel\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:getOwner\\(\\) has no return typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Badge\\:\\:getId\\(\\) has a nullable return type declaration\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Badge.php

@@ -196,17 +161,7 @@ parameters:
path: test/Fixture/FixtureFactory/Entity/Name.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:\\$id has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:\\$name has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:\\$spaceship has no typehint specified\\.$#"
message: "#^Class Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship referenced with incorrect case\\: Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceShip\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

@@ -215,11 +170,6 @@ parameters:
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:__construct\\(\\) has parameter \\$name with no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:__construct\\(\\) has parameter \\$spaceship with a nullable type declaration\\.$#"
count: 1
@@ -231,92 +181,37 @@ parameters:
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:getId\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:getName\\(\\) has no return typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:getId\\(\\) has a nullable return type declaration\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:getSpaceship\\(\\) has no return typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\:\\:getSpaceship\\(\\) has a nullable return type declaration\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Person.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:\\$id has no typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:getId\\(\\) has a nullable return type declaration\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/SpaceStation.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:\\$name has no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/SpaceStation.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:__construct\\(\\) has parameter \\$name with no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/SpaceStation.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:getId\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/SpaceStation.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:getName\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/SpaceStation.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\SpaceStation\\:\\:setName\\(\\) has parameter \\$name with no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/SpaceStation.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:\\$id has no typehint specified\\.$#"
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:\\$crew with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:\\$name has no typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:getId\\(\\) has a nullable return type declaration\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:\\$crew has no typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:getName\\(\\) has a nullable return type declaration\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:__construct\\(\\) has parameter \\$name with no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:getId\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:getName\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:setName\\(\\) has parameter \\$name with no typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:getCrew\\(\\) has no return typehint specified\\.$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

-
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:constructorWasCalled\\(\\) has no return typehint specified\\.$#"
message: "#^Method Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Spaceship\\:\\:getCrew\\(\\) return type with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection does not specify its types\\: TKey, T$#"
count: 1
path: test/Fixture/FixtureFactory/Entity/Spaceship.php

@@ -335,3 +230,8 @@ parameters:
count: 2
path: test/Unit/FixtureFactoryTest.php

-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'Doctrine\\\\\\\\Common…' and Doctrine\\\\Common\\\\Collections\\\\ArrayCollection&iterable\\<Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\FixtureFactory\\\\Entity\\\\Person\\> will always evaluate to true\\.$#"
count: 4
path: test/Unit/FixtureFactoryTest.php

@@ -3,6 +3,8 @@ includes:

parameters:
checkMissingIterableValueType: false
doctrine:
objectManagerLoader: config/object-manager.php
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\FactoryBot\Definition\AbstractDefinition

0 comments on commit 19c3864

Please sign in to comment.
You can’t perform that action at this time.