@@ -65,10 +65,10 @@ |
||
65 | 65 | protected function getExpectations() |
66 | 66 | { |
67 | 67 | return [ |
68 | - [ 'name' => 'setName', |
|
68 | + ['name' => 'setName', |
|
69 | 69 | 'with' => 'migrations:latest', |
70 | 70 | ], |
71 | - [ 'name' => 'setDescription', |
|
71 | + ['name' => 'setDescription', |
|
72 | 72 | 'with' => m::type('string'), |
73 | 73 | ], |
74 | 74 | ]; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function testHandle(LinkedVersions $versions, $newestFirst) |
71 | 71 | { |
72 | - $comparator = function(){}; |
|
72 | + $comparator = function() {}; |
|
73 | 73 | $repository = m::mock(RepositoryInterface::class); |
74 | 74 | $this->command->shouldReceive([ |
75 | 75 | 'getRepository' => $repository, |
@@ -120,6 +120,6 @@ discard block |
||
120 | 120 | } |
121 | 121 | $collections[] = new LinkedVersions($collection); |
122 | 122 | } |
123 | - return $this->combinations([$collections, $trueFalse]);; |
|
123 | + return $this->combinations([$collections, $trueFalse]); ; |
|
124 | 124 | } |
125 | 125 | } |
@@ -65,13 +65,13 @@ |
||
65 | 65 | protected function getExpectations() |
66 | 66 | { |
67 | 67 | return [ |
68 | - [ 'name' => 'setName', |
|
68 | + ['name' => 'setName', |
|
69 | 69 | 'with' => 'migrations:list', |
70 | 70 | ], |
71 | - [ 'name' => 'setDescription', |
|
71 | + ['name' => 'setDescription', |
|
72 | 72 | 'with' => m::type('string'), |
73 | 73 | ], |
74 | - [ 'name' => 'addOption', |
|
74 | + ['name' => 'addOption', |
|
75 | 75 | 'with' => ['newest-first', m::any(), InputOption::VALUE_NONE, m::type('string')], |
76 | 76 | ], |
77 | 77 | ]; |
@@ -69,7 +69,7 @@ |
||
69 | 69 | */ |
70 | 70 | public function testGetSetComparator() |
71 | 71 | { |
72 | - $comparator = function(){}; |
|
72 | + $comparator = function() {}; |
|
73 | 73 | $this->instance->setComparator($comparator); |
74 | 74 | $this->assertSame($comparator, $this->instance->getComparator()); |
75 | 75 | } |
@@ -82,11 +82,11 @@ |
||
82 | 82 | public function executeProvider() |
83 | 83 | { |
84 | 84 | return [ |
85 | - [ [], 5, new DefaultComparator()], |
|
86 | - [ Version::fromArray(1, 2, 3, 4, 5), 5], // simple |
|
87 | - [ Version::fromArray(1, 2, 3, 4, 5, -6), -6], // last item is -6 |
|
88 | - [ Version::fromArray(3, 5, 1, 6, 7, 2), 7], // default order |
|
89 | - [ Version::fromArray(3, 5, 1, 6, 7, 2), 1, function(Version $v1, Version $v2) { // reverse order |
|
85 | + [[], 5, new DefaultComparator()], |
|
86 | + [Version::fromArray(1, 2, 3, 4, 5), 5], // simple |
|
87 | + [Version::fromArray(1, 2, 3, 4, 5, -6), -6], // last item is -6 |
|
88 | + [Version::fromArray(3, 5, 1, 6, 7, 2), 7], // default order |
|
89 | + [Version::fromArray(3, 5, 1, 6, 7, 2), 1, function(Version $v1, Version $v2) { // reverse order |
|
90 | 90 | return (int) $v2->getId() - (int) $v1->getId(); |
91 | 91 | }], |
92 | 92 | ]; |
@@ -63,10 +63,10 @@ |
||
63 | 63 | protected function getExpectations() |
64 | 64 | { |
65 | 65 | return [ |
66 | - [ 'name' => 'setName', |
|
66 | + ['name' => 'setName', |
|
67 | 67 | 'with' => 'storage:latest', |
68 | 68 | ], |
69 | - [ 'name' => 'setDescription', |
|
69 | + ['name' => 'setDescription', |
|
70 | 70 | 'with' => m::type('string'), |
71 | 71 | ], |
72 | 72 | ]; |
@@ -69,10 +69,10 @@ |
||
69 | 69 | |
70 | 70 | if (!$isInteractive || $askResult) { |
71 | 71 | $timeline->shouldReceive('runSingle')->with( |
72 | - m::on(function ($version) { |
|
72 | + m::on(function($version) { |
|
73 | 73 | return (string) $version === '123'; |
74 | 74 | }), |
75 | - m::on(function (Options $options) use ($isUp, $isDryRun) { |
|
75 | + m::on(function(Options $options) use ($isUp, $isDryRun) { |
|
76 | 76 | return $options->isDryRun() === $isDryRun |
77 | 77 | && $options->isDirectionUp() === $isUp; |
78 | 78 | }) |
@@ -69,25 +69,25 @@ |
||
69 | 69 | protected function getExpectations() |
70 | 70 | { |
71 | 71 | return [ |
72 | - [ 'name' => 'setName', |
|
72 | + ['name' => 'setName', |
|
73 | 73 | 'with' => 'timeline:execute', |
74 | 74 | ], |
75 | - [ 'name' => 'setAliases', |
|
75 | + ['name' => 'setAliases', |
|
76 | 76 | 'with' => [['exec', 'execute']], |
77 | 77 | ], |
78 | - [ 'name' => 'setDescription', |
|
78 | + ['name' => 'setDescription', |
|
79 | 79 | 'with' => m::type('string'), |
80 | 80 | ], |
81 | - [ 'name' => 'addOption', |
|
81 | + ['name' => 'addOption', |
|
82 | 82 | 'with' => [ExecuteMessage::OPT_DRY_RUN, 'd', InputOption::VALUE_NONE, m::type('string')], |
83 | 83 | ], |
84 | - [ 'name' => 'addOption', |
|
84 | + ['name' => 'addOption', |
|
85 | 85 | 'with' => [ExecuteMessage::OPT_NO_STORAGE, m::any(), InputOption::VALUE_NONE, m::type('string')], |
86 | 86 | ], |
87 | - [ 'name' => 'addArgument', |
|
87 | + ['name' => 'addArgument', |
|
88 | 88 | 'with' => [ExecuteMessage::ARG_VERSION, InputArgument::REQUIRED, m::type('string')], |
89 | 89 | ], |
90 | - [ 'name' => 'addArgument', |
|
90 | + ['name' => 'addArgument', |
|
91 | 91 | 'with' => [ |
92 | 92 | ExecuteMessage::ARG_DIRECTION, |
93 | 93 | InputArgument::OPTIONAL, |
@@ -67,28 +67,28 @@ |
||
67 | 67 | protected function getExpectations() |
68 | 68 | { |
69 | 69 | return [ |
70 | - [ 'name' => 'setName', |
|
70 | + ['name' => 'setName', |
|
71 | 71 | 'with' => 'timeline:migrate', |
72 | 72 | ], |
73 | - [ 'name' => 'setAliases', |
|
73 | + ['name' => 'setAliases', |
|
74 | 74 | 'with' => [['migrate']], |
75 | 75 | ], |
76 | - [ 'name' => 'setDescription', |
|
76 | + ['name' => 'setDescription', |
|
77 | 77 | 'with' => m::type('string'), |
78 | 78 | ], |
79 | - [ 'name' => 'addArgument', |
|
79 | + ['name' => 'addArgument', |
|
80 | 80 | 'with' => [MigrateMessage::ARG_TARGET, InputArgument::OPTIONAL, m::type('string'), 'latest'], |
81 | 81 | ], |
82 | - [ 'name' => 'addOption', |
|
82 | + ['name' => 'addOption', |
|
83 | 83 | 'with' => [MigrateMessage::OPT_NOPROGRESS, m::any(), InputOption::VALUE_NONE, m::type('string')], |
84 | 84 | ], |
85 | - [ 'name' => 'addOption', |
|
85 | + ['name' => 'addOption', |
|
86 | 86 | 'with' => [MigrateMessage::OPT_STRATEGY, 's', InputOption::VALUE_REQUIRED, m::type('string'), 'up'], |
87 | 87 | ], |
88 | - [ 'name' => 'addOption', |
|
88 | + ['name' => 'addOption', |
|
89 | 89 | 'with' => [MigrateMessage::OPT_DRY_RUN, 'd', InputOption::VALUE_NONE, m::type('string')], |
90 | 90 | ], |
91 | - [ 'name' => 'addOption', |
|
91 | + ['name' => 'addOption', |
|
92 | 92 | 'with' => [MigrateMessage::OPT_NO_STORAGE, m::any(), InputOption::VALUE_NONE, m::type('string')], |
93 | 93 | ], |
94 | 94 | ]; |