@@ -1,15 +1,15 @@ discard block |
||
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 |
||
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 | * |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | * @param array $mergeData Some shit I don't know yet |
31 | 31 | * @return \app\framework\Component\View\View |
32 | 32 | */ |
33 | - function view($view = null, $data = [], $mergeData = []) { |
|
33 | + function view($view = null, $data = [ ], $mergeData = [ ]) { |
|
34 | 34 | $View = new \app\framework\Component\View\View($view, $data); |
35 | 35 | return $View->render(); |
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | - if(! function_exists("app")) { |
|
39 | + if (!function_exists("app")) { |
|
40 | 40 | /** |
41 | 41 | * Used to easily call Methods from classes without manually set |
42 | 42 | * locally Instances of them. |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | * @param array $param To declare what parameter shall be passed to the method |
46 | 46 | * @return mixed |
47 | 47 | */ |
48 | - function app($classMethod, $param = []) { |
|
49 | - return $GLOBALS["App"]->call($classMethod, $param); |
|
48 | + function app($classMethod, $param = [ ]) { |
|
49 | + return $GLOBALS[ "App" ]->call($classMethod, $param); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | - if(! function_exists("url")) { |
|
53 | + if (!function_exists("url")) { |
|
54 | 54 | /** |
55 | 55 | * Basically completes just the the url |
56 | 56 | * e.g. /test to yourexample.site/test |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | * @return string |
63 | 63 | */ |
64 | 64 | function url($path) { |
65 | - return $_SERVER['HTTP_HOST'].$path; |
|
65 | + return $_SERVER[ 'HTTP_HOST' ].$path; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - if(! function_exists("getStringBetween")) { |
|
69 | + if (!function_exists("getStringBetween")) { |
|
70 | 70 | /** |
71 | 71 | * This is a handy little function to strip out a string between |
72 | 72 | * two specified pieces of text. This could be used to parse |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @return bool|string |
79 | 79 | */ |
80 | 80 | function getStringBetween($string, $start, $end) { |
81 | - $string = ' ' . $string; |
|
81 | + $string = ' '.$string; |
|
82 | 82 | $ini = strpos($string, $start); |
83 | 83 | if ($ini == 0) return ''; |
84 | 84 | $ini += strlen($start); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | - if(! function_exists("handle")) { |
|
90 | + if (!function_exists("handle")) { |
|
91 | 91 | function handle(\Exception $e) { |
92 | 92 | \app\framework\Component\Exception\Handler::getInstance()->handler($e); |
93 | 93 | } |