Passed
Push — master ( ba134b...c8a625 )
by Ioannes
01:32
created
src/EnvHelper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
     public static function loadEnv() {
11 11
 
12 12
         $envFile = realpath(__DIR__ . '/../../../../.env');
13
-        if(!is_file($envFile)) {
13
+        if (!is_file($envFile)) {
14 14
             $envFile = realpath(__DIR__ . '/../../../../../.env');
15 15
         }
16
-        if(is_file($envFile)) {
16
+        if (is_file($envFile)) {
17 17
             try {
18 18
                 $env = new \Symfony\Component\Dotenv\Dotenv();
19 19
                 $env->load($envFile);
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
 
31 31
         $_SERVER['DOCUMENT_ROOT'] = realpath(__DIR__ . '/../../../../');
32 32
 
33
-        if(isset($_ENV['APP_DOCUMENT_ROOT']) && is_dir($_ENV['APP_DOCUMENT_ROOT'])) {
33
+        if (isset($_ENV['APP_DOCUMENT_ROOT']) && is_dir($_ENV['APP_DOCUMENT_ROOT'])) {
34 34
             $_SERVER['DOCUMENT_ROOT'] = $_ENV['APP_DOCUMENT_ROOT'];
35 35
             return $_SERVER['DOCUMENT_ROOT'];
36 36
         }
37 37
 
38 38
         $composerFile = realpath(__DIR__ . '/../../../../composer.json');
39
-        if(is_file($composerFile)) {
39
+        if (is_file($composerFile)) {
40 40
             $composerConfig = json_decode(file_get_contents($composerFile), true);
41
-            if(isset($composerConfig['extra']['document-root']) && is_dir($composerConfig['extra']['document-root'])) {
41
+            if (isset($composerConfig['extra']['document-root']) && is_dir($composerConfig['extra']['document-root'])) {
42 42
                 $_SERVER['DOCUMENT_ROOT'] = $composerConfig['extra']['document-root'];
43 43
                 return $_SERVER['DOCUMENT_ROOT'];
44 44
             }
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public static function getLogger($channel) {
55 55
 
56
-        if(isset($_ENV['APP_LOG_CLASS']) && class_exists($_ENV['APP_LOG_CLASS'])) {
56
+        if (isset($_ENV['APP_LOG_CLASS']) && class_exists($_ENV['APP_LOG_CLASS'])) {
57 57
             $logClass = $_ENV['APP_LOG_CLASS'];
58 58
             $log = new $logClass($channel);
59
-            if($log instanceof LoggerInterface) {
59
+            if ($log instanceof LoggerInterface) {
60 60
                 return $log;
61 61
             }
62 62
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public static function getCrontabFile() {
71 71
 
72
-        if(isset($_ENV['BX_CRONTAB_FOLDER']) && $_ENV['BX_CRONTAB_FOLDER']) {
72
+        if (isset($_ENV['BX_CRONTAB_FOLDER']) && $_ENV['BX_CRONTAB_FOLDER']) {
73 73
             return rtrim($_ENV['BX_CRONTAB_FOLDER'], "/") . '/bx_crontab.json';
74 74
         }
75 75
 
Please login to merge, or discard this patch.