Passed
Pull Request — master (#2)
by Alex
07:15
created
test/unit/Filter/IsNotEqualTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $criteria = [
93 93
             'field'  => $fieldName,
94 94
             'alias'  => 'test',
95
-            'where'  => WhereType::AND,
95
+            'where'  => WhereType:: AND ,
96 96
             'value'  => 123,
97 97
             'format' => null,
98 98
         ];
@@ -112,17 +112,17 @@  discard block
 block discarded – undo
112 112
         /** @var Expr\Comparison|MockObject $neq */
113 113
         $neq = $this->createMock(Expr\Comparison::class);
114 114
 
115
-        $isNotEqualString = $criteria['alias'] . '.' . $fieldName . '!=' . ':param_name';
115
+        $isNotEqualString = $criteria['alias'].'.'.$fieldName.'!='.':param_name';
116 116
         $expr->expects($this->once())
117 117
             ->method('neq')
118
-            ->with($criteria['alias'] . '.' . $fieldName, $this->stringStartsWith(':'))
118
+            ->with($criteria['alias'].'.'.$fieldName, $this->stringStartsWith(':'))
119 119
             ->willReturn($neq);
120 120
 
121 121
         $neq->expects($this->once())
122 122
             ->method('__toString')
123 123
             ->willReturn($isNotEqualString);
124 124
 
125
-        $methodName = (!isset($criteria['where']) || WhereType::AND === $criteria['where'])
125
+        $methodName = (!isset($criteria['where']) || WhereType:: AND === $criteria['where'])
126 126
             ? 'andWhere'
127 127
             : 'orWhere';
128 128
 
Please login to merge, or discard this patch.
src/Filter/IsNotNull.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
      */
23 23
     protected function createExpression(Expr $expr, string $fieldName, string $parameterName, string $alias): string
24 24
     {
25
-        return (string)$expr->isNotNull($alias . '.' . $fieldName);
25
+        return (string) $expr->isNotNull($alias.'.'.$fieldName);
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
src/Filter/Typecaster.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,25 +65,25 @@
 block discarded – undo
65 65
             $type = $metadata->getFieldType($fieldName);
66 66
         }
67 67
 
68
-        $castDates = isset($options['cast_dates']) ? (bool)$options['cast_dates'] : true;
68
+        $castDates = isset($options['cast_dates']) ? (bool) $options['cast_dates'] : true;
69 69
         switch ($type) {
70 70
             case 'integer':
71 71
             case 'smallint':
72 72
             case 'bigint': // Remove?
73
-                $value = (int)$value;
73
+                $value = (int) $value;
74 74
             break;
75 75
 
76 76
             case 'boolean':
77
-                $value = (bool)$value;
77
+                $value = (bool) $value;
78 78
             break;
79 79
 
80 80
             case 'decimal':
81 81
             case 'float':
82
-                $value = (float)$value;
82
+                $value = (float) $value;
83 83
             break;
84 84
 
85 85
             case 'string':
86
-                $value = (string)$value;
86
+                $value = (string) $value;
87 87
             break;
88 88
 
89 89
             case 'date':
Please login to merge, or discard this patch.