Completed
Push — master ( 0635f4...217dce )
by Kristof
8s
created
src/Event/Events/LabelsMerged.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: nicolas
5
- * Date: 27/10/15
6
- * Time: 12:28
7
- */
3
+     * Created by PhpStorm.
4
+     * User: nicolas
5
+     * Date: 27/10/15
6
+     * Time: 12:28
7
+     */
8 8
 
9 9
 namespace CultuurNet\UDB3\Event\Events;
10 10
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public static function deserialize(array $data)
58 58
     {
59 59
         $labels = array_map(
60
-            function ($item) {
60
+            function($item) {
61 61
                 return new Label(
62 62
                     $item['text'],
63 63
                     $item['visible']
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
     public function serialize()
79 79
     {
80 80
         $labels = array_map(
81
-            function (Label $label) {
81
+            function(Label $label) {
82 82
                 return [
83
-                    'text' => (string) $label,
83
+                    'text' => (string)$label,
84 84
                     'visible' => $label->isVisible(),
85 85
                 ];
86 86
             },
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-     * @return mixed The object instance
55
+     * @return LabelsMerged The object instance
56 56
      */
57 57
     public static function deserialize(array $data)
58 58
     {
Please login to merge, or discard this patch.
src/Event/Events/TranslationApplied.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: nicolas
5
- * Date: 04/11/15
6
- * Time: 17:35
7
- */
3
+     * Created by PhpStorm.
4
+     * User: nicolas
5
+     * Date: 04/11/15
6
+     * Time: 17:35
7
+     */
8 8
 
9 9
 namespace CultuurNet\UDB3\Event\Events;
10 10
 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
      * TranslationApplied constructor.
44 44
      * @param String $eventId
45 45
      * @param Language $language
46
-     * @param String|null $title
47
-     * @param String|null $shortDescription
48
-     * @param String|null $longDescription
46
+     * @param null|string $title
47
+     * @param null|string $shortDescription
48
+     * @param null|string $longDescription
49 49
      */
50 50
     public function __construct(
51 51
         String $eventId,
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     /**
71
-     * @return mixed The object instance
71
+     * @return TranslationApplied The object instance
72 72
      */
73 73
     public static function deserialize(array $data)
74 74
     {
Please login to merge, or discard this patch.
src/Event/Events/TranslationDeleted.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: nicolas
5
- * Date: 16/11/15
6
- * Time: 14:03
7
- */
3
+     * Created by PhpStorm.
4
+     * User: nicolas
5
+     * Date: 16/11/15
6
+     * Time: 14:03
7
+     */
8 8
 
9 9
 namespace CultuurNet\UDB3\Event\Events;
10 10
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-     * @return mixed The object instance
41
+     * @return TranslationDeleted The object instance
42 42
      */
43 43
     public static function deserialize(array $data)
44 44
     {
Please login to merge, or discard this patch.
src/Event/ReadModel/History/HistoryProjector.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
         $labels = $labelsMerged->getLabels()->toStrings();
216 216
         // Quote labels.
217 217
         $quotedLabels = array_map(
218
-            function ($label) {
218
+            function($label) {
219 219
                 return "'{$label}'";
220 220
             },
221 221
             $labels
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Variations;
7 7
 
Please login to merge, or discard this patch.
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -5,9 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 namespace CultuurNet\UDB3\Event\ReadModel\History;
7 7
 
8
-use Broadway\Domain\DateTime;
9 8
 use Broadway\Domain\DomainMessage;
10
-use Broadway\Domain\Metadata;
11 9
 use Broadway\EventHandling\EventListenerInterface;
12 10
 use CultuurNet\UDB3\Cdb\EventItemFactory;
13 11
 use CultuurNet\UDB3\Event\DescriptionTranslated;
@@ -21,11 +19,8 @@  discard block
 block discarded – undo
21 19
 use CultuurNet\UDB3\Event\Events\LabelsMerged;
22 20
 use CultuurNet\UDB3\Event\Events\TranslationDeleted;
23 21
 use CultuurNet\UDB3\Event\Events\LabelDeleted;
24
-use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface;
25 22
 use CultuurNet\UDB3\Event\TitleTranslated;
26
-use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait;
27 23
 use CultuurNet\UDB3\Offer\ReadModel\History\OfferHistoryProjector;
28
-use CultuurNet\UDB3\ReadModel\JsonDocument;
29 24
 use ValueObjects\String\String;
30 25
 
31 26
 class HistoryProjector extends OfferHistoryProjector implements EventListenerInterface
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/CdbXMLImporter.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
     {
168 168
         $labels = array_filter(
169 169
             array_values($event->getKeywords()),
170
-            function ($keyword) {
170
+            function($keyword) {
171 171
                 return (strlen(trim($keyword)) > 0);
172 172
             }
173 173
         );
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Variations;
7 7
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
 
165 165
     /**
166 166
      * @param \CultureFeed_Cdb_Item_Event $event
167
-     * @param $jsonLD
167
+     * @param \stdClass $jsonLD
168 168
      */
169 169
     private function importLabels(\CultureFeed_Cdb_Item_Event $event, $jsonLD)
170 170
     {
Please login to merge, or discard this patch.
src/Event/ReadModel/Relations/Doctrine/DBALRepository.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Event\ReadModel\Relations\Doctrine;
7 7
 
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $q = $this->connection->createQueryBuilder();
149 149
         $q->select('event')
150
-          ->from($this->tableName)
151
-          ->where('place = ?')
152
-          ->setParameter(0, $placeId);
150
+            ->from($this->tableName)
151
+            ->where('place = ?')
152
+            ->setParameter(0, $placeId);
153 153
 
154 154
         $results = $q->execute();
155 155
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
     public function removeRelations($eventId)
184 184
     {
185
-      // @todo implement this for non-drupal.
185
+        // @todo implement this for non-drupal.
186 186
     }
187 187
 
188 188
     /**
Please login to merge, or discard this 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->updateEventOrganizerRelation($connection, $eventId, null);
47 47
             }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function storeOrganizer($eventId, $organizerId)
54 54
     {
55
-        $transaction = function ($connection) use ($eventId, $organizerId) {
55
+        $transaction = function($connection) use ($eventId, $organizerId) {
56 56
             if ($this->eventHasRelations($connection, $eventId)) {
57 57
                 $this->updateEventOrganizerRelation($connection, $eventId, $organizerId);
58 58
             } else {
Please login to merge, or discard this patch.
src/Event/ReadModel/Relations/Projector.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Event\ReadModel\Relations;
7 7
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
     }
111 111
 
112 112
     /**
113
-    * @param EventUpdatedFromCdbXml $eventUpdatedFromCdbXml
114
-    */
113
+     * @param EventUpdatedFromCdbXml $eventUpdatedFromCdbXml
114
+     */
115 115
     protected function applyEventUpdatedFromCdbXml(EventUpdatedFromCdbXml $eventUpdatedFromCdbXml)
116 116
     {
117 117
         $eventId = $eventUpdatedFromCdbXml->getEventId();
Please login to merge, or discard this patch.
src/EventExport/Format/HTML/HTMLEventFormatter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
     {
248 248
         return array_keys(array_filter(
249 249
             $this->brandSpecs,
250
-            function (EventSpecificationInterface $brandSpec) use ($event) {
250
+            function(EventSpecificationInterface $brandSpec) use ($event) {
251 251
                 return $brandSpec->isSatisfiedBy($event);
252 252
             }
253 253
         ));
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Variations;
7 7
 
Please login to merge, or discard this patch.
Format/HTML/Uitpas/Promotion/EventOrganizerPromotionQueryFactory.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,16 +78,16 @@
 block discarded – undo
78 78
             $firstTimestamp = reset($uitpasCalendar->timestamps);
79 79
             $firstTimestampDate = new \DateTime();
80 80
             $firstTimestampDate
81
-              ->setTimestamp($firstTimestamp->date)
82
-              ->setTime(0, 0, 0);
81
+                ->setTimestamp($firstTimestamp->date)
82
+                ->setTime(0, 0, 0);
83 83
             $dateRange->datefrom = $firstTimestampDate->getTimestamp();
84 84
 
85 85
             /** @var \CultureFeed_Uitpas_Calendar_Timestamp $lastTimestamp */
86 86
             $lastTimestamp =  end($uitpasCalendar->timestamps);
87 87
             $lastTimestampDate = new \DateTime();
88 88
             $lastTimestampDate
89
-              ->setTimestamp($lastTimestamp->date)
90
-              ->setTime(24, 59, 59);
89
+                ->setTimestamp($lastTimestamp->date)
90
+                ->setTime(24, 59, 59);
91 91
             $dateRange->dateto = $lastTimestampDate->getTimestamp();
92 92
         } else {
93 93
             // If there is no useful calendar info, start from the time the
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             $dateRange->datefrom = $firstPeriod->datefrom;
66 66
 
67 67
             /** @var CultureFeed_Uitpas_Calendar_Period $lastPeriod */
68
-            $lastPeriod =  end($uitpasCalendar->periods);
68
+            $lastPeriod = end($uitpasCalendar->periods);
69 69
             $dateRange->dateto = $lastPeriod->dateto;
70 70
         } elseif (!empty($uitpasCalendar->timestamps)) {
71 71
             /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $dateRange->datefrom = $firstTimestampDate->getTimestamp();
84 84
 
85 85
             /** @var \CultureFeed_Uitpas_Calendar_Timestamp $lastTimestamp */
86
-            $lastTimestamp =  end($uitpasCalendar->timestamps);
86
+            $lastTimestamp = end($uitpasCalendar->timestamps);
87 87
             $lastTimestampDate = new \DateTime();
88 88
             $lastTimestampDate
89 89
               ->setTimestamp($lastTimestamp->date)
Please login to merge, or discard this patch.