Completed
Push — master ( 333357...e7cb1a )
by Helmut
02:43
created
src/Plugins/Feedback/Feedback.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -6,40 +6,40 @@
 block discarded – undo
6 6
 
7 7
 class Feedback extends Plugin {
8 8
 
9
-	public function onLoad($form)
10
-	{
11
-		$form->addButton('feedback_trigger_'.$form->id);
12
-	}
9
+    public function onLoad($form)
10
+    {
11
+        $form->addButton('feedback_trigger_'.$form->id);
12
+    }
13 13
 
14
-	public function onSubmitted($form) 
15
-	{
16
-		$request = $form->getRequest();
14
+    public function onSubmitted($form) 
15
+    {
16
+        $request = $form->getRequest();
17 17
 
18
-		if ($request->get('feedback_trigger_'.$form->id)) {
18
+        if ($request->get('feedback_trigger_'.$form->id)) {
19 19
 
20
-			$field = $form->field($request->get('name'));
20
+            $field = $form->field($request->get('name'));
21 21
 
22
-			if ( ! is_null($field)) {
22
+            if ( ! is_null($field)) {
23 23
 
24
-				$field->setFromRequest($request);
25
-				$field->runValidations();
24
+                $field->setFromRequest($request);
25
+                $field->runValidations();
26 26
 
27
-				$response = [
28
-					'id' => $field->id, 
29
-					'valid' => $field->valid(), 
30
-					'error_id' => 'feedback_errors_'.$field->id,
31
-					'error' => '', 
32
-				];
27
+                $response = [
28
+                    'id' => $field->id, 
29
+                    'valid' => $field->valid(), 
30
+                    'error_id' => 'feedback_errors_'.$field->id,
31
+                    'error' => '', 
32
+                ];
33 33
 
34
-				if ( ! $field->valid()) {
35
-					$response['error'] = $form->renderFieldErrors($field);
36
-				}
34
+                if ( ! $field->valid()) {
35
+                    $response['error'] = $form->renderFieldErrors($field);
36
+                }
37 37
 
38
-				header('Content-Type: application/json');
39
-				echo json_encode($response);
40
-				exit();
41
-			}
42
-		}
43
-	}
38
+                header('Content-Type: application/json');
39
+                echo json_encode($response);
40
+                exit();
41
+            }
42
+        }
43
+    }
44 44
 
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
src/templates/bootstrap/config.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return [
4
-	'plugins' => [
5
-		'feedback',
6
-	],
4
+    'plugins' => [
5
+        'feedback',
6
+    ],
7 7
 ];
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/Name/lang/es.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return [
4
-	'placeholder_first' => 'Nombre',
5
-	'placeholder_surname' => 'Apellido',
4
+    'placeholder_first' => 'Nombre',
5
+    'placeholder_surname' => 'Apellido',
6 6
 ];
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/Checkbox/Checkbox.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function setValuesFromModel($model)
44 44
     {
45
-        if (property_exists($model, $this->name)) $this->value = $model->{$this->name} ? true : false;
45
+        if (property_exists($model, $this->name)) {
46
+            $this->value = $model->{$this->name} ? true : false;
47
+        }
46 48
     }   
47 49
 
48 50
     public function setValuesFromRequest($request)
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 
53 55
     public function fillModelWithValues($model)
54 56
     {
55
-        if (property_exists($model, $this->name)) $model->{$this->name} = $this->value ? 1 : 0;
57
+        if (property_exists($model, $this->name)) {
58
+            $model->{$this->name} = $this->value ? 1 : 0;
59
+        }
56 60
     }
57 61
 
58 62
     public function validateRequired()
Please login to merge, or discard this patch.
src/Fields/Email/lang/es.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return [
4
-	'placeholder' => '[email protected]',
4
+    'placeholder' => '[email protected]',
5 5
 ];
6 6
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/Email/lang/en.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return [
4
-	'placeholder' => '[email protected]',
4
+    'placeholder' => '[email protected]',
5 5
 ];
6 6
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/Password/Password.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function needsRehash($hash = null)
21 21
     {
22
-        if (is_null($hash)) $hash = $this->value;
22
+        if (is_null($hash)) {
23
+            $hash = $this->value;
24
+        }
23 25
 
24 26
         return password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 10]);
25 27
     }   
@@ -57,7 +59,9 @@  discard block
 block discarded – undo
57 59
 
58 60
     public function setValuesFromModel($model)
59 61
     {
60
-        if (property_exists($model, $this->name)) $this->value = $model->{$this->name};
62
+        if (property_exists($model, $this->name)) {
63
+            $this->value = $model->{$this->name};
64
+        }
61 65
     }
62 66
 
63 67
     public function setValuesFromRequest($request)
@@ -67,7 +71,9 @@  discard block
 block discarded – undo
67 71
 
68 72
     public function fillModelWithValues($model)
69 73
     {
70
-        if (property_exists($model, $this->name)) $model->{$this->name} = $this->value;
74
+        if (property_exists($model, $this->name)) {
75
+            $model->{$this->name} = $this->value;
76
+        }
71 77
     }   
72 78
 
73 79
     public function validateRequired()
Please login to merge, or discard this patch.
src/Fields/Search/lang/es.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return [
4
-	'placeholder' => 'Buscar&hellip;',
5
-	'button' => 'Ir',
4
+    'placeholder' => 'Buscar&hellip;',
5
+    'button' => 'Ir',
6 6
 ];
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
src/Fields/Search/lang/en.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return [
4
-	'placeholder' => 'Search&hellip;',
5
-	'button' => 'Go',
4
+    'placeholder' => 'Search&hellip;',
5
+    'button' => 'Go',
6 6
 ];
7 7
\ No newline at end of file
Please login to merge, or discard this patch.