Skip to content

Commit 36f912c

Browse files
committed
Added PHPDoc
1 parent 1f77519 commit 36f912c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/EntityQuery.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,37 @@ class EntityQuery extends Query implements \Countable
1515
private $field;
1616

1717

18+
/**
19+
* @param string $field
20+
*/
1821
public function __construct(Entity $entity, $field)
1922
{
2023
$this->entity = $entity;
2124
$this->field = $field;
2225
}
2326

2427

28+
/**
29+
* @return Entity[]
30+
*/
2531
public function find()
2632
{
2733
return $this->entity->find($this->field, $this);
2834
}
2935

3036

37+
/**
38+
* @return Entity|NULL
39+
*/
3140
public function findOne()
3241
{
3342
return $this->entity->findOne($this->field, $this);
3443
}
3544

3645

46+
/**
47+
* @return int
48+
*/
3749
public function count()
3850
{
3951
return $this->entity->findCount($this->field, $this);

src/RepositoryQuery.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Inlm\Model;
44

55
use LeanMapperQuery\Query;
6+
use LeanMapper\Entity;
67
use LeanMapper\Repository;
78

89

@@ -18,18 +19,27 @@ public function __construct(Repository $repository)
1819
}
1920

2021

22+
/**
23+
* @return Entity[]
24+
*/
2125
public function find()
2226
{
2327
return $this->repository->find($this);
2428
}
2529

2630

31+
/**
32+
* @return Entity|NULL
33+
*/
2734
public function findOne()
2835
{
2936
return $this->repository->findOne($this);
3037
}
3138

3239

40+
/**
41+
* @return int
42+
*/
3343
public function count()
3444
{
3545
return $this->repository->findCount($this);

0 commit comments

Comments
 (0)