Completed
Pull Request — master (#133)
by Simone
01:59
created
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/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.
tests/Sensorario/Resources/ContainerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             ],
109 109
         ]);
110 110
 
111
-        $this->assertEquals( [
111
+        $this->assertEquals([
112 112
                 'foo',
113 113
                 'bar',
114 114
             ],
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             ],
142 142
         ]);
143 143
 
144
-        $this->assertEquals( [
144
+        $this->assertEquals([
145 145
                 'foo' => [
146 146
                     'set' => [
147 147
                         'equals_to' => 'bar',
Please login to merge, or discard this patch.
tests/Sensorario/Resources/RuleTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function testInvalidTypeIsNotAllowed()
48 48
     {
49 49
         $rule = Rule::fromArray([
50
-            'foo' => [ ]
50
+            'foo' => []
51 51
         ]);
52 52
 
53 53
         $rule->ensureRuleNameIsValid();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function testCheckFunctionReturnRuleValidityAsBoolean()
57 57
     {
58 58
         $rule = Rule::fromArray([
59
-            'foo' => [ ]
59
+            'foo' => []
60 60
         ]);
61 61
 
62 62
         $this->assertSame(
Please login to merge, or discard this patch.
src/Sensorario/Resources/MagicResource.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Sensorario\Resources;
13 13
 
14 14
 use Sensorario\Resources\Configurator;
15
-use Sensorario\Resources\Exceptions\EmptyComnfigurationException;
16 15
 use Sensorario\Resources\Validators\ResourcesValidator;
17 16
 
18 17
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         foreach ($properties as $k => $v) {
66 66
             if ('object' === gettype($v) && !isset($this->rules()[$k])) {
67 67
                 throw new \Sensorario\Resources\Exceptions\PropertyWithoutRuleException(
68
-                    'When property `' . $k . '` is an object class, must be defined in Resources::rules()'.
68
+                    'When property `' . $k . '` is an object class, must be defined in Resources::rules()' .
69 69
                     ' but rules here are equals to ' . var_export($this->rules(), true)
70 70
                     . ' And properties are ' . var_export($this->properties, true)
71 71
                 );
Please login to merge, or discard this patch.
src/Sensorario/Resources/Validators/Validators/AllowedProperties.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                 if (!$isAllowed) {
37 37
                     throw new \Sensorario\Resources\Exceptions\NotAllowedKeyException(
38 38
                         "Key `" . get_class($resource)
39
-                        . "::\$$key` with value `" .  $value
39
+                        . "::\$$key` with value `" . $value
40 40
                         . "` is not allowed"
41 41
                     );
42 42
                 }
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
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         if ($this->typeMismatch()) {
74 74
             if ($this->resource->isFieldNumericButString($this->fieldName)) {
75 75
                 throw new \Sensorario\Resources\Exceptions\WrongPropertyValueException(
76
-                    'Property `'.$this->fieldName.'` must be an integer!'
76
+                    'Property `' . $this->fieldName . '` must be an integer!'
77 77
                 );
78 78
             }
79 79
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         if ($this->rule->isNotMail()) {
107 107
             throw new \Sensorario\Resources\Exceptions\InvalidCustomValidatorException(
108
-                'Oops! `'. $this->rule->getRuleType() .'` custom validator is not available. Only email is.'
108
+                'Oops! `' . $this->rule->getRuleType() . '` custom validator is not available. Only email is.'
109 109
             );
110 110
         }
111 111
     }
Please login to merge, or discard this patch.
tests/Sensorario/Helpers/JsonExporterTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use PHPUnit\Framework\TestCase;
16 16
 use Resources\BirthDay;
17 17
 use Sensorario\Resources\Helpers\JsonExporter;
18
-use Sensorario\Resources\Resources\Resource;
19 18
 use Sensorario\Resources\Validators\ResourcesValidator;
20 19
 
21 20
 final class JsonExporterTest extends TestCase
Please login to merge, or discard this patch.
src/Sensorario/Resources/Validators/ResourcesValidator.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 namespace Sensorario\Resources\Validators;
12 12
 
13
-use Sensorario\Container\Container;
14 13
 use Sensorario\Resources\Resource;
15 14
 
16 15
 final class ResourcesValidator
Please login to merge, or discard this patch.