@@ -56,14 +56,14 @@ |
||
56 | 56 | |
57 | 57 | $start = microtime(true); |
58 | 58 | $contracts = $this->_em->getRepository(CompanyContract::class)->findAll(); |
59 | - echo "99 CompanyContract: " . number_format(microtime(true) - $start, 6) . "\n"; |
|
59 | + echo "99 CompanyContract: ".number_format(microtime(true) - $start, 6)."\n"; |
|
60 | 60 | $this->assertEquals(99, count($contracts)); |
61 | 61 | |
62 | 62 | $this->_em->clear(); |
63 | 63 | |
64 | 64 | $start = microtime(true); |
65 | 65 | $contracts = $this->_em->getRepository(CompanyContract::class)->findAll(); |
66 | - echo "99 CompanyContract: " . number_format(microtime(true) - $start, 6) . "\n"; |
|
66 | + echo "99 CompanyContract: ".number_format(microtime(true) - $start, 6)."\n"; |
|
67 | 67 | $this->assertEquals(99, count($contracts)); |
68 | 68 | } |
69 | 69 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | $e = microtime(true); |
60 | 60 | |
61 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
61 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | private function loadFixture() |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | foreach ($content as $selection) { |
155 | 155 | $field = $result[$selection->field]; |
156 | 156 | $choiceList = $selection->choiceList; |
157 | - $fieldSelection = new DDC2602FieldSelection(); |
|
157 | + $fieldSelection = new DDC2602FieldSelection(); |
|
158 | 158 | |
159 | 159 | $fieldSelection->field = $field; |
160 | - $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) { |
|
160 | + $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) { |
|
161 | 161 | return in_array($choice->id, $choiceList); |
162 | 162 | }); |
163 | 163 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $s = microtime(true); |
80 | 80 | $result = $hydrator->hydrateAll($stmt, $rsm); |
81 | 81 | $e = microtime(true); |
82 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
82 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $s = microtime(true); |
138 | 138 | $result = $hydrator->hydrateAll($stmt, $rsm); |
139 | 139 | $e = microtime(true); |
140 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
140 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | 'u__status' => 'developer', |
200 | 200 | 'u__username' => 'jwage', |
201 | 201 | 'u__name' => 'Jonathan', |
202 | - 'sclr0' => 'JWAGE' . $i, |
|
202 | + 'sclr0' => 'JWAGE'.$i, |
|
203 | 203 | 'p__phonenumber' => '91' |
204 | 204 | ]; |
205 | 205 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $s = microtime(true); |
212 | 212 | $result = $hydrator->hydrateAll($stmt, $rsm); |
213 | 213 | $e = microtime(true); |
214 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
214 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $s = microtime(true); |
268 | 268 | $result = $hydrator->hydrateAll($stmt, $rsm, [Query::HINT_FORCE_PARTIAL_LOAD => true]); |
269 | 269 | $e = microtime(true); |
270 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
270 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $s = microtime(true); |
324 | 324 | $result = $hydrator->hydrateAll($stmt, $rsm); |
325 | 325 | $e = microtime(true); |
326 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
326 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | /** |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | 'u__status' => 'developer', |
384 | 384 | 'u__username' => 'jwage', |
385 | 385 | 'u__name' => 'Jonathan', |
386 | - 'sclr0' => 'JWAGE' . $i, |
|
386 | + 'sclr0' => 'JWAGE'.$i, |
|
387 | 387 | 'p__phonenumber' => '91' |
388 | 388 | ]; |
389 | 389 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | $s = microtime(true); |
396 | 396 | $result = $hydrator->hydrateAll($stmt, $rsm, [Query::HINT_FORCE_PARTIAL_LOAD => true]); |
397 | 397 | $e = microtime(true); |
398 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
398 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
399 | 399 | } |
400 | 400 | |
401 | 401 | /** |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | 'u__status' => 'developer', |
438 | 438 | 'u__username' => 'jwage', |
439 | 439 | 'u__name' => 'Jonathan', |
440 | - 'sclr0' => 'JWAGE' . $i, |
|
440 | + 'sclr0' => 'JWAGE'.$i, |
|
441 | 441 | 'p__phonenumber' => '91', |
442 | 442 | 'a__id' => $i |
443 | 443 | ]; |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $s = microtime(true); |
451 | 451 | $result = $hydrator->hydrateAll($stmt, $rsm); |
452 | 452 | $e = microtime(true); |
453 | - echo __FUNCTION__ . " - " . ($e - $s) . " seconds" . PHP_EOL; |
|
453 | + echo __FUNCTION__." - ".($e - $s)." seconds".PHP_EOL; |
|
454 | 454 | } |
455 | 455 | } |
456 | 456 |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | $n = 100; |
25 | 25 | |
26 | 26 | $users = []; |
27 | - for ($i=1; $i<=$n; ++$i) { |
|
27 | + for ($i = 1; $i <= $n; ++$i) { |
|
28 | 28 | $user = new CmsUser; |
29 | 29 | $user->status = 'user'; |
30 | - $user->username = 'user' . $i; |
|
31 | - $user->name = 'Mr.Smith-' . $i; |
|
30 | + $user->username = 'user'.$i; |
|
31 | + $user->name = 'Mr.Smith-'.$i; |
|
32 | 32 | $this->_em->persist($user); |
33 | 33 | $users[] = $user; |
34 | 34 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | foreach ($users AS $user) { |
39 | 39 | $user->status = 'other'; |
40 | - $user->username = $user->username . '++'; |
|
40 | + $user->username = $user->username.'++'; |
|
41 | 41 | $user->name = str_replace('Mr.', 'Mrs.', $user->name); |
42 | 42 | } |
43 | 43 | |
@@ -45,6 +45,6 @@ discard block |
||
45 | 45 | $this->_em->flush(); |
46 | 46 | $e = microtime(true); |
47 | 47 | |
48 | - echo ' Compute ChangeSet '.$n.' objects in ' . ($e - $s) . ' seconds' . PHP_EOL; |
|
48 | + echo ' Compute ChangeSet '.$n.' objects in '.($e - $s).' seconds'.PHP_EOL; |
|
49 | 49 | } |
50 | 50 | } |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | //echo "Memory usage before: " . (memory_get_usage() / 1024) . " KB" . PHP_EOL; |
34 | 34 | |
35 | 35 | $batchSize = 20; |
36 | - for ($i=1; $i<=10000; ++$i) { |
|
36 | + for ($i = 1; $i <= 10000; ++$i) { |
|
37 | 37 | $user = new CmsUser; |
38 | 38 | $user->status = 'user'; |
39 | - $user->username = 'user' . $i; |
|
40 | - $user->name = 'Mr.Smith-' . $i; |
|
39 | + $user->username = 'user'.$i; |
|
40 | + $user->name = 'Mr.Smith-'.$i; |
|
41 | 41 | $this->_em->persist($user); |
42 | 42 | if (($i % $batchSize) == 0) { |
43 | 43 | $this->_em->flush(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $e = microtime(true); |
52 | 52 | |
53 | - echo ' Inserted 10000 objects in ' . ($e - $s) . ' seconds' . PHP_EOL; |
|
53 | + echo ' Inserted 10000 objects in '.($e - $s).' seconds'.PHP_EOL; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $user = $proxyFactory->getProxy($entityName, ['id' => $i]); |
43 | 43 | } |
44 | 44 | |
45 | - echo __FUNCTION__ . " - " . (microtime(true) - $start) . " seconds with " . $entityName . PHP_EOL; |
|
45 | + echo __FUNCTION__." - ".(microtime(true) - $start)." seconds with ".$entityName.PHP_EOL; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | $this->setMaxRunningTime(5); |
60 | 60 | $start = microtime(true); |
61 | 61 | |
62 | - for ($i = 0; $i < 100000; $i += 1) { |
|
62 | + for ($i = 0; $i < 100000; $i += 1) { |
|
63 | 63 | $user->__setInitialized(false); |
64 | 64 | $user->__setInitializer($initializer); |
65 | 65 | $user->__load(); |
66 | 66 | $user->__load(); |
67 | 67 | } |
68 | 68 | |
69 | - echo __FUNCTION__ . " - " . (microtime(true) - $start) . " seconds with " . $entityName . PHP_EOL; |
|
69 | + echo __FUNCTION__." - ".(microtime(true) - $start)." seconds with ".$entityName.PHP_EOL; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 |
@@ -24,18 +24,18 @@ |
||
24 | 24 | public $avatar; |
25 | 25 | |
26 | 26 | public function getId() { |
27 | - return $this->id; |
|
27 | + return $this->id; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function getUsername() { |
31 | - return $this->username; |
|
31 | + return $this->username; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getAvatar() { |
35 | - return $this->avatar; |
|
35 | + return $this->avatar; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function setAvatar(ForumAvatar $avatar) { |
39 | - $this->avatar = $avatar; |
|
39 | + $this->avatar = $avatar; |
|
40 | 40 | } |
41 | 41 | } |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | { |
84 | 84 | $metadata->mapField( |
85 | 85 | [ |
86 | - 'id' => true, |
|
87 | - 'fieldName' => 'id', |
|
88 | - 'type' => 'integer', |
|
89 | - 'columnName' => 'user_id', |
|
90 | - 'length' => 150, |
|
86 | + 'id' => true, |
|
87 | + 'fieldName' => 'id', |
|
88 | + 'type' => 'integer', |
|
89 | + 'columnName' => 'user_id', |
|
90 | + 'length' => 150, |
|
91 | 91 | ] |
92 | 92 | ); |
93 | 93 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | |
105 | 105 | $metadata->mapManyToMany( |
106 | 106 | [ |
107 | - 'fieldName' => 'groups', |
|
108 | - 'targetEntity' => 'DDC3579Group' |
|
107 | + 'fieldName' => 'groups', |
|
108 | + 'targetEntity' => 'DDC3579Group' |
|
109 | 109 | ] |
110 | 110 | ); |
111 | 111 |
@@ -133,7 +133,7 @@ |
||
133 | 133 | static public function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata) |
134 | 134 | { |
135 | 135 | $metadata->setInheritanceType(\Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_JOINED); |
136 | - $metadata->setTableName( 'company_contracts'); |
|
136 | + $metadata->setTableName('company_contracts'); |
|
137 | 137 | $metadata->setDiscriminatorColumn( |
138 | 138 | [ |
139 | 139 | 'name' => 'discr', |