Passed
Push — master ( 48b1ba...935bf2 )
by Luca
03:20 queued 01:33
created
src/Filter/ValueFilter/LowerThanEqualFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Class LowerThanEqualFilter
7 7
  * @package Jackal\Copycat\Filter\ValueFilter
8 8
  */
9
-class LowerThanEqualFilter extends AbstractCompareFilter{
9
+class LowerThanEqualFilter extends AbstractCompareFilter {
10 10
 
11 11
     protected function getComparison()
12 12
     {
Please login to merge, or discard this patch.
src/Filter/ValueFilter/NotBlankFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Class NotBlankFilter
7 7
  * @package Jackal\Copycat\Filter\ValueFilter
8 8
  */
9
-class NotBlankFilter extends EqualFilter{
9
+class NotBlankFilter extends EqualFilter {
10 10
     public function __construct($fieldName)
11 11
     {
12 12
         parent::__construct($fieldName, '');
Please login to merge, or discard this patch.
src/Filter/ValueFilter/GreaterThanEqualFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Class GreaterThanEqualFilter
7 7
  * @package Jackal\Copycat\Filter\ValueFilter
8 8
  */
9
-class GreaterThanEqualFilter extends AbstractCompareFilter{
9
+class GreaterThanEqualFilter extends AbstractCompareFilter {
10 10
 
11 11
     protected function getComparison()
12 12
     {
Please login to merge, or discard this patch.
src/Filter/ValueFilter/AbstractCompareFilter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function __invoke($value)
39 39
     {
40
-        return $this->applyComparison($value[$this->fieldName], $this->comparedValue,$this->getComparison());
40
+        return $this->applyComparison($value[$this->fieldName], $this->comparedValue, $this->getComparison());
41 41
     }
42 42
 
43
-    protected function applyComparison($value1,$value2,$comparison){
43
+    protected function applyComparison($value1, $value2, $comparison) {
44 44
 
45 45
         $value1 = $this->parseAsString($value1);
46 46
         $value2 = $this->parseAsString($value2);
47 47
 
48
-        switch ($comparison){
48
+        switch ($comparison) {
49 49
             case self::COMPARISON_EQ:{
50
-                if($value1 === null and $value2 === ''){
50
+                if ($value1 === null and $value2 === '') {
51 51
                     return true;
52 52
                 }
53 53
                 return $value1 === $value2;
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
      * @param mixed $value
76 76
      * @return string|null
77 77
      */
78
-    protected function parseAsString($value){
78
+    protected function parseAsString($value) {
79 79
 
80
-        if($value === null){
80
+        if ($value === null) {
81 81
             return null;
82 82
         }
83
-        if(is_scalar($value)){
83
+        if (is_scalar($value)) {
84 84
             return $value;
85 85
         }
86 86
 
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
             return $value->format('Y-m-d H:i:s');
89 89
         }
90 90
 
91
-        if(is_object($value) and method_exists($value,'__toString')){
92
-            return (string)$value;
91
+        if (is_object($value) and method_exists($value, '__toString')) {
92
+            return (string) $value;
93 93
         }
94 94
 
95 95
         throw new \RuntimeException('Cannot parse filter value');
Please login to merge, or discard this patch.
src/Filter/ValueFilter/GreaterThanFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  * Class GreaterThanFilter
9 9
  * @package Jackal\Copycat\Filter\ValueFilter
10 10
  */
11
-class GreaterThanFilter extends AbstractCompareFilter{
11
+class GreaterThanFilter extends AbstractCompareFilter {
12 12
 
13 13
     protected function getComparison()
14 14
     {
Please login to merge, or discard this patch.
src/Converter/ValueConverter/StringToObjectConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $object = @unserialize($value[$this->fieldName]);
18 18
 
19
-        if($object === false and $value[$this->fieldName] !== serialize(false)){
19
+        if ($object === false and $value[$this->fieldName] !== serialize(false)) {
20 20
             throw new \RuntimeException('Error converting string to object.');
21 21
         }
22 22
         $value[$this->fieldName] = $object;
Please login to merge, or discard this patch.
src/Converter/ValueConverter/DatetimeToStringConverter.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @param $fieldName
23 23
      * @param string $format
24 24
      */
25
-    public function __construct($fieldName, $outputFormat = 'Y-m-d H:i:s',$allowNulls = false)
25
+    public function __construct($fieldName, $outputFormat = 'Y-m-d H:i:s', $allowNulls = false)
26 26
     {
27 27
         parent::__construct($fieldName);
28 28
         $this->format = $outputFormat;
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
         $dateValue = &$value[$this->fieldName];
39 39
 
40 40
         if ($dateValue === null) {
41
-            if($this->allowNulls == false){
41
+            if ($this->allowNulls == false) {
42 42
                 throw new RuntimeException('Input must be DateTime object.');
43
-            }else{
43
+            } else {
44 44
                 $dateValue = null;
45 45
             }
46
-        }else {
46
+        } else {
47 47
             if (!($dateValue instanceof DateTime)) {
48 48
                 throw new RuntimeException('Input must be DateTime object.');
49 49
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@
 block discarded – undo
40 40
         if ($dateValue === null) {
41 41
             if($this->allowNulls == false){
42 42
                 throw new RuntimeException('Input must be DateTime object.');
43
-            }else{
43
+            } else{
44 44
                 $dateValue = null;
45 45
             }
46
-        }else {
46
+        } else {
47 47
             if (!($dateValue instanceof DateTime)) {
48 48
                 throw new RuntimeException('Input must be DateTime object.');
49 49
             }
Please login to merge, or discard this patch.