Skip to content

EntityRepository::count should return positive int #603

@kevinpapst

Description

@kevinpapst

Adding this method to the EntityRepository.stub solves a few issues where positive integer are expected.

Afaik this method can never return a negative interger.

	/**
	 * @param array<string, mixed> $criteria
	 *
	 * @return int<0, max>
	 */
	public function count(array $criteria);

Never opened a PR here, so please advice how to proceed.
Also I am puzzled whether return or phpstan-return or psalm-return is the correct way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions