Completed
Push — master ( 09cee1...75eab4 )
by Gaetano
06:21
created
Core/Executor/ContentManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -559,7 +559,7 @@
 block discarded – undo
559 559
                     $locations = $locationService->loadLocations($content->contentInfo);
560 560
                     if (count($locations) > 1) {
561 561
                         $otherParentLocations = array();
562
-                        foreach($locations as $otherLocation) {
562
+                        foreach ($locations as $otherLocation) {
563 563
                             if ($otherLocation->id != $location->id) {
564 564
                                 $otherParentLocations[] = $otherLocation->parentLocationId;
565 565
                             }
Please login to merge, or discard this patch.
Core/Executor/LanguageManager.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Kaliop\eZMigrationBundle\Core\Executor;
4 4
 
5 5
 use eZ\Publish\API\Repository\Values\Content\Language;
6
-use Kaliop\eZMigrationBundle\API\Collection\LanguageCollection;
7 6
 
8 7
 /**
9 8
  * Handles language migrations.
Please login to merge, or discard this patch.
Core/Executor/LocationManager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,8 +270,8 @@
 block discarded – undo
270 270
      * The Location Manager currently supports setting references to location id.
271 271
      *
272 272
      * @throws \InvalidArgumentException When trying to set a reference to an unsupported attribute.
273
-     * @param \eZ\Publish\API\Repository\Values\Content\Location|LocationCollection $location
274
-     * @return boolean
273
+     * @param LocationCollection|null $location
274
+     * @return false|null
275 275
      */
276 276
     protected function setReferences($location, $step)
277 277
     {
Please login to merge, or discard this patch.
Core/Executor/RepositoryExecutor.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      *
116 116
      * @throws \InvalidArgumentException when trying to set a reference to an unsupported attribute.
117 117
      * @param $object a sinle element to extract reference values from
118
-     * @param array $referencesDefinitionsthe definitions of the references to extract
118
+     * @param array $referencesDefinitions definitions of the references to extract
119 119
      * @return array key: the reference name (taken from $referencesDefinitions[n]['identifier'], value: the ref. value
120 120
      */
121 121
     abstract protected function getReferencesValues($object, $referencesDefinitions);
@@ -323,6 +323,9 @@  discard block
 block discarded – undo
323 323
         return preg_replace('/(?<!^)[A-Z]/', ' $0', $className);
324 324
     }
325 325
 
326
+    /**
327
+     * @param AbstractCollection $collection
328
+     */
326 329
     protected function getCollectionName($collection)
327 330
     {
328 331
         $className = get_class($collection);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             }
226 226
         }
227 227
 
228
-        foreach($referencesDefs as $reference) {
228
+        foreach ($referencesDefs as $reference) {
229 229
             $overwrite = false;
230 230
             if (isset($reference['overwrite'])) {
231 231
                 $overwrite = $reference['overwrite'];
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     {
247 247
         // allow setting *some* refs even when we have 0 or N matches
248 248
         foreach ($referencesDefinition as $key => $reference) {
249
-            switch($reference['attribute']) {
249
+            switch ($reference['attribute']) {
250 250
 
251 251
                 case 'count':
252 252
                     $value = count($entity);
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         if ($entity instanceof AbstractCollection) {
299 299
 
300 300
             $minOneRef = count($referencesDefinition) > 0;
301
-            $maxOneRef = count($referencesDefinition) > 0 && ! $this->areReferencesMultivalued($referencesDefinition);
301
+            $maxOneRef = count($referencesDefinition) > 0 && !$this->areReferencesMultivalued($referencesDefinition);
302 302
 
303 303
             if ($maxOneRef && count($entity) > 1) {
304 304
                 throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for multiple ' . $this->getCollectionName($entity) . 's');
Please login to merge, or discard this patch.
Core/Executor/SectionManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
      *
124 124
      * @param \eZ\Publish\API\Repository\Values\Content\Section|SectionCollection $section
125 125
      * @throws \InvalidArgumentException When trying to set a reference to an unsupported attribute
126
-     * @return boolean
126
+     * @return false|null
127 127
      */
128 128
     protected function setReferences($section, $step)
129 129
     {
Please login to merge, or discard this patch.
Core/Executor/TagManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
 
168 168
     /**
169 169
      * @param $object
170
-     * @return bool
170
+     * @return false|null
171 171
      *
172 172
      * @todo add support for keyword (with language),
173 173
      */
Please login to merge, or discard this patch.