Passed
Push — master ( 10220a...9ad793 )
by Mihail
05:11
created
Apps/Model/Basic/Antivirus.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $this->beginTime = time();
34 34
 
35 35
         $this->signatures = new \DOMDocument();
36
-        $this->signatures->load(root . '/Private/Antivirus/Signatures.xml');
36
+        $this->signatures->load(root.'/Private/Antivirus/Signatures.xml');
37 37
 
38 38
         // list of files is not prepared, 1st iteration
39 39
         if (!File::exist('/Private/Antivirus/ScanFiles.json')) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $this->scanFiles = json_decode(File::read('/Private/Antivirus/ScanFiles.json'));
48 48
         if (File::exist('/Private/Antivirus/Infected.json')) {
49
-            $this->infected = (array)json_decode(File::read('/Private/Antivirus/Infected.json'));
49
+            $this->infected = (array) json_decode(File::read('/Private/Antivirus/Infected.json'));
50 50
         }
51 51
     }
52 52
 
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 
109 109
             switch ($attrFormat) {
110 110
                 case 're':
111
-                    if ((preg_match('#(' . $sigContent . ')#smi', $content, $found, PREG_OFFSET_CAPTURE)) ||
112
-                        (preg_match('#(' . $sigContent . ')#smi', $normalized, $found, PREG_OFFSET_CAPTURE))
111
+                    if ((preg_match('#('.$sigContent.')#smi', $content, $found, PREG_OFFSET_CAPTURE)) ||
112
+                        (preg_match('#('.$sigContent.')#smi', $normalized, $found, PREG_OFFSET_CAPTURE))
113 113
                     ) {
114 114
                         $detected = true;
115 115
                         $pos = $found[0][1];
116 116
                         $this->infected[$path][] = [
117
-                            'pos' => (int)$pos,
117
+                            'pos' => (int) $pos,
118 118
                             'sigId' => $attrId,
119 119
                             'sigRule' => $sigContent,
120 120
                             'sever' => $attrSever,
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                         (($pos = strpos($normalized, $sigContent)) !== false)
129 129
                     ) {
130 130
                         $this->infected[$path][] = [
131
-                            'pos' => (int)$pos,
131
+                            'pos' => (int) $pos,
132 132
                             'sigId' => $attrId,
133 133
                             'sigRule' => $sigContent,
134 134
                             'sever' => $attrSever,
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     private function prepareScanlist()
150 150
     {
151
-        $files = (object)File::listFiles(root, $this->affectedExt);
151
+        $files = (object) File::listFiles(root, $this->affectedExt);
152 152
         File::write('/Private/Antivirus/ScanFiles.json', json_encode($files));
153 153
     }
154 154
 
Please login to merge, or discard this patch.
Apps/Model/Install/Main/FormInstall.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,14 +71,14 @@
 block discarded – undo
71 71
         $cfg['database'] = $this->db;
72 72
         $cfg['adminEmail'] = $this->email;
73 73
         $cfg['singleLanguage'] = $this->singleLanguage;
74
-        $cfg['multiLanguage'] = (bool)$this->multiLanguage;
75
-        $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$';
76
-        $cfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(4, 16));
74
+        $cfg['multiLanguage'] = (bool) $this->multiLanguage;
75
+        $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$';
76
+        $cfg['debug']['cookie']['key'] = 'fdebug_'.Str::randomLatinNumeric(mt_rand(4, 16));
77 77
         $cfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128));
78 78
 
79 79
         // import database tables
80 80
         $connectName = 'install';
81
-        include(root . '/Private/Database/install.php');
81
+        include(root.'/Private/Database/install.php');
82 82
 
83 83
         // insert admin user
84 84
         $user = new User();
Please login to merge, or discard this patch.
Apps/Controller/Front/Main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
 
26 26
     public function actionRead($id)
27 27
     {
28
-        echo "Action read called" . $id;
28
+        echo "Action read called".$id;
29 29
     }
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Controller/Api/Main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $connector = new \elFinderConnector(new \elFinder([
33 33
             'locale' => '',
34 34
             'roots' => [
35
-                ['driver' => 'LocalFileSystem', 'path' => root . '/upload/', 'URL' => App::$Alias->scriptUrl . '/upload/']
35
+                ['driver' => 'LocalFileSystem', 'path' => root.'/upload/', 'URL' => App::$Alias->scriptUrl.'/upload/']
36 36
             ]
37 37
         ]));
38 38
 
Please login to merge, or discard this patch.
Apps/ActiveRecord/Role.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
      */
27 27
     public static function get($role_id)
28 28
     {
29
-        $role = MainApp::$Memory->get('user.role.cache.' . $role_id);
29
+        $role = MainApp::$Memory->get('user.role.cache.'.$role_id);
30 30
 
31 31
         // not founded in cache
32 32
         if ($role === null) {
33 33
             $role = self::find($role_id);
34
-            MainApp::$Memory->set('user.role.cache.' . $role_id, $role);
34
+            MainApp::$Memory->set('user.role.cache.'.$role_id, $role);
35 35
         }
36 36
         return $role;
37 37
     }
Please login to merge, or discard this patch.
Apps/ActiveRecord/Profile.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
         }
47 47
 
48 48
         // check in cache
49
-        if (MainApp::$Memory->get('profile.object.cache.' . $user_id) !== null) {
50
-            return MainApp::$Memory->get('profile.object.cache.' . $user_id);
49
+        if (MainApp::$Memory->get('profile.object.cache.'.$user_id) !== null) {
50
+            return MainApp::$Memory->get('profile.object.cache.'.$user_id);
51 51
         }
52 52
 
53 53
         // find row
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         $object = $profile->first();
62 62
 
63
-        MainApp::$Memory->set('profile.object.cache.' . $user_id, $object);
63
+        MainApp::$Memory->set('profile.object.cache.'.$user_id, $object);
64 64
         return $object;
65 65
     }
66 66
 
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function getAvatarUrl($type = 'small')
73 73
     {
74
-        $default = '/upload/user/avatar/' . $type . '/default.jpg';
74
+        $default = '/upload/user/avatar/'.$type.'/default.jpg';
75 75
         if (!Arr::in($type, ['small', 'big', 'medium'])) {
76
-            return MainApp::$Alias->scriptUrl . $default;
76
+            return MainApp::$Alias->scriptUrl.$default;
77 77
         }
78 78
 
79
-        $route = '/upload/user/avatar/' . $type . '/' . $this->user_id . '.jpg';
79
+        $route = '/upload/user/avatar/'.$type.'/'.$this->user_id.'.jpg';
80 80
         if (File::exist($route)) {
81
-            return MainApp::$Alias->scriptUrl . $route . '?mtime=' . File::mTime($route);
81
+            return MainApp::$Alias->scriptUrl.$route.'?mtime='.File::mTime($route);
82 82
         }
83 83
 
84
-        return MainApp::$Alias->scriptUrl . $default;
84
+        return MainApp::$Alias->scriptUrl.$default;
85 85
     }
86 86
 
87 87
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $userNick = $this->nick;
94 94
         if ($userNick === null || Str::likeEmpty($userNick)) {
95
-            $userNick = 'id' . $this->id;
95
+            $userNick = 'id'.$this->id;
96 96
         }
97 97
 
98 98
         return $userNick;
Please login to merge, or discard this patch.
Apps/ActiveRecord/ContentCategory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public static function getByPath($path = '')
29 29
     {
30
-        if (MainApp::$Memory->get('cache.content.category.path.' . $path) !== null) {
31
-            return MainApp::$Memory->get('cache.content.category.path.' . $path);
30
+        if (MainApp::$Memory->get('cache.content.category.path.'.$path) !== null) {
31
+            return MainApp::$Memory->get('cache.content.category.path.'.$path);
32 32
         }
33 33
 
34 34
         $record = self::where('path', '=', $path)->first();
35
-        MainApp::$Memory->set('cache.content.category.path.' . $path, $record);
35
+        MainApp::$Memory->set('cache.content.category.path.'.$path, $record);
36 36
         return $record;
37 37
     }
38 38
 
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public static function getById($id)
45 45
     {
46
-        if (MainApp::$Memory->get('cache.content.category.id.' . $id) !== null) {
47
-            return MainApp::$Memory->get('cache.content.category.id.' . $id);
46
+        if (MainApp::$Memory->get('cache.content.category.id.'.$id) !== null) {
47
+            return MainApp::$Memory->get('cache.content.category.id.'.$id);
48 48
         }
49 49
 
50 50
         $record = self::find($id);
51
-        MainApp::$Memory->set('cache.content.category.id.' . $id, $record);
51
+        MainApp::$Memory->set('cache.content.category.id.'.$id, $record);
52 52
         return $record;
53 53
     }
54 54
 
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
             } else {
83 83
                 // set level marker based on slashes count in pathway
84 84
                 $slashCount = Str::entryCount($path, '/');
85
-                for ($i=-1; $i <= $slashCount; $i++) {
85
+                for ($i = -1; $i <= $slashCount; $i++) {
86 86
                     $title .= '--';
87 87
                 }
88 88
             }
89 89
             // add canonical title from db
90
-            $title .= ' ' . Serialize::getDecodeLocale($data->title);
90
+            $title .= ' '.Serialize::getDecodeLocale($data->title);
91 91
             // set response as array [id => title, ... ]
92 92
             $response[$data->id] = $title;
93 93
         }
Please login to merge, or discard this patch.
Apps/ActiveRecord/App.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
         $scriptVersion = $this->getScriptVersion();
150 150
 
151
-        return $scriptVersion === (float)$this->version;
151
+        return $scriptVersion === (float) $this->version;
152 152
     }
153 153
 
154 154
     /**
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function getScriptVersion()
159 159
     {
160
-        $class = 'Apps\Controller\Admin\\' . $this->sys_name;
160
+        $class = 'Apps\Controller\Admin\\'.$this->sys_name;
161 161
         if (!class_exists($class)) {
162 162
             return false;
163 163
         }
164 164
 
165
-        if (!defined($class . '::VERSION')) {
165
+        if (!defined($class.'::VERSION')) {
166 166
             return false;
167 167
         }
168 168
 
169
-        return (float)constant($class . '::VERSION');
169
+        return (float) constant($class.'::VERSION');
170 170
     }
171 171
 
172 172
 }
173 173
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/ActiveRecord/Content.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         // build path and check is file exists on disk
98
-        $path = '/upload/gallery/' . $this->id . '/orig/' . $pName;
98
+        $path = '/upload/gallery/'.$this->id.'/orig/'.$pName;
99 99
         if (!File::exist($path)) {
100 100
             return null;
101 101
         }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
         // remove extension, thumbs always in jpeg ;D
118 118
         $pName = Str::cleanExtension($pName);
119
-        $path = '/upload/gallery/' . $this->id . '/thumb/' . $pName . '.jpg';
119
+        $path = '/upload/gallery/'.$this->id.'/thumb/'.$pName.'.jpg';
120 120
 
121 121
         if (!File::exist($path)) {
122 122
             return null;
Please login to merge, or discard this patch.