Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8f083bf

Browse files
VincentLangletondrejmirtes
authored andcommitted
Mark more method with phpstan-impure
1 parent 873c32c commit 8f083bf

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

‎stubs/DocumentManager.stub‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class DocumentManager implements ObjectManager
1515
* @phpstan-param integer|null $lockMode
1616
* @phpstan-param integer|null $lockVersion
1717
* @phpstan-return T|null
18+
* @phpstan-impure
1819
*/
1920
public function find($documentName, $identifier, $lockMode = null, $lockVersion = null);
2021

‎stubs/DocumentRepository.stub‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ class DocumentRepository implements ObjectRepository
1616
* @phpstan-param int|null $lockMode
1717
* @phpstan-param int|null $lockVersion
1818
* @phpstan-return TDocumentClass|null
19+
* @phpstan-impure
1920
*/
2021
public function find($id, $lockMode = null, $lockVersion = null);
2122

2223
/**
2324
* @phpstan-return array<int, TDocumentClass>
25+
* @phpstan-impure
2426
*/
2527
public function findAll();
2628

@@ -30,12 +32,14 @@ class DocumentRepository implements ObjectRepository
3032
* @phpstan-param int|null $limit
3133
* @phpstan-param int|null $skip
3234
* @phpstan-return array<int, TDocumentClass>
35+
* @phpstan-impure
3336
*/
3437
public function findBy(array $criteria, ?array $sort = null, $limit = null, $skip = null);
3538

3639
/**
3740
* @phpstan-param array<string, mixed> $criteria The criteria.
3841
* @phpstan-return TDocumentClass|null
42+
* @phpstan-impure
3943
*/
4044
public function findOneBy(array $criteria);
4145

‎stubs/EntityManager.stub‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class EntityManager implements EntityManagerInterface
1414
* @phpstan-param integer|null $lockMode
1515
* @phpstan-param integer|null $lockVersion
1616
* @phpstan-return T|null
17+
* @phpstan-impure
1718
*/
1819
public function find($entityName, $id, $lockMode = null, $lockVersion = null);
1920

‎stubs/EntityManagerDecorator.stub‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class EntityManagerDecorator implements EntityManagerInterface
1616
* @phpstan-param integer|null $lockMode
1717
* @phpstan-param integer|null $lockVersion
1818
* @phpstan-return T|null
19+
* @phpstan-impure
1920
*/
2021
public function find($entityName, $id, $lockMode = null, $lockVersion = null);
2122

‎stubs/EntityManagerInterface.stub‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface EntityManagerInterface extends ObjectManager
1515
* @phpstan-param class-string<T> $className
1616
* @phpstan-param mixed $id
1717
* @phpstan-return T|null
18+
* @phpstan-impure
1819
*/
1920
public function find($className, $id);
2021

‎stubs/EntityRepository.stub‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class EntityRepository implements ObjectRepository
2626

2727
/**
2828
* @phpstan-return list<TEntityClass>
29+
* @phpstan-impure
2930
*/
3031
public function findAll();
3132

@@ -35,6 +36,7 @@ class EntityRepository implements ObjectRepository
3536
* @phpstan-param int|null $limit
3637
* @phpstan-param int|null $offset
3738
* @phpstan-return list<TEntityClass>
39+
* @phpstan-impure
3840
*/
3941
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null);
4042

@@ -77,6 +79,8 @@ class EntityRepository implements ObjectRepository
7779
* @param array<string, mixed> $criteria
7880
*
7981
* @return int<0, max>
82+
*
83+
* @phpstan-impure
8084
*/
8185
public function count(array $criteria);
8286

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /