@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | use PropertyFilterTrait; |
| 26 | 26 | |
| 27 | - const SUB_DIRECTORY = 'browscap' . DIRECTORY_SEPARATOR . 'sqlite'; |
|
| 27 | + const SUB_DIRECTORY = 'browscap'.DIRECTORY_SEPARATOR.'sqlite'; |
|
| 28 | 28 | const LINK_FILENAME = 'browscap.link'; |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | if (!is_string($dataDirectory) && $dataDirectory !== null) { |
| 67 | 67 | throw new InvalidArgumentException( |
| 68 | - "Invalid type '" . gettype($dataDirectory) . "' for argument 'dataDirectory'." |
|
| 68 | + "Invalid type '".gettype($dataDirectory)."' for argument 'dataDirectory'." |
|
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | if (!is_string($directory)) { |
| 125 | 125 | throw new InvalidArgumentException( |
| 126 | - "Invalid type '" . gettype($directory) . "' for argument 'directory'." |
|
| 126 | + "Invalid type '".gettype($directory)."' for argument 'directory'." |
|
| 127 | 127 | ); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $this->checkDirectory($directory, false); |
| 134 | 134 | |
| 135 | 135 | // Check/create sub directory |
| 136 | - $directory = $directory . DIRECTORY_SEPARATOR . self::SUB_DIRECTORY; |
|
| 136 | + $directory = $directory.DIRECTORY_SEPARATOR.self::SUB_DIRECTORY; |
|
| 137 | 137 | $this->checkDirectory($directory, true); |
| 138 | 138 | |
| 139 | 139 | $this->dataDirectory = $directory; |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | { |
| 175 | 175 | if (!is_string($directory)) { |
| 176 | 176 | throw new InvalidArgumentException( |
| 177 | - "Invalid type '" . gettype($directory) . "' for argument 'directory'." |
|
| 177 | + "Invalid type '".gettype($directory)."' for argument 'directory'." |
|
| 178 | 178 | ); |
| 179 | 179 | } |
| 180 | 180 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | { |
| 192 | 192 | if (!is_string($directory)) { |
| 193 | 193 | throw new InvalidArgumentException( |
| 194 | - "Invalid type '" . gettype($directory) . "' for argument 'directory'." |
|
| 194 | + "Invalid type '".gettype($directory)."' for argument 'directory'." |
|
| 195 | 195 | ); |
| 196 | 196 | } |
| 197 | 197 | |
@@ -231,9 +231,9 @@ discard block |
||
| 231 | 231 | sort($properties); |
| 232 | 232 | |
| 233 | 233 | return sha1( |
| 234 | - static::class . '|' . |
|
| 235 | - static::VERSION . '|' . |
|
| 236 | - get_class($filter) . '|' . |
|
| 234 | + static::class.'|'. |
|
| 235 | + static::VERSION.'|'. |
|
| 236 | + get_class($filter).'|'. |
|
| 237 | 237 | implode(',', $properties) |
| 238 | 238 | ); |
| 239 | 239 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | if (!is_string($dataDirectory)) { |
| 65 | 65 | throw new InvalidArgumentException( |
| 66 | - "Invalid type '" . gettype($dataDirectory) . "' for argument 'dataDirectory'." |
|
| 66 | + "Invalid type '".gettype($dataDirectory)."' for argument 'dataDirectory'." |
|
| 67 | 67 | ); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function getDatabasePath() |
| 99 | 99 | { |
| 100 | - $databasePath = $this->getDataDirectory() . DIRECTORY_SEPARATOR . $this->getDatabaseFileName(); |
|
| 100 | + $databasePath = $this->getDataDirectory().DIRECTORY_SEPARATOR.$this->getDatabaseFileName(); |
|
| 101 | 101 | |
| 102 | 102 | if (!$this->isFileReadable($databasePath)) { |
| 103 | 103 | if (!file_exists($databasePath)) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | { |
| 126 | 126 | // Get database to use, saved in the link file (as symlinks are not available or only |
| 127 | 127 | // with admin permissions on Windows). |
| 128 | - $linkFile = $this->getDataDirectory() . DIRECTORY_SEPARATOR . Parser::LINK_FILENAME; |
|
| 128 | + $linkFile = $this->getDataDirectory().DIRECTORY_SEPARATOR.Parser::LINK_FILENAME; |
|
| 129 | 129 | if ($this->isFileReadable($linkFile)) { |
| 130 | 130 | return (string)file_get_contents($linkFile); |
| 131 | 131 | } elseif (!file_exists($linkFile)) { |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | { |
| 149 | 149 | if (!is_string($file)) { |
| 150 | 150 | throw new InvalidArgumentException( |
| 151 | - "Invalid type '" . gettype($file) . "' for argument 'file'." |
|
| 151 | + "Invalid type '".gettype($file)."' for argument 'file'." |
|
| 152 | 152 | ); |
| 153 | 153 | } |
| 154 | 154 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | { |
| 260 | 260 | if (!is_string($userAgent)) { |
| 261 | 261 | throw new InvalidArgumentException( |
| 262 | - "Invalid type '" . gettype($userAgent) . "' for argument 'userAgent'." |
|
| 262 | + "Invalid type '".gettype($userAgent)."' for argument 'userAgent'." |
|
| 263 | 263 | ); |
| 264 | 264 | } |
| 265 | 265 | |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | { |
| 366 | 366 | if (!is_string($userAgent)) { |
| 367 | 367 | throw new InvalidArgumentException( |
| 368 | - "Invalid type '" . gettype($userAgent) . "' for argument 'userAgent'." |
|
| 368 | + "Invalid type '".gettype($userAgent)."' for argument 'userAgent'." |
|
| 369 | 369 | ); |
| 370 | 370 | } |
| 371 | 371 | |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | { |
| 398 | 398 | if (!is_string($userAgent)) { |
| 399 | 399 | throw new InvalidArgumentException( |
| 400 | - "Invalid type '" . gettype($userAgent) . "' for argument 'userAgent'." |
|
| 400 | + "Invalid type '".gettype($userAgent)."' for argument 'userAgent'." |
|
| 401 | 401 | ); |
| 402 | 402 | } |
| 403 | 403 | |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | { |
| 454 | 454 | if (!is_string($userAgent)) { |
| 455 | 455 | throw new InvalidArgumentException( |
| 456 | - "Invalid type '" . gettype($userAgent) . "' for argument 'userAgent'." |
|
| 456 | + "Invalid type '".gettype($userAgent)."' for argument 'userAgent'." |
|
| 457 | 457 | ); |
| 458 | 458 | } |
| 459 | 459 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $this->connection = new \SQLite3($this->getFileName()); |
| 57 | 57 | } catch (\Exception $e) { |
| 58 | 58 | throw new ParserConfigurationException( |
| 59 | - "Could not connect to database '" . $this->getFileName() . "'.", 0, $e |
|
| 59 | + "Could not connect to database '".$this->getFileName()."'.", 0, $e |
|
| 60 | 60 | ); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | if (!is_string($statement)) { |
| 111 | 111 | throw new InvalidArgumentException( |
| 112 | - "Invalid type '" . gettype($statement) . "' for argument 'statement'." |
|
| 112 | + "Invalid type '".gettype($statement)."' for argument 'statement'." |
|
| 113 | 113 | ); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | if (!is_string($statement)) { |
| 140 | 140 | throw new InvalidArgumentException( |
| 141 | - "Invalid type '" . gettype($statement) . "' for argument 'statement'." |
|
| 141 | + "Invalid type '".gettype($statement)."' for argument 'statement'." |
|
| 142 | 142 | ); |
| 143 | 143 | } |
| 144 | 144 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | { |
| 163 | 163 | if (!is_string($statement)) { |
| 164 | 164 | throw new InvalidArgumentException( |
| 165 | - "Invalid type '" . gettype($statement) . "' for argument 'statement'." |
|
| 165 | + "Invalid type '".gettype($statement)."' for argument 'statement'." |
|
| 166 | 166 | ); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | { |
| 47 | 47 | if (!is_string($fileName)) { |
| 48 | 48 | throw new InvalidArgumentException( |
| 49 | - "Invalid type '" . gettype($fileName) . "' for argument 'fileName'." |
|
| 49 | + "Invalid type '".gettype($fileName)."' for argument 'fileName'." |
|
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | if (!is_string($fileName)) { |
| 36 | 36 | throw new InvalidArgumentException( |
| 37 | - "Invalid type '" . gettype($fileName) . "' for argument 'fileName'." |
|
| 37 | + "Invalid type '".gettype($fileName)."' for argument 'fileName'." |
|
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | self::$adapterClasses = $rememberClasses; |
| 69 | 69 | |
| 70 | 70 | throw new InvalidArgumentException( |
| 71 | - "A value in the class name array is of type '" . gettype($className) . "'. String expected." |
|
| 71 | + "A value in the class name array is of type '".gettype($className)."'. String expected." |
|
| 72 | 72 | ); |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | if (!is_string($className)) { |
| 88 | 88 | throw new InvalidArgumentException( |
| 89 | - "Invalid type '" . gettype($className) . "' for argument 'className'." |
|
| 89 | + "Invalid type '".gettype($className)."' for argument 'className'." |
|
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | if (!is_string($fileName)) { |
| 93 | 93 | throw new InvalidArgumentException( |
| 94 | - "Invalid type '" . gettype($fileName) . "' for argument 'fileName'." |
|
| 94 | + "Invalid type '".gettype($fileName)."' for argument 'fileName'." |
|
| 95 | 95 | ); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | if ($this->connection === null) { |
| 55 | 55 | try { |
| 56 | - $this->connection = new \PDO('sqlite:' . $this->getFileName()); |
|
| 56 | + $this->connection = new \PDO('sqlite:'.$this->getFileName()); |
|
| 57 | 57 | $this->connection->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); |
| 58 | 58 | } catch (\PDOException $e) { |
| 59 | 59 | throw new ParserConfigurationException( |
| 60 | - "Could not connect to database '" . $this->getFileName() . "'.", 0, $e |
|
| 60 | + "Could not connect to database '".$this->getFileName()."'.", 0, $e |
|
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | { |
| 107 | 107 | if (!is_string($statement)) { |
| 108 | 108 | throw new InvalidArgumentException( |
| 109 | - "Invalid type '" . gettype($statement) . "' for argument 'statement'." |
|
| 109 | + "Invalid type '".gettype($statement)."' for argument 'statement'." |
|
| 110 | 110 | ); |
| 111 | 111 | } |
| 112 | 112 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | if (!is_string($statement)) { |
| 130 | 130 | throw new InvalidArgumentException( |
| 131 | - "Invalid type '" . gettype($statement) . "' for argument 'statement'." |
|
| 131 | + "Invalid type '".gettype($statement)."' for argument 'statement'." |
|
| 132 | 132 | ); |
| 133 | 133 | } |
| 134 | 134 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | { |
| 152 | 152 | if (!is_string($statement)) { |
| 153 | 153 | throw new InvalidArgumentException( |
| 154 | - "Invalid type '" . gettype($statement) . "' for argument 'statement'." |
|
| 154 | + "Invalid type '".gettype($statement)."' for argument 'statement'." |
|
| 155 | 155 | ); |
| 156 | 156 | } |
| 157 | 157 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | if (!is_bool($returnArray)) { |
| 25 | 25 | throw new InvalidArgumentException( |
| 26 | - "Invalid type '" . gettype($returnArray) . "' for argument 'returnArray'." |
|
| 26 | + "Invalid type '".gettype($returnArray)."' for argument 'returnArray'." |
|
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | if (!is_int($options)) { |
| 44 | 44 | throw new InvalidArgumentException( |
| 45 | - "Invalid type '" . gettype($options) . "' for argument 'options'." |
|
| 45 | + "Invalid type '".gettype($options)."' for argument 'options'." |
|
| 46 | 46 | ); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | if (!is_int($options)) { |
| 68 | 68 | throw new InvalidArgumentException( |
| 69 | - "Invalid type '" . gettype($options) . "' for argument 'options'." |
|
| 69 | + "Invalid type '".gettype($options)."' for argument 'options'." |
|
| 70 | 70 | ); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | if (!is_string($key)) { |
| 111 | 111 | throw new InvalidArgumentException( |
| 112 | - "Invalid type '" . gettype($key) . "' for argument 'key'." |
|
| 112 | + "Invalid type '".gettype($key)."' for argument 'key'." |
|
| 113 | 113 | ); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | if (!is_string($key)) { |
| 136 | 136 | throw new InvalidArgumentException( |
| 137 | - "Invalid type '" . gettype($key) . "' for argument 'key'." |
|
| 137 | + "Invalid type '".gettype($key)."' for argument 'key'." |
|
| 138 | 138 | ); |
| 139 | 139 | } |
| 140 | 140 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | { |
| 179 | 179 | if (!is_string($key)) { |
| 180 | 180 | throw new InvalidArgumentException( |
| 181 | - "Invalid type '" . gettype($key) . "' for argument 'key'." |
|
| 181 | + "Invalid type '".gettype($key)."' for argument 'key'." |
|
| 182 | 182 | ); |
| 183 | 183 | } |
| 184 | 184 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | { |
| 218 | 218 | if (!is_string($key)) { |
| 219 | 219 | throw new InvalidArgumentException( |
| 220 | - "Invalid type '" . gettype($key) . "' for argument 'key'." |
|
| 220 | + "Invalid type '".gettype($key)."' for argument 'key'." |
|
| 221 | 221 | ); |
| 222 | 222 | } |
| 223 | 223 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | { |
| 245 | 245 | if (!is_string($key)) { |
| 246 | 246 | throw new InvalidArgumentException( |
| 247 | - "Invalid type '" . gettype($key) . "' for argument 'key'." |
|
| 247 | + "Invalid type '".gettype($key)."' for argument 'key'." |
|
| 248 | 248 | ); |
| 249 | 249 | } |
| 250 | 250 | |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | { |
| 65 | 65 | if (!is_string($property)) { |
| 66 | 66 | throw new InvalidArgumentException( |
| 67 | - "Invalid type '" . gettype($property) . "' for argument 'property'." |
|
| 67 | + "Invalid type '".gettype($property)."' for argument 'property'." |
|
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | |