Skip to content

Do not use class names as string literals #36

Open
@larsroettig

Description

@larsroettig

Rule

Warning for String-Representation in $this->createMock for Unit Test.

Reason

if you use String Representation typos can happen also it not nice for IDEs Usage Analyse

Implementation

Bad Example:

$this->createMock('\Foo\Bar\Baz');

Recommendation Example:

$this->createMock(\Foo\Bar\Baz::class);

Metadata

Metadata

Assignees

No one assigned

    Labels

    experimentalShould be implemented with "experimental" severity to try it out

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions