Completed
Push — master ( 049fd7...76e6f8 )
by Basil
06:23 queued 01:16
created
modules/cmsadmin/apis/MenuController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use yii\db\Query;
6 6
 use luya\helpers\ArrayHelper;
7
-use cmsadmin\models\NavContainer;
8 7
 use admin\models\Lang;
9 8
 
10 9
 class MenuController extends \admin\base\RestController
Please login to merge, or discard this patch.
modules/cmsadmin/apis/NavController.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class NavController extends \admin\base\RestController
21 21
 {
22
+    /**
23
+     * @param string $name
24
+     */
22 25
     private function postArg($name)
23 26
     {
24 27
         return Yii::$app->request->post($name, null);
@@ -170,7 +173,6 @@  discard block
 block discarded – undo
170 173
     /**
171 174
      * creates a new nav entry for the type page (nav_id will be created.
172 175
      *
173
-     * @param array $_POST:
174 176
      */
175 177
     public function actionCreatePage()
176 178
     {
Please login to merge, or discard this patch.
modules/cmsadmin/components/Menu.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      * ]
92 92
      * ```
93 93
      *
94
-     * @param int $node parent_nav_id value
94
+     * @param integer $parentNavId
95 95
      */
96 96
     private function getFromParentNode($parentNavId)
97 97
     {
Please login to merge, or discard this patch.
modules/cmsadmin/models/Block.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -71,6 +71,9 @@
 block discarded – undo
71 71
         parent::afterDelete();
72 72
     }
73 73
 
74
+    /**
75
+     * @param string $context
76
+     */
74 77
     public static function objectId($blockId, $id, $context, $pageObject = null)
75 78
     {
76 79
         $block = self::find()->where(['id' => $blockId])->asArray()->one();
Please login to merge, or discard this patch.
modules/cmsadmin/models/NavItem.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      * 
184 184
      * @todo fix me above!
185 185
      *
186
-     * @param unknown $moduleName
186
+     * @param string $moduleName
187 187
      */
188 188
     public static function fromModule($moduleName)
189 189
     {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     /**
236 236
      * @todo use AR or queryCommand? NavItem::find()->leftJoin('cms_nav_item_module', 'nav_item_type_id=cms_nav_item_module.id')->where(['nav_item_type' => 2, 'cms_nav_item_module.module_name' => $moduleName])->asArray()->one()
237 237
      *
238
-     * @param unknown $moduleName
238
+     * @param string $moduleName
239 239
      *
240 240
      * @return unknown
241 241
      */
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      *
267 267
      * Copy content of type cms_nav_item_page to a target nav item. This will create a new entry in cms_nav_item_page and for every used block a new entry in cms_nav_item_page_block_item
268 268
      *
269
-     * @param $targetNavItem nav item object
269
+     * @param \yii\db\ActiveRecord $targetNavItem nav item object
270 270
      * @return bool
271 271
      */
272 272
     public function copyPageItem($targetNavItem)
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      *
321 321
      * Copy content of type cms_nav_item_module to a target nav item. This will create a new entry in cms_nav_item_module.
322 322
      *
323
-     * @param $targetNavItem
323
+     * @param \yii\db\ActiveRecord $targetNavItem
324 324
      * @return bool
325 325
      */
326 326
     public function copyModuleItem($targetNavItem)
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      *
349 349
      * Copy content of type cms_nav_item_redirect to a target nav item. This will create a new entry in cms_nav_item_redirect.
350 350
      *
351
-     * @param $targetNavItem
351
+     * @param \yii\db\ActiveRecord $targetNavItem
352 352
      * @return bool
353 353
      */
354 354
     public function copyRedirectItem($targetNavItem)
Please login to merge, or discard this patch.
modules/cmsadmin/models/NavItemModule.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 
21 21
     private $_module = null;
22 22
 
23
+    /**
24
+     * @return \luya\base\Module
25
+     */
23 26
     private function getModule()
24 27
     {
25 28
         if ($this->_module !== null) {
Please login to merge, or discard this patch.
modules/cmsadmin/models/NavItemPage.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -79,6 +79,9 @@  discard block
 block discarded – undo
79 79
         throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '". $this->id . "'. Make sure your page does not have an old inactive/deleted cms layout selected.");
80 80
     }
81 81
     
82
+    /**
83
+     * @param string $key
84
+     */
82 85
     private function setHasCache($key, $value, $expirationTime)
83 86
     {
84 87
         if (Yii::$app->has('cache')) {
@@ -86,6 +89,9 @@  discard block
 block discarded – undo
86 89
         }
87 90
     }
88 91
     
92
+    /**
93
+     * @param string $key
94
+     */
89 95
     private function getHasCache($key)
90 96
     {
91 97
         if (Yii::$app->has('cache')) {
@@ -98,6 +104,9 @@  discard block
 block discarded – undo
98 104
         return false;
99 105
     }
100 106
 
107
+    /**
108
+     * @param integer $prevId
109
+     */
101 110
     public function renderPlaceholder($navItemPageId, $placeholderVar, $prevId)
102 111
     {
103 112
         $string = '';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             return $data;
77 77
         }
78 78
 
79
-        throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '". $this->id . "'. Make sure your page does not have an old inactive/deleted cms layout selected.");
79
+        throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '".$this->id."'. Make sure your page does not have an old inactive/deleted cms layout selected.");
80 80
     }
81 81
     
82 82
     private function setHasCache($key, $value, $expirationTime)
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 }
145 145
             }
146 146
             
147
-            $string.= $blockResponse;
147
+            $string .= $blockResponse;
148 148
         }
149 149
 
150 150
         return $string;
Please login to merge, or discard this patch.
modules/crawler/classes/CrawlContainer.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -31,6 +31,9 @@
 block discarded – undo
31 31
         'filtered' => [],
32 32
     ];
33 33
     
34
+    /**
35
+     * @param string $cat
36
+     */
34 37
     public function addLog($cat, $message)
35 38
     {
36 39
         $this->log[$cat][] = $message;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
         $type = $this->getCrawler($url)->getContentType();
146 146
         
147 147
         if (strpos($type, 'text/html') === false) {
148
-            $this->addLog('invalid_header', $url . ' invalid header ' . $type);
148
+            $this->addLog('invalid_header', $url.' invalid header '.$type);
149 149
             return false;
150 150
         }
151 151
         
Please login to merge, or discard this patch.
modules/crawler/classes/CrawlPage.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 Goutte\Client;
6 6
 use yii\base\InvalidConfigException;
7 7
 use yii\base\yii\base;
8
-use luya\helpers\Url;
9 8
 
10 9
 class CrawlPage extends \yii\base\Object
11 10
 {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         
33 33
         $info = parse_url($this->baseUrl);
34 34
         
35
-        $this->baseHost = $info['scheme'] . '://' . $info['host'];
35
+        $this->baseHost = $info['scheme'].'://'.$info['host'];
36 36
     }
37 37
 
38 38
     public function flush()
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     
60 60
     public function getLinks()
61 61
     {
62
-        $links = $this->getCrawler()->filterXPath('//a')->each(function ($node, $i) {
62
+        $links = $this->getCrawler()->filterXPath('//a')->each(function($node, $i) {
63 63
             return $node->extract(array('_text', 'href'))[0];
64 64
         });
65 65
         foreach ($links as $key => $item) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             if (!isset($url['host']) || !isset($url['scheme'])) {
69 69
                 $base = $this->baseHost;
70 70
             } else {
71
-                $base = $url['scheme'] . '//' . $url['host'];
71
+                $base = $url['scheme'].'//'.$url['host'];
72 72
             }
73 73
             
74 74
             $path = null;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 $path = $url['path'];
78 78
             }
79 79
             
80
-            $url = rtrim($base, "/") . "/" . ltrim($path, "/");
80
+            $url = rtrim($base, "/")."/".ltrim($path, "/");
81 81
             
82 82
 
83 83
             $links[$key][1] = http_build_url($url, [
Please login to merge, or discard this patch.