Passed
Push — master ( 499080...e35dd9 )
by Ioannes
07:31
created
src/BxKint.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
     public static function init() {
13 13
 
14
-        if(class_exists('Kint\Kint')) {
14
+        if (class_exists('Kint\Kint')) {
15 15
             EventManager::getInstance()->addEventHandler('main', 'OnBeforeProlog', ['\App\BxKint', 'addButton']);
16 16
             EventManager::getInstance()->addEventHandler('main', 'OnEpilog', ['\App\BxKint', 'showInfo']);
17 17
         }
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
         global $BX_KINT_INFO;
23 23
         \Kint::$display_called_from = false;
24
-        if(self::checkAccess() && $_SESSION[self::SESSION_KEY]) {
24
+        if (self::checkAccess() && $_SESSION[self::SESSION_KEY]) {
25 25
             d($BX_KINT_INFO);
26 26
         }
27 27
     }
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 
31 31
         global $BX_KINT_INFO;
32 32
 
33
-        if(is_array($var)) {
34
-            if(!is_array($BX_KINT_INFO)) {
33
+        if (is_array($var)) {
34
+            if (!is_array($BX_KINT_INFO)) {
35 35
                 $BX_KINT_INFO = [];
36 36
             }
37 37
             $BX_KINT_INFO = array_merge($BX_KINT_INFO, $var);
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
         /** @global Application */
46 46
         global $APPLICATION;
47 47
 
48
-        if(self::checkAccess()) {
48
+        if (self::checkAccess()) {
49 49
 
50 50
             self::checkIcons();
51 51
 
52 52
             $query = $_GET[self::GET_PARAM];
53
-            if($query == 'Y') {
53
+            if ($query == 'Y') {
54 54
                 $_SESSION[self::SESSION_KEY] = true;
55
-            } else if($query == 'N') {
55
+            } else if ($query == 'N') {
56 56
                 $_SESSION[self::SESSION_KEY] = false;
57 57
             }
58 58
             $enabled = (bool) $_SESSION[self::SESSION_KEY];
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
         /** @global \CUser */
79 79
         global $USER;
80 80
 
81
-        if(is_object($USER)) {
82
-            if($USER->IsAdmin())  return true;
83
-            if(class_exists('CTopPanel')) {
81
+        if (is_object($USER)) {
82
+            if ($USER->IsAdmin())  return true;
83
+            if (class_exists('CTopPanel')) {
84 84
                 return \CTopPanel::shouldShowPanel();
85 85
             }
86 86
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     protected static function checkIcons() {
91 91
 
92
-        if(!file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/themes/.default/icons/bxkint/debug_enable.png')) {
92
+        if (!file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/themes/.default/icons/bxkint/debug_enable.png')) {
93 93
             mkdir($_SERVER['DOCUMENT_ROOT'] . '/bitrix/themes/.default/icons/bxkint', BX_DIR_PERMISSIONS);
94 94
 
95 95
             copy(__DIR__ . '/../resources/icons/debug_enable.png',
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,9 @@
 block discarded – undo
79 79
         global $USER;
80 80
 
81 81
         if(is_object($USER)) {
82
-            if($USER->IsAdmin())  return true;
82
+            if($USER->IsAdmin()) {
83
+                return true;
84
+            }
83 85
             if(class_exists('CTopPanel')) {
84 86
                 return \CTopPanel::shouldShowPanel();
85 87
             }
Please login to merge, or discard this patch.