Passed
Branch 3.0.0 (bab743)
by Joao
04:18
created
src/Dataset/TextFileDataset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $this->source = $source;
41 41
 
42 42
             if (!file_exists($this->source)) {
43
-                throw new NotFoundException("The specified file " . $this->source . " does not exists");
43
+                throw new NotFoundException("The specified file ".$this->source." does not exists");
44 44
             }
45 45
 
46 46
             $this->sourceType = "FILE";
Please login to merge, or discard this patch.
src/Dataset/IteratorFilter.php 2 patches
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -140,7 +140,6 @@  discard block
 block discarded – undo
140 140
 
141 141
     /**
142 142
      * Add a "("
143
-
144 143
      */
145 144
     public function startGroup()
146 145
     {
@@ -149,7 +148,6 @@  discard block
 block discarded – undo
149 148
 
150 149
     /**
151 150
      * Add a ")"
152
-
153 151
      */
154 152
     public function endGroup()
155 153
     {
Please login to merge, or discard this patch.
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -73,37 +73,37 @@
 block discarded – undo
73 73
 
74 74
             foreach ($field as $valueparam) {
75 75
                 switch ($relation) {
76
-                    case Relation::EQUAL:
77
-                        $result[$pos] &= ($valueparam == $value);
78
-                        break;
76
+                case Relation::EQUAL:
77
+                    $result[$pos] &= ($valueparam == $value);
78
+                    break;
79 79
 
80
-                    case Relation::GREATER_THAN:
81
-                        $result[$pos] &= ($valueparam > $value);
82
-                        break;
80
+                case Relation::GREATER_THAN:
81
+                    $result[$pos] &= ($valueparam > $value);
82
+                    break;
83 83
 
84
-                    case Relation::LESS_THAN:
85
-                        $result[$pos] &= ($valueparam < $value);
86
-                        break;
84
+                case Relation::LESS_THAN:
85
+                    $result[$pos] &= ($valueparam < $value);
86
+                    break;
87 87
 
88
-                    case Relation::GREATER_OR_EQUAL_THAN:
89
-                        $result[$pos] &= ($valueparam >= $value);
90
-                        break;
88
+                case Relation::GREATER_OR_EQUAL_THAN:
89
+                    $result[$pos] &= ($valueparam >= $value);
90
+                    break;
91 91
 
92
-                    case Relation::LESS_OR_EQUAL_THAN:
93
-                        $result[$pos] &= ($valueparam <= $value);
94
-                        break;
92
+                case Relation::LESS_OR_EQUAL_THAN:
93
+                    $result[$pos] &= ($valueparam <= $value);
94
+                    break;
95 95
 
96
-                    case Relation::NOT_EQUAL:
97
-                        $result[$pos] &= ($valueparam != $value);
98
-                        break;
96
+                case Relation::NOT_EQUAL:
97
+                    $result[$pos] &= ($valueparam != $value);
98
+                    break;
99 99
 
100
-                    case Relation::STARTS_WITH:
101
-                        $result[$pos] &= (strpos($valueparam, $value) === 0);
102
-                        break;
100
+                case Relation::STARTS_WITH:
101
+                    $result[$pos] &= (strpos($valueparam, $value) === 0);
102
+                    break;
103 103
 
104
-                    case Relation::CONTAINS:
105
-                        $result[$pos] &= (strpos($valueparam, $value) !== false);
106
-                        break;
104
+                case Relation::CONTAINS:
105
+                    $result[$pos] &= (strpos($valueparam, $value) !== false);
106
+                    break;
107 107
 
108 108
                 }
109 109
             }
Please login to merge, or discard this patch.
src/Dataset/SocketIterator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
         }
42 42
 
43 43
         $this->rows = array();
44
-        $rowsaux = preg_split("/" . $this->rowsep . "/", $linha);
44
+        $rowsaux = preg_split("/".$this->rowsep."/", $linha);
45 45
         sort($rowsaux);
46 46
         foreach ($rowsaux as $key => $value) {
47
-            $colsaux = preg_split("/" . $this->colsep . "/", $value);
47
+            $colsaux = preg_split("/".$this->colsep."/", $value);
48 48
             if (sizeof($colsaux) == sizeof($fieldnames)) {
49 49
                 $this->rows[] = $value;
50 50
             }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function moveNext()
79 79
     {
80
-        $cols = preg_split("/" . $this->colsep . "/", $this->rows[$this->current]);
80
+        $cols = preg_split("/".$this->colsep."/", $this->rows[$this->current]);
81 81
         $this->current++;
82 82
 
83 83
         $sr = new SingleRow();
Please login to merge, or discard this patch.
src/Dataset/IteratorFilterXPathFormatter.php 2 patches
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -26,37 +26,37 @@
 block discarded – undo
26 26
 
27 27
         $result = "";
28 28
         switch ($relation) {
29
-            case Relation::EQUAL:
30
-                $result = $field . "=" . $value;
31
-                break;
29
+        case Relation::EQUAL:
30
+            $result = $field . "=" . $value;
31
+            break;
32 32
 
33
-            case Relation::GREATER_THAN:
34
-                $result = $field . ">" . $value;
35
-                break;
33
+        case Relation::GREATER_THAN:
34
+            $result = $field . ">" . $value;
35
+            break;
36 36
 
37
-            case Relation::LESS_THAN:
38
-                $result = $field . "<" . $value;
39
-                break;
37
+        case Relation::LESS_THAN:
38
+            $result = $field . "<" . $value;
39
+            break;
40 40
 
41
-            case Relation::GREATER_OR_EQUAL_THAN:
42
-                $result = $field . ">=" . $value;
43
-                break;
41
+        case Relation::GREATER_OR_EQUAL_THAN:
42
+            $result = $field . ">=" . $value;
43
+            break;
44 44
 
45
-            case Relation::LESS_OR_EQUAL_THAN:
46
-                $result = $field . "<=" . $value;
47
-                break;
45
+        case Relation::LESS_OR_EQUAL_THAN:
46
+            $result = $field . "<=" . $value;
47
+            break;
48 48
 
49
-            case Relation::NOT_EQUAL:
50
-                $result = $field . "!=" . $value;
51
-                break;
49
+        case Relation::NOT_EQUAL:
50
+            $result = $field . "!=" . $value;
51
+            break;
52 52
 
53
-            case Relation::STARTS_WITH:
54
-                $result = " starts-with($field, $value) ";
55
-                break;
53
+        case Relation::STARTS_WITH:
54
+            $result = " starts-with($field, $value) ";
55
+            break;
56 56
 
57
-            case Relation::CONTAINS:
58
-                $result = " contains($field, $value) ";
59
-                break;
57
+        case Relation::CONTAINS:
58
+            $result = " contains($field, $value) ";
59
+            break;
60 60
 
61 61
         }
62 62
         return $result;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,39 +15,39 @@
 block discarded – undo
15 15
             return "/anydataset/row";
16 16
         }
17 17
 
18
-        return "/anydataset/row[" . $xpathFilter . "]";
18
+        return "/anydataset/row[".$xpathFilter."]";
19 19
     }
20 20
 
21 21
     public function getRelation($name, $relation, $value, &$param)
22 22
     {
23 23
         $str = is_numeric($value) ? "" : "'";
24
-        $field = "field[@name='" . $name . "'] ";
24
+        $field = "field[@name='".$name."'] ";
25 25
         $value = " $str$value$str ";
26 26
 
27 27
         $result = "";
28 28
         switch ($relation) {
29 29
             case Relation::EQUAL:
30
-                $result = $field . "=" . $value;
30
+                $result = $field."=".$value;
31 31
                 break;
32 32
 
33 33
             case Relation::GREATER_THAN:
34
-                $result = $field . ">" . $value;
34
+                $result = $field.">".$value;
35 35
                 break;
36 36
 
37 37
             case Relation::LESS_THAN:
38
-                $result = $field . "<" . $value;
38
+                $result = $field."<".$value;
39 39
                 break;
40 40
 
41 41
             case Relation::GREATER_OR_EQUAL_THAN:
42
-                $result = $field . ">=" . $value;
42
+                $result = $field.">=".$value;
43 43
                 break;
44 44
 
45 45
             case Relation::LESS_OR_EQUAL_THAN:
46
-                $result = $field . "<=" . $value;
46
+                $result = $field."<=".$value;
47 47
                 break;
48 48
 
49 49
             case Relation::NOT_EQUAL:
50
-                $result = $field . "!=" . $value;
50
+                $result = $field."!=".$value;
51 51
                 break;
52 52
 
53 53
             case Relation::STARTS_WITH:
Please login to merge, or discard this patch.
src/Dataset/JsonDataset.php 2 patches
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@
 block discarded – undo
23 23
 
24 24
         $lastError = json_last_error();
25 25
         switch ($lastError) {
26
-            case JSON_ERROR_NONE:
27
-                $lastErrorDesc = 'No errors';
28
-                break;
29
-            case JSON_ERROR_DEPTH:
30
-                $lastErrorDesc = 'Maximum stack depth exceeded';
31
-                break;
32
-            case JSON_ERROR_STATE_MISMATCH:
33
-                $lastErrorDesc = 'Underflow or the modes mismatch';
34
-                break;
35
-            case JSON_ERROR_CTRL_CHAR:
36
-                $lastErrorDesc = 'Unexpected control character found';
37
-                break;
38
-            case JSON_ERROR_SYNTAX:
39
-                $lastErrorDesc = 'Syntax error, malformed JSON';
40
-                break;
41
-            case JSON_ERROR_UTF8:
42
-                $lastErrorDesc = 'Malformed UTF-8 characters, possibly incorrectly encoded';
43
-                break;
44
-            default:
45
-                $lastErrorDesc = 'Unknown error';
46
-                break;
26
+        case JSON_ERROR_NONE:
27
+            $lastErrorDesc = 'No errors';
28
+            break;
29
+        case JSON_ERROR_DEPTH:
30
+            $lastErrorDesc = 'Maximum stack depth exceeded';
31
+            break;
32
+        case JSON_ERROR_STATE_MISMATCH:
33
+            $lastErrorDesc = 'Underflow or the modes mismatch';
34
+            break;
35
+        case JSON_ERROR_CTRL_CHAR:
36
+            $lastErrorDesc = 'Unexpected control character found';
37
+            break;
38
+        case JSON_ERROR_SYNTAX:
39
+            $lastErrorDesc = 'Syntax error, malformed JSON';
40
+            break;
41
+        case JSON_ERROR_UTF8:
42
+            $lastErrorDesc = 'Malformed UTF-8 characters, possibly incorrectly encoded';
43
+            break;
44
+        default:
45
+            $lastErrorDesc = 'Unknown error';
46
+            break;
47 47
         }
48 48
 
49 49
         if ($lastError != JSON_ERROR_NONE) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         }
48 48
 
49 49
         if ($lastError != JSON_ERROR_NONE) {
50
-            throw new DatasetException("Invalid JSON string: " . $lastErrorDesc);
50
+            throw new DatasetException("Invalid JSON string: ".$lastErrorDesc);
51 51
         }
52 52
     }
53 53
 
Please login to merge, or discard this patch.
src/Dataset/SingleRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@
 block discarded – undo
219 219
         if (is_array($this->row)) {
220 220
             return json_decode(json_encode($this->row));
221 221
         } else {
222
-            throw new UnexpectedValueException('I expected that getRawFormat is array() but ' . gettype($this->row) . ' was given');
222
+            throw new UnexpectedValueException('I expected that getRawFormat is array() but '.gettype($this->row).' was given');
223 223
         }
224 224
     }
