Passed
Push — master ( beb5fc...4d9ea0 )
by Anton
02:12
created
src/Command/Migrate/MigrateCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function perform()
25 25
     {
26
-        if (!$this->verifyConfigured() || !$this->verifyEnvironment()) {
26
+        if (!$this->verifyConfigured() || !$this->verifyEnvironment()){
27 27
             return;
28 28
         }
29 29
 
30 30
         $found = false;
31 31
         $count = $this->option('one') ? 1 : PHP_INT_MAX;
32 32
 
33
-        while ($count > 0 && ($migration = $this->migrator->run())) {
33
+        while ($count > 0 && ($migration = $this->migrator->run())){
34 34
             $found = true;
35 35
             $count--;
36 36
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             );
41 41
         }
42 42
 
43
-        if (!$found) {
43
+        if (!$found){
44 44
             $this->writeln("<fg=red>No outstanding migrations were found.</fg=red>");
45 45
         }
46 46
     }
Please login to merge, or discard this patch.
src/Command/Migrate/AbstractCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     protected function verifyConfigured(): bool
42 42
     {
43
-        if (!$this->migrator->isConfigured()) {
43
+        if (!$this->migrator->isConfigured()){
44 44
             $this->writeln(
45 45
                 "<fg=red>Migrations are not configured yet, run '<info>migrate:init</info>' first.</fg=red>"
46 46
             );
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
      */
59 59
     protected function verifyEnvironment(): bool
60 60
     {
61
-        if ($this->option('force') || $this->config->isSafe()) {
61
+        if ($this->option('force') || $this->config->isSafe()){
62 62
             //Safe to run
63 63
             return true;
64 64
         }
65 65
 
66 66
         $this->writeln("<fg=red>Confirmation is required to run migrations!</fg=red>");
67 67
 
68
-        if (!$this->askConfirmation()) {
68
+        if (!$this->askConfirmation()){
69 69
             $this->writeln("<comment>Cancelling operation...</comment>");
70 70
 
71 71
             return false;
Please login to merge, or discard this patch.
src/Command/Migrate/RollbackCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function perform()
25 25
     {
26
-        if (!$this->verifyConfigured() || !$this->verifyEnvironment()) {
26
+        if (!$this->verifyConfigured() || !$this->verifyEnvironment()){
27 27
             //Making sure we can safely migrate in this environment
28 28
             return;
29 29
         }
30 30
 
31 31
         $found = false;
32 32
         $count = !$this->option('all') ? 1 : PHP_INT_MAX;
33
-        while ($count > 0 && ($migration = $this->migrator->rollback())) {
33
+        while ($count > 0 && ($migration = $this->migrator->rollback())){
34 34
             $found = true;
35 35
             $count--;
36 36
             $this->sprintf(
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             );
40 40
         }
41 41
 
42
-        if (!$found) {
42
+        if (!$found){
43 43
             $this->writeln("<fg=red>No executed migrations were found.</fg=red>");
44 44
         }
45 45
     }
Please login to merge, or discard this patch.
src/Module/Publisher.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,18 +43,18 @@  discard block
 block discarded – undo
43 43
         string $destination,
44 44
         string $mergeMode = self::FOLLOW,
45 45
         int $mode = FilesInterface::READONLY
46
-    ) {
47
-        if (!$this->files->isFile($filename)) {
46
+    ){
47
+        if (!$this->files->isFile($filename)){
48 48
             throw new PublishException("Given '{$filename}' is not valid file");
49 49
         }
50 50
 
51
-        if ($this->files->exists($destination)) {
52
-            if ($this->files->md5($destination) == $this->files->md5($filename)) {
51
+        if ($this->files->exists($destination)){
52
+            if ($this->files->md5($destination) == $this->files->md5($filename)){
53 53
                 //Nothing to do
54 54
                 return;
55 55
             }
56 56
 
57
-            if ($mergeMode == self::FOLLOW) {
57
+            if ($mergeMode == self::FOLLOW){
58 58
                 return;
59 59
             }
60 60
         }
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         string $destination,
76 76
         string $mergeMode = self::REPLACE,
77 77
         int $mode = FilesInterface::READONLY
78
-    ) {
79
-        if (!$this->files->isDirectory($directory)) {
78
+    ){
79
+        if (!$this->files->isDirectory($directory)){
80 80
             throw new PublishException("Given '{$directory}' is not valid directory");
81 81
         }
82 82
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
         /**
87 87
          * @var SplFileInfo $file
88 88
          */
89
-        foreach ($finder->getIterator() as $file) {
89
+        foreach ($finder->getIterator() as $file){
90 90
             $this->publish(
91 91
                 (string)$file,
92
-                $destination . '/' . $file->getRelativePathname(),
92
+                $destination.'/'.$file->getRelativePathname(),
93 93
                 $mergeMode,
94 94
                 $mode
95 95
             );
Please login to merge, or discard this patch.
src/Http/PaginationFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function createPaginator(string $parameter, int $limit = 25): PaginatorInterface
45 45
     {
46
-        if (!$this->container->has(ServerRequestInterface::class)) {
46
+        if (!$this->container->has(ServerRequestInterface::class)){
47 47
             throw new ScopeException("Unable to create paginator, no request scope found");
48 48
         }
49 49
         /**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         //Getting page number
55 55
         $page = 0;
56
-        if (!empty($query[$parameter]) && is_scalar($query[$parameter])) {
56
+        if (!empty($query[$parameter]) && is_scalar($query[$parameter])){
57 57
             $page = (int)$query[$parameter];
58 58
         }
59 59
 
Please login to merge, or discard this patch.
tests/Framework/HttpTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     protected function fetchCookies(array $header)
69 69
     {
70 70
         $result = [];
71
-        foreach ($header as $line) {
71
+        foreach ($header as $line){
72 72
             $cookie = explode('=', $line);
73 73
             $result[$cookie[0]] = rawurldecode(substr($cookie[1], 0, strpos($cookie[1], ';')));
74 74
         }
Please login to merge, or discard this patch.
tests/Framework/Framework/ExtensionsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $output = $this->runCommand('php:extensions');
18 18
 
19
-        foreach (get_loaded_extensions() as $extension) {
19
+        foreach (get_loaded_extensions() as $extension){
20 20
             $this->assertContains($extension, $output);
21 21
         }
22 22
     }
Please login to merge, or discard this patch.
tests/Framework/ConsoleTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
 
32 32
         $fs = new Files();
33 33
 
34
-        if ($fs->isDirectory(__DIR__ . '/../app/migrations')) {
35
-            $fs->deleteDirectory(__DIR__ . '/../app/migrations');
34
+        if ($fs->isDirectory(__DIR__.'/../app/migrations')){
35
+            $fs->deleteDirectory(__DIR__.'/../app/migrations');
36 36
         }
37 37
 
38 38
         $runtime = $this->app->get(DirectoriesInterface::class)->get('runtime');
39
-        if ($fs->isDirectory($runtime)) {
39
+        if ($fs->isDirectory($runtime)){
40 40
             $fs->deleteDirectory($runtime);
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
tests/Framework/Views/CompileTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
          */
37 37
         $dirs = $this->app->get(DirectoriesInterface::class);
38 38
         $fs = $this->app->get(FilesInterface::class);
39
-        $fs->write($dirs->get('cache') . '/views/test.php', 'test', null, true);
39
+        $fs->write($dirs->get('cache').'/views/test.php', 'test', null, true);
40 40
 
41 41
         $out = $this->runCommandDebug('views:reset');
42 42
         $this->assertContains('test.php', $out);
Please login to merge, or discard this patch.