@@ -100,7 +100,7 @@ |
||
100 | 100 | $documentToUpdate = new NoSqlDocument( |
101 | 101 | $document[0]->getIdDocument(), |
102 | 102 | self::TEST_COLLECTION, |
103 | - [ 'price' => 150000 ] |
|
103 | + ['price' => 150000] |
|
104 | 104 | ); |
105 | 105 | sleep(1); // Just to force a new Update DateTime |
106 | 106 | $documentSaved = $this->dbDriver->save($documentToUpdate); |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | $connectionString, |
28 | 28 | array_merge( |
29 | 29 | [ |
30 | - "sqlrelay" => $prefix . "DbSqlRelayDriver", |
|
31 | - "oci8" => $prefix . "DbOci8Driver", |
|
32 | - "dblib" => $prefix . "PdoDblib", |
|
33 | - "mysql" => $prefix . "PdoMysql", |
|
34 | - "pgsql" => $prefix . "PdoPgsql", |
|
35 | - "oci" => $prefix . "PdoOci", |
|
36 | - "odbc" => $prefix . "PdoOdbc", |
|
37 | - "sqlite" => $prefix . "PdoSqlite", |
|
30 | + "sqlrelay" => $prefix."DbSqlRelayDriver", |
|
31 | + "oci8" => $prefix."DbOci8Driver", |
|
32 | + "dblib" => $prefix."PdoDblib", |
|
33 | + "mysql" => $prefix."PdoMysql", |
|
34 | + "pgsql" => $prefix."PdoPgsql", |
|
35 | + "oci" => $prefix."PdoOci", |
|
36 | + "odbc" => $prefix."PdoOdbc", |
|
37 | + "sqlite" => $prefix."PdoSqlite", |
|
38 | 38 | ], |
39 | 39 | (array)$schemesAlternative |
40 | 40 | ), |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $connectionString, |
58 | 58 | array_merge( |
59 | 59 | [ |
60 | - "mongodb" => $prefix . "MongoDbDriver", |
|
60 | + "mongodb" => $prefix."MongoDbDriver", |
|
61 | 61 | ], |
62 | 62 | (array)$schemesAlternative |
63 | 63 | ), |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $connectionString, |
76 | 76 | array_merge( |
77 | 77 | [ |
78 | - "s3" => $prefix . "AwsS3Driver", |
|
78 | + "s3" => $prefix."AwsS3Driver", |
|
79 | 79 | ], |
80 | 80 | (array)$schemesAlternative |
81 | 81 | ), |
@@ -57,8 +57,8 @@ |
||
57 | 57 | throw new DatasetException("Socket error: $errstr ($errno)"); |
58 | 58 | } |
59 | 59 | |
60 | - $out = "GET " . $this->path . " HTTP/1.1\r\n"; |
|
61 | - $out .= "Host: " . $this->server . "\r\n"; |
|
60 | + $out = "GET ".$this->path." HTTP/1.1\r\n"; |
|
61 | + $out .= "Host: ".$this->server."\r\n"; |
|
62 | 62 | $out .= "Connection: Close\r\n\r\n"; |
63 | 63 | |
64 | 64 | fwrite($handle, $out); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | if (!preg_match("~^https?://~", $source)) { |
39 | 39 | if (!file_exists($this->source)) { |
40 | - throw new NotFoundException("The specified file " . $this->source . " does not exists"); |
|
40 | + throw new NotFoundException("The specified file ".$this->source." does not exists"); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $this->sourceType = "FILE"; |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | throw new DatasetException("TextFileDataset Socket error: $errstr ($errno)"); |
81 | 81 | } |
82 | 82 | |
83 | - $out = "GET " . $urlParts[4] . " HTTP/1.1\r\n"; |
|
84 | - $out .= "Host: " . $urlParts[2] . "\r\n"; |
|
83 | + $out = "GET ".$urlParts[4]." HTTP/1.1\r\n"; |
|
84 | + $out .= "Host: ".$urlParts[2]."\r\n"; |
|
85 | 85 | $out .= "Connection: Close\r\n\r\n"; |
86 | 86 | |
87 | 87 | fwrite($handle, $out); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | if (function_exists('dba_open')) { |
31 | - $cache = sys_get_temp_dir() . "/caps.db"; |
|
31 | + $cache = sys_get_temp_dir()."/caps.db"; |
|
32 | 32 | $this->connection->capabilityCache($cache); |
33 | 33 | } |
34 | 34 | } |
@@ -35,47 +35,47 @@ |
||
35 | 35 | $paramName = $name; |
36 | 36 | $counter = 0; |
37 | 37 | while (array_key_exists($paramName, $param)) { |
38 | - $paramName = $name . ($counter++); |
|
38 | + $paramName = $name.($counter++); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $param[$paramName] = $value; |
42 | 42 | |
43 | 43 | $result = ""; |
44 | 44 | $field = " $name "; |
45 | - $valueparam = " [[" . $paramName . "]] "; |
|
45 | + $valueparam = " [[".$paramName."]] "; |
|
46 | 46 | switch ($relation) { |
47 | 47 | case Relation::EQUAL: |
48 | - $result = $field . "=" . $valueparam; |
|
48 | + $result = $field."=".$valueparam; |
|
49 | 49 | break; |
50 | 50 | |
51 | 51 | case Relation::GREATER_THAN: |
52 | - $result = $field . ">" . $valueparam; |
|
52 | + $result = $field.">".$valueparam; |
|
53 | 53 | break; |
54 | 54 | |
55 | 55 | case Relation::LESS_THAN: |
56 | - $result = $field . "<" . $valueparam; |
|
56 | + $result = $field."<".$valueparam; |
|
57 | 57 | break; |
58 | 58 | |
59 | 59 | case Relation::GREATER_OR_EQUAL_THAN: |
60 | - $result = $field . ">=" . $valueparam; |
|
60 | + $result = $field.">=".$valueparam; |
|
61 | 61 | break; |
62 | 62 | |
63 | 63 | case Relation::LESS_OR_EQUAL_THAN: |
64 | - $result = $field . "<=" . $valueparam; |
|
64 | + $result = $field."<=".$valueparam; |
|
65 | 65 | break; |
66 | 66 | |
67 | 67 | case Relation::NOT_EQUAL: |
68 | - $result = $field . "!=" . $valueparam; |
|
68 | + $result = $field."!=".$valueparam; |
|
69 | 69 | break; |
70 | 70 | |
71 | 71 | case Relation::STARTS_WITH: |
72 | - $param[$paramName] = $value . "%"; |
|
73 | - $result = $field . " like " . $valueparam; |
|
72 | + $param[$paramName] = $value."%"; |
|
73 | + $result = $field." like ".$valueparam; |
|
74 | 74 | break; |
75 | 75 | |
76 | 76 | case Relation::CONTAINS: |
77 | - $param[$paramName] = "%" . $value . "%"; |
|
78 | - $result = $field . " like " . $valueparam; |
|
77 | + $param[$paramName] = "%".$value."%"; |
|
78 | + $result = $field." like ".$valueparam; |
|
79 | 79 | break; |
80 | 80 | |
81 | 81 | } |
@@ -40,7 +40,7 @@ |
||
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"; |
@@ -15,39 +15,39 @@ |
||
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: |
@@ -33,8 +33,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |