Passed
Push — trunk ( 72cafa...79712a )
by SuperNova.WS
03:36
created
login.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 include('includes/init.' . substr(strrchr(__FILE__, '.'), 1));
17 17
 // die();
18
-if($template_result[F_USER_IS_AUTHORIZED]) {
18
+if ($template_result[F_USER_IS_AUTHORIZED]) {
19 19
   sys_redirect('index' . DOT_PHP_EX);
20 20
 }
21 21
 lng_include('login');
Please login to merge, or discard this patch.
market.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 $newstock = $stock;
27 27
 $intError = MARKET_DEAL;
28 28
 
29
-switch($mode)
29
+switch ($mode)
30 30
 {
31 31
   case MARKET_RESOURCES: // Resource trader
32 32
     require('includes/includes/market_trader.inc');
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
 }
83 83
 
84 84
 $message_id = sys_get_param_int('message');
85
-if($message_id != MARKET_NOTHING)
85
+if ($message_id != MARKET_NOTHING)
86 86
 {
87 87
   $template->assign_block_vars('result', array('MESSAGE' => $lang['eco_mrk_errors'][$message_id]));
88 88
 }
89 89
 
90
-if($message)
90
+if ($message)
91 91
 {
92 92
   $template->assign_block_vars('result', array('MESSAGE' => $message));
93 93
 }
Please login to merge, or discard this patch.
classes/auth_abstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
    */
36 36
   // OK 4.9
37 37
   public function __construct($filename = __FILE__) {
38
-    if($this->provider_id == ACCOUNT_PROVIDER_NONE) {
38
+    if ($this->provider_id == ACCOUNT_PROVIDER_NONE) {
39 39
       die('У всех провайдеров должен быть $provider_id!');
40 40
     }
41 41
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
   // OK 4.6
134 134
   public function player_name_suggest() {
135 135
     $name = '';
136
-    if(is_object($this->account) && !empty($this->account->account_email)) {
136
+    if (is_object($this->account) && !empty($this->account->account_email)) {
137 137
       list($name) = explode('@', $this->account->account_email);
138 138
     }
139 139
 
Please login to merge, or discard this patch.
classes/Confirmation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
       // $query = static::$db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' AND `type` = {$confirmation_type_safe} FOR UPDATE", true);
42 42
       // Тип не нужен для проверки - код подтверждения должен быть уникален от слова "совсем"
43 43
       $query = $this->db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' FOR UPDATE", true);
44
-    } while($query);
44
+    } while ($query);
45 45
 
46 46
     $this->db->doquery(
47 47
       "REPLACE INTO {{confirmations}}
Please login to merge, or discard this patch.
classes/Pimple/Container.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
 
240 240
         $factory = $this->values[$id];
241 241
 
242
-        $extended = function ($c) use ($callable, $factory) {
242
+        $extended = function($c) use ($callable, $factory) {
243 243
             return $callable($factory($c), $c);
244 244
         };
245 245
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
  *
32 32
  * @author  Fabien Potencier
33 33
  */
34
-class Container implements \ArrayAccess
35
-{
34
+class Container implements \ArrayAccess {
36 35
     private $values = array();
37 36
     private $factories;
38 37
     private $protected;
@@ -47,8 +46,7 @@  discard block
 block discarded – undo
47 46
      *
48 47
      * @param array $values The parameters or objects.
49 48
      */
50
-    public function __construct(array $values = array())
51
-    {
49
+    public function __construct(array $values = array()) {
52 50
         $this->factories = new \SplObjectStorage();
53 51
         $this->protected = new \SplObjectStorage();
54 52
 
@@ -71,8 +69,7 @@  discard block
 block discarded – undo
71 69
      *
72 70
      * @throws \RuntimeException Prevent override of a frozen service
73 71
      */
74
-    public function offsetSet($id, $value)
75
-    {
72
+    public function offsetSet($id, $value) {
76 73
         if (isset($this->frozen[$id])) {
77 74
             throw new \RuntimeException(sprintf('Cannot override frozen service "%s".', $id));
78 75
         }
@@ -90,8 +87,7 @@  discard block
 block discarded – undo
90 87
      *
91 88
      * @throws \InvalidArgumentException if the identifier is not defined
92 89
      */
93
-    public function offsetGet($id)
94
-    {
90
+    public function offsetGet($id) {
95 91
         if (!isset($this->keys[$id])) {
96 92
             throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
97 93
         }
@@ -125,8 +121,7 @@  discard block
 block discarded – undo
125 121
      *
126 122
      * @return bool
127 123
      */
128
-    public function offsetExists($id)
129
-    {
124
+    public function offsetExists($id) {
130 125
         return isset($this->keys[$id]);
131 126
     }
132 127
 
@@ -135,8 +130,7 @@  discard block
 block discarded – undo
135 130
      *
136 131
      * @param string $id The unique identifier for the parameter or object
137 132
      */
138
-    public function offsetUnset($id)
139
-    {
133
+    public function offsetUnset($id) {
140 134
         if (isset($this->keys[$id])) {
141 135
             if (is_object($this->values[$id])) {
142 136
                 unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]);
@@ -155,8 +149,7 @@  discard block
 block discarded – undo
155 149
      *
156 150
      * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object
157 151
      */
158
-    public function factory($callable)
159
-    {
152
+    public function factory($callable) {
160 153
         if (!method_exists($callable, '__invoke')) {
161 154
             throw new \InvalidArgumentException('Service definition is not a Closure or invokable object.');
162 155
         }
@@ -177,8 +170,7 @@  discard block
 block discarded – undo
177 170
      *
178 171
      * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object
179 172
      */
180
-    public function protect($callable)
181
-    {
173
+    public function protect($callable) {
182 174
         if (!method_exists($callable, '__invoke')) {
183 175
             throw new \InvalidArgumentException('Callable is not a Closure or invokable object.');
184 176
         }
@@ -197,8 +189,7 @@  discard block
 block discarded – undo
197 189
      *
198 190
      * @throws \InvalidArgumentException if the identifier is not defined
199 191
      */
200
-    public function raw($id)
201
-    {
192
+    public function raw($id) {
202 193
         if (!isset($this->keys[$id])) {
203 194
             throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
204 195
         }
@@ -223,8 +214,7 @@  discard block
 block discarded – undo
223 214
      *
224 215
      * @throws \InvalidArgumentException if the identifier is not defined or not a service definition
225 216
      */
226
-    public function extend($id, $callable)
227
-    {
217
+    public function extend($id, $callable) {
228 218
         if (!isset($this->keys[$id])) {
229 219
             throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
230 220
         }
@@ -256,8 +246,7 @@  discard block
 block discarded – undo
256 246
      *
257 247
      * @return array An array of value names
258 248
      */
259
-    public function keys()
260
-    {
249
+    public function keys() {
261 250
         return array_keys($this->values);
262 251
     }
263 252
 
@@ -269,8 +258,7 @@  discard block
 block discarded – undo
269 258
      *
270 259
      * @return static
271 260
      */
272
-    public function register(ServiceProviderInterface $provider, array $values = array())
273
-    {
261
+    public function register(ServiceProviderInterface $provider, array $values = array()) {
274 262
         $provider->register($this);
275 263
 
276 264
         foreach ($values as $key => $value) {
Please login to merge, or discard this patch.
classes/PlayerToAccountTranslate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
   protected static $is_init = false;
20 20
 
21 21
   protected static function init() {
22
-    if(!empty(static::$db)) {
22
+    if (!empty(static::$db)) {
23 23
       return;
24 24
     }
25 25
     static::$db = classSupernova::$db;
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
     $provider_id_safe = intval($provider_id_unsafe);
67 67
     !is_array($account_list) ? $account_list = array($account_list) : false;
68 68
 
69
-    foreach($account_list as $provider_account_id_unsafe) {
69
+    foreach ($account_list as $provider_account_id_unsafe) {
70 70
       $provider_account_id_safe = intval($provider_account_id_unsafe);
71 71
 
72 72
       // TODO - Здесь могут отсутствовать аккаунты - проверять провайдером
73 73
       $query = static::$db->doquery("SELECT `user_id` FROM {{account_translate}} WHERE `provider_id` = {$provider_id_safe} AND `provider_account_id` = {$provider_account_id_safe} FOR UPDATE");
74
-      while($row = static::$db->db_fetch($query)) {
74
+      while ($row = static::$db->db_fetch($query)) {
75 75
         $account_translation[$row['user_id']][$provider_id_unsafe][$provider_account_id_unsafe] = true;
76 76
       }
77 77
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
       "SELECT * FROM {{account_translate}} WHERE `user_id` = {$user_id_safe} " .
92 92
       ($provider_id_unsafe ? "AND `provider_id` = {$provider_id_safe} " : '') .
93 93
       "ORDER BY `timestamp` FOR UPDATE");
94
-    while($row = static::$db->db_fetch($query)) {
94
+    while ($row = static::$db->db_fetch($query)) {
95 95
       $account_translation[$row['user_id']][$row['provider_id']][$row['provider_account_id']] = $row;
96 96
     }
97 97
 
Please login to merge, or discard this patch.
classes/template.php 4 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
       // Search array to get correct position
587 587
       list($search_key, $search_value) = @each($key);
588 588
 
589
-      $key = NULL;
589
+      $key = null;
590 590
       foreach ($this->_tpldata[$blockname] as $i => $val_ary)
591 591
       {
592 592
         if ($val_ary[$search_key] === $search_value)
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
       }
598 598
 
599 599
       // key/value pair not found
600
-      if ($key === NULL)
600
+      if ($key === null)
601 601
       {
602 602
         return false;
603 603
       }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
   {
87 87
     global $user;
88 88
 
89
-    if (file_exists($this->rootPhysical. 'styles/' . $user->theme['template_path'] . '/template'))
89
+    if (file_exists($this->rootPhysical . 'styles/' . $user->theme['template_path'] . '/template'))
90 90
     {
91 91
       $this->root = $this->rootPhysical . 'styles/' . $user->theme['template_path'] . '/template';
92 92
       $this->cachepath = $this->rootPhysical . 'cache/tpl_' . str_replace('_', '-', $user->theme['template_path']) . '_';
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
       // Re-position template blocks
646 646
       for ($i = sizeof($this->_tpldata[$blockname]); $i > $key; $i--)
647 647
       {
648
-        $this->_tpldata[$blockname][$i] = $this->_tpldata[$blockname][$i-1];
648
+        $this->_tpldata[$blockname][$i] = $this->_tpldata[$blockname][$i - 1];
649 649
         $this->_tpldata[$blockname][$i]['S_ROW_COUNT'] = $i;
650 650
       }
651 651
 
@@ -725,13 +725,13 @@  discard block
 block discarded – undo
725 725
   */
726 726
   function assign_recursive($values, $name = '')
727 727
   {
728
-    if(isset($values['.']))
728
+    if (isset($values['.']))
729 729
     {
730 730
       $values_extra = $values['.'];
731 731
       unset($values['.']);
732 732
     }
733 733
 
734
-    if(!$name)
734
+    if (!$name)
735 735
     {
736 736
       $this->assign_vars($values);
737 737
     }
@@ -740,12 +740,12 @@  discard block
 block discarded – undo
740 740
       $this->assign_block_vars($name, $values);
741 741
     }
742 742
 
743
-    if(isset($values_extra))
743
+    if (isset($values_extra))
744 744
     {
745
-      foreach($values_extra as $sub_array_name => $sub_array)
745
+      foreach ($values_extra as $sub_array_name => $sub_array)
746 746
       {
747 747
         $new_name = $name . ($name ? '.' : '') . $sub_array_name;
748
-        foreach($sub_array as $sub_element)
748
+        foreach ($sub_array as $sub_element)
749 749
         {
750 750
           $this->assign_recursive($sub_element, $new_name);
751 751
         }
Please login to merge, or discard this patch.
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 class template
26 26
 {
27 27
   /** variable that holds all the data we'll be substituting into
28
-  * the compiled templates. Takes form:
29
-  * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value
30
-  * if it's a root-level variable, it'll be like this:
31
-  * --> $this->_tpldata[.][0][varname] == value
32
-  */
28
+   * the compiled templates. Takes form:
29
+   * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value
30
+   * if it's a root-level variable, it'll be like this:
31
+   * --> $this->_tpldata[.][0][varname] == value
32
+   */
33 33
   var $_tpldata = array('.' => array(0 => array()));
34 34
   var $_rootref;
35 35
 //  var $_block_counter = array();
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
   }
80 80
 
81 81
   /**
82
-  * Set template location
83
-  * @access public
84
-  */
82
+   * Set template location
83
+   * @access public
84
+   */
85 85
   function set_template()
86 86
   {
87 87
     global $user;
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
   }
121 121
 
122 122
   /**
123
-  * Set custom template location (able to use directory outside of phpBB)
124
-  * @access public
125
-  */
123
+   * Set custom template location (able to use directory outside of phpBB)
124
+   * @access public
125
+   */
126 126
   function set_custom_template($template_path, $template_name, $fallback_template_path = false)
127 127
   {
128 128
     global $user;
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
   }
162 162
 
163 163
   /**
164
-  * Sets the template filenames for handles. $filename_array
165
-  * should be a hash of handle => filename pairs.
166
-  * @access public
167
-  */
164
+   * Sets the template filenames for handles. $filename_array
165
+   * should be a hash of handle => filename pairs.
166
+   * @access public
167
+   */
168 168
   function set_filenames($filename_array)
169 169
   {
170 170
     if (!is_array($filename_array))
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
   }
192 192
 
193 193
   /**
194
-  * Destroy template data set
195
-  * @access public
196
-  */
194
+   * Destroy template data set
195
+   * @access public
196
+   */
197 197
   function destroy()
198 198
   {
199 199
     $this->_tpldata = array('.' => array(0 => array()));
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
   }
202 202
 
203 203
   /**
204
-  * Reset/empty complete block
205
-  * @access public
206
-  */
204
+   * Reset/empty complete block
205
+   * @access public
206
+   */
207 207
   function destroy_block_vars($blockname)
208 208
   {
209 209
     if (strpos($blockname, '.') !== false)
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
   }
232 232
 
233 233
   /**
234
-  * Display handle
235
-  * @access public
236
-  */
234
+   * Display handle
235
+   * @access public
236
+   */
237 237
   function display($handle, $include_once = true)
238 238
   {
239 239
     /**
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
   }
276 276
 
277 277
   /**
278
-  * Display the handle and assign the output to a template variable or return the compiled result.
279
-  * @access public
280
-  */
278
+   * Display the handle and assign the output to a template variable or return the compiled result.
279
+   * @access public
280
+   */
281 281
   function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
282 282
   {
283 283
     ob_start();
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
   }
296 296
 
297 297
   /**
298
-  * Load a compiled template if possible, if not, recompile it
299
-  * @access private
300
-  */
298
+   * Load a compiled template if possible, if not, recompile it
299
+   * @access private
300
+   */
301 301
   function _tpl_load(&$handle)
302 302
   {
303 303
     global $user, $config;
@@ -475,9 +475,9 @@  discard block
 block discarded – undo
475 475
   }
476 476
 
477 477
   /**
478
-  * Assign key variable pairs from an array
479
-  * @access public
480
-  */
478
+   * Assign key variable pairs from an array
479
+   * @access public
480
+   */
481 481
   function assign_vars($vararray)
482 482
   {
483 483
     foreach ($vararray as $key => $val)
@@ -489,9 +489,9 @@  discard block
 block discarded – undo
489 489
   }
490 490
 
491 491
   /**
492
-  * Assign a single variable to a single key
493
-  * @access public
494
-  */
492
+   * Assign a single variable to a single key
493
+   * @access public
494
+   */
495 495
   function assign_var($varname, $varval)
496 496
   {
497 497
     $this->_rootref[$varname] = $varval;
@@ -500,9 +500,9 @@  discard block
 block discarded – undo
500 500
   }
501 501
 
502 502
   /**
503
-  * Assign key variable pairs from an array to a specified block
504
-  * @access public
505
-  */
503
+   * Assign key variable pairs from an array to a specified block
504
+   * @access public
505
+   */
506 506
   function assign_block_vars($blockname, $vararray)
507 507
   {
508 508
     if (strpos($blockname, '.') !== false)
@@ -567,33 +567,33 @@  discard block
 block discarded – undo
567 567
   }
568 568
 
569 569
   /**
570
-  * Change already assigned key variable pair (one-dimensional - single loop entry)
571
-  *
572
-  * An example of how to use this function:
573
-  * {@example alter_block_array.php}
574
-  *
575
-  * @param  string  $blockname  the blockname, for example 'loop'
576
-  * @param  array $vararray the var array to insert/add or merge
577
-  * @param  mixed $key    Key to search for
578
-  *
579
-  * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
580
-  *
581
-  * int: Position [the position to change or insert at directly given]
582
-  *
583
-  * If key is false the position is set to 0
584
-  * If key is true the position is set to the last entry
585
-  *
586
-  * @param  string  $mode   Mode to execute (valid modes are 'insert' and 'change')
587
-  *
588
-  * If insert, the vararray is inserted at the given position (position counting from zero).
589
-  * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
590
-  *
591
-  * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
592
-  * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
593
-  *
594
-  * @return bool false on error, true on success
595
-  * @access public
596
-  */
570
+   * Change already assigned key variable pair (one-dimensional - single loop entry)
571
+   *
572
+   * An example of how to use this function:
573
+   * {@example alter_block_array.php}
574
+   *
575
+   * @param  string  $blockname  the blockname, for example 'loop'
576
+   * @param  array $vararray the var array to insert/add or merge
577
+   * @param  mixed $key    Key to search for
578
+   *
579
+   * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
580
+   *
581
+   * int: Position [the position to change or insert at directly given]
582
+   *
583
+   * If key is false the position is set to 0
584
+   * If key is true the position is set to the last entry
585
+   *
586
+   * @param  string  $mode   Mode to execute (valid modes are 'insert' and 'change')
587
+   *
588
+   * If insert, the vararray is inserted at the given position (position counting from zero).
589
+   * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
590
+   *
591
+   * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
592
+   * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
593
+   *
594
+   * @return bool false on error, true on success
595
+   * @access public
596
+   */
597 597
   function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
598 598
   {
599 599
     if (strpos($blockname, '.') !== false)
@@ -677,9 +677,9 @@  discard block
 block discarded – undo
677 677
   }
678 678
 
679 679
   /**
680
-  * Include a separate template
681
-  * @access private
682
-  */
680
+   * Include a separate template
681
+   * @access private
682
+   */
683 683
   function _tpl_include($filename, $include = true)
684 684
   {
685 685
     // This is used to access global vars
@@ -709,9 +709,9 @@  discard block
 block discarded – undo
709 709
   }
710 710
 
711 711
   /**
712
-  * Include a php-file
713
-  * @access private
714
-  */
712
+   * Include a php-file
713
+   * @access private
714
+   */
715 715
   function _php_include($filename)
716 716
   {
717 717
     $file = $this->rootPhysical . $filename;
@@ -726,9 +726,9 @@  discard block
 block discarded – undo
726 726
   }
727 727
 
728 728
   /**
729
-  * Assign key variable pairs from an array with block support
730
-  * @access public
731
-  */
729
+   * Assign key variable pairs from an array with block support
730
+   * @access public
731
+   */
732 732
   function assign_recursive($values, $name = '')
733 733
   {
734 734
     if(isset($values['.']))
Please login to merge, or discard this patch.
Braces   +29 added lines, -58 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
 * Base Template class.
23 23
 * @package phpBB3
24 24
 */
25
-class template
26
-{
25
+class template {
27 26
   /** variable that holds all the data we'll be substituting into
28 27
   * the compiled templates. Takes form:
29 28
   * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value
@@ -82,8 +81,7 @@  discard block
 block discarded – undo
82 81
   * Set template location
83 82
   * @access public
84 83
   */
85
-  function set_template()
86
-  {
84
+  function set_template() {
87 85
     global $user;
88 86
 
89 87
     if (file_exists($this->rootPhysical. 'styles/' . $user->theme['template_path'] . '/template'))
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
       {
109 107
         $this->inherit_root = $this->rootPhysical . 'styles/' . $user->theme['template_inherit_path'] . '/template';
110 108
       }
111
-    }
112
-    else
109
+    } else
113 110
     {
114 111
       trigger_error('Template path could not be found: styles/' . $user->theme['template_path'] . '/template', E_USER_ERROR);
115 112
     }
@@ -123,8 +120,7 @@  discard block
 block discarded – undo
123 120
   * Set custom template location (able to use directory outside of phpBB)
124 121
   * @access public
125 122
   */
126
-  function set_custom_template($template_path, $template_name, $fallback_template_path = false)
127
-  {
123
+  function set_custom_template($template_path, $template_name, $fallback_template_path = false) {
128 124
     global $user;
129 125
 
130 126
     // Make sure $template_path has no ending slash
@@ -145,8 +141,7 @@  discard block
 block discarded – undo
145 141
 
146 142
       $this->inherit_root = $fallback_template_path;
147 143
       $this->orig_tpl_inherits_id = true;
148
-    }
149
-    else
144
+    } else
150 145
     {
151 146
       $this->orig_tpl_inherits_id = false;
152 147
     }
@@ -165,8 +160,7 @@  discard block
 block discarded – undo
165 160
   * should be a hash of handle => filename pairs.
166 161
   * @access public
167 162
   */
168
-  function set_filenames($filename_array)
169
-  {
163
+  function set_filenames($filename_array) {
170 164
     if (!is_array($filename_array))
171 165
     {
172 166
       return false;
@@ -194,8 +188,7 @@  discard block
 block discarded – undo
194 188
   * Destroy template data set
195 189
   * @access public
196 190
   */
197
-  function destroy()
198
-  {
191
+  function destroy() {
199 192
     $this->_tpldata = array('.' => array(0 => array()));
200 193
     $this->_rootref = &$this->_tpldata['.'][0];
201 194
   }
@@ -204,8 +197,7 @@  discard block
 block discarded – undo
204 197
   * Reset/empty complete block
205 198
   * @access public
206 199
   */
207
-  function destroy_block_vars($blockname)
208
-  {
200
+  function destroy_block_vars($blockname) {
209 201
     if (strpos($blockname, '.') !== false)
210 202
     {
211 203
       // Nested block.
@@ -220,8 +212,7 @@  discard block
 block discarded – undo
220 212
       }
221 213
 
222 214
       unset($str[$blocks[$blockcount]]);
223
-    }
224
-    else
215
+    } else
225 216
     {
226 217
       // Top-level block.
227 218
       unset($this->_tpldata[$blockname]);
@@ -234,8 +225,7 @@  discard block
 block discarded – undo
234 225
   * Display handle
235 226
   * @access public
236 227
   */
237
-  function display($handle, $include_once = true)
238
-  {
228
+  function display($handle, $include_once = true) {
239 229
     /**
240 230
      * @var phpbb_hook $phpbb_hook
241 231
      */
@@ -264,8 +254,7 @@  discard block
 block discarded – undo
264 254
     if ($filename = $this->_tpl_load($handle))
265 255
     {
266 256
       ($include_once) ? include_once($filename) : include($filename);
267
-    }
268
-    else
257
+    } else
269 258
     {
270 259
       $this->evaluate($this->compiled_code[$handle]);
271 260
     }
@@ -277,8 +266,7 @@  discard block
 block discarded – undo
277 266
   * Display the handle and assign the output to a template variable or return the compiled result.
278 267
   * @access public
279 268
   */
280
-  function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
281
-  {
269
+  function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) {
282 270
     ob_start();
283 271
     $this->display($handle, $include_once);
284 272
     $contents = ob_get_clean();
@@ -297,8 +285,7 @@  discard block
 block discarded – undo
297 285
   * Load a compiled template if possible, if not, recompile it
298 286
   * @access private
299 287
   */
300
-  function _tpl_load(&$handle)
301
-  {
288
+  function _tpl_load(&$handle) {
302 289
     global $user, $config;
303 290
 
304 291
     if (!isset($this->filename[$handle]))
@@ -319,8 +306,7 @@  discard block
 block discarded – undo
319 306
     if (!file_exists($filename) || @filesize($filename) === 0)
320 307
     {
321 308
       $recompile = true;
322
-    }
323
-    else if ($config->load_tplcompile)
309
+    } else if ($config->load_tplcompile)
324 310
     {
325 311
       // No way around it: we need to check inheritance here
326 312
       if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
@@ -403,15 +389,13 @@  discard block
 block discarded – undo
403 389
               $this->files[$row['template_filename']] = $file;
404 390
               $this->files_inherit[$row['template_filename']] = $file;
405 391
               $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
406
-            }
407
-            else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
392
+            } else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
408 393
             {
409 394
               // Ok, we have a situation. There is a file in the subtemplate, but nothing in the DB. We have to fix that.
410 395
               $force_reload = true;
411 396
               $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
412 397
             }
413
-          }
414
-          else
398
+          } else
415 399
           {
416 400
             $this->files_template[$row['template_filename']] = $user->theme['template_id'];
417 401
           }
@@ -421,8 +405,7 @@  discard block
 block discarded – undo
421 405
             if ($row['template_filename'] == $this->filename[$handle])
422 406
             {
423 407
               $compile->_tpl_load_file($handle, true);
424
-            }
425
-            else
408
+            } else
426 409
             {
427 410
               $this->files[$row['template_filename']] = $file;
428 411
               $this->filename[$row['template_filename']] = $row['template_filename'];
@@ -437,8 +420,7 @@  discard block
 block discarded – undo
437 420
           {
438 421
             $this->compiled_code[$handle] = $compile->compile(trim($row['template_data']));
439 422
             $compile->compile_write($handle, $this->compiled_code[$handle]);
440
-          }
441
-          else
423
+          } else
442 424
           {
443 425
             // Only bother compiling if it doesn't already exist
444 426
             if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . DOT_PHP_EX))
@@ -449,8 +431,7 @@  discard block
 block discarded – undo
449 431
             }
450 432
           }
451 433
         }
452
-      }
453
-      else
434
+      } else
454 435
       {
455 436
         $file = $this->root . '/' . $row['template_filename'];
456 437
 
@@ -477,8 +458,7 @@  discard block
 block discarded – undo
477 458
   * Assign key variable pairs from an array
478 459
   * @access public
479 460
   */
480
-  function assign_vars($vararray)
481
-  {
461
+  function assign_vars($vararray) {
482 462
     foreach ($vararray as $key => $val)
483 463
     {
484 464
       $this->_rootref[$key] = $val;
@@ -491,8 +471,7 @@  discard block
 block discarded – undo
491 471
   * Assign a single variable to a single key
492 472
   * @access public
493 473
   */
494
-  function assign_var($varname, $varval)
495
-  {
474
+  function assign_var($varname, $varval) {
496 475
     $this->_rootref[$varname] = $varval;
497 476
 
498 477
     return true;
@@ -502,8 +481,7 @@  discard block
 block discarded – undo
502 481
   * Assign key variable pairs from an array to a specified block
503 482
   * @access public
504 483
   */
505
-  function assign_block_vars($blockname, $vararray)
506
-  {
484
+  function assign_block_vars($blockname, $vararray) {
507 485
     if (strpos($blockname, '.') !== false)
508 486
     {
509 487
       // Nested block.
@@ -538,8 +516,7 @@  discard block
 block discarded – undo
538 516
       // We're adding a new iteration to this block with the given
539 517
       // variable assignments.
540 518
       $str[$blocks[$blockcount]][] = $vararray;
541
-    }
542
-    else
519
+    } else
543 520
     {
544 521
       // Top-level block.
545 522
       $s_row_count = (isset($this->_tpldata[$blockname])) ? sizeof($this->_tpldata[$blockname]) : 0;
@@ -593,8 +570,7 @@  discard block
 block discarded – undo
593 570
   * @return bool false on error, true on success
594 571
   * @access public
595 572
   */
596
-  function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
597
-  {
573
+  function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') {
598 574
     if (strpos($blockname, '.') !== false)
599 575
     {
600 576
       // Nested blocks are not supported
@@ -639,8 +615,7 @@  discard block
 block discarded – undo
639 615
         $key = sizeof($this->_tpldata[$blockname]);
640 616
         unset($this->_tpldata[$blockname][($key - 1)]['S_LAST_ROW']);
641 617
         $vararray['S_LAST_ROW'] = true;
642
-      }
643
-      else if ($key === 0)
618
+      } else if ($key === 0)
644 619
       {
645 620
         unset($this->_tpldata[$blockname][0]['S_FIRST_ROW']);
646 621
         $vararray['S_FIRST_ROW'] = true;
@@ -679,8 +654,7 @@  discard block
 block discarded – undo
679 654
   * Include a separate template
680 655
   * @access private
681 656
   */
682
-  function _tpl_include($filename, $include = true)
683
-  {
657
+  function _tpl_include($filename, $include = true) {
684 658
     // This is used to access global vars
685 659
     global $lang, $config, $user;
686 660
 
@@ -710,8 +684,7 @@  discard block
 block discarded – undo
710 684
   * Include a php-file
711 685
   * @access private
712 686
   */
713
-  function _php_include($filename)
714
-  {
687
+  function _php_include($filename) {
715 688
     $file = $this->rootPhysical . $filename;
716 689
 
717 690
     if (!file_exists($file))
@@ -727,8 +700,7 @@  discard block
 block discarded – undo
727 700
   * Assign key variable pairs from an array with block support
728 701
   * @access public
729 702
   */
730
-  function assign_recursive($values, $name = '')
731
-  {
703
+  function assign_recursive($values, $name = '') {
732 704
     if(isset($values['.']))
733 705
     {
734 706
       $values_extra = $values['.'];
@@ -738,8 +710,7 @@  discard block
 block discarded – undo
738 710
     if(!$name)
739 711
     {
740 712
       $this->assign_vars($values);
741
-    }
742
-    else
713
+    } else
743 714
     {
744 715
       $this->assign_block_vars($name, $values);
745 716
     }
Please login to merge, or discard this patch.
classes/Pimple/ServiceProviderInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
  * @author  Fabien Potencier
33 33
  * @author  Dominik Zogg
34 34
  */
35
-interface ServiceProviderInterface
36
-{
35
+interface ServiceProviderInterface {
37 36
     /**
38 37
      * Registers services on the given container.
39 38
      *
Please login to merge, or discard this patch.
language/en/menu.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = (array(
Please login to merge, or discard this patch.