Passed
Branch master (65f5fa)
by Glegrith
02:40
created
bootstrap/helper.php 2 patches
Spacing   +11 added lines, -11 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("view")) {
12
+    if (!function_exists("view")) {
13 13
         /**
14 14
          * Get the evaluated view contents for the given view.
15 15
          *
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
          * @param  array   $mergeData   Some shit I don't know yet
19 19
          * @return \app\framework\Component\View\View
20 20
          */
21
-        function view($view = null, $data = [], $mergeData = []) {
21
+        function view($view = null, $data = [ ], $mergeData = [ ]) {
22 22
             $View = new \app\framework\Component\View\View($view, $data);
23 23
             return $View->render();
24 24
         }
25 25
     }
26 26
 
27
-    if(! function_exists("app")) {
27
+    if (!function_exists("app")) {
28 28
         /**
29 29
          * Used to easily call Methods from classes without manually set
30 30
          * locally Instances of them.
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
          * @param string $classMethod The class name(if in \app\custom\ namespace) or the "namespace+className@methodToCall"
33 33
          */
34 34
         function app($classMethod, $param = null) {
35
-            return $GLOBALS["App"]->call($classMethod, $param);
35
+            return $GLOBALS[ "App" ]->call($classMethod, $param);
36 36
         }
37 37
     }
38 38
 
39
-    if(! function_exists("url")) {
39
+    if (!function_exists("url")) {
40 40
         /**
41 41
          * Basically completes just the the url
42 42
          * e.g. /test to yourexample.site/test
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
          * @return string
49 49
          */
50 50
         function url($path) {
51
-            return $_SERVER['HTTP_HOST'].$path;
51
+            return $_SERVER[ 'HTTP_HOST' ].$path;
52 52
         }
53 53
     }
54 54
 
55
-    if(! function_exists("pathTo")) {
55
+    if (!function_exists("pathTo")) {
56 56
         /**
57 57
          * Easy function to get the path to the project + if you want an directory in it.
58 58
          *
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         }
65 65
     }
66 66
 
67
-    if(! function_exists("getStringBetween")) {
67
+    if (!function_exists("getStringBetween")) {
68 68
         /**
69 69
          * This is a handy little function to strip out a string between
70 70
          * two specified pieces of text. This could be used to parse
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
          * @return bool|string
77 77
          */
78 78
         function getStringBetween($string, $start, $end) {
79
-            $string = ' ' . $string;
79
+            $string = ' '.$string;
80 80
             $ini = strpos($string, $start);
81 81
             if ($ini == 0) return '';
82 82
             $ini += strlen($start);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,9 @@
 block discarded – undo
78 78
         function getStringBetween($string, $start, $end) {
79 79
             $string = ' ' . $string;
80 80
             $ini = strpos($string, $start);
81
-            if ($ini == 0) return '';
81
+            if ($ini == 0) {
82
+                return '';
83
+            }
82 84
             $ini += strlen($start);
83 85
             $len = strpos($string, $end, $ini) - $ini;
84 86
             return substr($string, $ini, $len);
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
     $klein = new Klein();
15 15
 
16
-    $klein->respond("GET", "/", function(){
16
+    $klein->respond("GET", "/", function() {
17 17
         view("welcome");
18 18
     });
19 19
 
Please login to merge, or discard this patch.