You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpnamespaceMyVendor\MyProject\Tests\_generated;
// This class was automatically generated by build task// You should not change it manually as it will be overwritten on next build// @codingStandardsIgnoreFiletrait UnitTesterActions
{
/** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that an array has a specified key. * * @param int|string $key * @param array|ArrayAccess $array * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() */publicfunctionassertArrayHasKey($key, $array, string$message = "") {
return$this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args()));
}
}
☝️ it is still relative.
Using the ::assertArrayHasKey() trough the tester: $this->tester->assertArrayHasKey('foo', $myArrayOrArrayAccess);
PHPStorm highlights this line with an error, because:
Expected parameter of type 'array|\MyVendor\MyProject\Tests\_generated\ArrayAccess', '\MyVendor\MyProject\Foo' provided.
Recommended soulution
Use Fully Qualified Names for classes, traits and interfaces in PHPDoc type hints.
Activity
Issue Codeception#10 - Use FQN in PHPDoc type hints for classes and i…
Merge pull request #11 from Sweetchuck/issue-10-2.x-phpdoc-typehint-fqn
fix: use fully qualified ArrayAccess in PHPDoc
fix: use fully qualified ArrayAccess in PHPDoc (#21)