@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | 'fieldName' => 'bar1', |
82 | 82 | 'targetEntity' => 'baz1', |
83 | 83 | ]; |
84 | - $association2 = [ |
|
84 | + $association2 = [ |
|
85 | 85 | 'sourceEntity' => 'foo2', |
86 | 86 | 'fieldName' => 'bar2', |
87 | 87 | 'targetEntity' => 'baz2', |
88 | 88 | ]; |
89 | - $association3 = [ |
|
89 | + $association3 = [ |
|
90 | 90 | 'sourceEntity' => 'foo3', |
91 | 91 | 'fieldName' => 'bar3', |
92 | 92 | 'targetEntity' => 'baz3', |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | ], |
104 | 104 | ], |
105 | 105 | 'A new entity was found through the relationship \'foo1#bar1\' that was not configured to cascade ' |
106 | - . 'persist operations for entity: stdClass@' . spl_object_hash($entity1) |
|
106 | + . 'persist operations for entity: stdClass@'.spl_object_hash($entity1) |
|
107 | 107 | . '. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity ' |
108 | 108 | . 'or configure cascade persist this association in the mapping for example ' |
109 | 109 | . '@ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem ' |
@@ -120,15 +120,15 @@ discard block |
||
120 | 120 | $entity2, |
121 | 121 | ], |
122 | 122 | ], |
123 | - 'Multiple non-persisted new entities were found through the given association graph:' . "\n\n" |
|
123 | + 'Multiple non-persisted new entities were found through the given association graph:'."\n\n" |
|
124 | 124 | . ' * A new entity was found through the relationship \'foo1#bar1\' that was not configured to ' |
125 | - . 'cascade persist operations for entity: stdClass@' . spl_object_hash($entity1) . '. ' |
|
125 | + . 'cascade persist operations for entity: stdClass@'.spl_object_hash($entity1).'. ' |
|
126 | 126 | . 'To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity ' |
127 | 127 | . 'or configure cascade persist this association in the mapping for example ' |
128 | 128 | . '@ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem ' |
129 | - . 'implement \'baz1#__toString()\' to get a clue.' . "\n" |
|
129 | + . 'implement \'baz1#__toString()\' to get a clue.'."\n" |
|
130 | 130 | . ' * A new entity was found through the relationship \'foo2#bar2\' that was not configured to ' |
131 | - . 'cascade persist operations for entity: stdClass@' . spl_object_hash($entity2) . '. To solve ' |
|
131 | + . 'cascade persist operations for entity: stdClass@'.spl_object_hash($entity2).'. To solve ' |
|
132 | 132 | . 'this issue: Either explicitly call EntityManager#persist() on this unknown entity or ' |
133 | 133 | . 'configure cascade persist this association in the mapping for example ' |
134 | 134 | . '@ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem ' |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | ], |
143 | 143 | ], |
144 | 144 | 'A new entity was found through the relationship \'foo3#bar3\' that was not configured to cascade ' |
145 | - . 'persist operations for entity: ' . $stringEntity3 |
|
145 | + . 'persist operations for entity: '.$stringEntity3 |
|
146 | 146 | . '. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity ' |
147 | 147 | . 'or configure cascade persist this association in the mapping for example ' |
148 | 148 | . '@ManyToOne(..,cascade={"persist"}).', |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | for ($i = 1; $i <= 10000; ++$i) { |
44 | 44 | $user = new CMS\CmsUser; |
45 | 45 | $user->status = 'user'; |
46 | - $user->username = 'user' . $i; |
|
47 | - $user->name = 'Mr.Smith-' . $i; |
|
46 | + $user->username = 'user'.$i; |
|
47 | + $user->name = 'Mr.Smith-'.$i; |
|
48 | 48 | |
49 | 49 | $this->users[$i] = $user; |
50 | 50 | } |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | // Yes, this is a lot of overhead, but I have no better solution other than |
58 | 58 | // completely mocking out the DB, which would be silly (query impact is |
59 | 59 | // necessarily part of our benchmarks) |
60 | - $this->entityManager->getConnection()->executeQuery('DELETE FROM ' . $this->tableName)->execute(); |
|
60 | + $this->entityManager->getConnection()->executeQuery('DELETE FROM '.$this->tableName)->execute(); |
|
61 | 61 | |
62 | 62 | foreach ($this->users as $key => $user) { |
63 | 63 | $this->entityManager->persist($user); |
64 | 64 | |
65 | - if (! ($key % 20)) { |
|
65 | + if ( ! ($key % 20)) { |
|
66 | 66 | $this->entityManager->flush(); |
67 | 67 | $this->entityManager->clear(); |
68 | 68 | } |