Test Failed
Push — trunk ( b3f953...fb036a )
by SuperNova.WS
05:47
created
includes/functions/sys_maintenance.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function sys_maintenance()
4
-{
3
+function sys_maintenance() {
5 4
   global $config;
6 5
 
7 6
   $bashing_time_limit = SN_TIME_NOW - $config->fleet_bashing_scope;
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
  * TODO: 2. [<m|w|d|h|m|s>@]<time>
43 42
  */
44 43
 
45
-function sys_schedule_get_prev_run($scheduleList, $recorded_run = SN_TIME_NOW, $return_next_run = false)
46
-{
44
+function sys_schedule_get_prev_run($scheduleList, $recorded_run = SN_TIME_NOW, $return_next_run = false) {
47 45
   static $date_part_names_reverse = array('seconds', 'minutes', 'hours', 'days', 'months', 'years',);
48 46
 
49 47
   $possible_schedules = array();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
     array('query' => "DELETE FROM `{{planets}}` WHERE `id_owner` = 0 AND `destruyed` < UNIX_TIMESTAMP();", 'result' => false, 'error' => '', 'affected_rows' => 0),
18 18
   );
19 19
 
20
-  foreach($queries as &$query)
20
+  foreach ($queries as &$query)
21 21
   {
22 22
     $query['result'] = doquery($query['query']);
23 23
     $query['error']  = SN::$db->db_error();
24
-    $query['affected_rows']  = SN::$db->db_affected_rows();
24
+    $query['affected_rows'] = SN::$db->db_affected_rows();
25 25
   }
26 26
 
27 27
   return $queries;
@@ -53,30 +53,30 @@  discard block
 block discarded – undo
53 53
   $recorded_run = strtotime($recorded_run);
54 54
 
55 55
   $prev_run_array = getdate($recorded_run);
56
-  $prev_run_array = array($prev_run_array['seconds'],$prev_run_array['minutes'],$prev_run_array['hours'],$prev_run_array['mday'],$prev_run_array['mon'],$prev_run_array['year']);
56
+  $prev_run_array = array($prev_run_array['seconds'], $prev_run_array['minutes'], $prev_run_array['hours'], $prev_run_array['mday'], $prev_run_array['mon'], $prev_run_array['year']);
57 57
   $today_array = getdate(SN_TIME_NOW);
58
-  $today_array = array($today_array['seconds'],$today_array['minutes'],$today_array['hours'],$today_array['mday'],$today_array['mon'],$today_array['year']);
58
+  $today_array = array($today_array['seconds'], $today_array['minutes'], $today_array['hours'], $today_array['mday'], $today_array['mon'], $today_array['year']);
59 59
   $scheduleList = explode(',', $scheduleList);
60 60
   array_walk($scheduleList, function(&$schedule) use ($prev_run_array, $today_array, $date_part_names_reverse, &$possible_schedules) {
61 61
     $schedule = array('schedule_array' => array_reverse(explode(':', trim($schedule))));
62 62
 
63 63
     $interval = $date_part_names_reverse[count($schedule['schedule_array'])];
64 64
 
65
-    foreach($prev_run_array as $index => $date_part) {
65
+    foreach ($prev_run_array as $index => $date_part) {
66 66
       $schedule['array']['recorded'][$index] = isset($schedule['schedule_array'][$index]) ? intval($schedule['schedule_array'][$index]) : $date_part;
67 67
       $schedule['array']['now'][$index] = isset($schedule['schedule_array'][$index]) ? intval($schedule['schedule_array'][$index]) : $today_array[$index];
68 68
     }
69
-    if($schedule['array']['recorded'] == $schedule['array']['now']) {
69
+    if ($schedule['array']['recorded'] == $schedule['array']['now']) {
70 70
       unset($schedule['array']['now']);
71 71
     }
72 72
 
73
-    foreach($schedule['array'] as $name => $array) {
73
+    foreach ($schedule['array'] as $name => $array) {
74 74
       $schedule['string'][$name] = "{$array[5]}-{$array[4]}-{$array[3]} {$array[2]}:{$array[1]}:{$array[0]}";
75 75
       $schedule['string'][$name . '_next'] = $schedule['string'][$name] . ' +1 ' . $interval;
76 76
       $schedule['string'][$name . '_prev'] = $schedule['string'][$name] . ' -1 ' . $interval;
77 77
     }
78 78
 
79
-    foreach($schedule['string'] as $string) {
79
+    foreach ($schedule['string'] as $string) {
80 80
       $timestamp = strtotime($string);
81 81
       $schedule['timestamp'][$timestamp] = $possible_schedules[$timestamp] = date(FMT_DATE_TIME_SQL, strtotime($string));
82 82
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
   $prev_run = 0;
88 88
   $next_run = 0;
89
-  foreach($possible_schedules as $timestamp => $string_date) {
89
+  foreach ($possible_schedules as $timestamp => $string_date) {
90 90
     $prev_run = SN_TIME_NOW >= $timestamp ? $timestamp : $prev_run;
91 91
     $next_run = SN_TIME_NOW < $timestamp && !$next_run ? $timestamp : $next_run;
92 92
   }
Please login to merge, or discard this patch.
includes/functions/lng_language.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,14 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // ----------------------------------------------------------------------------------------------------------------
4
-function lng_try_filepath($path, $file_path_relative)
5
-{
4
+function lng_try_filepath($path, $file_path_relative) {
6 5
   $file_path = SN_ROOT_PHYSICAL . ($path && file_exists(SN_ROOT_PHYSICAL . $path . $file_path_relative) ? $path : '') . $file_path_relative;
7 6
   return file_exists($file_path) ? $file_path : false;
8 7
 }
9 8
 
10
-function lng_die_not_an_object()
11
-{
9
+function lng_die_not_an_object() {
12 10
   print('Ошибка - $lang не объект! Сообщите Администратору сервера и приложите содержимое страницы');
13 11
   $trace = debug_backtrace();
14 12
   unset($trace[0]);
@@ -17,32 +15,27 @@  discard block
 block discarded – undo
17 15
 }
18 16
 
19 17
 // ----------------------------------------------------------------------------------------------------------------
20
-function lng_include($filename, $path = '', $ext = '.mo.php')
21
-{
18
+function lng_include($filename, $path = '', $ext = '.mo.php') {
22 19
   global $lang;
23 20
   return is_object($lang) ? $lang->lng_include($filename, $path, $ext) : lng_die_not_an_object();
24 21
 }
25 22
 
26
-function lng_get_list()
27
-{
23
+function lng_get_list() {
28 24
   global $lang;
29 25
   return is_object($lang) ? $lang->lng_get_list() : lng_die_not_an_object();
30 26
 }
31 27
 
32
-function lng_get_info($entry)
33
-{
28
+function lng_get_info($entry) {
34 29
   global $lang;
35 30
   return is_object($lang) ? $lang->lng_get_info($entry) : lng_die_not_an_object();
36 31
 }
37 32
 
38
-function lng_switch($language_new)
39
-{
33
+function lng_switch($language_new) {
40 34
   global $lang;
41 35
   return is_object($lang) ? $lang->lng_switch($language_new) : lng_die_not_an_object();
42 36
 }
43 37
 
44
-function lng_load_i18n($i18n)
45
-{
38
+function lng_load_i18n($i18n) {
46 39
   global $lang;
47 40
   return is_object($lang) ? $lang->lng_load_i18n($i18n) : lng_die_not_an_object();
48 41
 }
Please login to merge, or discard this patch.
classes/Pages/PageQuest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
       QUEST_STATUS_COMPLETE => '',
32 32
     );
33 33
 
34
-    if(!isset($statuses[$this->filterQuestStatus])) {
34
+    if (!isset($statuses[$this->filterQuestStatus])) {
35 35
       $this->filterQuestStatus = QUEST_STATUS_ALL;
36 36
     }
37 37
   }
Please login to merge, or discard this patch.
classes/TextModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
       }
102 102
     }
103 103
 
104
-    if(!isset($next)) {
104
+    if (!isset($next)) {
105 105
       $next = new TextEntity();
106 106
     }
107 107
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
       $prev = $this->getById($currentText->prev);
120 120
     }
121 121
 
122
-    if(!isset($prev)) {
122
+    if (!isset($prev)) {
123 123
       $prev = new TextEntity();
124 124
     }
125 125
 
Please login to merge, or discard this patch.
classes/DBAL/DbQuery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
    * @return string
339 339
    */
340 340
   protected function stringValue($value) {
341
-    return "'" . $this->escape((string)$value) . "'";
341
+    return "'" . $this->escape((string) $value) . "'";
342 342
   }
343 343
 
344 344
   /**
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
    * @return string
350 350
    */
351 351
   public function quote($fieldName) {
352
-    return "`" . $this->escape((string)$fieldName) . "`";
352
+    return "`" . $this->escape((string) $fieldName) . "`";
353 353
   }
354 354
 
355 355
   /**
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
    * @return string
397 397
    */
398 398
   protected function quoteTable($tableName) {
399
-    return "`{{" . $this->escape((string)$tableName) . "}}`";
399
+    return "`{{" . $this->escape((string) $tableName) . "}}`";
400 400
   }
401 401
 
402 402
   /**
Please login to merge, or discard this patch.
classes/TextEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
    */
44 44
   public function toArray() {
45 45
     $tutorial = array();
46
-    foreach($this->keys() as $key) {
46
+    foreach ($this->keys() as $key) {
47 47
       $tutorial[$key] = $this->$key;
48 48
     }
49 49
 
Please login to merge, or discard this patch.
admin/adm_quest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-define('INSIDE'  , true);
11
-define('INSTALL' , false);
12
-define('IN_ADMIN'  , true);
10
+define('INSIDE', true);
11
+define('INSTALL', false);
12
+define('IN_ADMIN', true);
13 13
 
14 14
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
15 15
 
Please login to merge, or discard this patch.
_error-404.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 // header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
6 6
 // @header("{$serverProtocol} 200 OK");
7
-echo "File {$redirectFrom} not found on server. Contact administration if you think that this is error";
7
+echo "file {$redirectFrom} not found on server. Contact administration if you think that this is error";
8 8
 die();
9 9
 ?> */
Please login to merge, or discard this patch.
classes/Core/Repository.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
    */
30 30
   protected $_repository;
31 31
 
32
- /**
32
+  /**
33 33
    * @var ContainerPlus $_oldRepo
34 34
    */
35 35
   protected $_oldRepo;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
   public function get($entityClass, $id) {
88 88
     $entityIndex = get_class($entityClass) . '\\' . $id;
89
-    if(!isset($this->_repository[$entityIndex])) {
89
+    if (!isset($this->_repository[$entityIndex])) {
90 90
 
91 91
     }
92 92
 
Please login to merge, or discard this patch.