225 225
 
Please login to merge, or discard this patch.
src/Store/DbPdoDriver.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             throw new NotAvailableException("Extension 'PDO' is not loaded");
34 34
         }
35 35
 
36
-        if (!extension_loaded('pdo_' . strtolower($connUri->getScheme()))) {
37
-            throw new NotAvailableException("Extension 'pdo_" . strtolower($connUri->getScheme()) . "' is not loaded");
36
+        if (!extension_loaded('pdo_'.strtolower($connUri->getScheme()))) {
37
+            throw new NotAvailableException("Extension 'pdo_".strtolower($connUri->getScheme())."' is not loaded");
38 38
         }
39 39
 
40 40
         $strcnn = $this->createPboConnStr($connUri);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $pdoConnectionString,
50 50
             $this->connectionUri->getUsername(),
51 51
             $this->connectionUri->getPassword(),
52
-            (array) $preOptions
52
+            (array)$preOptions
53 53
         );
54 54
 
55 55
         $this->connectionUri->withScheme($this->instance->getAttribute(PDO::ATTR_DRIVER_NAME));
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
59 59
         $this->instance->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
60 60
 
61
-        foreach ((array) $postOptions as $key => $value) {
61
+        foreach ((array)$postOptions as $key => $value) {
62 62
             $this->instance->setAttribute($key, $value);
63 63
         }
64 64
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $host = $connUri->getHost();
69 69
         if (empty($host)) {
70
-            return $connUri->getScheme() . ":" . $connUri->getPath();
70
+            return $connUri->getScheme().":".$connUri->getPath();
71 71
         }
72 72
 
73 73
         $database = preg_replace('~^/~', '', $connUri->getPath());
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
             $database = ";dbname=$database";
76 76
         }
