Completed
Push — 3.x ( d15676...a8aa9a )
by Delete
07:08 queued 03:53
created
src/Command/Update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Command;
5 5
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 'ini-load',
60 60
                 null,
61 61
                 InputOption::VALUE_OPTIONAL,
62
-                'Will download the parser data (of the given type - "lite", "full" or "standard") for the update. ' .
62
+                'Will download the parser data (of the given type - "lite", "full" or "standard") for the update. '.
63 63
                 'If no type set, the "standard" type is used.'
64 64
             )
65 65
             ->addOption(
Please login to merge, or discard this patch.
src/Parser/Sqlite/Adapter/Pdo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Parser\Sqlite\Adapter;
5 5
 
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Parser/Sqlite/Adapter/Sqlite3.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Parser\Sqlite\Adapter;
5 5
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Parser/Sqlite/Parser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Parser\Sqlite;
5 5
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 {
27 27
     use PropertyFilterTrait;
28 28
 
29
-    const SUB_DIRECTORY = 'browscap' . DIRECTORY_SEPARATOR . 'sqlite';
29
+    const SUB_DIRECTORY = 'browscap'.DIRECTORY_SEPARATOR.'sqlite';
30 30
     const LINK_FILENAME = 'browscap.link';
31 31
 
32 32
     /**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $this->checkDirectory($directory, false);
121 121
 
122 122
         // Check/create sub directory
123
-        $directory = $directory . DIRECTORY_SEPARATOR . self::SUB_DIRECTORY;
123
+        $directory = $directory.DIRECTORY_SEPARATOR.self::SUB_DIRECTORY;
124 124
         $this->checkDirectory($directory, true);
125 125
 
126 126
         $this->dataDirectory = $directory;
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
         sort($properties);
204 204
         
205 205
         return sha1(
206
-            static::class . '|' .
207
-            static::VERSION . '|' .
208
-            get_class($filter) . '|' .
206
+            static::class.'|'.
207
+            static::VERSION.'|'.
208
+            get_class($filter).'|'.
209 209
             implode(',', $properties)
210 210
         );
211 211
     }
Please login to merge, or discard this patch.
src/Parser/Sqlite/Writer.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Parser\Sqlite;
5 5
 
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
     protected function getTemporaryFileName() : string
110 110
     {
111 111
         if ($this->temporaryFileName === null) {
112
-            $this->temporaryFileName = $this->getDataDirectory() . DIRECTORY_SEPARATOR .
113
-                'browscap_' . microtime(true) . '.sqlite';
112
+            $this->temporaryFileName = $this->getDataDirectory().DIRECTORY_SEPARATOR.
113
+                'browscap_'.microtime(true).'.sqlite';
114 114
         }
115 115
 
116 116
         return $this->temporaryFileName;
@@ -181,28 +181,28 @@  discard block
 block discarded – undo
181 181
 
182 182
         // Create tables
183 183
         $adapter->exec(
184
-            'CREATE TABLE IF NOT EXISTS info (version_id INTEGER PRIMARY KEY ASC, release_time INTEGER NOT NULL, ' .
184
+            'CREATE TABLE IF NOT EXISTS info (version_id INTEGER PRIMARY KEY ASC, release_time INTEGER NOT NULL, '.
185 185
             'type_id INTEGER NOT NULL, data_hash TEXT NOT NULL)'
186 186
         );
187 187
         $adapter->exec(
188
-            'CREATE TABLE IF NOT EXISTS browser (browser_id INTEGER PRIMARY KEY ASC, browser_parent_id INTEGER, ' .
188
+            'CREATE TABLE IF NOT EXISTS browser (browser_id INTEGER PRIMARY KEY ASC, browser_parent_id INTEGER, '.
189 189
             'browser_pattern TEXT NOT NULL)'
190 190
         );
191 191
         $adapter->exec(
192
-            'CREATE TABLE IF NOT EXISTS search (browser_id INTEGER PRIMARY KEY ASC, ' .
192
+            'CREATE TABLE IF NOT EXISTS search (browser_id INTEGER PRIMARY KEY ASC, '.
193 193
             'browser_pattern_length INTEGER NOT NULL, browser_pattern TEXT NOT NULL)'
194 194
         );
195 195
 
196 196
         $adapter->exec(
197
-            'CREATE TABLE IF NOT EXISTS browser_property (browser_property_id INTEGER PRIMARY KEY ASC, ' .
197
+            'CREATE TABLE IF NOT EXISTS browser_property (browser_property_id INTEGER PRIMARY KEY ASC, '.
198 198
             'browser_id INTEGER NOT NULL, property_key_id INTEGER NOT NULL, property_value_id INTEGER NOT NULL)'
199 199
         );
200 200
         $adapter->exec(
201
-            'CREATE TABLE IF NOT EXISTS browser_property_key (property_key_id INTEGER PRIMARY KEY ASC, ' .
201
+            'CREATE TABLE IF NOT EXISTS browser_property_key (property_key_id INTEGER PRIMARY KEY ASC, '.
202 202
             'property_key TEXT NOT NULL)'
203 203
         );
204 204
         $adapter->exec(
205
-            'CREATE TABLE IF NOT EXISTS browser_property_value (property_value_id INTEGER PRIMARY KEY ASC, ' .
205
+            'CREATE TABLE IF NOT EXISTS browser_property_value (property_value_id INTEGER PRIMARY KEY ASC, '.
206 206
             'property_value TEXT NOT NULL)'
207 207
         );
208 208
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
                 $parentId = $this->parentPatterns[$properties['Parent']];
355 355
                 unset($properties['Parent']);
356 356
             } else {
357
-                throw new ParserRuntimeException("Parent '" . $properties['Parent'] . "' not found.");
357
+                throw new ParserRuntimeException("Parent '".$properties['Parent']."' not found.");
358 358
             }
359 359
         }
360 360
 
@@ -468,15 +468,15 @@  discard block
 block discarded – undo
468 468
             // Do NOT use "CREATE TABLE ... AS" here, because this would automatically add an extra id column,
469 469
             // which requires additional space
470 470
             $adapter->exec(
471
-                'CREATE TABLE IF NOT EXISTS "search_' . $keywordValue . '" ' .
472
-                '(browser_id INTEGER PRIMARY KEY ASC, browser_pattern_length INTEGER NOT NULL, ' .
471
+                'CREATE TABLE IF NOT EXISTS "search_'.$keywordValue.'" '.
472
+                '(browser_id INTEGER PRIMARY KEY ASC, browser_pattern_length INTEGER NOT NULL, '.
473 473
                 'browser_pattern TEXT NOT NULL)'
474 474
             );
475 475
             /** @noinspection DisconnectedForeachInstructionInspection */
476 476
             $adapter->beginTransaction();
477 477
             $adapter->exec(
478
-                'INSERT INTO "search_' . $keywordValue . '" ' .
479
-                'SELECT browser_id, browser_pattern_length, browser_pattern ' .
478
+                'INSERT INTO "search_'.$keywordValue.'" '.
479
+                'SELECT browser_id, browser_pattern_length, browser_pattern '.
480 480
                 "FROM search WHERE browser_pattern GLOB '*$keywordValue*'"
481 481
             );
482 482
             $adapter->exec("INSERT INTO keyword VALUES ($keywordId, '$keywordValue')");
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
             $adapter->commitTransaction();
486 486
 
487 487
             $adapter->exec(
488
-                'CREATE INDEX IF NOT EXISTS i_se' . $keywordId . '_brpale ON "search_' . $keywordValue .
488
+                'CREATE INDEX IF NOT EXISTS i_se'.$keywordId.'_brpale ON "search_'.$keywordValue.
489 489
                 '"(browser_pattern_length)'
490 490
             );
491 491
 
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
     protected function cleanUp()
518 518
     {
519 519
         $currentDatabaseFile = basename($this->getTemporaryFileName());
520
-        foreach (glob($this->getDataDirectory() . DIRECTORY_SEPARATOR . 'browscap_*.sqlite') as $file) {
520
+        foreach (glob($this->getDataDirectory().DIRECTORY_SEPARATOR.'browscap_*.sqlite') as $file) {
521 521
             if (basename($file) !== $currentDatabaseFile) {
522 522
                 @unlink($file);
523 523
             }
@@ -529,6 +529,6 @@  discard block
 block discarded – undo
529 529
      */
530 530
     protected function getLinkPath() : string
531 531
     {
532
-        return $this->getDataDirectory() . DIRECTORY_SEPARATOR . Parser::LINK_FILENAME;
532
+        return $this->getDataDirectory().DIRECTORY_SEPARATOR.Parser::LINK_FILENAME;
533 533
     }
534 534
 }
Please login to merge, or discard this patch.
src/Browscap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap;
5 5
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $reader = $parser->getReader(true);
182 182
             if ($reader->isUpdateRequired() === true) {
183 183
                 throw new ParserRuntimeException(
184
-                    'There is something wrong with the parser. The data have been re-generated without errors, ' .
184
+                    'There is something wrong with the parser. The data have been re-generated without errors, '.
185 185
                     'but the reader still requires an update of the data...'
186 186
                 );
187 187
             }
Please login to merge, or discard this patch.
src/Source/DownloadAbstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Source;
5 5
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             // Check status code
138 138
             if ($response->getStatusCode() !== 200) {
139 139
                 throw new SourceUnavailableException(
140
-                    'HTTP error: ' . $response->getStatusCode() . ' ' . $response->getReasonPhrase(),
140
+                    'HTTP error: '.$response->getStatusCode().' '.$response->getReasonPhrase(),
141 141
                     1459162268
142 142
                 );
143 143
             }
Please login to merge, or discard this patch.
src/Source/SourceFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Source;
5 5
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 self::$sourceClasses = $rememberClasses;
58 58
 
59 59
                 throw new InvalidArgumentException(
60
-                    "A value in the class name array is of type '" . gettype($className) . "'. String expected."
60
+                    "A value in the class name array is of type '".gettype($className)."'. String expected."
61 61
                 );
62 62
             }
63 63
         }
Please login to merge, or discard this patch.
src/Source/Ini/BrowscapOrg.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Crossjoin\Browscap\Source\Ini;
5 5
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function getReleaseTime() : int
54 54
     {
55
-        $stream = $this->loadContent(self::BASE_URI . '/version');
55
+        $stream = $this->loadContent(self::BASE_URI.'/version');
56 56
 
57 57
         if (!$stream->isReadable()) {
58 58
             throw new SourceUnavailableException('Source stream is not readable.', 1459162265);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function getVersion() : int
71 71
     {
72
-        $stream = $this->loadContent(self::BASE_URI . '/version-number');
72
+        $stream = $this->loadContent(self::BASE_URI.'/version-number');
73 73
 
74 74
         if (!$stream->isReadable()) {
75 75
             throw new SourceUnavailableException('Source stream is not readable.', 1459162266);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         }
101 101
 
102 102
         $this->type = $type;
103
-        $this->setSourceUri(self::BASE_URI . '/stream?q=' . $sourceType);
103
+        $this->setSourceUri(self::BASE_URI.'/stream?q='.$sourceType);
104 104
     }
105 105
 
106 106
     /**
Please login to merge, or discard this patch.