Completed
Push — master ( 100486...45110c )
by Basil
11:58 queued 05:54
created
modules/admin/src/controllers/DefaultController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace admin\controllers;
4 4
 
5 5
 use Yii;
6
-use admin\Module;
7 6
 use luya\helpers\Url;
8 7
 use yii\helpers\Json;
9 8
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
     public function actionIndex()
15 15
     {
16 16
         // register auth token
17
-        $this->view->registerJs("var authToken='".Yii::$app->adminuser->identity->authToken ."';", \luya\web\View::POS_HEAD);
17
+        $this->view->registerJs("var authToken='".Yii::$app->adminuser->identity->authToken."';", \luya\web\View::POS_HEAD);
18 18
         $this->view->registerJs("var homeUrl='".Url::home(true)."';", \luya\web\View::POS_HEAD);
19 19
         // register admin js translations from module
20
-        $this->view->registerJs('var i18n=' . Json::encode($this->module->jsTranslations), \luya\web\View::POS_HEAD);
20
+        $this->view->registerJs('var i18n='.Json::encode($this->module->jsTranslations), \luya\web\View::POS_HEAD);
21 21
         // Init ElementQueries after page load
22 22
         // $this->view->registerJs('setTimeout( function() {ElementQueries.listen(); ElementQueries.init();}, 1500);', \luya\web\View::POS_LOAD);
23 23
         // return and render index view file
Please login to merge, or discard this patch.
modules/admin/src/helpers/Storage.php 2 patches
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@  discard block
 block discarded – undo
29 29
      * So you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32() checksum in decimal format.
30 30
      *
31 31
      * @var string
32
+     * @param string $fileName
32 33
      */
33 34
     public static function createFileHash($fileName)
34 35
     {
@@ -133,7 +134,7 @@  discard block
 block discarded – undo
133 134
     /**
134 135
      * 
135 136
      * @param array $fileArray Its an entry of the files array like $_FILEs['logo_image'];
136
-     * @param number $toFolder
137
+     * @param integer $toFolder
137 138
      * @param string $isHidden
138 139
      */
139 140
     public static function uploadFromFileArray(array $fileArray, $toFolder = 0, $isHidden = false)
@@ -194,7 +195,7 @@  discard block
 block discarded – undo
194 195
     /**
195 196
      * 
196 197
      * @param array $filesArray Use $_FILES
197
-     * @param number $toFolder
198
+     * @param integer $toFolder
198 199
      * @param string $isHidden
199 200
      * 
200 201
      * @todo what happen if $files does have more then one entry, as the response is limit to 1
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@
 block discarded – undo
103 103
         $height = 0;
104 104
         
105 105
         if (isset($dimensions[0]) && isset($dimensions[1])) {
106
-            $width = (int)$dimensions[0];
107
-            $height = (int)$dimensions[1];
106
+            $width = (int) $dimensions[0];
107
+            $height = (int) $dimensions[1];
108 108
         } elseif ($throwException) {
109 109
             throw new Exception("Unable to determine the resoltuions of the file $filePath.");
110 110
         }
Please login to merge, or discard this patch.
modules/admin/src/image/Item.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     
39 39
     /**
40 40
      * 
41
-     * @return string|boolean
41
+     * @return string|false
42 42
      */
43 43
     public function getSource()
44 44
     {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     
54 54
     /**
55 55
      * 
56
-     * @return string|boolean
56
+     * @return string|false
57 57
      */
58 58
     public function getServerSource()
59 59
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             $apply = Yii::$app->storage->addImage($this->getFileId(), $this->getFilterId());
49 49
         }
50 50
         
51
-        return ($this->getFile()) ? Yii::$app->storage->httpPath . '/' . $this->getFilterId() . '_' . $this->getFile()->getSystemFileName() : false;
51
+        return ($this->getFile()) ? Yii::$app->storage->httpPath.'/'.$this->getFilterId().'_'.$this->getFile()->getSystemFileName() : false;
52 52
     }
53 53
     
54 54
     /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getServerSource()
59 59
     {
60
-        return ($this->getFile()) ? Yii::$app->storage->serverPath . '/' . $this->getFilterId() . '_' . $this->getFile()->getSystemFileName() : false;
60
+        return ($this->getFile()) ? Yii::$app->storage->serverPath.'/'.$this->getFilterId().'_'.$this->getFile()->getSystemFileName() : false;
61 61
     }
62 62
     
63 63
     /**
Please login to merge, or discard this patch.
modules/admin/src/importers/FilterImporter.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
 
8 8
 class FilterImporter extends \luya\base\Importer
9 9
 {
10
+    /**
11
+     * @param string $identifier
12
+     */
10 13
     private function refresh($identifier, $fields)
11 14
     {
12 15
         $model = StorageEffect::find()->where(['identifier' => $identifier])->one();
Please login to merge, or discard this patch.
modules/admin/src/models/Config.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -9,11 +9,17 @@  discard block
 block discarded – undo
9 9
         return 'admin_config';
10 10
     }
11 11
 
12
+    /**
13
+     * @param string $name
14
+     */
12 15
     public static function has($name)
13 16
     {
14 17
         return (self::find()->where(['name' => $name])->one()) ? true : false;
15 18
     }
16 19
 
20
+    /**
21
+     * @param string $name
22
+     */
17 23
     public static function get($name)
18 24
     {
19 25
         $model = self::find()->where(['name' => $name])->asArray()->one();
@@ -25,6 +31,9 @@  discard block
 block discarded – undo
25 31
         return;
26 32
     }
27 33
 
34
+    /**
35
+     * @param string $name
36
+     */
28 37
     public static function set($name, $value)
29 38
     {
30 39
         $model = self::find()->where(['name' => $name])->one();
@@ -42,6 +51,9 @@  discard block
 block discarded – undo
42 51
         return $model->insert(false);
43 52
     }
44 53
 
54
+    /**
55
+     * @param string $name
56
+     */
45 57
     public static function remove($name)
46 58
     {
47 59
         $model = self::find()->where(['name' => $name])->one();
Please login to merge, or discard this patch.
modules/admin/src/models/StorageFile.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      * We can not global set is_deleted=0 to the where condition cause in some parts of the storage we want
41 41
      * to access the name_new_compound to rebuild old image paths.
42 42
      * 
43
-     * @return \yii\db\$this
43
+     * @return \yii\db\ActiveQuery
44 44
      */
45 45
     public static function find()
46 46
     {
Please login to merge, or discard this patch.
modules/admin/src/Module.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -46,6 +46,9 @@
 block discarded – undo
46 46
         return $model->getErrors();
47 47
     }
48 48
 
49
+    /**
50
+     * @param string $message
51
+     */
49 52
     public function slack($message, $room)
50 53
     {
51 54
         $ch = curl_init('https://slack.com/api/chat.postMessage');
Please login to merge, or discard this patch.
modules/admin/src/ngrest/base/Model.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,6 +45,9 @@  discard block
 block discarded – undo
45 45
 
46 46
     public $ngRestServiceArray = [];
47 47
 
48
+    /**
49
+     * @param \admin\ngrest\ConfigBuilder $config
50
+     */
48 51
     abstract public function ngRestConfig($config);
49 52
 
50 53
     abstract public function ngRestApiEndpoint();
@@ -292,8 +295,8 @@  discard block
 block discarded – undo
292 295
      * 
293 296
      * 
294 297
      * @param \admin\ngrest\ConfigBuilder $config
295
-     * @param unknown $type
296
-     * @param array $fields
298
+     * @param string $type
299
+     * @param string[] $fields
297 300
      * @throws \yii\base\InvalidConfigException
298 301
      * @since 1.0.0-beta4
299 302
      */
Please login to merge, or discard this patch.
modules/admin/src/ngrest/base/Plugin.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@  discard block
 block discarded – undo
26 26
         return $this->_model;
27 27
     }
28 28
 
29
+    /**
30
+     * @param string $type
31
+     */
29 32
     protected function createBaseElement($doc, $type)
30 33
     {
31 34
         $elmn = $doc->createElement($type);
@@ -47,6 +50,9 @@  discard block
 block discarded – undo
47 50
         $this->i18n = $i18n;
48 51
     }
49 52
 
53
+    /**
54
+     * @param string $name
55
+     */
50 56
     public function getServiceName($name)
51 57
     {
52 58
         return 'service.'.$this->name.'.'.$name;
Please login to merge, or discard this patch.