Test Failed
Push — 1.0.0-dev ( 49bbbd...877729 )
by nguereza
02:45
created
core/classes/Log.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
                 //NOTE: here need put the show_error() "logging" to false 
141 141
                 //to prevent self function loop call
142 142
                 show_error('Invalid config log level [' . $configLogLevel . '], '
143
-                           . 'the value must be one of the following: ' 
144
-                           . implode(', ', array_map('strtoupper', self::$validConfigLevel))
145
-                           , 'Log Config Error', 
146
-                           $logging = false
147
-                       );
143
+                            . 'the value must be one of the following: ' 
144
+                            . implode(', ', array_map('strtoupper', self::$validConfigLevel))
145
+                            , 'Log Config Error', 
146
+                            $logging = false
147
+                        );
148 148
                 return;	
149 149
             }
150 150
 			
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         protected function levelCanSaveLog($level) {
215 215
             $result = true;
216 216
             $configLogLevel = get_config('log_level');
217
-             //check if can save log regarding the log level configuration
217
+                //check if can save log regarding the log level configuration
218 218
             $configLevel = self::getLevelValue($configLogLevel);
219 219
             if ($configLevel > $level) {
220 220
                 //can't log
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                 //NOTE: here need put the show_error() "logging" to false 
295 295
                 //to prevent self function loop call
296 296
                 show_error('Error : the log dir does not exist or is not writable',
297
-                           'Log directory error', $logging = false);
297
+                            'Log directory error', $logging = false);
298 298
             }
299 299
 			
300 300
             $path = $logSavePath . 'logs-' . date('Y-m-d') . '.log';
Please login to merge, or discard this patch.
core/libraries/Email.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
             }
386 386
             $filename = $this->encodeUtf8($this->filterOther((string) $filename));
387 387
             if (empty($data)) {
388
-               $data = $this->getAttachmentData($path);
388
+                $data = $this->getAttachmentData($path);
389 389
             }
390 390
             $this->attachments[] = array(
391 391
                 'path' => $path,
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             $addresses = array();
427 427
             foreach ($pairs as $name => $email) {
428 428
                 if (is_numeric($name)) {
429
-                   $name = null;
429
+                    $name = null;
430 430
                 }
431 431
                 $addresses[] = $this->formatHeader($email, $name);
432 432
             }
@@ -970,10 +970,10 @@  discard block
 block discarded – undo
970 970
             return $headers;
971 971
         }
972 972
 
973
-         /**
974
-         * Get the attachment message for send or the simple message
975
-         * @return string
976
-         */
973
+            /**
974
+             * Get the attachment message for send or the simple message
975
+             * @return string
976
+             */
977 977
         protected function getMessageWithAttachmentForSend() {
978 978
             $message = $this->getWrapMessage();
979 979
             if ($this->hasAttachments()) {
@@ -1010,11 +1010,11 @@  discard block
 block discarded – undo
1010 1010
          */
1011 1011
         protected function sendHelloCommand() {
1012 1012
             $responseCode = $this->sendCommand('EHLO ' . $this->getSmtpClientHostname())
1013
-                                 ->getSmtpResponseCode();
1013
+                                    ->getSmtpResponseCode();
1014 1014
             if ($responseCode !== 250) {
1015 1015
                 //May be try with "HELO"
1016 1016
                 $responseCode = $this->sendCommand('HELO ' . $this->getSmtpClientHostname())
1017
-                                     ->getSmtpResponseCode();
1017
+                                        ->getSmtpResponseCode();
1018 1018
                 if ($responseCode !== 250) {
1019 1019
                     $this->error = $this->smtpResponse;
1020 1020
                     return false;
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
             $message = $this->getMessageWithAttachmentForSend();
1159 1159
             $headers = $this->getHeadersForSend(); 
1160 1160
             $this->logger->info('Sending new mail using mail protocol, the information are listed below: '
1161
-                                  . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1161
+                                    . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1162 1162
             $result = mail($to, $this->subject, $message, $headers, $this->params);
1163 1163
             if (!$result) {
1164 1164
                 $this->error = 'Error when sending mail using mail protocol';
@@ -1166,10 +1166,10 @@  discard block
 block discarded – undo
1166 1166
             return $result;
1167 1167
         }
1168 1168
 
1169
-         /**
1170
-         * Send mail using "smtp" protocol
1171
-         * @return boolean
1172
-         */
1169
+            /**
1170
+             * Send mail using "smtp" protocol
1171
+             * @return boolean
1172
+             */
1173 1173
         protected function sendSmtp() {
1174 1174
             if (!$this->smtpConnection()) {
1175 1175
                 return false;
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
             $message = $this->getMessageWithAttachmentForSend();
1190 1190
             $headers = $this->getHeadersForSend();
1191 1191
             $this->logger->info('Sending new mail using SMTP protocol, the information are listed below: '
1192
-                                  . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1192
+                                    . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1193 1193
             
1194 1194
             $recipients = array_merge($this->to, $this->cc, $this->bcc);
1195 1195
             $commands = array(
@@ -1223,17 +1223,17 @@  discard block
 block discarded – undo
1223 1223
             return empty($this->error);
1224 1224
         }
1225 1225
 
1226
-         /**
1227
-         * Return the client hostname for SMTP
1228
-         * 
1229
-         * There are only two legal types of hostname - either a fully
1230
-         * qualified domain name (eg: "mail.example.com") or an IP literal
1231
-         * (eg: "[1.2.3.4]").
1232
-         *
1233
-         * @link    https://tools.ietf.org/html/rfc5321#section-2.3.5
1234
-         * @link    http://cbl.abuseat.org/namingproblems.html
1235
-         * @return string
1236
-         */
1226
+            /**
1227
+             * Return the client hostname for SMTP
1228
+             * 
1229
+             * There are only two legal types of hostname - either a fully
1230
+             * qualified domain name (eg: "mail.example.com") or an IP literal
1231
+             * (eg: "[1.2.3.4]").
1232
+             *
1233
+             * @link    https://tools.ietf.org/html/rfc5321#section-2.3.5
1234
+             * @link    http://cbl.abuseat.org/namingproblems.html
1235
+             * @return string
1236
+             */
1237 1237
         protected function getSmtpClientHostname() {
1238 1238
             $globals = &class_loader('GlobalVar', 'classes');
1239 1239
             if ($globals->server('SERVER_NAME')) {
Please login to merge, or discard this patch.