Completed
Pull Request — master (#161)
by Kristof
05:38
created
src/Event/ReadModel/History/HistoryProjector.php 2 patches
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.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                     $domainMessage->getRecordedOn()
76 76
                 ),
77 77
                 new String(
78
-                    'Aangemaakt via EntryAPI door consumer "' . $consumerName . '"'
78
+                    'Aangemaakt via EntryAPI door consumer "'.$consumerName.'"'
79 79
                 ),
80 80
                 $this->getAuthorFromMetadata($domainMessage->getMetadata())
81 81
             )
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                     $domainMessage->getRecordedOn()
96 96
                 ),
97 97
                 new String(
98
-                    'Geüpdatet via EntryAPI door consumer "' . $consumerName . '"'
98
+                    'Geüpdatet via EntryAPI door consumer "'.$consumerName.'"'
99 99
                 ),
100 100
                 $this->getAuthorFromMetadata($domainMessage->getMetadata())
101 101
             )
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $labels = $labelsMerged->getLabels()->toStrings();
127 127
         // Quote labels.
128 128
         $quotedLabels = array_map(
129
-            function ($label) {
129
+            function($label) {
130 130
                 return "'{$label}'";
131 131
             },
132 132
             $labels
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $consumerName = $this->getConsumerFromMetadata($domainMessage->getMetadata());
139 139
 
140 140
         if ($consumerName) {
141
-            $message .= ' via EntryAPI door consumer "' . $consumerName . '"';
141
+            $message .= ' via EntryAPI door consumer "'.$consumerName.'"';
142 142
         }
143 143
 
144 144
         $this->writeHistory(
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         $consumerName = $this->getConsumerFromMetadata($domainMessage->getMetadata());
201 201
 
202 202
         if ($consumerName) {
203
-            $message .= ' via EntryAPI door consumer "' . $consumerName . '"';
203
+            $message .= ' via EntryAPI door consumer "'.$consumerName.'"';
204 204
         }
205 205
 
206 206
         $this->writeHistory(
Please login to merge, or discard this patch.
src/LocalEntityService.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -78,6 +78,9 @@
 block discarded – undo
78 78
         return $document->getRawBody();
79 79
     }
80 80
 
81
+    /**
82
+     * @param string $id
83
+     */
81 84
     public function iri($id)
82 85
     {
83 86
         return $this->iriGenerator->iri($id);
Please login to merge, or discard this patch.
src/Offer/ReadModel/History/OfferHistoryProjector.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     }
126 126
 
127 127
     /**
128
-     * @param $dateString
128
+     * @param string $dateString
129 129
      * @return \DateTime
130 130
      */
131 131
     private function dateFromUdb2DateString($dateString)
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
     /**
353 353
      * @param string $eventId
354
-     * @param Log[]|Log $logs
354
+     * @param Log $logs
355 355
      */
356 356
     protected function writeHistory($eventId, $logs)
357 357
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
             if (preg_match('/^apply(.+)$/', $method, $matches)) {
64 64
                 $event = $matches[1];
65
-                $classNameMethod = 'get' . $event . 'ClassName';
65
+                $classNameMethod = 'get'.$event.'ClassName';
66 66
 
67 67
                 if (method_exists($this, $classNameMethod)) {
68 68
                     $eventFullClassName = call_user_func(array($this, $classNameMethod));
Please login to merge, or discard this patch.
src/Offer/Events/AbstractLabelEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function serialize()
33 33
     {
34 34
         return parent::serialize() + array(
35
-            'label' => (string) $this->label,
35
+            'label' => (string)$this->label,
36 36
         );
37 37
     }
38 38
 
Please login to merge, or discard this patch.
src/EventExport/EventExportService.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *  A selection of items that will be included in the export.
92 92
      *  When left empty the whole query will export.
93 93
      *
94
-     * @return bool|string
94
+     * @return false|string
95 95
      *  The destination url of the export file or false if no events were found.
96 96
      */
97 97
     public function exportEvents(
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      * Generator that yields each unique search result.
264 264
      *
265 265
      * @param int $totalItemCount
266
-     * @param string|object $query
266
+     * @param EventExportQuery $query
267 267
      * @param LoggerInterface $logger
268 268
      *
269 269
      * @return \Generator
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
             if (!$moved) {
174 174
                 throw new \RuntimeException(
175
-                    'Unable to move export file to public directory ' .
175
+                    'Unable to move export file to public directory '.
176 176
                     $this->publicDirectory
177 177
                 );
178 178
             }
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
     ) {
260 260
         $fileUniqueId = basename($tmpPath);
261 261
         $extension = $fileFormat->getFileNameExtension();
262
-        $finalFileName = $fileUniqueId . '.' . $extension;
263
-        $finalPath = $this->publicDirectory . '/' . $finalFileName;
262
+        $finalFileName = $fileUniqueId.'.'.$extension;
263
+        $finalPath = $this->publicDirectory.'/'.$finalFileName;
264 264
 
265 265
         return $finalPath;
266 266
     }
Please login to merge, or discard this patch.
src/Offer/ReadModel/Permission/Doctrine/DBALRepository.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 use CultuurNet\UDB3\Event\ReadModel\Permission\PermissionQueryInterface;
12 12
 use Doctrine\DBAL\Connection;
13 13
 use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
14
-use Doctrine\DBAL\Schema\Schema;
15 14
 use CultuurNet\UDB3\Event\ReadModel\Permission\PermissionRepositoryInterface;
16 15
 use ValueObjects\String\String;
17 16
 
Please login to merge, or discard this patch.
src/Event/EventEditingServiceInterface.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -7,12 +7,8 @@
 block discarded – undo
7 7
 
8 8
 use CultuurNet\UDB3\CalendarInterface;
9 9
 use CultuurNet\UDB3\ContactPoint;
10
-use CultuurNet\UDB3\EventNotFoundException;
11
-use CultuurNet\UDB3\Label;
12
-use CultuurNet\UDB3\Language;
13 10
 use CultuurNet\UDB3\Location;
14 11
 use CultuurNet\UDB3\Media\Image;
15
-use CultuurNet\UDB3\Media\MediaObject;
16 12
 use CultuurNet\UDB3\Title;
17 13
 use ValueObjects\String\String;
18 14
 
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,6 +23,7 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @param string $id
25 25
      * @param string $description
26
+     * @return string
26 27
      */
27 28
     public function updateDescription($id, $description);
28 29
 
@@ -31,6 +32,7 @@  discard block
 block discarded – undo
31 32
      *
32 33
      * @param string $id
33 34
      * @param string $ageRange
35
+     * @return string
34 36
      */
35 37
     public function updateTypicalAgeRange($id, $ageRange);
36 38
 
@@ -38,6 +40,7 @@  discard block
 block discarded – undo
38 40
      * Delete the typical age range of a place.
39 41
      *
40 42
      * @param string $id
43
+     * @return string
41 44
      */
42 45
     public function deleteTypicalAgeRange($id);
43 46
 
@@ -46,6 +49,7 @@  discard block
 block discarded – undo
46 49
      *
47 50
      * @param string $id
48 51
      * @param string $organizerId
52
+     * @return string
49 53
      */
50 54
     public function updateOrganizer($id, $organizerId);
51 55
 
@@ -54,6 +58,7 @@  discard block
 block discarded – undo
54 58
      *
55 59
      * @param string $id
56 60
      * @param string $organizerId
61
+     * @return string
57 62
      */
58 63
     public function deleteOrganizer($id, $organizerId);
59 64
 
@@ -62,6 +67,7 @@  discard block
 block discarded – undo
62 67
      *
63 68
      * @param string $id
64 69
      * @param ContactPoint $contactPoint
70
+     * @return string
65 71
      */
66 72
     public function updateContactPoint($id, ContactPoint $contactPoint);
67 73
 
@@ -70,6 +76,7 @@  discard block
 block discarded – undo
70 76
      *
71 77
      * @param string $id
72 78
      * @param Image $image
79
+     * @return string
73 80
      */
74 81
     public function addImage($id, Image $image);
75 82
 
@@ -96,6 +103,7 @@  discard block
 block discarded – undo
96 103
      *
97 104
      * @param string $id
98 105
      * @param Image $image
106
+     * @return string
99 107
      */
100 108
     public function removeImage($id, Image $image);
101 109
 
@@ -103,7 +111,7 @@  discard block
 block discarded – undo
103 111
      * @param Title $title
104 112
      * @param EventType $eventType
105 113
      * @param Location $location
106
-     * @param CalendarBase $calendar
114
+     * @param CalendarInterface $calendar
107 115
      * @param Theme/null $theme
108 116
      *
109 117
      * @return string $eventId
@@ -115,7 +123,7 @@  discard block
 block discarded – undo
115 123
      * @param Title $title
116 124
      * @param EventType $eventType
117 125
      * @param Location $location
118
-     * @param CalendarBase $calendar
126
+     * @param CalendarInterface $calendar
119 127
      * @param Theme/null $theme
120 128
      *
121 129
      * @return string $eventId
Please login to merge, or discard this patch.
src/Offer/Events/AbstractDescriptionTranslated.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     }
25 25
 
26 26
     /**
27
-     * @return String
27
+     * @return string
28 28
      */
29 29
     public function getDescription()
30 30
     {
Please login to merge, or discard this patch.
src/Offer/Commands/AbstractTranslateDescription.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     }
25 25
 
26 26
     /**
27
-     * @return String
27
+     * @return string
28 28
      */
29 29
     public function getDescription()
30 30
     {
Please login to merge, or discard this patch.