136
136
*
137
137
* Note that key is ignored, because actual field name is part of criteria and/or expression.
138
138
*/
139
-
140
139
class Doctrine2 extends CodeceptionModule implements DependsOnModule, DataMapper
141
140
{
142
141
@@ -515,7 +514,7 @@ public function haveInRepository($classNameOrInstance, array $data = [])
515
514
private function instantiateAndPopulateEntity (string $ className , array $ data , array &$ instances )
516
515
{
517
516
$ rpa = new ReflectionPropertyAccessor ();
518
- [$ scalars ,$ relations ] = $ this ->splitScalarsAndRelations ($ className , $ data );
517
+ [$ scalars , $ relations ] = $ this ->splitScalarsAndRelations ($ className , $ data );
519
518
// Pass relations that are already objects to the constructor, too
520
519
$ properties = array_merge (
521
520
$ scalars ,
@@ -880,11 +879,11 @@ protected function proceedSeeInRepository(string $entity, array $params = []): a
880
879
* $email = $I->grabFromRepository(User::class, 'email', ['name' => 'davert']);
881
880
* ```
882
881
*
883
- * @version 1.1
884
882
* @param class-string $entity
885
883
* @param string $field
886
884
* @param array $params
887
885
* @return mixed
886
+ * @version 1.1
888
887
*/
889
888
public function grabFromRepository (string $ entity , string $ field , array $ params = [])
890
889
{
@@ -911,7 +910,7 @@ public function grabFromRepository(string $entity, string $field, array $params
911
910
*
912
911
* @template T
913
912
* @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]`
915
914
* @return list<T>
916
915
* @version 1.1
917
916
*/
@@ -941,7 +940,7 @@ public function grabEntitiesFromRepository(string $entity, array $params = []):
941
940
*
942
941
* @template T
943
942
* @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]`
945
944
* @return T
946
945
* @version 1.1
947
946
*/
@@ -1004,7 +1003,7 @@ public function _getEntityManager(): EntityManagerInterface
1004
1003
*/
1005
1004
private function debugEntityCreation (object $ instance , $ pks ): void
1006
1005
{
1007
- $ message = get_class ($ instance ). ' entity created with ' ;
1006
+ $ message = get_class ($ instance ) . ' entity created with ' ;
1008
1007
1009
1008
if (!is_array ($ pks )) {
1010
1009
$ pks = [$ pks ];
@@ -1015,9 +1014,9 @@ private function debugEntityCreation(object $instance, $pks): void
1015
1014
1016
1015
foreach ($ pks as $ pk ) {
1017
1016
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 ) . ', ' ;
1019
1018
} else {
1020
- $ message .= var_export ($ pk , true ). ', ' ;
1019
+ $ message .= var_export ($ pk , true ) . ', ' ;
1021
1020
}
1022
1021
}
1023
1022
0 commit comments