Completed
Pull Request — master (#110)
by Simone
02:49
created
src/Sensorario/Resources/Validators/Validators/AllowedProperties.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                 if (!$isAllowed) {
38 38
                     throw new RuntimeException(
39 39
                         "Key `" . get_class($resource)
40
-                        . "::\$$key` with value `" .  $value
40
+                        . "::\$$key` with value `" . $value
41 41
                         . "` is not allowed"
42 42
                     );
43 43
                 }
Please login to merge, or discard this patch.
src/Sensorario/Resources/MagicResource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         foreach ($properties as $k => $v) {
58 58
             if ('object' === gettype($v) && !isset($this->rules()[$k])) {
59 59
                 throw new RuntimeException(
60
-                    'When property `' . $k . '` is an object class, must be defined in Resources::rules()'.
60
+                    'When property `' . $k . '` is an object class, must be defined in Resources::rules()' .
61 61
                     ' but rules here are equals to ' . var_export($this->rules(), true)
62 62
                     . ' And properties are ' . var_export($this->properties, true)
63 63
                 );
Please login to merge, or discard this patch.
src/Sensorario/Resources/Configurator.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
 
19 19
     public function __call($method, $bar)
20 20
     {
21
-         return $this->container->$method(
22
-             $this->resourceName
23
-         );
21
+            return $this->container->$method(
22
+                $this->resourceName
23
+            );
24 24
     }
25 25
 
26 26
     public function resourceName()
Please login to merge, or discard this patch.
src/Sensorario/Resources/Container.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -105,6 +105,9 @@
 block discarded – undo
105 105
         return $allowed;
106 106
     }
107 107
 
108
+    /**
109
+     * @param string $constraintName
110
+     */
108 111
     public function getConstraints(
109 112
         $constraintName,
110 113
         $resource
Please login to merge, or discard this patch.
src/Sensorario/Resources/Validators/Validators/RightType.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use Egulias\EmailValidator\Validation\RFCValidation;
18 18
 use RuntimeException;
19 19
 use Sensorario\Resources\Resource;
20
-use Sensorario\Resources\Rule;
21 20
 use Sensorario\Resources\Rulers\Ruler;
22 21
 use Sensorario\Resources\Validators\Interfaces\Validator;
23 22
 
Please login to merge, or discard this patch.
src/Sensorario/Resources/Rulers/Ruler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if ($this->typeMismatch()) {
64 64
             if ($this->resource->isFieldNumericButString($this->fieldName)) {
65 65
                 throw new \RuntimeException(
66
-                    'Property `'.$this->fieldName.'` must be an integer!'
66
+                    'Property `' . $this->fieldName . '` must be an integer!'
67 67
                 );
68 68
             }
69 69
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         if ($this->rule->isNotMail()) {
93 93
             throw new \RuntimeException(
94
-                'Oops! `'. $this->rule->getRuleType() .'` custom validator is not available. Only email is.'
94
+                'Oops! `' . $this->rule->getRuleType() . '` custom validator is not available. Only email is.'
95 95
             );
96 96
         }
97 97
     }
Please login to merge, or discard this patch.
src/Sensorario/Resources/Rulers/Rule.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     public function asArray() : array
49 49
     {
50
-         return $this->rule;
50
+            return $this->rule;
51 51
     }
52 52
 
53 53
     public function isValid()
Please login to merge, or discard this patch.
src/Sensorario/Resources/Resource.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace Sensorario\Resources\Schema;
13 13
 
14
-use RuntimeException;
15
-
16 14
 final class Schema
17 15
 {
18 16
     const PRIMITIVE_ARRAY   = 'array';
Please login to merge, or discard this patch.