Completed
Push — master ( 25abd6...2ecbc7 )
by Gabriel
07:23
created
src/CommandBus/Config/InitHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             $msg = sprintf('Config file created at "<info>%s</info>".', $message->getConfig()->getFileName());
54 54
         } else {
55 55
             $msg = sprintf(
56
-                '<error>Error: Could not create and write file "<info>%s</info>". '.
56
+                '<error>Error: Could not create and write file "<info>%s</info>". ' .
57 57
                 'Please check file and directory permissions.</error>',
58 58
                 $message->getConfig()->getFileName()
59 59
             );
Please login to merge, or discard this patch.
src/CommandBus/Config/StatusHandler.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
         $headVersion = $migratedVersions->last();
61 61
 
62 62
         $currentMessage = $headVersion ?
63
-            "Current version: <comment>{$headVersion->getId()}</comment>" :
64
-            'Nothing has been migrated yet.';
63
+            "Current version: <comment>{$headVersion->getId()}</comment>" : 'Nothing has been migrated yet.';
65 64
         $output->writeln($currentMessage);
66 65
 
67 66
         $diff = array_diff($availableMigrations->toArray(), $migratedVersions->toArray());
Please login to merge, or discard this patch.
src/CommandBus/Repository/CreateHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         }
77 77
 
78 78
         $timestamp = date('YmdHis');
79
-        $className = ['v'.$timestamp];
79
+        $className = ['v' . $timestamp];
80 80
         $title = $input->getArgument('title');
