Skip to content

Commit

Permalink
Add missing throws
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jun 26, 2023
1 parent a9eae20 commit cbfcf32
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ parameters:
- stubs/Collections/ReadableCollection.stub
- stubs/Collections/Selectable.stub
- stubs/ORM/AbstractQuery.stub
- stubs/ORM/Exception/ORMException.stub
- stubs/ORM/Id/AbstractIdGenerator.stub
- stubs/ORM/Mapping/ClassMetadata.stub
- stubs/ORM/Mapping/ClassMetadataInfo.stub
Expand Down
4 changes: 4 additions & 0 deletions stubs/EntityManager.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Doctrine\ORM;

use Doctrine\ORM\Exception\ORMException;

class EntityManager implements EntityManagerInterface
{

Expand Down Expand Up @@ -35,6 +37,8 @@ class EntityManager implements EntityManagerInterface
* @phpstan-param class-string<T> $entityName
* @phpstan-param mixed $id
* @phpstan-return T|null
*
* @throws ORMException
*/
public function getReference($entityName, $id);

Expand Down
3 changes: 3 additions & 0 deletions stubs/EntityManagerDecorator.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Doctrine\ORM\Decorator;

use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Exception\ORMException;

class EntityManagerDecorator implements EntityManagerInterface
{
Expand Down Expand Up @@ -37,6 +38,8 @@ class EntityManagerDecorator implements EntityManagerInterface
* @phpstan-param class-string<T> $entityName
* @phpstan-param mixed $id
* @phpstan-return T|null
*
* @throws ORMException
*/
public function getReference($entityName, $id);

Expand Down
3 changes: 3 additions & 0 deletions stubs/EntityManagerInterface.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Doctrine\ORM;

use Doctrine\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectRepository;
use Doctrine\ORM\Exception\ORMException;
use Doctrine\ORM\Mapping\ClassMetadata;

interface EntityManagerInterface extends ObjectManager
Expand Down Expand Up @@ -36,6 +37,8 @@ interface EntityManagerInterface extends ObjectManager
* @phpstan-param class-string<T> $entityName
* @phpstan-param mixed $id
* @phpstan-return T|null
*
* @throws ORMException
*/
public function getReference($entityName, $id);

Expand Down
10 changes: 10 additions & 0 deletions stubs/ORM/Exception/ORMException.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Doctrine\ORM\Exception;

use Doctrine\ORM\ORMException as BaseORMException;

class ORMException extends BaseORMException
{

}

0 comments on commit cbfcf32

Please sign in to comment.