Completed
Pull Request — master (#397)
by Luc
03:50
created
src/Offer/Offer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $sameFacilities = array_uintersect(
217 217
             $facilities1,
218 218
             $facilities2,
219
-            function (Facility $facility1, Facility $facility2) {
219
+            function(Facility $facility1, Facility $facility2) {
220 220
                 return strcmp($facility1->getId(), $facility2->getId());
221 221
             }
222 222
         );
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         // Convert the imported labels to label collection.
268 268
         $importLabelsCollection = new LabelCollection(
269 269
             array_map(
270
-                function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
270
+                function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) {
271 271
                     return new Label(
272 272
                         $label->getName()->toString(),
273 273
                         $label->isVisible()
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         foreach ($addedLabels->asArray() as $addedLabel) {
292 292
             $importLabels = $importLabels->with(
293 293
                 new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label(
294
-                    new LabelName((string) $addedLabel),
294
+                    new LabelName((string)$addedLabel),
295 295
                     $addedLabel->isVisible()
296 296
                 )
297 297
             );
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         $importImages = $imageCollection->toArray();
676 676
         $currentImages = $currentImageCollection->toArray();
677 677
 
678
-        $compareImages = function (Image $a, Image $b) {
678
+        $compareImages = function(Image $a, Image $b) {
679 679
             $idA = $a->getMediaObjectId()->toNative();
680 680
             $idB = $b->getMediaObjectId()->toNative();
681 681
             return strcmp($idA, $idB);
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
             if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) {
823 823
                 return true; // nothing left to do if the offer has already been rejected for the same reason
824 824
             } else {
825
-                throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason);
825
+                throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason);
826 826
             }
827 827
         }
828 828
 
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
         $dutchImagesList = $imagesEvent->getImages()->toArray();
998 998
         $translatedImagesList = array_filter(
999 999
             $this->images->toArray(),
1000
-            function (Image $image) {
1000
+            function(Image $image) {
1001 1001
                 return $image->getLanguage()->getCode() !== 'nl';
1002 1002
             }
1003 1003
         );
Please login to merge, or discard this patch.
src/Label/ReadModels/JSON/Repository/Doctrine/DBALReadRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function getByUuid(UUID $uuid)
55 55
     {
56 56
         $aliases = $this->getAliases();
57
-        $whereId = SchemaConfigurator::UUID_COLUMN . ' = ?';
57
+        $whereId = SchemaConfigurator::UUID_COLUMN.' = ?';
58 58
 
59 59
         $queryBuilder = $this->createQueryBuilder()->select($aliases)
60 60
             ->from($this->getTableName()->toNative())
@@ -215,15 +215,15 @@  discard block
 block discarded – undo
215 215
     private function createUserLabelsSubQuery(Query $query)
216 216
     {
217 217
         return $this->createQueryBuilder()
218
-            ->select('DISTINCT ' . LabelRolesSchemaConfigurator::LABEL_ID_COLUMN)
218
+            ->select('DISTINCT '.LabelRolesSchemaConfigurator::LABEL_ID_COLUMN)
219 219
             ->from($this->userRolesTableName->toNative(), 'ur')
220 220
             ->innerJoin(
221 221
                 'ur',
222 222
                 $this->labelRolesTableName->toNative(),
223 223
                 'lr',
224
-                'ur.' . PermissionsSchemaConfigurator::ROLE_ID_COLUMN . ' = lr.' . LabelRolesSchemaConfigurator::ROLE_ID_COLUMN
224
+                'ur.'.PermissionsSchemaConfigurator::ROLE_ID_COLUMN.' = lr.'.LabelRolesSchemaConfigurator::ROLE_ID_COLUMN
225 225
             )
226
-            ->where('ur.' . PermissionsSchemaConfigurator::USER_ID_COLUMN . '= :' . PermissionsSchemaConfigurator::USER_ID_COLUMN);
226
+            ->where('ur.'.PermissionsSchemaConfigurator::USER_ID_COLUMN.'= :'.PermissionsSchemaConfigurator::USER_ID_COLUMN);
227 227
     }
228 228
 
229 229
     /**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         return $queryBuilder->expr()->like(
251 251
             SchemaConfigurator::NAME_COLUMN,
252
-            ':' . SchemaConfigurator::NAME_COLUMN
252
+            ':'.SchemaConfigurator::NAME_COLUMN
253 253
         );
254 254
     }
255 255
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     private function createLikeParameter(Query $query)
261 261
     {
262
-        return '%' . $query->getValue()->toNative() . '%';
262
+        return '%'.$query->getValue()->toNative().'%';
263 263
     }
264 264
 
265 265
     /**
Please login to merge, or discard this patch.
src/Calendar/CalendarConverter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function toCdbCalendar(CalendarInterface $calendar)
41 41
     {
42 42
         $weekScheme = $this->getWeekScheme($calendar);
43
-        $calendarType = (string) $calendar->getType();
43
+        $calendarType = (string)$calendar->getType();
44 44
 
45 45
         switch ($calendarType) {
46 46
             case CalendarType::MULTIPLE:
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps)
101 101
     {
102
-        $numberOfTimestamps =  iterator_count($timestamps);
102
+        $numberOfTimestamps = iterator_count($timestamps);
103 103
         $timestamps->rewind();
104 104
 
105 105
         return $numberOfTimestamps;
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
             foreach ($openingHours as $openingHour) {
134 134
                 // In CDB2 every day needs to be a seperate entry.
135 135
                 if (is_array($openingHour)) {
136
-                    $openingHour = (object) $openingHour;
136
+                    $openingHour = (object)$openingHour;
137 137
                 }
138 138
                 foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) {
139 139
                     $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime(
140
-                        $openingHour->getOpens()->toNativeString() . ':00',
141
-                        $openingHour->getCloses()->toNativeString() . ':00'
140
+                        $openingHour->getOpens()->toNativeString().':00',
141
+                        $openingHour->getCloses()->toNativeString().':00'
142 142
                     );
143 143
                 }
144 144
             }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             } else {
222 222
                 $days = iterator_to_array($period->getDatePeriod('1 DAY'));
223 223
                 $fillerTimestamps = array_map(
224
-                    function (DateTimeInterface $dateTime) use ($index) {
224
+                    function(DateTimeInterface $dateTime) use ($index) {
225 225
                         return new CultureFeed_Cdb_Data_Calendar_Timestamp(
226 226
                             $dateTime->format('Y-m-d'),
227 227
                             $this->createIndexedTimeString($index)
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
             $newCalendar = array_reduce(
235 235
                 array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]),
236
-                function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) {
236
+                function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) {
237 237
                     $calendar->add($timestamp);
238 238
                     return $calendar;
239 239
                 },
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         }
257 257
 
258 258
         $time = is_int($index)
259
-            ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT)
259
+            ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT)
260 260
             : $timestamp->format('H:i:s');
261 261
 
262 262
         return $time;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     private function createIndexedTimeString($index)
270 270
     {
271
-        return '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT);
271
+        return '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT);
272 272
     }
273 273
 
274 274
     /**
Please login to merge, or discard this patch.
src/Event/ReadModel/Relations/Doctrine/DBALRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function removeOrganizer($eventId)
43 43
     {
44
-        $transaction = function ($connection) use ($eventId) {
44
+        $transaction = function($connection) use ($eventId) {
45 45
             if ($this->eventHasRelations($connection, $eventId)) {
46 46
                 $this->updateEventRelation($connection, $eventId, 'organizer', null);
47 47
             }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     private function storeRelation($eventId, $relationType, $itemId)
69 69
     {
70
-        $transaction = function ($connection) use ($eventId, $relationType, $itemId) {
70
+        $transaction = function($connection) use ($eventId, $relationType, $itemId) {
71 71
             if ($this->eventHasRelations($connection, $eventId)) {
72 72
                 $this->updateEventRelation($connection, $eventId, $relationType, $itemId);
73 73
             } else {
Please login to merge, or discard this patch.
src/Storage/DBALPurgeService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $this->connection->exec($sql);
43 43
 
44 44
         if ($platform instanceof SqlitePlatform) {
45
-            $sql = 'UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME=' . $this->connection->quoteIdentifier($this->tableName);
45
+            $sql = 'UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='.$this->connection->quoteIdentifier($this->tableName);
46 46
             $this->connection->exec($sql);
47 47
         }
48 48
     }
Please login to merge, or discard this patch.
src/MyOrganizers/ReadModel/Doctrine/DBALLookupService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         // @todo transform @id here to an object that has a full URL
63 63
         // when json-encoded
64 64
         $organizers = array_map(
65
-            function ($resultRow) {
65
+            function($resultRow) {
66 66
                 return [
67 67
                     '@id' => $this->iriGenerator->iri($resultRow[Columns::ID]),
68 68
                     '@type' => 'Organizer',
Please login to merge, or discard this patch.
src/Cdb/ItemBaseAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             );
36 36
         }
37 37
 
38
-        return isset($userId) ? (string) $userId : '';
38
+        return isset($userId) ? (string)$userId : '';
39 39
     }
40 40
 
41 41
     public function getCreationDateTime(): ?DateTimeImmutable
Please login to merge, or discard this patch.
src/MyOrganizers/ReadModel/Doctrine/DBALHelperTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,6 @@
 block discarded – undo
11 11
 
12 12
     public function parameter(string $name): string
13 13
     {
14
-        return ':' . $name;
14
+        return ':'.$name;
15 15
     }
16 16
 }
Please login to merge, or discard this patch.
src/ReadModel/Index/UDB2Projector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
         $this->repository->updateIndex(
106 106
             $itemId,
107 107
             $itemType,
108
-            (string) $userId,
108
+            (string)$userId,
109 109
             $name,
110 110
             $postalCode,
111 111
             $city,
Please login to merge, or discard this patch.