81 81
         if (!empty($title)) {
82 82
             $title = preg_replace('/[^A-Za-z\d_]+/', '', $title);
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
     {
162 162
         $className = $class->getName();
163 163
         $file = new FileGenerator([
164
-            'fileName' => $className.'.php',
164
+            'fileName' => $className . '.php',
165 165
             'classes' => [$class],
166 166
         ]);
167 167
         $contents = $file->generate();
168 168
 
169
-        $relativePath = $destinationDir.DIRECTORY_SEPARATOR.$file->getFilename();
169
+        $relativePath = $destinationDir . DIRECTORY_SEPARATOR . $file->getFilename();
170 170
         if ($filesystem->has($relativePath)) {
171 171
             throw new CliException(sprintf(
172 172
                 'Could not generate migration. File already exists: %s',
Please login to merge, or discard this patch.
src/CommandBus/Repository/ListHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     protected function outputVersions(LinkedVersions $versions, OutputInterface $output)
61 61
     {
62 62
         foreach ($versions as $version) {
63
-            $output->writeln('<comment>('.$version->getId().')</comment> '.get_class($version->getMigration()));
63
+            $output->writeln('<comment>(' . $version->getId() . ')</comment> ' . get_class($version->getMigration()));
64 64
         }
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
src/CommandBus/Timeline/ExecuteHandler.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
         $version = (string) $input->getArgument(ExecuteMessage::ARG_VERSION);
39 39
 
40 40
         $direction = $input->getArgument(ExecuteMessage::ARG_DIRECTION) == Options::DIRECTION_DOWN ?
41
-            Options::DIRECTION_DOWN :
42
-            Options::DIRECTION_UP;
41
+            Options::DIRECTION_DOWN : Options::DIRECTION_UP;
43 42
         $dryRun = (bool) $input->getOption(ExecuteMessage::OPT_DRY_RUN);
44 43
         $forced = true; // because we're executing a single migration
45 44
 
@@ -47,7 +46,7 @@  discard block
 block discarded – undo
47 46
 
48 47
         $canExecute = true;
49 48
         if ($input->isInteractive()) {
50
-            $output->writeln('<error>WARNING!</error> You are about to manually execute a database migration that '.
49
+            $output->writeln('<error>WARNING!</error> You are about to manually execute a database migration that ' .
51 50
                 'could result in schema changes and data lost.');
52 51
             $question = sprintf('Are you sure you wish to migrate "%s" (y/n)? ', $direction);
53 52
             $canExecute = $command->getCliCommand()
Please login to merge, or discard this patch.
src/Config/Config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function getMigrationsDirectoryPath()
153 153
     {
154
-        return getcwd().DIRECTORY_SEPARATOR.$this->getMigrationsDirectory();
154
+        return getcwd() . DIRECTORY_SEPARATOR . $this->getMigrationsDirectory();
155 155
     }
156 156
 
157 157
     /**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getStorageFilePath()
177 177
     {
178
-        return getcwd().DIRECTORY_SEPARATOR.$this->getStorageFile();
178
+        return getcwd() . DIRECTORY_SEPARATOR . $this->getStorageFile();
179 179
     }
180 180
 
181 181
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function getConfigFilePath()
193 193
     {
194
-        return getcwd().DIRECTORY_SEPARATOR.$this->getFileName();
194
+        return getcwd() . DIRECTORY_SEPARATOR . $this->getFileName();
195 195
     }
196 196
 
197 197
     /**
Please login to merge, or discard this patch.
src/Provider/CommandsProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         // add all message classes to the container
116 116
         foreach ($commands as $alias => $config) {
117
-            $container->add($alias, function (Container $container, $config) {
117
+            $container->add($alias, function(Container $container, $config) {
118 118
                 /** @var MessageFactoryInterface $factory */
119 119
                 $factory = !empty($config['factory']) ? $config['factory'] : DefaultFactory::class;
120 120
                 $factory = $container->get($factory);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         }
131 131
 
132 132
         // setup the command bus to know which handler to use for each message class
133
-        $container->singleton(Services::COMMAND_BUS, function () use ($commands) {
133
+        $container->singleton(Services::COMMAND_BUS, function() use ($commands) {
134 134
             $map = [];
135 135
             foreach ($commands as $alias => $config) {
136 136
                 $message = $config['message'];
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         });
143 143
 
144 144
         // create a service (that's just an array) that has a list of all the commands for the app
145
-        $container->add(Services::COMMANDS, function (ContainerInterface $container) use ($commands) {
145
+        $container->add(Services::COMMANDS, function(ContainerInterface $container) use ($commands) {
146 146
             $commandList = [];
147 147
             foreach ($commands as $alias => $config) {
148 148
                 $commandList[] = new BaseCommand($container, $alias, $config['message']);
Please login to merge, or discard this patch.
src/Provider/ConfigProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $baseDir = getcwd();
49 49
         $baleenBaseDir = $this->getContainer()->get(Services::BALEEN_BASE_DIR);
50
-        $this->getContainer()->singleton(Services::CONFIG_STORAGE, function () use ($baseDir, $baleenBaseDir) {
50
+        $this->getContainer()->singleton(Services::CONFIG_STORAGE, function() use ($baseDir, $baleenBaseDir) {
51 51
             $configFiles = glob(implode(DIRECTORY_SEPARATOR, [$baleenBaseDir, 'config', '*.php']));
52 52
             $configFilesystem = new Filesystem(new Local($baseDir));
53 53
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         });
56 56
         $this->getContainer()->singleton(
57 57
             Services::CONFIG,
58
-            function (ConfigStorage $configStorage) use ($baseDir) {
58
+            function(ConfigStorage $configStorage) use ($baseDir) {
59 59
                 return $configStorage->load(Config::CONFIG_FILE_NAME);
60 60
             }
61 61
         )->withArgument(Services::CONFIG_STORAGE);
Please login to merge, or discard this patch.
src/Provider/HelperSetProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function register()
43 43
     {
44 44
         $container = $this->getContainer();
45
-        $container->singleton(Services::HELPERSET, function () use ($container) {
45
+        $container->singleton(Services::HELPERSET, function() use ($container) {
46 46
             $helperSet = new HelperSet();
47 47
             $helperSet->set($container->get(Services::HELPERSET_QUESTION), 'question');
48 48
 
Please login to merge, or discard this patch.