Completed
Push — master ( 9bb1a7...9f8480 )
by Helmut
06:35
created
tests/functional/paragraph_text/fills_model_with_value_.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 
8 8
 if ($form->submitted()) {
9 9
 
10
-	$model = new stdClass;
11
-	$model->foo = '';
10
+    $model = new stdClass;
11
+    $model->foo = '';
12 12
 
13
-	$form->fill($model);
13
+    $form->fill($model);
14 14
 
15
-	exit('Submitted ['.$model->foo.']');
15
+    exit('Submitted ['.$model->foo.']');
16 16
 
17 17
 }
18 18
 
Please login to merge, or discard this patch.
tests/functional/name/submitted_.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 
8 8
 if ($form->submitted()) {
9 9
 
10
-	$values = $form->get('foo');
10
+    $values = $form->get('foo');
11 11
 
12
-	exit('Submitted ['.$values['foo'].','.$values['foo_first'].','.$values['foo_surname'].']');
12
+    exit('Submitted ['.$values['foo'].','.$values['foo_first'].','.$values['foo_surname'].']');
13 13
 
14 14
 }
15 15
 
Please login to merge, or discard this patch.
tests/functional/name/submitted_with_default_.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 
8 8
 if ($form->submitted()) {
9 9
 
10
-	$values = $form->get('foo');
10
+    $values = $form->get('foo');
11 11
 
12
-	exit('Submitted ['.$values['foo'].','.$values['foo_first'].','.$values['foo_surname'].']');
12
+    exit('Submitted ['.$values['foo'].','.$values['foo_first'].','.$values['foo_surname'].']');
13 13
 
14 14
 }
15 15
 
Please login to merge, or discard this patch.
tests/codeception/_support/UnitTester.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 {
21 21
     use _generated\FunctionalTesterActions;
22 22
 
23
-   /**
24
-    * Define custom actions here
25
-    */
23
+    /**
24
+     * Define custom actions here
25
+     */
26 26
 }
Please login to merge, or discard this patch.
tests/codeception/_support/AcceptanceTester.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 {
21 21
     use _generated\FunctionalTesterActions;
22 22
 
23
-   /**
24
-    * Define custom actions here
25
-    */
23
+    /**
24
+     * Define custom actions here
25
+     */
26 26
 }
Please login to merge, or discard this patch.
src/Renderer.php 1 patch
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -4,140 +4,140 @@
 block discarded – undo
4 4
 
