Passed
Push — master ( 3db37c...11f6ba )
by Mihail
04:15
created
Apps/ActiveRecord/ContentCategory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     /**
13 13
      * Get record via category path address
14 14
      * @param string $path
15
-     * @return self|object|null
15
+     * @return ContentCategory
16 16
      */
17 17
     public static function getByPath($path = '')
18 18
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             } else {
72 72
                 // set level marker based on slashes count in pathway
73 73
                 $slashCount = Str::entryCount($path, '/');
74
-                for ($i=-1; $i <= $slashCount; $i++) {
74
+                for ($i = -1; $i <= $slashCount; $i++) {
75 75
                     $title .= '--';
76 76
                 }
77 77
             }
Please login to merge, or discard this patch.
Apps/ActiveRecord/Role.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ffcms\Core\App as MainApp;
6 6
 use Ffcms\Core\Arch\ActiveModel;
7 7
 use Ffcms\Core\Helper\Type\Arr;
8
-use Ffcms\Core\Helper\Type\Str;
9 8
 
10 9
 class Role extends ActiveModel
11 10
 {
Please login to merge, or discard this patch.
Apps/Controller/Admin/Main.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Ffcms\Core\App;
10 10
 use Ffcms\Core\Exception\SyntaxException;
11 11
 use Ffcms\Core\Helper\FileSystem\File;
12
-use Ffcms\Core\Helper\Type\Arr;
13 12
 use Ffcms\Core\Helper\Type\Integer;
14 13
 use Ffcms\Core\Helper\Type\Str;
15 14
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,9 +117,9 @@
 block discarded – undo
117 117
      */
118 118
     public function actionDeleteroute()
119 119
     {
120
-        $type = (string)App::$Request->query->get('type');
121
-        $loader = (string)App::$Request->query->get('loader');
122
-        $source = Str::lowerCase((string)App::$Request->query->get('path'));
120
+        $type = (string) App::$Request->query->get('type');
121
+        $loader = (string) App::$Request->query->get('loader');
122
+        $source = Str::lowerCase((string) App::$Request->query->get('path'));
123 123
 
124 124
         $model = new EntityDeleteRoute($type, $loader, $source);
125 125
         if ($model->send()) {
Please login to merge, or discard this patch.
Apps/Controller/Api/Comments.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Ffcms\Core\App;
8 8
 use Ffcms\Core\Exception\JsonException;
9 9
 use Ffcms\Core\Helper\Date;
10
-use Ffcms\Core\Helper\Type\Obj;
11 10
 use Ffcms\Core\Helper\Type\Str;
12 11
 
13 12
 class Comments extends ApiController
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
         // set header
20 20
         $this->setJsonHeader();
21 21
         // offset can be only integer
22
-        $offset = (int)$offset;
22
+        $offset = (int) $offset;
23 23
         // get comment target path and check
24
-        $path = (string)App::$Request->query->get('path');
24
+        $path = (string) App::$Request->query->get('path');
25 25
         if (Str::likeEmpty($path)) {
26 26
             throw new JsonException('Wrong path');
27 27
         }
Please login to merge, or discard this patch.
Apps/Controller/Front/Content.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,12 +7,10 @@
 block discarded – undo
7 7
 use Apps\Model\Front\Content\EntityCategoryRead;
8 8
 use Extend\Core\Arch\FrontAppController;
9 9
 use Ffcms\Core\App;
10
-use Ffcms\Core\Exception\ForbiddenException;
11 10
 use Ffcms\Core\Exception\NotFoundException;
12 11
 use Apps\Model\Front\Content\EntityContentRead;
13 12
 use Ffcms\Core\Helper\HTML\SimplePagination;
14 13
 use Ffcms\Core\Helper\Type\Arr;
15
-use Ffcms\Core\Helper\Type\Str;
16 14
 
17 15
 class Content extends FrontAppController
18 16
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $path = App::$Request->getPathWithoutControllerAction();
37 37
         $configs = $this->getConfigs();
38
-        $page = (int)App::$Request->query->get('page');
39
-        $itemCount = (int)$configs['itemPerCategory'];
38
+        $page = (int) App::$Request->query->get('page');
39
+        $itemCount = (int) $configs['itemPerCategory'];
40 40
         $offset = $page * $itemCount;
41 41
 
42 42
         // generate category array
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $categoryData = null;
45 45
         $currentCategoryData = null;
46 46
         // does it multi-category mod?
47
-        if ((int)$configs['multiCategories'] === 1) {
47
+        if ((int) $configs['multiCategories'] === 1) {
48 48
             $categoryData = ContentCategory::where('path', 'like', $path . '%')->get()->toArray();
49 49
             if (count($categoryData) < 1) {
50 50
                 throw new NotFoundException();
Please login to merge, or discard this patch.
Apps/Controller/Front/Main.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 Extend\Core\Arch\FrontAppController;
6 6
 use Ffcms\Core\Arch\View;
7
-use Apps\Model\Front\User;
8 7
 
9 8
 
10 9
 class Main extends FrontAppController
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormCategoryUpdate.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Ffcms\Core\App;
7 7
 use Ffcms\Core\Arch\Model;
8 8
 use Ffcms\Core\Exception\SyntaxException;
9
-use Ffcms\Core\Helper\Type\Obj;
10 9
 use Ffcms\Core\Helper\Serialize;
11 10
 use Ffcms\Core\Helper\Type\Str;
12 11
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-    * Pass properties from default record values
42
-    */
41
+     * Pass properties from default record values
42
+     */
43 43
     public function before()
44 44
     {
45 45
         if ($this->_record->id === null) {
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
     }
75 75
 
76 76
     /**
77
-    * Form labels
78
-    */
77
+     * Form labels
78
+     */
79 79
     public function labels()
80 80
     {
81 81
         return [
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
     }
94 94
 
95 95
     /**
96
-    * Validation rules
97
-    */
96
+     * Validation rules
97
+     */
98 98
     public function rules()
99 99
     {
100 100
         $rules = [
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
         ];
103 103
 
104 104
         // general category
105
-        if ($this->_new === false && (int)$this->_record->id === 1) {
105
+        if ($this->_new === false && (int) $this->_record->id === 1) {
106 106
             $rules[] = ['path', 'used'];
107 107
         } else {
108 108
             $rules[] = ['path', 'required'];
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentUpdate.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Ffcms\Core\Helper\Date;
10 10
 use Ffcms\Core\Helper\FileSystem\Directory;
11 11
 use Ffcms\Core\Helper\FileSystem\File;
12
-use Ffcms\Core\Helper\Type\Integer;
13 12
 use Ffcms\Core\Helper\Type\Obj;
14 13
 use Ffcms\Core\Helper\Serialize;
15 14
 use Ffcms\Core\Helper\Type\Str;
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
     }
44 44
 
45 45
     /**
46
-    * Set model properties from active record data
47
-    */
46
+     * Set model properties from active record data
47
+     */
48 48
     public function before()
49 49
     {
50 50
         // is new item?
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     }
106 106
 
107 107
     /**
108
-    * Labels
109
-    */
108
+     * Labels
109
+     */
110 110
     public function labels()
111 111
     {
112 112
         return [
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function rules()
83 83
     {
84
-        $res =  [
84
+        $res = [
85 85
             ['title.' . App::$Request->getLanguage(), 'required'],
86 86
             ['text.' . App::$Request->getLanguage(), 'required', null, true, true],
87 87
             ['text', 'used', null, true, true],
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         $this->_content->meta_description = Serialize::encode(App::$Security->strip_tags($this->metaDescription));
143 143
         $this->_content->source = App::$Security->strip_tags($this->source);
144 144
         // check if rating is changed
145
-        if ((int)$this->addRating !== 0) {
146
-            $this->_content->rating += (int)$this->addRating;
145
+        if ((int) $this->addRating !== 0) {
146
+            $this->_content->rating += (int) $this->addRating;
147 147
         }
148 148
         // check if special comment hash is exist
149 149
         if ($this->_new || Str::length($this->_content->comment_hash) < 32) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $data = ContentCategory::getSortedCategories();
182 182
         $response = [];
183 183
         foreach ($data as $key=>$val) {
184
-            $response[] = (string)$key;
184
+            $response[] = (string) $key;
185 185
         }
186 186
         return $response;
187 187
     }
Please login to merge, or discard this patch.
Apps/Model/Admin/Main/EntityDeleteRoute.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 
19 19
     /**
20 20
      * EntityDeleteRoute constructor. Pass parameters from controller
21
-     * @param null $type
22
-     * @param null $loader
21
+     * @param string $type
22
+     * @param string $loader
23 23
      * @param null $source
24 24
      */
25 25
     public function __construct($type = null, $loader = null, $source = null)
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
     }
33 33
 
34 34
     /**
35
-    * Check passed params from constructor
36
-    */
35
+     * Check passed params from constructor
36
+     */
37 37
     public function before()
38 38
     {
39 39
         // check rule type
Please login to merge, or discard this patch.