It seems like $em can also be of type null; however, parameter $em of Zenstruck\Foundry\Bundle...Property::__construct() does only seem to accept Doctrine\ORM\EntityManagerInterface, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
20
$this->property = new Property(/** @scrutinizer ignore-type */ $em);
Loading history...
21
}
22
23
/**
24
* @before
25
*/
26
public function skipIfNotUsingFoundryBundle(): void
27
{
28
if (!\getenv('KERNEL_CLASS')) {
29
$this->markTestSkipped('App Kernel not found.');
30
}
31
32
if (!\getenv('USE_FOUNDRY_BUNDLE')) {
33
$this->markTestSkipped('ZenstruckFoundryBundle not enabled.');
34
}
35
}
36
37
/**
38
* @test
39
* @dataProvider doctrineTypes
40
*/
41
public function generated_faker_method(string $doctrineType)
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.