| @@ -20,8 +20,6 @@ | ||
| 20 | 20 | namespace Baleen\Migrations\Service\Runner; | 
| 21 | 21 | |
| 22 | 22 | use Baleen\Migrations\Exception\Service\Runner\RunnerException; | 
| 23 | -use Baleen\Migrations\Service\MigrationBus\MigrationBus; | |
| 24 | -use Baleen\Migrations\Service\MigrationBus\MigrationBusInterface; | |
| 25 | 23 | use Baleen\Migrations\Migration\OptionsInterface; | 
| 26 | 24 | use Baleen\Migrations\Service\Runner\Event\Migration\MigrateAfterEvent; | 
| 27 | 25 | use Baleen\Migrations\Service\Runner\Event\Migration\MigrateBeforeEvent; | 
| @@ -21,14 +21,12 @@ | ||
| 21 | 21 | |
| 22 | 22 | use Baleen\Migrations\Exception\InvalidArgumentException; | 
| 23 | 23 | use Baleen\Migrations\Exception\Version\Collection\CollectionException; | 
| 24 | -use Baleen\Migrations\Migration\Options\Direction; | |
| 25 | 24 | use Baleen\Migrations\Shared\Collection\AbstractCollection; | 
| 26 | 25 | use Baleen\Migrations\Version\Collection\Resolver\DefaultResolverStackFactory; | 
| 27 | 26 | use Baleen\Migrations\Version\Collection\Resolver\ResolverInterface; | 
| 28 | 27 | use Baleen\Migrations\Version\Comparator\ComparatorInterface; | 
| 29 | 28 | use Baleen\Migrations\Version\Comparator\MigrationComparator; | 
| 30 | 29 | use Baleen\Migrations\Version\VersionInterface; | 
| 31 | -use Zend\Stdlib\ArrayUtils; | |
| 32 | 30 | |
| 33 | 31 | /** | 
| 34 | 32 | * Class CollectionAbstract. | 
| @@ -25,7 +25,6 @@ | ||
| 25 | 25 | use Baleen\Migrations\Service\Runner\Event\Collection\CollectionBeforeEvent; | 
| 26 | 26 | use Baleen\Migrations\Common\Collection\CollectionInterface; | 
| 27 | 27 | use Baleen\Migrations\Common\Event\Context\CollectionContext; | 
| 28 | -use Baleen\Migrations\Common\Event\MutePublisher; | |
| 29 | 28 | use Baleen\Migrations\Common\Event\Publisher\HasInternalPublisherTrait; | 
| 30 | 29 | use Baleen\Migrations\Common\Event\PublisherInterface; | 
| 31 | 30 | use Baleen\Migrations\Delta\Collection\Collection; | 
| @@ -81,12 +81,12 @@ | ||
| 81 | 81 | return true; // nothing to do - exit early | 
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | -        $mapToIds = function(DeltaInterface $v) { | |
| 84 | +        $mapToIds = function (DeltaInterface $v) { | |
| 85 | 85 | return $v->getId(); | 
| 86 | 86 | }; | 
| 87 | 87 | /** @var CollectionInterface $migrated */ | 
| 88 | 88 | /** @var CollectionInterface $notMigrated */ | 
| 89 | -        list($migrated, $notMigrated) = $versions->partition(function($i, DeltaInterface $v) { | |
| 89 | +        list($migrated, $notMigrated) = $versions->partition(function ($i, DeltaInterface $v) { | |
| 90 | 90 | return $v->isMigrated(); | 
| 91 | 91 | }); | 
| 92 | 92 | $migratedIds = $migrated->map($mapToIds); | 
| @@ -62,7 +62,7 @@ | ||
| 62 | 62 | } | 
| 63 | 63 | // normalize namespaces | 
| 64 | 64 |          foreach ($namespaces as &$namespace) { | 
| 65 | - $namespace = trim($namespace, '\\') . '\\'; | |
| 65 | + $namespace = trim($namespace, '\\').'\\'; | |
| 66 | 66 | } | 
| 67 | 67 | krsort($namespaces); // we search from highest to lowest priority | 
| 68 | 68 | $this->namespaces = $namespaces; | 
| @@ -102,7 +102,7 @@ | ||
| 102 | 102 | $str = (string) $value; | 
| 103 | 103 |          if (empty($str)) { | 
| 104 | 104 | throw new InvalidArgumentException( | 
| 105 | - 'Refusing to create a DeltaId from an empty string or any other type of value that casts into an ' . | |
| 105 | + 'Refusing to create a DeltaId from an empty string or any other type of value that casts into an '. | |
| 106 | 106 | 'empty string.' | 
| 107 | 107 | ); | 
| 108 | 108 | } | 
| @@ -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 | } | 
| @@ -303,7 +303,7 @@ discard block | ||
| 303 | 303 | */ | 
| 304 | 304 | public function __toString() | 
| 305 | 305 |      { | 
| 306 | - return __CLASS__ . '@' . spl_object_hash($this); | |
| 306 | + return __CLASS__.'@'.spl_object_hash($this); | |
| 307 | 307 | } | 
| 308 | 308 | |
| 309 | 309 | /** | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 |      { | 
| 62 | 62 |          if (!is_array($repositories) && (!is_object($repositories) || !$repositories instanceof \Traversable)) { | 
| 63 | 63 | throw new InvalidArgumentException(sprintf( | 
| 64 | - 'Invalid argument provided for $repositories, expecting either an array or Traversable object, but' . | |
| 64 | + 'Invalid argument provided for $repositories, expecting either an array or Traversable object, but'. | |
| 65 | 65 | ' "%s" given', | 
| 66 | 66 | is_object($repositories) ? get_class($repositories) : gettype($repositories) | 
| 67 | 67 | )); | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 |      { | 
| 92 | 92 |          if (!is_array($repositories) && (!is_object($repositories) || !$repositories instanceof \Traversable)) { | 
| 93 | 93 | throw new InvalidArgumentException(sprintf( | 
| 94 | - 'Invalid argument provided for $repositories, expecting either an array or Traversable object, but' . | |
| 94 | + 'Invalid argument provided for $repositories, expecting either an array or Traversable object, but'. | |
| 95 | 95 | ' "%s" given', | 
| 96 | 96 | is_object($repositories) ? get_class($repositories) : gettype($repositories) | 
| 97 | 97 | )); | 
| @@ -218,6 +218,6 @@ | ||
| 218 | 218 | */ | 
| 219 | 219 | public function __toString() | 
| 220 | 220 |      { | 
| 221 | - return __CLASS__ . '@' . spl_object_hash($this); | |
| 221 | + return __CLASS__.'@'.spl_object_hash($this); | |
| 222 | 222 | } | 
| 223 | 223 | } |