5 5
 class Renderer {
6 6
 	
7
- 	/**
8
-     * Array of engine definitions using
9
-     * file extension as key.
10
-     * 
11
-     * @var array
12
-     */
13
-	protected $engines = [
14
-		'.mustache.php' => 'Helmut\Forms\Engines\Mustache',
15
-		'.twig.php' => 'Helmut\Forms\Engines\Twig',
16
-		'.blade.php' => 'Helmut\Forms\Engines\Blade',
17
-	];
18
-
19
- 	/**
20
-     * Cache of running engines.
21
-     *
22
-     * @var array
23
-     */
24
-	protected $running = [];
25
-
26
- 	/**
27
-     * Cache of template files.
28
-     *
29
-     * @var array
30
-     */
31
-	protected $templates = [];
32
-
33
-	/**
7
+        /**
8
+         * Array of engine definitions using
9
+         * file extension as key.
10
+         * 
11
+         * @var array
12
+         */
13
+    protected $engines = [
14
+        '.mustache.php' => 'Helmut\Forms\Engines\Mustache',
15
+        '.twig.php' => 'Helmut\Forms\Engines\Twig',
16
+        '.blade.php' => 'Helmut\Forms\Engines\Blade',
17
+    ];
18
+
19
+        /**
20
+         * Cache of running engines.
21
+         *
22
+         * @var array
23
+         */
24
+    protected $running = [];
25
+
26
+        /**
27
+         * Cache of template files.
28
+         *
29
+         * @var array
30
+         */
31
+    protected $templates = [];
32
+
33
+    /**
34 34
      * Add a new engine implementation.
35 35
      *
36
-	 * @param  string  $extension
37
-	 * @param  string  $class
36
+     * @param  string  $extension
37
+     * @param  string  $class
38 38
      * @return void
39 39
      */
40
-	public function addEngine($extension, $class)
41
-	{
42
-		array_unshift($this->engines, [$extension => $class]);
43
-	}
40
+    public function addEngine($extension, $class)
41
+    {
42
+        array_unshift($this->engines, [$extension => $class]);
43
+    }
44 44
 
45
-	/**
45
+    /**
46 46
      * Get an engine implementation.
47 47
      *
48
-	 * @param  string  $key
48
+     * @param  string  $key
49 49
      * @return \Helmut\Forms\Engine
50 50
      */
51
-	public function start($key)
52
-	{
53
-		if ( ! isset($this->running[$key])) {
54
-			$this->running[$key] = new $this->engines[$key];
55
-		}
51
+    public function start($key)
52
+    {
53
+        if ( ! isset($this->running[$key])) {
54
+            $this->running[$key] = new $this->engines[$key];
55
+        }
56 56
 
57
-		return $this->running[$key];
58
-	}
57
+        return $this->running[$key];
58
+    }
59 59
 
60
-	/**
60
+    /**
61 61
      * Get engine file extensions.
62 62
      *
63 63
      * @return array
64 64
      */
65
-	public function extensions()
66
-	{
67
-		return array_keys($this->engines);
68
-	}
65
+    public function extensions()
66
+    {
67
+        return array_keys($this->engines);
68
+    }
69 69
 
70
-	/**
70
+    /**
71 71
      * Create a template cache key.
72 72
      *
73
-	 * @param  string  $template
74
-	 * @param  array  $paths
73
+     * @param  string  $template
74
+     * @param  array  $paths
75 75
      * @return string
76 76
      */	
77
-	public function key($template, $paths) 
78
-	{
79
-		return $template.'-'.md5(serialize($paths));
80
-	}
77
+    public function key($template, $paths) 
78
+    {
79
+        return $template.'-'.md5(serialize($paths));
80
+    }
81 81
 
82
-	/**
82
+    /**
83 83
      * Render a template.
84 84
      *
85
-	 * @param  string  $template
86
-	 * @param  array  $properties
87
-	 * @param  array  $paths
85
+     * @param  string  $template
86
+     * @param  array  $properties
87
+     * @param  array  $paths
88 88
      * @return string
89 89
      */
90
-	public function render($template, $properties, $paths)
91
-	{
92
-		if ($this->has($template, $paths)) {
90
+    public function render($template, $properties, $paths)
91
+    {
92
+        if ($this->has($template, $paths)) {
93 93
 
94
-			$template = $this->findTemplate($template, $paths);
94
+            $template = $this->findTemplate($template, $paths);
95 95
 
96
-			return $this->start($template['engine'])->render($template['path'], $properties);
97
-		}
98
-	}
96
+            return $this->start($template['engine'])->render($template['path'], $properties);
97
+        }
98
+    }
99 99
 
100
-	/**
100
+    /**
101 101
      * Check if a template exists.
102 102
      *
103
-	 * @param  string  $template
104
-	 * @param  array  $paths
103
+     * @param  string  $template
104
+     * @param  array  $paths
105 105
      * @return boolean
106 106
      */	
107
-	public function has($template, $paths)
108
-	{
109
-		return ! is_null($this->findTemplate($template, $paths));
110
-	}
107
+    public function has($template, $paths)
108
+    {
109
+        return ! is_null($this->findTemplate($template, $paths));
110
+    }
111 111
 
112
-	/**
112
+    /**
113 113
      * Find template file with engine.
114 114
      *
115
-	 * @param  string  $template
116
-	 * @param  array  $paths
115
+     * @param  string  $template
116
+     * @param  array  $paths
117 117
      * @return array
118 118
      */	
119
-	public function findTemplate($template, $paths)
120
-	{
121
-		$key = $this->key($template, $paths);
122
-
123
-		if ( ! isset($this->templates[$key])) {
124
-
125
-			$this->templates[$key] = null;
126
-
127
-			$extensions = $this->extensions();
128
-			foreach ($paths as $path) {
129
-				foreach ($extensions as $extension) {
130
-					if (file_exists($path.$template.$extension)) {
131
-						return $this->templates[$key] = [
132
-							'engine' => $extension, 
133
-							'path' => $path.$template.$extension,
134
-						];
135
-					}
136
-				}
137
-			}
138
-		}
139
-
140
-		return $this->templates[$key];
141
-	}	
119
+    public function findTemplate($template, $paths)
120
+    {
121
+        $key = $this->key($template, $paths);
122
+
123
+        if ( ! isset($this->templates[$key])) {
124
+
125
+            $this->templates[$key] = null;
126
+
127
+            $extensions = $this->extensions();
128
+            foreach ($paths as $path) {
129
+                foreach ($extensions as $extension) {
130
+                    if (file_exists($path.$template.$extension)) {
131
+                        return $this->templates[$key] = [
132
+                            'engine' => $extension, 
133
+                            'path' => $path.$template.$extension,
134
+                        ];
135
+                    }
136
+                }
137
+            }
138
+        }
139
+
140
+        return $this->templates[$key];
141
+    }	
142 142
 
143 143
 }
Please login to merge, or discard this patch.