Skip to content

Commit bb3cdf1

Browse files
committed
Reformat code
1 parent a72ed25 commit bb3cdf1

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A Doctrine 2 module for Codeception.
99

1010
## Requirements
1111

12-
* `PHP 7.4` or higher.
12+
* `PHP 8.0` or higher.
1313

1414
## Installation
1515

src/Codeception/Module/Doctrine2.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
*
137137
* Note that key is ignored, because actual field name is part of criteria and/or expression.
138138
*/
139-
140139
class Doctrine2 extends CodeceptionModule implements DependsOnModule, DataMapper
141140
{
142141

@@ -515,7 +514,7 @@ public function haveInRepository($classNameOrInstance, array $data = [])
515514
private function instantiateAndPopulateEntity(string $className, array $data, array &$instances)
516515
{
517516
$rpa = new ReflectionPropertyAccessor();
518-
[$scalars,$relations] = $this->splitScalarsAndRelations($className, $data);
517+
[$scalars, $relations] = $this->splitScalarsAndRelations($className, $data);
519518
// Pass relations that are already objects to the constructor, too
520519
$properties = array_merge(
521520
$scalars,
@@ -880,11 +879,11 @@ protected function proceedSeeInRepository(string $entity, array $params = []): a
880879
* $email = $I->grabFromRepository(User::class, 'email', ['name' => 'davert']);
881880
* ```
882881
*
883-
* @version 1.1
884882
* @param class-string $entity
885883
* @param string $field
886884
* @param array $params
887885
* @return mixed
886+
* @version 1.1
888887
*/
889888
public function grabFromRepository(string $entity, string $field, array $params = [])
890889
{
@@ -911,7 +910,7 @@ public function grabFromRepository(string $entity, string $field, array $params
911910
*
912911
* @template T
913912
* @param class-string<T> $entity
914-
* @param array $params. For `IS NULL`, use `['field' => null]`
913+
* @param array $params . For `IS NULL`, use `['field' => null]`
915914
* @return list<T>
916915
* @version 1.1
917916
*/
@@ -941,7 +940,7 @@ public function grabEntitiesFromRepository(string $entity, array $params = []):
941940
*
942941
* @template T
943942
* @param class-string<T> $entity
944-
* @param array $params. For `IS NULL`, use `['field' => null]`
943+
* @param array $params . For `IS NULL`, use `['field' => null]`
945944
* @return T
946945
* @version 1.1
947946
*/
@@ -1004,7 +1003,7 @@ public function _getEntityManager(): EntityManagerInterface
10041003
*/
10051004
private function debugEntityCreation(object $instance, $pks): void
10061005
{
1007-
$message = get_class($instance).' entity created with ';
1006+
$message = get_class($instance) . ' entity created with ';
10081007

10091008
if (!is_array($pks)) {
10101009
$pks = [$pks];
@@ -1015,9 +1014,9 @@ private function debugEntityCreation(object $instance, $pks): void
10151014

10161015
foreach ($pks as $pk) {
10171016
if ($this->isDoctrineEntity($pk)) {
1018-
$message .= get_class($pk).': '.var_export($this->extractPrimaryKey($pk), true).', ';
1017+
$message .= get_class($pk) . ': ' . var_export($this->extractPrimaryKey($pk), true) . ', ';
10191018
} else {
1020-
$message .= var_export($pk, true).', ';
1019+
$message .= var_export($pk, true) . ', ';
10211020
}
10221021
}
10231022

src/Codeception/Util/ReflectionPropertyAccessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private function setPropertiesForClass(?object $obj, string $class, array $data)
5252
$constructorParameters[] = $data[$parameter->getName()];
5353
} else {
5454
throw new InvalidArgumentException(
55-
'Constructor parameter "'.$parameter->getName().'" missing'
55+
'Constructor parameter "' . $parameter->getName() . '" missing'
5656
);
5757
}
5858
}

0 commit comments

Comments
 (0)