77 77
 
78
-        $strcnn = $connUri->getScheme() . ":"
79
-            . "host=" . $connUri->getHost()
78
+        $strcnn = $connUri->getScheme().":"
79
+            . "host=".$connUri->getHost()
80 80
             . $database;
81 81
 
82 82
         if ($connUri->getPort() != "") {
83
-            $strcnn .= ";port=" . $connUri->getPort();
83
+            $strcnn .= ";port=".$connUri->getPort();
84 84
         }
85 85
 
86 86
         $query = $connUri->getQuery();
87
-        $strcnn .= ";" . implode(';', explode('&', $query));
87
+        $strcnn .= ";".implode(';', explode('&', $query));
88 88
 
89 89
         return $strcnn;
90 90
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         if (!empty($array)) {
110 110
             foreach ($array as $key => $value) {
111
-                $stmt->bindValue(":" . SqlBind::keyAdj($key), $value);
111
+                $stmt->bindValue(":".SqlBind::keyAdj($key), $value);
112 112
             }
113 113
         }
114 114
 
Please login to merge, or discard this patch.
src/Store/DbSqlRelayDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             sqlrcur_prepareQuery($cur, $sql);
57 57
             $bindCount = 1;
58 58
             foreach ($array as $key => $value) {
59
-                $field = strval($bindCount ++);
59
+                $field = strval($bindCount++);
60 60
                 sqlrcur_inputBind($cur, $field, $value);
61 61
             }
62 62
             $success = sqlrcur_executeQuery($cur);
Please login to merge, or discard this patch.
src/Store/DbOci8Driver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
 
72 72
         $host = $connUri->getHost();
73 73
 
74
-        $tns = "(DESCRIPTION = " .
75
-            "    (ADDRESS = (PROTOCOL = $protocol)(HOST = $host)(PORT = $port)) " .
76
-            "        (CONNECT_DATA = (SERVICE_NAME = $svcName)) " .
74
+        $tns = "(DESCRIPTION = ".
75
+            "    (ADDRESS = (PROTOCOL = $protocol)(HOST = $host)(PORT = $port)) ".
76
+            "        (CONNECT_DATA = (SERVICE_NAME = $svcName)) ".
77 77
             ")";
78 78
 
79 79
         return $tns;
Please login to merge, or discard this patch.