@@ -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); |
@@ -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 | } |
@@ -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"; |
@@ -140,7 +140,6 @@ discard block |
||
140 | 140 | |
141 | 141 | /** |
142 | 142 | * Add a "(" |
143 | - |
|
144 | 143 | */ |
145 | 144 | public function startGroup() |
146 | 145 | { |
@@ -149,7 +148,6 @@ discard block |
||
149 | 148 | |
150 | 149 | /** |
151 | 150 | * Add a ")" |
152 | - |
|
153 | 151 | */ |
154 | 152 | public function endGroup() |
155 | 153 | { |
@@ -72,35 +72,35 @@ |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | $data = [ |
75 | - Relation::EQUAL => function ($valueparam, $value) { |
|
75 | + Relation::EQUAL => function($valueparam, $value) { |
|
76 | 76 | return ($valueparam == $value); |
77 | 77 | }, |
78 | 78 | |
79 | - Relation::GREATER_THAN => function ($valueparam, $value) { |
|
79 | + Relation::GREATER_THAN => function($valueparam, $value) { |
|
80 | 80 | return ($valueparam > $value); |
81 | 81 | }, |
82 | 82 | |
83 | - Relation::LESS_THAN => function ($valueparam, $value) { |
|
83 | + Relation::LESS_THAN => function($valueparam, $value) { |
|
84 | 84 | return ($valueparam < $value); |
85 | 85 | }, |
86 | 86 | |
87 | - Relation::GREATER_OR_EQUAL_THAN => function ($valueparam, $value) { |
|
87 | + Relation::GREATER_OR_EQUAL_THAN => function($valueparam, $value) { |
|
88 | 88 | return ($valueparam >= $value); |
89 | 89 | }, |
90 | 90 | |
91 | - Relation::LESS_OR_EQUAL_THAN => function ($valueparam, $value) { |
|
91 | + Relation::LESS_OR_EQUAL_THAN => function($valueparam, $value) { |
|
92 | 92 | return ($valueparam <= $value); |
93 | 93 | }, |
94 | 94 | |
95 | - Relation::NOT_EQUAL => function ($valueparam, $value) { |
|
95 | + Relation::NOT_EQUAL => function($valueparam, $value) { |
|
96 | 96 | return ($valueparam != $value); |
97 | 97 | }, |
98 | 98 | |
99 | - Relation::STARTS_WITH => function ($valueparam, $value) { |
|
99 | + Relation::STARTS_WITH => function($valueparam, $value) { |
|
100 | 100 | return (strpos($valueparam, $value) === 0); |
101 | 101 | }, |
102 | 102 | |
103 | - Relation::CONTAINS => function ($valueparam, $value) { |
|
103 | + Relation::CONTAINS => function($valueparam, $value) { |
|
104 | 104 | return (strpos($valueparam, $value) !== false); |
105 | 105 | }, |
106 | 106 | ]; |
@@ -23,27 +23,27 @@ |
||
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) { |
@@ -47,7 +47,7 @@ |
||
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 |
@@ -103,7 +103,7 @@ |
||
103 | 103 | $fields[$fieldDef->fieldName] = substr($buffer, $fieldDef->startPos, $fieldDef->length); |
104 | 104 | if (!empty($fieldDef->requiredValue) |
105 | 105 | && ( |
106 | - !preg_match("/^[" . $fieldDef->requiredValue . "]$/", $fields[$fieldDef->fieldName]) |
|
106 | + !preg_match("/^[".$fieldDef->requiredValue."]$/", $fields[$fieldDef->fieldName]) |
|
107 | 107 | ) |
108 | 108 | ) { |
109 | 109 | throw new IteratorException( |
@@ -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 |