Passed
Push — master ( f20f2e...004834 )
by Mihail
05:22
created
Apps/Model/Admin/Content/FormCategoryUpdate.php 3 patches
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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ffcms\Core\App;
6 6
 use Ffcms\Core\Arch\Model;
7
-use Ffcms\Core\Helper\Type\Obj;
8 7
 use Ffcms\Core\Helper\Type\Str;
9 8
 use Ffcms\Core\Interfaces\iUser;
10 9
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         ];
108 108
 
109 109
         // general category
110
-        if ($this->_new === false && (int)$this->_record->id === 1) {
110
+        if ($this->_new === false && (int) $this->_record->id === 1) {
111 111
             $rules[] = ['path', 'used'];
112 112
         } else {
113 113
             $rules[] = ['path', 'required'];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $rules[] = ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'];
117 117
         }
118 118
 
119
-        $rules[] = ['title.' . App::$Request->getLanguage(), 'required'];
119
+        $rules[] = ['title.'.App::$Request->getLanguage(), 'required'];
120 120
 
121 121
 
122 122
         return $rules;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $this->_record->title = Serialize::encode(App::$Security->strip_tags($this->title));
131 131
         $this->_record->description = Serialize::encode(App::$Security->strip_tags($this->description));
132
-        $savePath = trim($this->_pathNested . '/' . $this->path, '/');
132
+        $savePath = trim($this->_pathNested.'/'.$this->path, '/');
133 133
         $this->_record->path = $savePath;
134 134
         $this->_record->configs = Serialize::encode($this->configs);
135 135
         $this->_record->save();
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         // build path with owner category
165 165
         $this->_pathNested = $owner->path;
166 166
         if (Str::length($this->_pathNested) > 0) {
167
-            $path = $this->_pathNested . '/' . $path;
167
+            $path = $this->_pathNested.'/'.$path;
168 168
         }
169 169
 
170 170
         // make select for check
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentClear.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
     }
16 16
 
17 17
     /**
18
-    * Example of usage magic labels for future form helper usage
19
-    */
18
+     * Example of usage magic labels for future form helper usage
19
+     */
20 20
     public function labels()
