Completed
Branch master (d79e68)
by Ben
02:17
created
src/Former/Form/Fields/Select.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
 	 * Set the select options
171 171
 	 *
172 172
 	 * @param  array   $_options     The options as an array
173
-	 * @param  mixed   $selected     Facultative selected entry
173
+	 * @param  null|string   $selected     Facultative selected entry
174 174
 	 * @param  boolean $valuesAsKeys Whether the array's values should be used as
175 175
 	 *                               the option's values instead of the array's keys
176 176
 	 */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			$this->name .= '[]';
91 91
 		}
92 92
 
93
-		if ( ! $this->value instanceOf \ArrayAccess) {
93
+		if (!$this->value instanceOf \ArrayAccess) {
94 94
 			$this->value = (array) $this->value;
95 95
 		}
96 96
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		foreach ($parent->getChildren() as $child) {
133 133
 			// Search by value
134 134
 
135
-			if ($child->getAttribute('value') === $value || is_numeric($value) && $child->getAttribute('value') === (int)$value ) {
135
+			if ($child->getAttribute('value') === $value || is_numeric($value) && $child->getAttribute('value') === (int) $value) {
136 136
 				$child->selected('selected');
137 137
 			}
138 138
 
Please login to merge, or discard this patch.
src/Former/Form/Form.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -351,9 +351,9 @@
 block discarded – undo
351 351
 	}
352 352
 
353 353
 	/**
354
-	 * @param $name
354
+	 * @param string $name
355 355
 	 * @param $params
356
-	 * @param $type
356
+	 * @param string $type
357 357
 	 *
358 358
 	 * @return $this
359 359
 	 */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		$this->url       = $url;
97 97
 		$this->populator = $populator;
98 98
 
99
-		$this->app->singleton('former.form.framework', function ($app) {
99
+		$this->app->singleton('former.form.framework', function($app) {
100 100
 			return clone $app['former.framework'];
101 101
 		});
102 102
 	}
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 
403 403
 		// If raw form
404 404
 		if ($type == 'raw') {
405
-			$this->app->bind('former.form.framework', function ($app) {
405
+			$this->app->bind('former.form.framework', function($app) {
406 406
 				return $app['former']->getFrameworkInstance('Nude');
407 407
 			});
408 408
 		}
Please login to merge, or discard this patch.
src/Former/Form/Group.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -442,7 +442,7 @@
 block discarded – undo
442 442
 	/**
443 443
 	 * Format the field with prepended/appended elements
444 444
 	 *
445
-	 * @param  Field $field The field to format
445
+	 * @param  \Former\Traits\Field $field The field to format
446 446
 	 *
447 447
 	 * @return string        Field plus supplementary elements
448 448
 	 */
Please login to merge, or discard this patch.
src/Former/FormerServiceProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
 	/**
157 157
 	 * Get all of the configuration files for the application.
158 158
 	 *
159
-	 * @param  $app
159
+	 * @param  Container $app
160 160
 	 * @return array
161 161
 	 */
162 162
 	protected function getConfigurationFiles($app)
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -90,15 +90,15 @@  discard block
 block discarded – undo
90 90
 		// Session and request
91 91
 		//////////////////////////////////////////////////////////////////
92 92
 
93
-		$app->bindIf('session.manager', function ($app) {
93
+		$app->bindIf('session.manager', function($app) {
94 94
 			return new SessionManager($app);
95 95
 		});
96 96
 
97
-		$app->bindIf('session', function ($app) {
97
+		$app->bindIf('session', function($app) {
98 98
 			return $app['session.manager']->driver('array');
99 99
 		}, true);
100 100
 
101
-		$app->bindIf('request', function ($app) {
101
+		$app->bindIf('request', function($app) {
102 102
 			$request = Request::createFromGlobals();
103 103
 			if (method_exists($request, 'setSessionStore')) {
104 104
 				$request->setSessionStore($app['session']);
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 		// Config
113 113
 		//////////////////////////////////////////////////////////////////
114 114
 
115
-		$app->bindIf('path.config', function ($app) {
116
-			return __DIR__ . '/../config/';
115
+		$app->bindIf('path.config', function($app) {
116
+			return __DIR__.'/../config/';
117 117
 		}, true);
118 118
 
119
-		$app->bindIf('config', function ($app) {
119
+		$app->bindIf('config', function($app) {
120 120
 			$config = new Repository;
121 121
 			$this->loadConfigurationFiles($app, $config);
122 122
 			return $config;
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
 		// Localization
126 126
 		//////////////////////////////////////////////////////////////////
127 127
 
128
-		$app->bindIf('translation.loader', function ($app) {
128
+		$app->bindIf('translation.loader', function($app) {
129 129
 			return new FileLoader($app['files'], 'src/config');
130 130
 		});
131 131
 
132
-		$app->bindIf('translator', function ($app) {
132
+		$app->bindIf('translator', function($app) {
133 133
 			$loader = new FileLoader($app['files'], 'lang');
134 134
 
135 135
 			return new Translator($loader, 'fr');
@@ -181,25 +181,25 @@  discard block
 block discarded – undo
181 181
 	public function bindFormer(Container $app)
182 182
 	{
183 183
 		// Add config namespace
184
-		$configPath = __DIR__ . '/../config/former.php';
184
+		$configPath = __DIR__.'/../config/former.php';
185 185
 		$this->mergeConfigFrom($configPath, 'former');
186
-		$this->publishes([$configPath => $app['path.config'] . '/former.php']);
186
+		$this->publishes([$configPath => $app['path.config'].'/former.php']);
187 187
 		
188 188
 		$framework = $app['config']->get('former.framework');
189 189
 		
190
-		$app->bind('former.framework', function ($app) {
190
+		$app->bind('former.framework', function($app) {
191 191
 			return $app['former']->getFrameworkInstance($app['config']->get('former.framework'));
192 192
 		});
193 193
 
194
-		$app->singleton('former.populator', function ($app) {
194
+		$app->singleton('former.populator', function($app) {
195 195
 			return new Populator();
196 196
 		});
197 197
 
198
-		$app->singleton('former.dispatcher', function ($app) {
198
+		$app->singleton('former.dispatcher', function($app) {
199 199
 			return new MethodDispatcher($app, Former::FIELDSPACE);
200 200
 		});
201 201
 
202
-		$app->singleton('former', function ($app) {
202
+		$app->singleton('former', function($app) {
203 203
 			return new Former($app, $app->make('former.dispatcher'));
204 204
 		});
205 205
 		$app->alias('former', 'Former\Former');
Please login to merge, or discard this patch.
src/Former/Framework/Nude.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
 	 *
127 127
 	 * @param Field $field
128 128
 	 *
129
-	 * @return Element
129
+	 * @return Input
130 130
 	 */
131 131
 	public function createPlainTextField(Field $field)
132 132
 	{
Please login to merge, or discard this patch.
src/Former/LiveValidation.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@
 block discarded – undo
267 267
 	/**
268 268
 	 * Transform extensions and mime groups into a list of mime types
269 269
 	 *
270
-	 * @param  array $mimes An array of mimes
270
+	 * @param  string[] $mimes An array of mimes
271 271
 	 *
272 272
 	 * @return string A concatenated list of mimes
273 273
 	 */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 *
22 22
 	 * @param Field $field The field
23 23
 	 */
24
-	public function __construct(Field &$field)
24
+	public function __construct(Field&$field)
25 25
 	{
26 26
 		$this->field = $field;
27 27
 	}
Please login to merge, or discard this patch.
src/Former/Exceptions/InvalidFrameworkException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php namespace Former\Exceptions;
2 2
 
3
-class InvalidFrameworkException extends \RuntimeException{
3
+class InvalidFrameworkException extends \RuntimeException {
4 4
 
5 5
 	/**
6 6
 	 * reference to framework class
Please login to merge, or discard this patch.
src/Former/Helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		//Convert parametrs of old format to new format
128 128
 		if (!is_callable($text)) {
129 129
 			$optionTextValue = $text;
130
-			$text = function ($model) use($optionTextValue) {
130
+			$text = function($model) use($optionTextValue) {
131 131
 				if ($optionTextValue and isset($model->$optionTextValue)) {
132 132
 					return $model->$optionTextValue;
133 133
 				} elseif (method_exists($model, '__toString')) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 					$optionAttributeValue = $modelAttributeName($model);
173 173
 				} elseif ($modelAttributeName and isset($model->$modelAttributeName)) {
174 174
 					$optionAttributeValue = $model->$modelAttributeName;
175
-				} elseif($optionAttributeName === 'value') {
175
+				} elseif ($optionAttributeName === 'value') {
176 176
 					//For backward compatibility
177 177
 					if (method_exists($model, 'getKey')) {
178 178
 						$optionAttributeValue = $model->getKey();
Please login to merge, or discard this patch.
src/Former/Form/Actions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 	 */
52 52
 	public function getContent()
53 53
 	{
54
-		$content = array_map(function ($content) {
54
+		$content = array_map(function($content) {
55 55
 			return method_exists($content, '__toString') ? (string) $content : $content;
56 56
 		}, $this->value);
57 57
 
Please login to merge, or discard this patch.