Completed
Branch master (37b207)
by Helmut
10:03 queued 16s
created
src/Engines/Blade.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
 
7 7
 class Blade implements Engine {
8 8
 
9
-	/**
9
+    /**
10 10
      * Render the template content.
11 11
      *
12
-	 * @param  string  $path
13
-	 * @param  array  $properties
12
+     * @param  string  $path
13
+     * @param  array  $properties
14 14
      * @return string
15 15
      */
16
-	public function render($path, $properties = []) 
17
-	{
18
-		if ( ! function_exists('app')) throw new \Exception('Laravel required for blade rendering engine.');
16
+    public function render($path, $properties = []) 
17
+    {
18
+        if ( ! function_exists('app')) throw new \Exception('Laravel required for blade rendering engine.');
19 19
 
20
-		return app()->make('view')->file($path, $properties);
21
-	}
20
+        return app()->make('view')->file($path, $properties);
21
+    }
22 22
 
23 23
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
      */
16 16
 	public function render($path, $properties = []) 
17 17
 	{
18
-		if ( ! function_exists('app')) throw new \Exception('Laravel required for blade rendering engine.');
18
+		if ( ! function_exists('app')) {
19
+		    throw new \Exception('Laravel required for blade rendering engine.');
20
+		}
19 21
 
20 22
 		return app()->make('view')->file($path, $properties);
21 23
 	}
Please login to merge, or discard this patch.
src/Engines/Mustache.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@
 block discarded – undo
12 12
      *
13 13
      * @var \Mustache_Engine
14 14
      */	
15
-	protected $compiler;
15
+    protected $compiler;
16 16
 
17
-	/**
17
+    /**
18 18
      * Fetch the compiler.
19 19
      *
20 20
      * @return \Mustache_Engine
21 21
      */
22
-	public function compiler()
23
-	{
24
-		if ( ! $this->compiler) $this->compiler = new Mustache_Engine;
22
+    public function compiler()
23
+    {
24
+        if ( ! $this->compiler) $this->compiler = new Mustache_Engine;
25 25
 
26
-		return $this->compiler;
27
-	}
26
+        return $this->compiler;
27
+    }
28 28
 
29
-	/**
29
+    /**
30 30
      * Render the template content.
31 31
      *
32
-	 * @param  string  $path
33
-	 * @param  array  $properties
32
+     * @param  string  $path
33
+     * @param  array  $properties
34 34
      * @return string
35 35
      */
36
-	public function render($path, $properties = []) 
37
-	{
38
-		$content = file_get_contents($path);
36
+    public function render($path, $properties = []) 
37
+    {
38
+        $content = file_get_contents($path);
39 39
 
40
-		return $this->compiler()->render($content, $properties);
41
-	}
40
+        return $this->compiler()->render($content, $properties);
41
+    }
42 42
 
43 43
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
      */
22 22
 	public function compiler()
23 23
 	{
24
-		if ( ! $this->compiler) $this->compiler = new Mustache_Engine;
24
+		if ( ! $this->compiler) {
25
+		    $this->compiler = new Mustache_Engine;
26
+		}
25 27
 
26 28
 		return $this->compiler;
27 29
 	}
Please login to merge, or discard this patch.
src/Engines/Twig.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,39 +8,39 @@
 block discarded – undo
8 8
 
9 9
 class Twig implements Engine {
10 10
 
11
-  	/**
12
-     * The twig compiler engine.
13
-     *
14
-     * @var \Twig_Environment
15
-     */	
16
-	protected $compiler;
17
-
18
-	/**
11
+        /**
12
+         * The twig compiler engine.
13
+         *
14
+         * @var \Twig_Environment
15
+         */	
16
+    protected $compiler;
17
+
18
+    /**
19 19
      * Fetch the compiler.
20 20
      *
21 21
      * @return \Twig_Environment
22 22
      */
23
-	public function compiler()
24
-	{
25
-		if ( ! $this->compiler) {
26
-			$this->compiler = new Twig_Environment(new Twig_Loader_String);
27
-		}
23
+    public function compiler()
24
+    {
25
+        if ( ! $this->compiler) {
26
+            $this->compiler = new Twig_Environment(new Twig_Loader_String);
27
+        }
28 28
 
29
-		return $this->compiler;
30
-	}
29
+        return $this->compiler;
30
+    }
31 31
 
32
-	/**
32
+    /**
33 33
      * Render the template content.
34 34
      *
35
-	 * @param  string  $path
36
-	 * @param  array  $properties
35
+     * @param  string  $path
36
+     * @param  array  $properties
37 37
      * @return string
38 38
      */
39
-	public function render($path, $properties = []) 
40
-	{
41
-		$content = file_get_contents($path);
39
+    public function render($path, $properties = []) 
40
+    {
41
+        $content = file_get_contents($path);
42 42
 
43
-		return $this->compiler()->render($content, $properties);
44
-	}
43
+        return $this->compiler()->render($content, $properties);
44
+    }
45 45
 
46 46
 }
Please login to merge, or discard this patch.
src/Engine.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 
5 5
 interface Engine {
6 6
 	
7
-	/**
7
+    /**
8 8
      * Render the template content.
9 9
      *
10
-	 * @param  string  $path
11
-	 * @param  array  $properties
10
+     * @param  string  $path
11
+     * @param  array  $properties
12 12
      * @return string
13 13
      */
14
-	public function render($path, $properties = []);
14
+    public function render($path, $properties = []);
15 15
 
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/Symfony.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 block discarded – undo
7 7
 
8 8
 class Symfony implements Request {
9 9
 	
10
-	protected $request;
11
-
12
-	public function __construct()
13
-	{
14
-		$this->request = SymfonyRequest::createFromGlobals();
15
-	}
16
-
17
-	public function all()
18
-	{
19
-		return $this->request->request->all();
20
-	}
21
-
22
-	public function get($key)
23
-	{
24
-		return $this->request->request->get($key);
25
-	}
26
-
27
-	public function csrf()
28
-	{
29
-		return ['name' => '_token', 'value' => csrf_token()];
30
-	}
10
+    protected $request;
11
+
12
+    public function __construct()
13
+    {
14
+        $this->request = SymfonyRequest::createFromGlobals();
15
+    }
16
+
17
+    public function all()
18
+    {
19
+        return $this->request->request->all();
20
+    }
21
+
22
+    public function get($key)
23
+    {
24
+        return $this->request->request->get($key);
25
+    }
26
+
27
+    public function csrf()
28
+    {
29
+        return ['name' => '_token', 'value' => csrf_token()];
30
+    }
31 31
 
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/Basic.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
 
7 7
 class Basic implements Request {
8 8
 	
9
-	public function all()
10
-	{
11
-		return isset($_POST) ? $_POST : [];
12
-	}
9
+    public function all()
10
+    {
11
+        return isset($_POST) ? $_POST : [];
12
+    }
13 13
 
14
-	public function get($key)
15
-	{
16
-		return isset($_POST[$key]) ? $_POST[$key] : null;
17
-	}
14
+    public function get($key)
15
+    {
16
+        return isset($_POST[$key]) ? $_POST[$key] : null;
17
+    }
18 18
 
19
-	public function csrf()
20
-	{
21
-		return [];
22
-	}
19
+    public function csrf()
20
+    {
21
+        return [];
22
+    }
23 23
 
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/Laravel.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 block discarded – undo
7 7
 
8 8
 class Laravel implements Request {
9 9
 	
10
-	protected $request;
11
-
12
-	public function __construct(IlluminateRequest $request)
13
-	{
14
-		$this->request = $request;
15
-	}
16
-
17
-	public function all()
18
-	{
19
-		return $this->request->all();
20
-	}
21
-
22
-	public function get($key)
23
-	{
24
-		return $this->request->get($key);
25
-	}
26
-
27
-	public function csrf()
28
-	{
29
-		return ['name' => '_token', 'value' => csrf_token()];
30
-	}
10
+    protected $request;
11
+
12
+    public function __construct(IlluminateRequest $request)
13
+    {
14
+        $this->request = $request;
15
+    }
16
+
17
+    public function all()
18
+    {
19
+        return $this->request->all();
20
+    }
21
+
22
+    public function get($key)
23
+    {
24
+        return $this->request->get($key);
25
+    }
26
+
27
+    public function csrf()
28
+    {
29
+        return ['name' => '_token', 'value' => csrf_token()];
30
+    }
31 31
 
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
src/Request.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,26 +4,26 @@
 block discarded – undo
4 4
 
5 5
 interface Request {
6 6
 	
7
-	/**
7
+    /**
8 8
      * Fetch all values from the request.
9 9
      *
10 10
      * @return array
11 11
      */
12
-	public function all();
12
+    public function all();
13 13
 
14
-	/**
14
+    /**
15 15
      * Fetch a value from the request matching provided key.
16 16
      *
17 17
      * @var string
18 18
      * @return mixed
19 19
      */
20
-	public function get($key);
20
+    public function get($key);
21 21
 
22
-	/**
22
+    /**
23 23
      * Return array of csrf template properties.
24 24
      *
25 25
      * @return array
26 26
      */
27
-	public function csrf();	
27
+    public function csrf();	
28 28
 
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.