@@ -117,7 +117,7 @@ |
||
| 117 | 117 | /** |
| 118 | 118 | * @param VersionInterface $version |
| 119 | 119 | * @param OptionsInterface $options |
| 120 | - * @return bool |
|
| 120 | + * @return boolean|null |
|
| 121 | 121 | */ |
| 122 | 122 | protected function doRun(VersionInterface $version, OptionsInterface $options) |
| 123 | 123 | { |
@@ -70,7 +70,7 @@ |
||
| 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 | * |
@@ -141,7 +141,7 @@ |
||
| 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 | * |
@@ -28,7 +28,6 @@ |
||
| 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. |
@@ -114,8 +114,8 @@ |
||
| 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) |
@@ -77,7 +77,7 @@ |
||
| 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 | /** |
@@ -47,7 +47,7 @@ |
||
| 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 | |
@@ -127,7 +127,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * |
| 51 | 51 | * @param SingleCommand $command |
| 52 | 52 | * |
| 53 | - * @return VersionInterface |
|
| 53 | + * @return boolean |
|
| 54 | 54 | */ |
| 55 | 55 | public function handle(SingleCommand $command) |
| 56 | 56 | { |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | |
| 20 | 20 | namespace Baleen\Migrations\Service\Command\Migrate\Single; |
| 21 | 21 | |
| 22 | -use Baleen\Migrations\Service\Command\Migrate\AbstractRunnerHandler; |
|
| 23 | 22 | use Baleen\Migrations\Service\Command\Migrate\Single; |
| 24 | 23 | use Baleen\Migrations\Service\Runner\HasRunnerTrait; |
| 25 | 24 | use Baleen\Migrations\Service\Runner\MigrationRunner; |
@@ -25,7 +25,6 @@ |
||
| 25 | 25 | use Baleen\Migrations\Service\Runner\Event\Collection\CollectionBeforeEvent; |
| 26 | 26 | use Baleen\Migrations\Shared\Collection\CollectionInterface; |
| 27 | 27 | use Baleen\Migrations\Shared\Event\Context\CollectionContext; |
| 28 | -use Baleen\Migrations\Shared\Event\MutePublisher; |
|
| 29 | 28 | use Baleen\Migrations\Shared\Event\Publisher\HasInternalPublisherTrait; |
| 30 | 29 | use Baleen\Migrations\Shared\Event\PublisherInterface; |
| 31 | 30 | use Baleen\Migrations\Version\Collection\Collection; |