Skip to content

Commit 18c6cb0

Browse files
authored
Merge pull request #6 from pageon/add-php-doc-repository
Add documentation to repository
2 parents 32a4e3a + a1d69bd commit 18c6cb0

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

features/generate/domain/resources/php71/Backend/Modules/TestModule/Domain/MyTestEntity/MyTestEntityRepository.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
use Doctrine\ORM\NoResultException;
1111
use Doctrine\ORM\Query\Expr\Join;
1212

13+
/**
14+
* @method MyTestEntity|null find($id, $lockMode = null, $lockVersion = null)
15+
* @method MyTestEntity|null findOneBy(array $criteria, array $orderBy = null)
16+
* @method MyTestEntity[] findAll()
17+
* @method MyTestEntity[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
18+
*/
1319
class MyTestEntityRepository extends ServiceEntityRepository
1420
{
1521
public function __construct(ManagerRegistry $registry)

features/generate/domain/resources/php71/Standalone/MyEntityRepository.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
use Doctrine\ORM\NoResultException;
1111
use Doctrine\ORM\Query\Expr\Join;
1212

13+
/**
14+
* @method MyEntity|null find($id, $lockMode = null, $lockVersion = null)
15+
* @method MyEntity|null findOneBy(array $criteria, array $orderBy = null)
16+
* @method MyEntity[] findAll()
17+
* @method MyEntity[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
18+
*/
1319
class MyEntityRepository extends ServiceEntityRepository
1420
{
1521
public function __construct(ManagerRegistry $registry)

src/Domain/Repository/Repository.php71.php.twig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ use Doctrine\ORM\NonUniqueResultException;
1010
use Doctrine\ORM\NoResultException;
1111
use Doctrine\ORM\Query\Expr\Join;
1212
13+
/**
14+
* @method {{ class.entityClassName.name }}|null find($id, $lockMode = null, $lockVersion = null)
15+
* @method {{ class.entityClassName.name }}|null findOneBy(array $criteria, array $orderBy = null)
16+
* @method {{ class.entityClassName.name }}[] findAll()
17+
* @method {{ class.entityClassName.name }}[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
18+
*/
1319
class {{ class.className.name }} extends ServiceEntityRepository
1420
{
1521
public function __construct(ManagerRegistry $registry)

0 commit comments

Comments
 (0)