-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ private function getReferenceRepository(): ReferenceRepository | |
* | ||
* @return void | ||
Check failure on line 50 in src/AbstractFixture.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
*/ | ||
public function setReference(string $name, object $object) | ||
public function setReference(string $name, object $object): void | ||
{ | ||
$this->getReferenceRepository()->setReference($name, $object); | ||
} | ||
|
@@ -68,7 +68,7 @@ public function setReference(string $name, object $object) | |
* | ||
* @throws BadMethodCallException - if repository already has a reference by $name. | ||
*/ | ||
public function addReference(string $name, object $object) | ||
public function addReference(string $name, object $object): void | ||
{ | ||
$this->getReferenceRepository()->addReference($name, $object); | ||
} | ||
|
@@ -86,7 +86,7 @@ public function addReference(string $name, object $object) | |
* | ||
* @template T of object | ||
*/ | ||
public function getReference(string $name, ?string $class = null) | ||
public function getReference(string $name, ?string $class = null): object | ||
{ | ||
if ($class === null) { | ||
Deprecation::trigger( | ||
|
@@ -110,7 +110,7 @@ public function getReference(string $name, ?string $class = null) | |
* | ||
* @return bool | ||
*/ | ||
public function hasReference(string $name, ?string $class = null) | ||
public function hasReference(string $name, ?string $class = null): bool | ||
{ | ||
if ($class === null) { | ||
Deprecation::trigger( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,16 +40,14 @@ public function __construct(DocumentManager $dm, ?MongoDBPurger $purger = null) | |
|
||
/** | ||
* Retrieve the DocumentManager instance this executor instance is using. | ||
* | ||
* @return DocumentManager | ||
*/ | ||
public function getObjectManager() | ||
public function getObjectManager(): DocumentManager | ||
{ | ||
return $this->dm; | ||
} | ||
|
||
/** @inheritDoc */ | ||
Check failure on line 49 in src/Executor/MongoDBExecutor.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
public function setReferenceRepository(ReferenceRepository $referenceRepository) | ||
public function setReferenceRepository(ReferenceRepository $referenceRepository): void | ||
{ | ||
$this->dm->getEventManager()->removeEventListener( | ||
$this->listener->getSubscribedEvents(), | ||
|
@@ -62,7 +60,7 @@ public function setReferenceRepository(ReferenceRepository $referenceRepository) | |
} | ||
|
||
/** @inheritDoc */ | ||
public function execute(array $fixtures, bool $append = false) | ||
public function execute(array $fixtures, bool $append = false): void | ||
{ | ||
if ($append === false) { | ||
$this->purge(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,16 +43,14 @@ public function __construct(EntityManagerInterface $em, ?ORMPurgerInterface $pur | |
|
||
/** | ||
* Retrieve the EntityManagerInterface instance this executor instance is using. | ||
* | ||
* @return EntityManagerInterface | ||
*/ | ||
public function getObjectManager() | ||
public function getObjectManager(): EntityManagerInterface | ||
{ | ||
return $this->originalManager; | ||
} | ||
|
||
/** @inheritDoc */ | ||
Check failure on line 52 in src/Executor/ORMExecutorCommon.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
public function setReferenceRepository(ReferenceRepository $referenceRepository) | ||
public function setReferenceRepository(ReferenceRepository $referenceRepository): void | ||
{ | ||
$this->em->getEventManager()->removeEventListener( | ||
$this->listener->getSubscribedEvents(), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ interface OrderedFixtureInterface | |
* | ||
* @return int | ||
Check failure on line 17 in src/OrderedFixtureInterface.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
*/ | ||
public function getOrder(); | ||
public function getOrder(): int; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ class ProxyReferenceRepository extends ReferenceRepository | |
* | ||
* @return string | ||
Check failure on line 25 in src/ProxyReferenceRepository.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
*/ | ||
public function serialize() | ||
public function serialize(): string | ||
{ | ||
$unitOfWork = $this->getManager()->getUnitOfWork(); | ||
$simpleReferences = []; | ||
|
@@ -49,7 +49,7 @@ public function serialize() | |
* | ||
* @return void | ||
Check failure on line 50 in src/ProxyReferenceRepository.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
*/ | ||
public function unserialize(string $serializedData) | ||
public function unserialize(string $serializedData): void | ||
{ | ||
$repositoryData = unserialize($serializedData); | ||
|
||
|
@@ -98,7 +98,7 @@ public function unserialize(string $serializedData) | |
* | ||
* @return bool | ||
Check failure on line 99 in src/ProxyReferenceRepository.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
*/ | ||
public function load(string $baseCacheName) | ||
public function load(string $baseCacheName): bool | ||
{ | ||
$filename = $baseCacheName . '.ser'; | ||
|
||
|
@@ -124,7 +124,7 @@ public function load(string $baseCacheName) | |
* | ||
* @return void | ||
Check failure on line 125 in src/ProxyReferenceRepository.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
*/ | ||
public function save(string $baseCacheName) | ||
public function save(string $baseCacheName): void | ||
{ | ||
$serializedData = $this->serialize(); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,26 +27,22 @@ public function __construct(?DocumentManager $dm = null) | |
|
||
/** | ||
* Set the DocumentManager instance this purger instance should use. | ||
* | ||
* @return void | ||
*/ | ||
public function setDocumentManager(DocumentManager $dm) | ||
public function setDocumentManager(DocumentManager $dm): void | ||
{ | ||
$this->dm = $dm; | ||
} | ||
|
||
/** | ||
* Retrieve the DocumentManager instance this purger instance is using. | ||
* | ||
* @return DocumentManager | ||
*/ | ||
public function getObjectManager() | ||
public function getObjectManager(): DocumentManager | ||
{ | ||
return $this->dm; | ||
} | ||
|
||
/** @inheritDoc */ | ||
Check failure on line 44 in src/Purger/MongoDBPurger.php GitHub Actions / Coding Standards / Coding Standards (8.2)
|
||
public function purge() | ||
public function purge(): void | ||
{ | ||
$metadatas = $this->dm->getMetadataFactory()->getAllMetadata(); | ||
foreach ($metadatas as $metadata) { | ||
|