21 21
     {
22 22
         return [
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
     }
26 26
 
27 27
     /**
28
-    * Typo rules
29
-    */
28
+     * Typo rules
29
+     */
30 30
     public function rules()
31 31
     {
32 32
         return [];
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentDelete.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     }
25 25
 
26 26
     /**
27
-    * Set readable title of content to property
28
-    */
27
+     * Set readable title of content to property
28
+     */
29 29
     public function before()
30 30
     {
31 31
         $this->id = $this->_record->id;
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-    * Form labels
37
-    */
36
+     * Form labels
37
+     */
38 38
     public function labels()
39 39
     {
40 40
         return [
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
     }
44 44
 
45 45
     /**
46
-    * Validation does not matter
47
-    */
46
+     * Validation does not matter
47
+     */
48 48
     public function rules()
49 49
     {
50 50
         return [
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentRestore.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
     }
21 21
 
22 22
     /**
23
-    * Pass properties
24
-    */
23
+     * Pass properties
24
+     */
25 25
     public function before()
26 26
     {
27 27
         $this->id = $this->_record->id;
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     /**
32
-    * Form label
33
-    */
32
+     * Form label
33
+     */
34 34
     public function labels()
35 35
     {
36 36
         return [
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-    * Typical rules
43
-    */
42
+     * Typical rules
43
+     */
44 44
     public function rules()
45 45
     {
46 46
         return [];
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormSettings.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     }
29 29
 
30 30
     /**
31
-    * Set model properties based on defaults config values
32
-    */
31
+     * Set model properties based on defaults config values
32
+     */
33 33
     public function before()
34 34
     {
35 35
         foreach ($this->_configs as $property => $value) {
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
     }
41 41
 
42 42
     /**
43
-    * Form labels
44
-    */
43
+     * Form labels
44
+     */
45 45
     public function labels()
46 46
     {
47 47
         return [
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-    * Validation rules
61
-    */
60
+     * Validation rules
61
+     */
62 62
     public function rules()
63 63
     {
64 64
         return [
Please login to merge, or discard this patch.
Apps/Model/Admin/Main/EntityDeleteRoute.php 3 patches
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.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
 
19 19
     /**
20 20
      * EntityDeleteRoute constructor. Pass parameters from controller
21
-     * @param null $type
22
-     * @param null $loader
23
-     * @param null $source
21
+     * @param string $type
22
+     * @param string $loader
23
+     * @param string $source
24 24
      */
25 25
     public function __construct($type = null, $loader = null, $source = null)
26 26
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
         // prepare source path
50 50
         if ($this->type === 'Alias') {
51
-            $this->source = '/' . trim($this->source, '/');
51
+            $this->source = '/'.trim($this->source, '/');
52 52
         } else {
53 53
             $this->source = ucfirst($this->source);
54 54
         }
Please login to merge, or discard this patch.
Apps/Model/Admin/Main/FormAddRoute.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 
19 19
     /**
20
-    * Load default properties into the model
21
-    */
20
+     * Load default properties into the model
21
+     */
22 22
     public function before()
23 23
     {
24 24
         $this->cfg = App::$Properties->getAll('Routing');
25 25
     }
26 26
 
27 27
     /**
28
-    * Define labels for form
29
-    */
28
+     * Define labels for form
29
+     */
30 30
     public function labels()
31 31
     {
32 32
         return [
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-    * Define validation rules
42
-    */
41
+     * Define validation rules
42
+     */
43 43
     public function rules()
44 44
     {
45 45
         return [
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $configData = [
59 59
             ucfirst(Str::lowerCase($this->type)) => [
60 60
                 ucfirst(Str::lowerCase($this->loader)) => [
61
-                    '/' . trim($this->source, '/') => '/' . trim($this->target, '/')
61
+                    '/'.trim($this->source, '/') => '/'.trim($this->target, '/')
62 62
                 ]
63 63
             ]
64 64
         ];
Please login to merge, or discard this patch.
Apps/Model/Admin/Main/FormSettings.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     public $languageDomainAlias;
28 28
 
29 29
     /**
30
-    * Set property values from configurations
31
-    */
30
+     * Set property values from configurations
31
+     */
32 32
     public function before()
33 33
     {
34 34
         // set default values
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-    * Set translation helpers
42
-    */
41
+     * Set translation helpers
42
+     */
43 43
     public function labels()
44 44
     {
45 45
         return [
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-    * Validation rules for configuration saving
68
-    */
67
+     * Validation rules for configuration saving
68
+     */
69 69
     public function rules()
70 70
     {
71 71
         return [
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function getAvailableThemes($env_name)
93 93
     {
94
-        $path = root . '/Apps/View/' . $env_name . '/';
94
+        $path = root.'/Apps/View/'.$env_name.'/';
95 95
         if (!Directory::exist($path)) {
96 96
             return [];
97 97
         }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function makeSave()
113 113
     {
114 114
         $toSave = App::$Security->strip_php_tags($this->getAllProperties());
115
-        $stringSave = '<?php return ' . App::$Security->var_export54($toSave, null, true) . ';';
115
+        $stringSave = '<?php return '.App::$Security->var_export54($toSave, null, true).';';
116 116
 
117 117
         $cfgPath = '/Private/Config/Default.php';
118 118
         if (File::exist($cfgPath) && File::writable($cfgPath)) {
Please login to merge, or discard this patch.
Apps/Model/Admin/Profile/FormFieldUpdate.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
     }
24 24
 
25 25
     /**
26
-    * Set defaults values
27
-    */
26
+     * Set defaults values
27
+     */
28 28
     public function before()
29 29
     {
30 30
         foreach ($this->_record->toArray() as $property => $value) {
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-    * Labels
43
-    */
42
+     * Labels
43
+     */
44 44
     public function labels()
45 45
     {
46 46
         return [
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-    * Validation rules
56
-    */
55
+     * Validation rules
56
+     */
57 57
     public function rules()
58 58
     {
59 59
         $rules = [
@@ -87,6 +87,6 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function delete()
89 89
     {
90
-       $this->_record->delete();
90
+        $this->_record->delete();
91 91
     }
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@
 block discarded – undo
62 62
         ];
63 63
 
64 64
         foreach (App::$Properties->get('languages') as $lang) {
65
-            $rules[] = ['name.' . $lang, 'required'];
66
-            $rules[] = ['name.' . $lang, 'length_max', 50];
65
+            $rules[] = ['name.'.$lang, 'required'];
66
+            $rules[] = ['name.'.$lang, 'length_max', 50];
67 67
         }
68 68
 
69 69
         return $rules;
Please login to merge, or discard this patch.