Skip to content

Add ObjectProphecy to class properties if PHP version selected for the project is >= 7.4 #72

@MollocH

Description

@MollocH

Is your feature request related to a problem? Please describe.
PHP7.4 introduced class variable type-hinting. It would be great if the plugin could identify the selected php version for this project and if >= 7.4, could make a slight change to the mock declaration.

Describe the solution you'd like
Current behaviour:
/** @var DistributionRepository|ObjectProphecy */
private $distributionRepository;

Desired behaviour:
use Prophecy\Prophecy\ObjectProphecy;
/** @var DistributionRepository|ObjectProphecy */
private ObjectProphecy $distributionRepository;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions