Completed
Branch 09branch (946dde)
by Anton
05:16
created
source/views/exceptions/light/slow.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * @param array $arguments
14 14
  * @return array
15 15
  */
16
-$argumenter = function (array $arguments) use ($dumper, $styler, &$dumps) {
16
+$argumenter = function(array $arguments) use ($dumper, $styler, &$dumps) {
17 17
     $result = [];
18 18
     foreach ($arguments as $argument) {
19 19
         $display = $type = strtolower(gettype($argument));
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     return $result;
58 58
 };
59 59
 
60
-$highlightQuery = function (string $query) {
61
-    if(class_exists('SqlFormatter')) {
60
+$highlightQuery = function(string $query) {
61
+    if (class_exists('SqlFormatter')) {
62 62
         \SqlFormatter::$pre_attributes = '';
63 63
 
64 64
         //Cutting container
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         <?php
105 105
         $previous = $exception->getPrevious();
106
-        while($previous instanceof Throwable) {
106
+        while ($previous instanceof Throwable) {
107 107
             ?><div class="previous">
108 108
             &bull; caused by <?= get_class($previous) ?>:
109 109
             <strong><?= $previous->getMessage() ?></strong>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         ?>
116 116
     </div>
117 117
 
118
-    <?php if($exception instanceof \Spiral\Database\Exceptions\QueryExceptionInterface) {?>
118
+    <?php if ($exception instanceof \Spiral\Database\Exceptions\QueryExceptionInterface) {?>
119 119
         <div class="query"><?= $highlightQuery($exception->getQuery()) ?></div>
120 120
     <?php } ?>
121 121
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     $arguments = $argumenter($trace['args']);
141 141
                 }
142 142
 
143
-                $function = '<strong>' . $trace['function'] . '</strong>';
143
+                $function = '<strong>'.$trace['function'].'</strong>';
144 144
                 if (isset($trace['type']) && isset($trace['class'])) {
145 145
                     $reflection = new ReflectionClass($trace['class']);
146 146
                     $function = Spiral\interpolate(
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                         continue;
209 209
                     }
210 210
 
211
-                    $function = '<strong>' . $trace['function'] . '</strong>';
211
+                    $function = '<strong>'.$trace['function'].'</strong>';
212 212
                     if (isset($trace['type']) && isset($trace['class'])) {
213 213
                         $reflection = new ReflectionClass($trace['class']);
214 214
                         $function = Spiral\interpolate(
Please login to merge, or discard this patch.
source/views/exceptions/light/fast.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * @param array $arguments
14 14
  * @return array
15 15
  */
16
-$argumenter = function (array $arguments) use ($dumper, $styler, &$dumps) {
16
+$argumenter = function(array $arguments) use ($dumper, $styler, &$dumps) {
17 17
     $result = [];
18 18
     foreach ($arguments as $argument) {
19 19
         $display = $type = strtolower(gettype($argument));
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     return $result;
50 50
 };
51 51
 
52
-$highlightQuery = function (string $query) {
53
-    if(class_exists('SqlFormatter')) {
52
+$highlightQuery = function(string $query) {
53
+    if (class_exists('SqlFormatter')) {
54 54
         \SqlFormatter::$pre_attributes = '';
55 55
 
56 56
         //Cutting container
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         in&nbsp;<i><?= $exception->getFile() ?></i>&nbsp;at&nbsp;<strong>line&nbsp;<?= $exception->getLine() ?></strong>
86 86
         <?php
87 87
         $previous = $exception->getPrevious();
88
-        while($previous instanceof Throwable) {
88
+        while ($previous instanceof Throwable) {
89 89
             ?><div class="previous">
90 90
             &bull; caused by <?= get_class($previous) ?>:
91 91
             <strong><?= $previous->getMessage() ?></strong>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         ?>
98 98
     </div>
99 99
 
100
-    <?php if($exception instanceof \Spiral\Database\Exceptions\QueryExceptionInterface) {?>
100
+    <?php if ($exception instanceof \Spiral\Database\Exceptions\QueryExceptionInterface) {?>
101 101
         <div class="query"><?= $highlightQuery($exception->getQuery()) ?></div>
102 102
     <?php } ?>
103 103
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                     $arguments = $argumenter($trace['args']);
124 124
                 }
125 125
 
126
-                $function = '<strong>' . $trace['function'] . '</strong>';
126
+                $function = '<strong>'.$trace['function'].'</strong>';
127 127
                 if (isset($trace['type']) && isset($trace['class'])) {
128 128
                     $reflection = new ReflectionClass($trace['class']);
129 129
                     $function = \Spiral\interpolate(
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                         continue;
190 190
                     }
191 191
 
192
-                    $function = '<strong>' . $trace['function'] . '</strong>';
192
+                    $function = '<strong>'.$trace['function'].'</strong>';
193 193
                     if (isset($trace['type']) && isset($trace['class'])) {
194 194
                         $reflection = new ReflectionClass($trace['class']);
195 195
                         $function = \Spiral\interpolate(
Please login to merge, or discard this patch.
source/Spiral/Commands/ORM/Helpers/MigrationHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function createMigration(SchemaBuilder $builder): string
45 45
     {
46 46
         //New migration name
47
-        $migration = 'orm-' . hash('crc32', microtime(true));
47
+        $migration = 'orm-'.hash('crc32', microtime(true));
48 48
 
49 49
         $atomizer = $this->createAtomizer();
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         $declaration = new ClassDeclaration(
56
-            'Migration_' . Inflector::classify($migration),
56
+            'Migration_'.Inflector::classify($migration),
57 57
             Migration::class
58 58
         );
59 59
 
Please login to merge, or discard this patch.
source/Spiral/Debug/LogManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      *
112 112
      * @param string $channel
113 113
      *
114
-     * @return array
114
+     * @return HandlerInterface[]
115 115
      */
116 116
     protected function createHandlers(string $channel): array
117 117
     {
Please login to merge, or discard this patch.
source/Spiral/Translator/Catalogue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     protected function loadDomain(string $domain)
213 213
     {
214
-        $data = $this->memory->loadData(Translator::MEMORY . '.' . $this->domainSection($domain));
214
+        $data = $this->memory->loadData(Translator::MEMORY.'.'.$this->domainSection($domain));
215 215
 
216 216
         if (empty($data)) {
217 217
             $data = [];
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function saveDomain(string $domain, array $data)
234 234
     {
235
-        $this->memory->saveData(Translator::MEMORY . '.' . $this->domainSection($domain), $data);
235
+        $this->memory->saveData(Translator::MEMORY.'.'.$this->domainSection($domain), $data);
236 236
     }
237 237
 
238 238
     /**
Please login to merge, or discard this patch.
source/Spiral/Core/Memory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @param string $filename Cache filename.
54 54
      */
55
-    public function loadData(string $section, string &$filename = null)
55
+    public function loadData(string $section, string & $filename = null)
56 56
     {
57 57
         $filename = $this->memoryFilename($section);
58 58
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $filename = $this->memoryFilename($section);
76 76
 
77 77
         //We are packing data into plain php
78
-        $data = '<?php return ' . var_export($data, true) . ';';
78
+        $data = '<?php return '.var_export($data, true).';';
79 79
 
80 80
         //We need help to write file with directory creation
81 81
         $this->files->write($filename, $data, FilesInterface::RUNTIME, true);
@@ -93,6 +93,6 @@  discard block
 block discarded – undo
93 93
         $name = strtolower(str_replace(['/', '\\'], '-', $name));
94 94
 
95 95
         //Runtime cache
96
-        return $this->directory . $name . static::EXTENSION;
96
+        return $this->directory.$name.static::EXTENSION;
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
source/Spiral/Core/AbstractCore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             );
41 41
         }
42 42
 
43
-        $benchmark = $this->benchmark('callAction', $controller . '::' . ($action ?? '~default~'));
43
+        $benchmark = $this->benchmark('callAction', $controller.'::'.($action ?? '~default~'));
44 44
 
45 45
         //Making sure that all static functionality works well
46 46
         $iocScope = self::staticContainer($this->container);
Please login to merge, or discard this patch.
source/Spiral/Core/Core.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
          * Default directories pattern, you can overwrite any directory you want in index file.
131 131
          */
132 132
         $this->directories = $directories + [
133
-                'framework' => dirname(__DIR__) . '/',
134
-                'public'    => $directories['root'] . 'webroot/',
135
-                'config'    => $directories['application'] . 'config/',
136
-                'views'     => $directories['application'] . 'views/',
137
-                'runtime'   => $directories['application'] . 'runtime/',
138
-                'cache'     => $directories['application'] . 'runtime/cache/',
139
-                'resources' => $directories['application'] . 'resources/',
140
-                'locales'   => $directories['application'] . 'resources/locales/'
133
+                'framework' => dirname(__DIR__).'/',
134
+                'public'    => $directories['root'].'webroot/',
135
+                'config'    => $directories['application'].'config/',
136
+                'views'     => $directories['application'].'views/',
137
+                'runtime'   => $directories['application'].'runtime/',
138
+                'cache'     => $directories['application'].'runtime/cache/',
139
+                'resources' => $directories['application'].'resources/',
140
+                'locales'   => $directories['application'].'resources/locales/'
141 141
             ];
142 142
 
143 143
         //Every application needs timezone to be set, by default we are using UTC
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      */
197 197
     public function setDirectory(string $alias, string $path): DirectoriesInterface
198 198
     {
199
-        $this->directories[$alias] = rtrim($path, '/\\') . '/';
199
+        $this->directories[$alias] = rtrim($path, '/\\').'/';
200 200
 
201 201
         return $this;
202 202
     }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
              * Default spiral environment is based on .env file.
449 449
              */
450 450
             $environment = new Environment(
451
-                $core->directory('root') . '.env',
451
+                $core->directory('root').'.env',
452 452
                 $container->get(FilesInterface::class),
453 453
                 $core->memory
454 454
             );
Please login to merge, or discard this patch.
source/Spiral/Console/ConsoleDispatcher.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@
 block discarded – undo
209 209
      * @param \Closure                                          $closure
210 210
      * @param \Symfony\Component\Console\Output\OutputInterface $output
211 211
      *
212
-     * @return mixed
212
+     * @return OutputInterface
213 213
      */
214 214
     private function runScoped(\Closure $closure, OutputInterface $output)
215 215
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         //Let's keep output reference to render exceptions
103 103
         $this->output = $output ?? new ConsoleOutput();
104 104
 
105
-        $this->runScoped(function () use ($input) {
105
+        $this->runScoped(function() use ($input) {
106 106
             $this->consoleApplication()->run($input, $this->output);
107 107
         }, $this->output);
108 108
     }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         $output = $output ?? new BufferedOutput();
133 133
 
134
-        $code = $this->runScoped(function () use ($input, $output, $command) {
134
+        $code = $this->runScoped(function() use ($input, $output, $command) {
135 135
             return $this->consoleApplication()->find($command)->run($input, $output);
136 136
         }, $output);
137 137
 
Please login to merge, or discard this patch.