Passed
Push — master ( c9c971...49cc0b )
by Glegrith
02:11
created
bootstrap/helper.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2
-    if(! function_exists("dd")) {
2
+    if (!function_exists("dd")) {
3 3
         /**
4 4
          * Little helper called dump and die
5 5
          * @param $val
6 6
          */
7 7
         function dd($val) {
8
-            var_dump($val);die;
8
+            var_dump($val); die;
9 9
         }
10 10
     }
11 11
 
12
-    if(! function_exists("pathTo")) {
12
+    if (!function_exists("pathTo")) {
13 13
         /**
14 14
          * Easy function to get the path to the project + if you want an directory in it.
15 15
          *
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         }
22 22
     }
23 23
 
24
-    if(! function_exists("view")) {
24
+    if (!function_exists("view")) {
25 25
         /**
26 26
          * Get the evaluated view contents for the given view.
27 27
          *
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
          * @param  array   $data        Data to set values in template file
30 30
          * @return \app\framework\Component\View\View|string
31 31
          */
32
-        function view($view = null, $data = []) {
32
+        function view($view = null, $data = [ ]) {
33 33
             $View = new \app\framework\Component\View\View($view, $data);
34 34
             return $View->render();
35 35
         }
36 36
     }
37 37
 
38
-    if(! function_exists("app")) {
38
+    if (!function_exists("app")) {
39 39
         /**
40 40
          * Used to easily call Methods from classes without manually set
41 41
          * locally Instances of them.
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
          * @param array $param To declare what parameter shall be passed to the method
45 45
          * @return mixed
46 46
          */
47
-        function app($classMethod, $param = []) {
48
-            return $GLOBALS["App"]->call($classMethod, $param);
47
+        function app($classMethod, $param = [ ]) {
48
+            return $GLOBALS[ "App" ]->call($classMethod, $param);
49 49
         }
50 50
     }
51 51
 
52
-    if(! function_exists("url")) {
52
+    if (!function_exists("url")) {
53 53
         /**
54 54
          * Basically completes just the the url
55 55
          * e.g. /test to yourexample.site/test
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
          * @return string
62 62
          */
63 63
         function url($path) {
64
-            return $_SERVER['HTTP_HOST'].$path;
64
+            return $_SERVER[ 'HTTP_HOST' ].$path;
65 65
         }
66 66
     }
67 67
 
68
-    if(! function_exists("getStringBetween")) {
68
+    if (!function_exists("getStringBetween")) {
69 69
         /**
70 70
          * This is a handy little function to strip out a string between
71 71
          * two specified pieces of text. This could be used to parse
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
          * @return bool|string
78 78
          */
79 79
         function getStringBetween($string, $start, $end) {
80
-            $string = ' ' . $string;
80
+            $string = ' '.$string;
81 81
             $ini = strpos($string, $start);
82 82
             if ($ini == 0) return '';
83 83
             $ini += strlen($start);
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
         }
87 87
     }
88 88
 
89
-    if(! function_exists("handle")) {
89
+    if (!function_exists("handle")) {
90 90
         function handle(\Exception $e) {
91 91
             \app\framework\Component\Exception\Handler::getInstance()->handler($e);
92 92
         }
93 93
     }
94 94
 
95
-    if(! function_exists("arr")) {
95
+    if (!function_exists("arr")) {
96 96
         /**
97 97
          * Create an ArrayObject from array
98 98
          * @param array $arr
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         }
104 104
     }
105 105
 
106
-    if(! function_exists("encrypt")) {
106
+    if (!function_exists("encrypt")) {
107 107
         /**
108 108
          * Encrypt the given value.
109 109
          *
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                 \app\framework\Component\Config\Config::getInstance()->get("CrypKey")
118 118
             );
119 119
 
120
-            return $Encryptor->encrypt($value, $serialize );
120
+            return $Encryptor->encrypt($value, $serialize);
121 121
         }
122 122
     }
123 123
 
124
-    if(! function_exists("decrypt")) {
124
+    if (!function_exists("decrypt")) {
125 125
         /**
126 126
          * Decrypt the given value.
127 127
          *
@@ -135,6 +135,6 @@  discard block
 block discarded – undo
135 135
                 \app\framework\Component\Config\Config::getInstance()->get("CrypKey")
136 136
             );
137 137
 
138
-            return $Encryptor->decrypt($value, $unserialize );
138
+            return $Encryptor->decrypt($value, $unserialize);
139 139
         }
140 140
     }
Please login to merge, or discard this patch.