Completed
Branch master (b30f8b)
by Basil
06:06
created
envs/dev/properties/TestProperty.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace app\properties;
4 4
 
5
-use Yii;
6
-
7 5
 class TestProperty extends \admin\base\Property
8 6
 {
9 7
     public function init()
Please login to merge, or discard this patch.
modules/admin/apis/StorageController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Yii;
6 6
 use Exception;
7 7
 use admin\helpers\Storage;
8
-use admin\models\StorageImage;
9 8
 use admin\models\StorageFile;
10 9
 use admin\models\StorageFolder;
11 10
 use admin\Module;
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      * @todo http://php.net/manual/en/features.file-upload.errors.php
103 103
      *
104 104
      * @return array|json Key represents the uploaded file name, value represents the id in the database.
105
-    */
105
+     */
106 106
     public function actionFilesUpload()
107 107
     {
108 108
         foreach ($_FILES as $k => $file) {
Please login to merge, or discard this patch.
modules/admin/base/Filter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
     /**
143 143
      * Get an array with all the effect param options, based on the effect params defintion.
144 144
      *
145
-     * @param array $effectParamsDefintion
145
+     * @param array $effectParams
146 146
      *
147 147
      * @throws Exception When the vars key does not exists in the effect definition.
148 148
      *
Please login to merge, or discard this patch.
modules/admin/base/RestVerbController.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -48,6 +48,9 @@
 block discarded – undo
48 48
         $this->throwException(__METHOD__);
49 49
     }
50 50
 
51
+    /**
52
+     * @param string $method
53
+     */
51 54
     private function throwException($method)
52 55
     {
53 56
         throw new \Exception('The action '.$method.' is not yet supported.');
Please login to merge, or discard this patch.
modules/admin/components/Auth.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,6 +25,10 @@  discard block
 block discarded – undo
25 25
         return ($create + $update + $delete);
26 26
     }
27 27
 
28
+    /**
29
+     * @param integer $type
30
+     * @param integer $permissionWeight
31
+     */
28 32
     public function permissionVerify($type, $permissionWeight)
29 33
     {
30 34
         $numbers = [];
@@ -76,9 +80,6 @@  discard block
 block discarded – undo
76 80
     /**
77 81
      * see if the user id matches against the moduleName, controllerName, actionName inside of the rights database.
78 82
      *
79
-     * @param string $moduleName     Module Name
80
-     * @param string $controllerName The name of the controller without suffix "Controller"
81
-     * @param string $actionName     The name of the action without prefix "action";
82 83
      *
83 84
      * @return bool
84 85
      */
Please login to merge, or discard this patch.
modules/admin/components/StorageContainer.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
     /**
418 418
      * 
419 419
      * @param unknown $folderName
420
-     * @param number $parentFolderId
420
+     * @param integer $parentFolderId
421 421
      * @return boolean
422 422
      */
423 423
     public function addFolder($folderName, $parentFolderId = 0)
@@ -453,6 +453,9 @@  discard block
 block discarded – undo
453 453
         return (isset($this->filtersArray[$filterIdentifier])) ? $this->filtersArray[$filterIdentifier] : false;
454 454
     }
455 455
     
456
+    /**
457
+     * @param string $key
458
+     */
456 459
     protected function getQueryCacheHelper(\yii\db\Query $query, $key)
457 460
     {
458 461
         $data = $this->getHasCache($key);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function getHttpPath()
111 111
     {
112 112
         if ($this->_httpPath === null) {
113
-            $this->_httpPath = $this->request->baseUrl . '/storage';
113
+            $this->_httpPath = $this->request->baseUrl.'/storage';
114 114
         }
115 115
         
116 116
         return $this->_httpPath;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function getServerPath()
124 124
     {
125 125
         if ($this->_serverPath === null) {
126
-            $this->_serverPath = Yii::getAlias('@webroot') . '/storage';
126
+            $this->_serverPath = Yii::getAlias('@webroot').'/storage';
127 127
         }
128 128
         
129 129
         return $this->_serverPath;
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         
231 231
         $newName = implode([$baseName.'_'.$fileHashName, $fileInfo->extension], '.');
232 232
         
233
-        $savePath = $this->serverPath . '/' . $newName;
233
+        $savePath = $this->serverPath.'/'.$newName;
234 234
         
235 235
         if (is_uploaded_file($fileSource)) {
236 236
             if (!@move_uploaded_file($fileSource, $savePath)) {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
             $image = $imagine->open($fileQuery->serverSource);
323 323
             
324 324
             $fileName = $filterId.'_'.$fileQuery->systemFileName;
325
-            $fileSavePath = $this->serverPath . '/' . $fileName;
325
+            $fileSavePath = $this->serverPath.'/'.$fileName;
326 326
             if (empty($filterId)) {
327 327
                 $save = $image->save($fileSavePath);
328 328
             } else {
Please login to merge, or discard this patch.
modules/admin/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/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/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.