Completed
Push — master ( 3cc06d...bb89f7 )
by Anton
14s queued 11s
created
src/Framework/Kernel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,28 +43,28 @@
 block discarded – undo
43 43
      */
44 44
     protected function mapDirectories(array $directories): array
45 45
     {
46
-        if (!isset($directories['root'])) {
46
+        if (!isset($directories['root'])){
47 47
             throw new BootException("Missing required directory `root`.");
48 48
         }
49 49
 
50
-        if (!isset($directories['app'])) {
51
-            $directories['app'] = $directories['root'] . '/app/';
50
+        if (!isset($directories['app'])){
51
+            $directories['app'] = $directories['root'].'/app/';
52 52
         }
53 53
 
54 54
         return array_merge([
55 55
             // public root
56
-            'public'    => $directories['root'] . '/public/',
56
+            'public'    => $directories['root'].'/public/',
57 57
 
58 58
             // vendor libraries
59
-            'vendor'    => $directories['root'] . '/vendor/',
59
+            'vendor'    => $directories['root'].'/vendor/',
60 60
 
61 61
             // data directories
62
-            'runtime'   => $directories['root'] . '/runtime/',
63
-            'cache'     => $directories['root'] . '/runtime/cache/',
62
+            'runtime'   => $directories['root'].'/runtime/',
63
+            'cache'     => $directories['root'].'/runtime/cache/',
64 64
 
65 65
             // application directories
66
-            'config'    => $directories['app'] . '/config/',
67
-            'resources' => $directories['app'] . '/resources/',
66
+            'config'    => $directories['app'].'/config/',
67
+            'resources' => $directories['app'].'/resources/',
68 68
         ], $directories);
69 69
     }
70 70
 }
Please login to merge, or discard this patch.
src/Bootloader/SnapshotsBootloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
         EnvironmentInterface $env,
42 42
         DirectoriesInterface $dirs,
43 43
         FilesInterface $files
44
-    ) {
44
+    ){
45 45
         return new FileSnapshotter(
46
-            $dirs->get('runtime') . '/snapshots/',
46
+            $dirs->get('runtime').'/snapshots/',
47 47
             $env->get('SNAPSHOT_MAX_FILES', self::MAX_SNAPSHOTS),
48 48
             $env->get('SNAPSHOT_VERBOSITY', HandlerInterface::VERBOSITY_VERBOSE),
49 49
             new HtmlHandler(),
Please login to merge, or discard this patch.
src/Bootloader/Http/SessionBootloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         CookiesBootloader $cookies,
51 51
         HttpBootloader $http,
52 52
         DirectoriesInterface $directories
53
-    ) {
53
+    ){
54 54
         $config->setDefaults('session', [
55 55
             'lifetime' => 86400,
56 56
             'cookie'   => 'sid',
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             'handler'  => new Autowire(
59 59
                 FileHandler::class,
60 60
                 [
61
-                    'directory' => $directories->get('runtime') . 'session',
61
+                    'directory' => $directories->get('runtime').'session',
62 62
                     'lifetime'  => 86400
63 63
                 ]
64 64
             )
Please login to merge, or discard this patch.
src/Command/CleanCommand.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,20 +26,20 @@  discard block
 block discarded – undo
26 26
     public function perform(FilesInterface $files, DirectoriesInterface $directories)
27 27
     {
28 28
         $cacheDirectory = $directories->get('cache');
29
-        if (!$files->exists($cacheDirectory)) {
29
+        if (!$files->exists($cacheDirectory)){
30 30
             $this->writeln("Cache directory is missing, no cache to be cleaned.");
31 31
 
32 32
             return;
33 33
         }
34 34
 
35
-        if ($this->isVerbose()) {
35
+        if ($this->isVerbose()){
36 36
             $this->writeln("<info>Cleaning application cache:</info>");
37 37
         }
38 38
 
39
-        foreach ($files->getFiles($cacheDirectory) as $filename) {
40
-            try {
39
+        foreach ($files->getFiles($cacheDirectory) as $filename){
40
+            try{
41 41
                 $files->delete($filename);
42
-            } catch (\Throwable $e) {
42
+            }catch (\Throwable $e){
43 43
                 // @codeCoverageIgnoreStart
44 44
                 $this->sprintf(
45 45
                     "<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>\n",
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 // @codeCoverageIgnoreEnd
52 52
             }
53 53
 
54
-            if ($this->isVerbose()) {
54
+            if ($this->isVerbose()){
55 55
                 $this->sprintf(
56 56
                     "<fg=green>[deleted]</fg=green> `%s`\n",
57 57
                     $files->relativePath($filename, $cacheDirectory)
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,20 +26,26 @@  discard block
 block discarded – undo
26 26
     public function perform(FilesInterface $files, DirectoriesInterface $directories)
27 27
     {
28 28
         $cacheDirectory = $directories->get('cache');
29
-        if (!$files->exists($cacheDirectory)) {
29
+        if (!$files->exists($cacheDirectory))
30
+        {
30 31
             $this->writeln("Cache directory is missing, no cache to be cleaned.");
31 32
 
32 33
             return;
33 34
         }
34 35
 
35
-        if ($this->isVerbose()) {
36
+        if ($this->isVerbose())
37
+        {
36 38
             $this->writeln("<info>Cleaning application cache:</info>");
37 39
         }
38 40
 
39
-        foreach ($files->getFiles($cacheDirectory) as $filename) {
40
-            try {
41
+        foreach ($files->getFiles($cacheDirectory) as $filename)
42
+        {
43
+            try
44
+            {
41 45
                 $files->delete($filename);
42
-            } catch (\Throwable $e) {
46
+            }
47
+            catch (\Throwable $e)
48
+            {
43 49
                 // @codeCoverageIgnoreStart
44 50
                 $this->sprintf(
45 51
                     "<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>\n",
@@ -51,7 +57,8 @@  discard block
 block discarded – undo
51 57
                 // @codeCoverageIgnoreEnd
52 58
             }
53 59
 
54
-            if ($this->isVerbose()) {
60
+            if ($this->isVerbose())
61
+            {
55 62
                 $this->sprintf(
56 63
                     "<fg=green>[deleted]</fg=green> `%s`\n",
57 64
                     $files->relativePath($filename, $cacheDirectory)
Please login to merge, or discard this patch.
src/Command/Views/ResetCommand.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,20 +27,20 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function perform(ViewsConfig $config, FilesInterface $files)
29 29
     {
30
-        if (!$files->exists($config->getCacheDirectory())) {
30
+        if (!$files->exists($config->getCacheDirectory())){
31 31
             $this->writeln("Cache directory is missing, no cache to be cleaned.");
32 32
 
33 33
             return;
34 34
         }
35 35
 
36
-        if ($this->isVerbose()) {
36
+        if ($this->isVerbose()){
37 37
             $this->writeln("<info>Cleaning view cache:</info>");
38 38
         }
39 39
 
40
-        foreach ($files->getFiles($config->getCacheDirectory()) as $filename) {
41
-            try {
40
+        foreach ($files->getFiles($config->getCacheDirectory()) as $filename){
41
+            try{
42 42
                 $files->delete($filename);
43
-            } catch (\Throwable $e) {
43
+            }catch (\Throwable $e){
44 44
                 // @codeCoverageIgnoreStart
45 45
                 $this->sprintf(
46 46
                     "<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>\n",
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 // @codeCoverageIgnoreEnd
54 54
             }
55 55
 
56
-            if ($this->isVerbose()) {
56
+            if ($this->isVerbose()){
57 57
                 $this->sprintf(
58 58
                     "<fg=green>[deleted]</fg=green> `%s`\n",
59 59
                     $files->relativePath($filename, $config->getCacheDirectory())
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,20 +27,26 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function perform(ViewsConfig $config, FilesInterface $files)
29 29
     {
30
-        if (!$files->exists($config->getCacheDirectory())) {
30
+        if (!$files->exists($config->getCacheDirectory()))
31
+        {
31 32
             $this->writeln("Cache directory is missing, no cache to be cleaned.");
32 33
 
33 34
             return;
34 35
         }
35 36
 
36
-        if ($this->isVerbose()) {
37
+        if ($this->isVerbose())
38
+        {
37 39
             $this->writeln("<info>Cleaning view cache:</info>");
38 40
         }
39 41
 
40
-        foreach ($files->getFiles($config->getCacheDirectory()) as $filename) {
41
-            try {
42
+        foreach ($files->getFiles($config->getCacheDirectory()) as $filename)
43
+        {
44
+            try
45
+            {
42 46
                 $files->delete($filename);
43
-            } catch (\Throwable $e) {
47
+            }
48
+            catch (\Throwable $e)
49
+            {
44 50
                 // @codeCoverageIgnoreStart
45 51
                 $this->sprintf(
46 52
                     "<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>\n",
@@ -53,7 +59,8 @@  discard block
 block discarded – undo
53 59
                 // @codeCoverageIgnoreEnd
54 60
             }
55 61
 
56
-            if ($this->isVerbose()) {
62
+            if ($this->isVerbose())
63
+            {
57 64
                 $this->sprintf(
58 65
                     "<fg=green>[deleted]</fg=green> `%s`\n",
59 66
                     $files->relativePath($filename, $config->getCacheDirectory())
Please login to merge, or discard this patch.
src/Command/Translator/ExportCommand.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function perform(TranslatorConfig $config, CatalogueManager $manager)
41 41
     {
42
-        if (!$config->hasDumper($this->option('dumper'))) {
42
+        if (!$config->hasDumper($this->option('dumper'))){
43 43
             $this->writeln("<fg=red>Undefined dumper '{$this->option('dumper')}'.</fg=red>");
44 44
 
45 45
             return;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $manager->get($this->argument('locale'))
52 52
         );
53 53
 
54
-        if ($this->isVerbose() && !empty($mc->getDomains())) {
54
+        if ($this->isVerbose() && !empty($mc->getDomains())){
55 55
             $this->sprintf(
56 56
                 "<info>Exporting domain(s):</info> %s\n",
57 57
                 join(',', $mc->getDomains())
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
             'xliff_version'  => '2.0' // forcing default version for xliff dumper only
67 67
         ]);
68 68
 
69
-        $this->writeln("Export successfully completed using <info>" . get_class($dumper) . "</info>");
70
-        $this->writeln("Output: <comment>" . realpath($this->argument('path')) . "</comment>");
69
+        $this->writeln("Export successfully completed using <info>".get_class($dumper)."</info>");
70
+        $this->writeln("Output: <comment>".realpath($this->argument('path'))."</comment>");
71 71
     }
72 72
 
73 73
     /**
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
             $catalogue->getData()
87 87
         );
88 88
 
89
-        if ($this->option('fallback')) {
90
-            foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages) {
91
-                foreach ($messages as $id => $message) {
92
-                    if (!$messageCatalogue->defines($id, $domain)) {
89
+        if ($this->option('fallback')){
90
+            foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages){
91
+                foreach ($messages as $id => $message){
92
+                    if (!$messageCatalogue->defines($id, $domain)){
93 93
                         $messageCatalogue->set($id, $message, $domain);
94 94
                     }
95 95
                 }
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function perform(TranslatorConfig $config, CatalogueManager $manager)
41 41
     {
42
-        if (!$config->hasDumper($this->option('dumper'))) {
42
+        if (!$config->hasDumper($this->option('dumper')))
43
+        {
43 44
             $this->writeln("<fg=red>Undefined dumper '{$this->option('dumper')}'.</fg=red>");
44 45
 
45 46
             return;
@@ -51,7 +52,8 @@  discard block
 block discarded – undo
51 52
             $manager->get($this->argument('locale'))
52 53
         );
53 54
 
54
-        if ($this->isVerbose() && !empty($mc->getDomains())) {
55
+        if ($this->isVerbose() && !empty($mc->getDomains()))
56
+        {
55 57
             $this->sprintf(
56 58
                 "<info>Exporting domain(s):</info> %s\n",
57 59
                 join(',', $mc->getDomains())
@@ -86,10 +88,14 @@  discard block
 block discarded – undo
86 88
             $catalogue->getData()
87 89
         );
88 90
 
89
-        if ($this->option('fallback')) {
90
-            foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages) {
91
-                foreach ($messages as $id => $message) {
92
-                    if (!$messageCatalogue->defines($id, $domain)) {
91
+        if ($this->option('fallback'))
92
+        {
93
+            foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages)
94
+            {
95
+                foreach ($messages as $id => $message)
96
+                {
97
+                    if (!$messageCatalogue->defines($id, $domain))
98
+                    {
93 99
                         $messageCatalogue->set($id, $message, $domain);
94 100
                     }
95 101
                 }
Please login to merge, or discard this patch.
src/Console/Logger/DebugListener.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function __invoke(LogEvent $event)
51 51
     {
52
-        if (empty($this->output)) {
52
+        if (empty($this->output)){
53 53
             return;
54 54
         }
55 55
 
56
-        if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) {
56
+        if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE){
57 57
             return;
58 58
         }
59 59
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function enable(): self
91 91
     {
92
-        if (!empty($this->logs)) {
92
+        if (!empty($this->logs)){
93 93
             $this->logs->addListener($this);
94 94
         }
95 95
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function disable(): self
105 105
     {
106
-        if (!empty($this->logs)) {
106
+        if (!empty($this->logs)){
107 107
             $this->logs->removeListener($this);
108 108
         }
109 109
 
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
      */
127 127
     private function getChannel(string $channel): string
128 128
     {
129
-        if (!class_exists($channel, false)) {
129
+        if (!class_exists($channel, false)){
130 130
             return "[{$channel}]";
131 131
         }
132 132
 
133
-        try {
133
+        try{
134 134
             $reflection = new \ReflectionClass($channel);
135
-        } catch (\ReflectionException $e) {
135
+        }catch (\ReflectionException $e){
136 136
             return $channel;
137 137
         }
138 138
 
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
      */
147 147
     private function getMessage(bool $decorated, string $message)
148 148
     {
149
-        if (!$decorated) {
149
+        if (!$decorated){
150 150
             return $message;
151 151
         }
152 152
 
153
-        return Color::GRAY . $message . Color::RESET;
153
+        return Color::GRAY.$message.Color::RESET;
154 154
     }
155 155
 }
Please login to merge, or discard this patch.
tests/app/src/Job/ErrorJob.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,8 +12,10 @@
 block discarded – undo
12 12
 
13 13
 class ErrorJob extends AbstractJob
14 14
 {
15
-    public function do()
15
+    public function do{
16
+        ()
16 17
     {
17 18
         throw new \ErrorException("bad job");
18 19
     }
20
+    }
19 21
 }
Please login to merge, or discard this patch.
tests/app/src/Job/TestJob.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,8 +13,10 @@
 block discarded – undo
13 13
 
14 14
 class TestJob extends AbstractJob
15 15
 {
16
-    public function do(EnvironmentInterface $env)
16
+    public function do{
17
+        (EnvironmentInterface $env)
17 18
     {
18 19
         $env->set('FIRED', true);
19 20
     }
21
+    }
20 22
 }
Please login to merge, or discard this patch.