Completed
Push — master ( ae0103...9b98c5 )
by Joao
04:23 queued 56s
created
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.
src/Store/PdoOci.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public function __construct(Uri $connUri)
12 12
     {
13 13
         $this->connectionUri = $connUri;
14
-        $strconn = $connUri->getScheme(). ":dbname=" . DbOci8Driver::getTnsString($connUri);
14
+        $strconn = $connUri->getScheme().":dbname=".DbOci8Driver::getTnsString($connUri);
15 15
 
16 16
         // Create Connection
17 17
         $this->instance = new PDO(
Please login to merge, or discard this patch.
src/Store/DbCached.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $iterator = $this->dbDriver->getIterator($sql, $params);
54 54
 
55 55
             $cacheItem->set($iterator->toArray());
56
-            $cacheItem->expiresAfter(DateInterval::createFromDateString($this->timeToCache . " seconds"));
56
+            $cacheItem->expiresAfter(DateInterval::createFromDateString($this->timeToCache." seconds"));
57 57
 
58 58
             $this->cacheEngine->save($cacheItem);
59 59
         }
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 
79 79
         // Define the query key
80 80
         if (is_array($arKey2) && count($arKey2) > 0) {
81
-            $key2 = ":" . md5(json_encode($arKey2));
81
+            $key2 = ":".md5(json_encode($arKey2));
82 82
         } else {
83 83
             $key2 = "";
84 84
         }
85 85
 
86
-        return  "qry:" . $key1 . $key2;
86
+        return  "qry:".$key1.$key2;
87 87
     }
88 88
 
89 89
     public function getScalar($sql, $array = null)
Please login to merge, or discard this patch.
src/Store/Helpers/SqlBind.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@
 block discarded – undo
78 78
                     "/:$paramName([^\\w\\d]|$)/",
79 79
                 ],
80 80
                 [
81
-                    $dbArg . '',
82
-                    $dbArg . '$1',
81
+                    $dbArg.'',
82
+                    $dbArg.'$1',
83 83
                 ],
84 84
                 $sql,
85 85
                 -1,
Please login to merge, or discard this patch.
src/Store/Helpers/DbSqliteFunctions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
         }
33 33
 
34 34
         if (stripos($sql, ' LIMIT ') === false) {
35
-            $sql = $sql . " LIMIT x, y";
35
+            $sql = $sql." LIMIT x, y";
36 36
         }
37 37
 
38 38
         return preg_replace(
39 39
             '~(\s[Ll][Ii][Mm][Ii][Tt])\s.*?,\s*.*~',
40
-            '$1 ' . $start .', ' .$qty,
40
+            '$1 '.$start.', '.$qty,
41 41
             $sql
42 42
         );
43 43
     }
Please login to merge, or discard this patch.
src/Store/Helpers/SqlHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                     $campos .= ", ";
80 80
                     $valores .= ", ";
81 81
                 }
82
-                $campos .= $this->fieldDeliLeft . $fieldname . $this->fieldDeliRight;
82
+                $campos .= $this->fieldDeliLeft.$fieldname.$this->fieldDeliRight;
83 83
                 $valores .= $this->getValue($fieldname, $fieldvalue, $param, $decimalpoint);
84 84
             }
85 85
             $sql = "insert into $table ($campos) values ($valores)";
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function getValue($name, $valores, &$param, $decimalpoint)
105 105
     {
106
-        $paramName = "[[" . $name . "]]";
106
+        $paramName = "[[".$name."]]";
107 107
         if (!is_array($valores)) {
108 108
             $valores = array(SQLFieldType::TEXT, $valores);
109 109
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         if (strlen($sql) > 4) {
152 152
             $sql .= ' and ';
153 153
         }
154
-        $sql = " $fieldName " . $relation . " " . $this->getValue($fieldName, $value, $param, '.');
154
+        $sql = " $fieldName ".$relation." ".$this->getValue($fieldName, $value, $param, '.');
155 155
     }
156 156
 
157 157
     public function setFieldDelimeters($left, $right)
Please login to merge, or discard this patch.
src/Store/Helpers/DbMysqlFunctions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
     public function concat($str1, $str2 = null)
11 11
     {
12
-        return "concat(" . implode(func_get_args(), ', ') . ")";
12
+        return "concat(".implode(func_get_args(), ', ').")";
13 13
     }
14 14
 
15 15
     /**
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
         }
27 27
 
28 28
         if (stripos($sql, ' LIMIT ') === false) {
29
-            $sql = $sql . " LIMIT x, y";
29
+            $sql = $sql." LIMIT x, y";
30 30
         }
31 31
 
32 32
         return preg_replace(
33 33
             '~(\s[Ll][Ii][Mm][Ii][Tt])\s.*?,\s*.*~',
34
-            '$1 ' . $start .', ' .$qty,
34
+            '$1 '.$start.', '.$qty,
35 35
             $sql
36 36
         );
37 37
     }
Please login to merge, or discard this patch.