Completed
Pull Request — master (#849)
by Martin
03:21
created
core/helpers/ArrayHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@
 block discarded – undo
50 50
         foreach ($array as $k => $v) {
51 51
             if (is_numeric($v)) {
52 52
                 if (is_float($v)) {
53
-                    $return[$k] = (float)$v;
53
+                    $return[$k] = (float) $v;
54 54
                 } else {
55
-                    $return[$k] = (int)$v;
55
+                    $return[$k] = (int) $v;
56 56
                 }
57 57
             } elseif (is_array($v)) {
58 58
                 $return[$k] = self::typeCast($v);
Please login to merge, or discard this patch.
core/traits/ErrorHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@
 block discarded – undo
68 68
             $_file = $exception->getFile();
69 69
             $_line = $exception->getLine();
70 70
         } elseif (is_string($exception)) {
71
-            $_message = 'exception string: ' . $exception;
71
+            $_message = 'exception string: '.$exception;
72 72
         } elseif (is_array($exception)) {
73
-            $_message = 'exception array dump: ' . print_r($exception, true);
73
+            $_message = 'exception array dump: '.print_r($exception, true);
74 74
         }
75 75
 
76 76
         return [
Please login to merge, or discard this patch.
core/console/Controller.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * Helper method to stop the console command with an error message, outputError returns exit code 1.
48 48
      *
49 49
      * @param string $message The message which should be displayed.
50
-     * @return number Exit code 1
50
+     * @return integer Exit code 1
51 51
      */
52 52
     public function outputError($message)
53 53
     {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * Helper method to stop the console command with a success message, outputSuccess returns exit code 0.
61 61
      *
62 62
      * @param string $message The message which sould be displayed
63
-     * @return number Exit code 0
63
+     * @return integer Exit code 0
64 64
      */
65 65
     public function outputSuccess($message)
66 66
     {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * but does have a different output color (blue). outputInfo returns exit code 0.
75 75
      * 
76 76
      * @param string $message The message which sould be displayed.
77
-     * @return number Exit code 0
77
+     * @return integer Exit code 0
78 78
      * @since 1.0.0-beta5
79 79
      */
80 80
     public function outputInfo($message)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
             $name = substr($name, 0, -(strlen($suffix)));
76 76
         }
77 77
     
78
-        return $name . $suffix;
78
+        return $name.$suffix;
79 79
     }
80 80
     
81 81
     /**
Please login to merge, or discard this patch.
core/console/commands/views/crud/create_model.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * NgRest Model created at <?php echo date("d.m.Y H:i"); ?> on LUYA Version <?php echo $luyaVersion; ?>.
24 24
  *
25
-<?php foreach ($properties as $name => $type): ?> * @property <?= $type; ?> $<?= $name . PHP_EOL; ?>
26
-<?php endforeach;?>
25
+<?php foreach ($properties as $name => $type): ?> * @property <?= $type; ?> $<?= $name.PHP_EOL; ?>
26
+<?php endforeach; ?>
27 27
  */
28
-<?php if (!$extended): ?>abstract <?endif;?>class <?php echo $className; ?> extends \admin\ngrest\base\Model
28
+<?php if (!$extended): ?>abstract <?endif; ?>class <?php echo $className; ?> extends \admin\ngrest\base\Model
29 29
 {
30 30
     <?php if ($extended): ?>
31 31
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         return [
45 45
         <?php foreach ($allFieldNames as $name): ?>
46 46
     '<?= $name; ?>' => Yii::t('app', '<?= \yii\helpers\Inflector::humanize($name); ?>'),
47
-        <?php endforeach;?>];
47
+        <?php endforeach; ?>];
48 48
     }
49 49
     
50 50
     /**
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
     {
98 98
         return [
99 99
         <?php foreach ($fieldConfigs as $name => $type): ?>
100
-    '<?=$name; ?>' => '<?= $type;?>',
101
-        <?endforeach;?>];
100
+    '<?=$name; ?>' => '<?= $type; ?>',
101
+        <?endforeach; ?>];
102 102
     }
103 103
     
104 104
     /**
Please login to merge, or discard this patch.
core/console/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function verbosePrint($message, $section = null)
18 18
     {
19 19
         if ($this->verbose) {
20
-            $this->output((!empty($section)) ? $section . ': ' . $message : $message);
20
+            $this->output((!empty($section)) ? $section.': '.$message : $message);
21 21
         }
22 22
     }
23 23
     
Please login to merge, or discard this patch.
core/base/Module.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
      * Define a last of importer class with an array or run code directily with the import() method.
199 199
      * 
200 200
      * @param ImportControllerInterface $importer
201
-     * @return boolean|array
201
+     * @return boolean
202 202
      */
203 203
     public function import(ImportControllerInterface $importer)
204 204
     {
Please login to merge, or discard this patch.
core/console/Importer.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,6 @@
 block discarded – undo
71 71
      * $this->addLog('block', 'new block <ID> have been found and added to database');
72 72
      * ```
73 73
      * 
74
-     * @param string $section
75 74
      * @param string $value
76 75
 	 * @todo trigger deprecated section call
77 76
      */
Please login to merge, or discard this patch.
core/console/commands/ImportController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $this->verbosePrint('Run import index', __METHOD__);
129 129
             foreach (Yii::$app->getModules() as $id => $module) {
130 130
                 if ($module instanceof \luya\base\Module) {
131
-                    $this->verbosePrint('collect module importers from module: ' . $id, __METHOD__);
131
+                    $this->verbosePrint('collect module importers from module: '.$id, __METHOD__);
132 132
                     $response = $module->import($this);
133 133
                     if (is_array($response)) { // importer returns an array with class names
134 134
                         foreach ($response as $class) {
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
             ksort($queue);
151 151
     
152 152
             foreach ($queue as $pos => $object) {
153
-                $this->verbosePrint("run object '" .$object->className() . " on pos $pos.", __METHOD__);
153
+                $this->verbosePrint("run object '".$object->className()." on pos $pos.", __METHOD__);
154 154
                 $objectResponse = $object->run();
155
-                $this->verbosePrint("run object response: " . var_export($objectResponse, true), __METHOD__);
155
+                $this->verbosePrint("run object response: ".var_export($objectResponse, true), __METHOD__);
156 156
             }
157 157
     
158 158
             if (Yii::$app->hasModule('admin')) {
@@ -160,15 +160,15 @@  discard block
 block discarded – undo
160 160
                 Yii::$app->db->createCommand()->update('admin_user', ['force_reload' => 1])->execute();
161 161
             }
162 162
     
163
-            $this->verbosePrint('importer finished, get log output: ' . var_export($this->getLog(), true), __METHOD__);
163
+            $this->verbosePrint('importer finished, get log output: '.var_export($this->getLog(), true), __METHOD__);
164 164
             
165 165
             foreach ($this->getLog() as $section => $value) {
166
-                $this->outputInfo(PHP_EOL . $section . ":");
166
+                $this->outputInfo(PHP_EOL.$section.":");
167 167
                 foreach ($value as $k => $v) {
168 168
                     if (is_array($v)) {
169 169
                         $this->output(print_r($v, true));
170 170
                     } else {
171
-                        $this->output(" - " . $v);
171
+                        $this->output(" - ".$v);
172 172
                     }
173 173
                 }
174 174
             }
Please login to merge, or discard this patch.
core/console/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
             if (isset($partial[0]) && (count($partial) > 1) && ($module = Yii::$app->getModule($partial[0]))) {
76 76
                 try {
77 77
                     // change the controller namespace of this module to make usage of `commands`.
78
-                    $module->controllerNamespace = $module->namespace . '\commands';
78
+                    $module->controllerNamespace = $module->namespace.'\commands';
79 79
                     unset($partial[0]);
80 80
                     // action response
81 81
                     return $module->runAction(implode("/", $partial), $params);
Please login to merge, or discard this patch.