Completed
Push — master ( 417a50...a61c99 )
by Dmytro
07:12
created
framework/helpers/Naming.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
                             break;
150 150
                         }
151 151
                         $array = &$array[$key];
152
-                    } elseif(isset($array[$key])) { // last element
152
+                    } elseif (isset($array[$key])) { // last element
153 153
                         unset($array[$key]);
154 154
                     }
155 155
                 }
Please login to merge, or discard this patch.
framework/core/Messages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
      */
133 133
     public static function reorderMessages()
134 134
     {
135
-        uasort(self::$messages, function ($a, $b) {
135
+        uasort(self::$messages, function($a, $b) {
136 136
             return $a->type <= $b->type;
137 137
         });
138 138
     }
Please login to merge, or discard this patch.
classes/Email.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         return $this->sendNotification(
31 31
             Config::EMAIL_ADMIN,
32
-            "New user signup: '" . $user->username . "'",
32
+            "New user signup: '".$user->username."'",
33 33
             $_LANG->code,
34 34
             "signup_admin_email",
35 35
             array(
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         global $_LANG;
55 55
 
56 56
         if (!Validator::isEmail($user->email)) {
57
-            throw new \Exception("Invalid email: '" . $user->email . "'");
57
+            throw new \Exception("Invalid email: '".$user->email."'");
58 58
         }
59 59
 
60 60
         return $this->sendNotification(
Please login to merge, or discard this patch.
classes/db/tools/ErrorLog.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if ($type === 0) {
38 38
             $errorTypes[] = "E_LOG_INFO";
39 39
         } else {
40
-            for ($i = 0; $i < 15;  $i++) {
40
+            for ($i = 0; $i < 15; $i++) {
41 41
                 $errorType = self::friendlyErrorType($type & pow(2, $i));
42 42
                 if (!empty($errorType)) {
43 43
                     $errorTypes[] = $errorType;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             }
46 46
         }
47 47
 
48
-        $query = "INSERT INTO " . self::TABLE_NAME . " (type, error_type, called, script, line, message, count, last_seen) VALUES (?, ?, ?, ?, ?, ?, 1, ?)
48
+        $query = "INSERT INTO ".self::TABLE_NAME." (type, error_type, called, script, line, message, count, last_seen) VALUES (?, ?, ?, ?, ?, ?, 1, ?)
49 49
                   ON DUPLICATE KEY UPDATE count = count + 1, last_seen = ?";
50 50
         try {
51 51
             return DBCore::doUpdateQuery($query, "isssisss", array(
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     private static function friendlyErrorType($type) {
60
-        switch($type) {
60
+        switch ($type) {
61 61
             case E_ERROR: // 1
62 62
                 return 'E_ERROR';
63 63
             case E_WARNING: // 2
Please login to merge, or discard this patch.
classes/db/access/User.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
      * Updates login time.
109 109
      */
110 110
     public function updateLoginTime() {
111
-        $query = "UPDATE " . self::TABLE_NAME . "
111
+        $query = "UPDATE ".self::TABLE_NAME."
112 112
                      SET last_login_time = NOW()
113
-                   WHERE " . self::ID_FIELD_NAME . " = ?";
113
+                   WHERE " . self::ID_FIELD_NAME." = ?";
114 114
         DBCore::doUpdateQuery($query, "i", array($this->id));
115 115
     }
116 116
 
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function getAvatarPath($icon = false) {
178 178
         $currentAvatarFileName = $this->avatar;
179
-        if (!empty($currentAvatarFileName) && file_exists(Config::DIR_AVATARS . $currentAvatarFileName)) {
180
-            return Config::DIR_AVATARS . $currentAvatarFileName;
179
+        if (!empty($currentAvatarFileName) && file_exists(Config::DIR_AVATARS.$currentAvatarFileName)) {
180
+            return Config::DIR_AVATARS.$currentAvatarFileName;
181 181
         }
182 182
         if ($icon) {
183 183
             return "img/user_avatar.png";
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function updateAvatar($newAvatarFileName) {
196 196
         $currentAvatarFileName = $this->avatar;
197
-        if (!empty($currentAvatarFileName) && file_exists(Config::DIR_AVATARS . $currentAvatarFileName)) {
198
-            unlink(Config::DIR_AVATARS . $currentAvatarFileName);
197
+        if (!empty($currentAvatarFileName) && file_exists(Config::DIR_AVATARS.$currentAvatarFileName)) {
198
+            unlink(Config::DIR_AVATARS.$currentAvatarFileName);
199 199
         }
200 200
 
201
-        if (file_exists(Config::DIR_AVATARS . $newAvatarFileName)) {
202
-            $query = "UPDATE " . self::TABLE_NAME
201
+        if (file_exists(Config::DIR_AVATARS.$newAvatarFileName)) {
202
+            $query = "UPDATE ".self::TABLE_NAME
203 203
                     . " SET avatar = ?"
204
-                    . " WHERE " . self::ID_FIELD_NAME . " = ?";
204
+                    . " WHERE ".self::ID_FIELD_NAME." = ?";
205 205
             if (DBCore::doUpdateQuery($query, "si", array(
206 206
                 $newAvatarFileName,
207 207
                 $this->id
Please login to merge, or discard this patch.
classes/db/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     );
22 22
 
23 23
     public function save() {
24
-        $query = "INSERT INTO " . self::TABLE_NAME . " (setting_id, value) VALUES (?, ?)
24
+        $query = "INSERT INTO ".self::TABLE_NAME." (setting_id, value) VALUES (?, ?)
25 25
                   ON DUPLICATE KEY UPDATE value = ?";
26 26
         return DBCore::doUpdateQuery($query, "sss", array(
27 27
             $this->id,
Please login to merge, or discard this patch.
framework/mail/Email.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
      *           delivery, FALSE otherwise.
89 89
      */
90 90
     protected function sendMail($email, $subject, $message, $format = self::FORMAT_TEXT, $replyTo = "") {
91
-        $headers = "From: " . $this->fromName . " <" . $this->fromEmail . ">\r\n";
92
-        $headers.= "Reply-To: " . $replyTo . "\r\n";
91
+        $headers = "From: ".$this->fromName." <".$this->fromEmail.">\r\n";
92
+        $headers .= "Reply-To: ".$replyTo."\r\n";
93 93
 
94 94
         if ($format == self::FORMAT_HTML) {
95
-            $headers.= "MIME-Version: 1.0\r\n";
96
-            $headers.= "Content-type: text/html; charset=utf-8\r\n";
95
+            $headers .= "MIME-Version: 1.0\r\n";
96
+            $headers .= "Content-type: text/html; charset=utf-8\r\n";
97 97
         }
98 98
 
99 99
         /*
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
         $_EMAIL = $params;
150 150
 
151 151
         ob_start();
152
-        include($this->tplFolder . $languageCode . "/" . $template . ".tpl.php");
152
+        include($this->tplFolder.$languageCode."/".$template.".tpl.php");
153 153
         if (!empty($this->signatureTpl)) {
154
-            include($this->tplFolder . $languageCode . "/" . $this->signatureTpl);
154
+            include($this->tplFolder.$languageCode."/".$this->signatureTpl);
155 155
         }
156 156
         $message = ob_get_contents();
157 157
         ob_end_clean();
Please login to merge, or discard this patch.
framework/mail/POP.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
             fgets($sock, 1024);
59 59
 
60 60
             // Connection accepted
61
-            fwrite($sock, "USER " . $username . "\r\n");
61
+            fwrite($sock, "USER ".$username."\r\n");
62 62
             $userresponse = fgets($sock, 1024);
63 63
             if ($userresponse[0] == "+") { // User accepted
64
-                fwrite($sock, "PASS " . $password . "\r\n");
64
+                fwrite($sock, "PASS ".$password."\r\n");
65 65
                 $passresponse = fgets($sock, 1024);
66 66
                 if ($passresponse[0] != "+") { // Wrong password
67 67
                     $passresponse = str_replace("\r", "", str_replace("\n", "", $passresponse));
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
                 }
73 73
             } else { // Invalid username
74 74
                 throw new POPServerException(
75
-                    "Username '" . $username . "' not accepted.", 1
75
+                    "Username '".$username."' not accepted.", 1
76 76
                 );
77 77
             }
78 78
         } else {
79 79
             throw new POPServerException(
80
-                "Unable to Connect to " . $host . ". Network Problems could be responsible.", 2
80
+                "Unable to Connect to ".$host.". Network Problems could be responsible.", 2
81 81
             );
82 82
         }
83 83
         $this->connection = $sock;
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
         $ret = $L2 = $L3 = null;
358 358
         for ($i = 0; $i < $len; $i++) {
359 359
             if (isset($avar[$i]) && isset($avar[$i][0]) && isset($avar[$i][1]) && isset($avar[$i][2])) {
360
-                $L2 = $avar[$i][0] . $avar[$i][1];
361
-                $L3 = $avar[$i][0] . $avar[$i][1] . $avar[$i][2];
360
+                $L2 = $avar[$i][0].$avar[$i][1];
361
+                $L3 = $avar[$i][0].$avar[$i][1].$avar[$i][2];
362 362
                 if ($L2 != "  " && $L3 != "Rec" && $L2 != "") {
363 363
                     $avar2 = explode(":", $avar[$i]);
364 364
                     $temp = str_replace("$avar2[0]:", "", $avar[$i]);
Please login to merge, or discard this patch.
framework/app/Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
     }
44 44
 
45 45
     protected function init() {
46
-        $action = 'action' . ucfirst(
46
+        $action = 'action'.ucfirst(
47 47
             preg_replace_callback(
48 48
                 "#_([a-z])#",
49
-                function ($matches) {
49
+                function($matches) {
50 50
                     return strtoupper($matches[1]);
51 51
                 },
52 52
                 $this->route->action
Please login to merge, or discard this patch.