Completed
Branch ddd-changes (96d3bc)
by Gabriel
05:08
created
src/Service/Command/Migrate/Single/SingleHandler.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      *
36 36
      * @param SingleCommand $command
37 37
      *
38
-     * @return VersionInterface
38
+     * @return \Baleen\Migrations\Shared\Collection\CollectionInterface
39 39
      */
40 40
     public function handle(SingleCommand $command)
41 41
     {
Please login to merge, or discard this patch.
src/Service/Runner/AbstractRunner.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
     /**
61 61
      * getContext
62
-     * @return ContextInterface|null
62
+     * @return ContextInterface
63 63
      */
64 64
     final protected function getContext() {
65 65
         return $this->context;
Please login to merge, or discard this patch.
src/Shared/Collection/CollectionInterface.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      *
84 84
      * @param string|integer $key The kex/index of the element to remove.
85 85
      *
86
-     * @return mixed The removed element or NULL, if the collection did not contain the element.
86
+     * @return null|VersionInterface The removed element or NULL, if the collection did not contain the element.
87 87
      */
88 88
     public function remove($key);
89 89
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     /**
100 100
      * Gets all keys/indices of the collection.
101 101
      *
102
-     * @return array The keys/indices of the collection, in the order of the corresponding
102
+     * @return integer[] The keys/indices of the collection, in the order of the corresponding
103 103
      *               elements in the collection.
104 104
      */
105 105
     public function getKeys();
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      * @param int      $offset The offset to start from.
215 215
      * @param int|null $length The maximum number of elements to return, or null for no limit.
216 216
      *
217
-     * @return array
217
+     * @return VersionInterface[]
218 218
      */
219 219
     public function slice($offset, $length = null);
220 220
 
Please login to merge, or discard this patch.
src/Shared/Event/Progress.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     /**
71 71
      * Update the current progress
72 72
      *
73
-     * @param $newProgress
73
+     * @param integer $newProgress
74 74
      *
75 75
      * @return void
76 76
      *
Please login to merge, or discard this patch.
src/Version/Collection/Collection.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
     /**
142 142
      * Add a version to the collection
143 143
      *
144
-     * @param mixed $version
144
+     * @param VersionInterface $version
145 145
      *
146 146
      * @return bool
147 147
      *
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 use Baleen\Migrations\Version\Comparator\ComparatorInterface;
29 29
 use Baleen\Migrations\Version\Comparator\MigrationComparator;
30 30
 use Baleen\Migrations\Version\VersionInterface;
31
-use Zend\Stdlib\ArrayUtils;
32 31
 
33 32
 /**
34 33
  * Class CollectionAbstract.
Please login to merge, or discard this patch.
src/Version/Comparator/NamespacesAwareComparator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,8 +114,8 @@
 block discarded – undo
114 114
     /**
115 115
      * Compare using namespaces
116 116
      *
117
-     * @param $class1
118
-     * @param $class2
117
+     * @param string $class1
118
+     * @param string $class2
119 119
      * @return int|null
120 120
      */
121 121
     private function compareNamespaces($class1, $class2)
Please login to merge, or discard this patch.
src/Migration/Options/Direction.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      * @return string
78 78
      */
79 79
     public function getDirection() {
80
-       return $this->direction;
80
+        return $this->direction;
81 81
     }
82 82
 
83 83
     /**
Please login to merge, or discard this patch.
src/Service/Command/Migrate/Collection/CollectionHandler.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $filter = function (VersionInterface $v) use ($target, $comparator, $direction) {
48 48
             return ($direction->isUp() ^ $v->isMigrated()) // direction must be opposite to migration status
49 49
                     && $comparator->compare($v, $target) <= 0; // version must be before or be equal to target (not
50
-                                                               // affected by direction because comparator is reversed)
50
+                                                                // affected by direction because comparator is reversed)
51 51
         };
52 52
         $collection = $collection->filter($filter)->sort($comparator);
53 53
 
Please login to merge, or discard this patch.
src/Shared/Collection/AbstractCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     public function remove($key)
128 128
     {
129 129
         $key = (string) $key;
130
-        if ( ! isset($this->elements[$key]) && ! array_key_exists($key, $this->elements)) {
130
+        if (!isset($this->elements[$key]) && !array_key_exists($key, $this->elements)) {
131 131
             return null;
132 132
         }
133 133
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     final public function forAll(Closure $p)
271 271
     {
272 272
         foreach ($this->elements as $key => $element) {
273
-            if ( ! $p($key, $element)) {
273
+            if (!$p($key, $element)) {
274 274
                 return false;
275 275
             }
276 276
         }
Please login to merge, or discard this patch.