@@ -18,7 +18,7 @@ |
||
18 | 18 | if (preg_match($version, $uaString)) { |
19 | 19 | preg_match($version, $uaString, $v); |
20 | 20 | $version = $v[0]; |
21 | - $version = preg_replace('/' . $phrase . '/', '', $version); |
|
21 | + $version = preg_replace('/'.$phrase.'/', '', $version); |
|
22 | 22 | $version = str_replace(';', '', $version); |
23 | 23 | $version = str_replace(' ', '', $version); |
24 | 24 | $version = str_replace('/', '', $version); |
@@ -18,19 +18,19 @@ |
||
18 | 18 | |
19 | 19 | protected function getFileNames(string $directory = 'default'): array |
20 | 20 | { |
21 | - if($directory === 'default') { |
|
21 | + if ($directory === 'default') { |
|
22 | 22 | $directoryIterator = new \DirectoryIterator($this->dataDirectory); |
23 | 23 | } else { |
24 | 24 | $directoryIterator = new \DirectoryIterator($directory); |
25 | 25 | } |
26 | 26 | $files = new Set(); |
27 | 27 | foreach ($directoryIterator as $file) { |
28 | - if($file->isDir() && !$file->isDot()) { |
|
28 | + if ($file->isDir() && !$file->isDot()) { |
|
29 | 29 | $dirFiles = $this->getFileNames($file->getRealPath()); |
30 | 30 | $files->add($dirFiles); |
31 | 31 | } |
32 | 32 | |
33 | - if($file->isFile() && !$file->isLink() && $file->isReadable()) { |
|
33 | + if ($file->isFile() && !$file->isLink() && $file->isReadable()) { |
|
34 | 34 | $files->add($file->getRealPath()); |
35 | 35 | } |
36 | 36 | } |
@@ -79,10 +79,10 @@ |
||
79 | 79 | $this->setDataProvider($dataProvider); |
80 | 80 | $this->detectors = []; |
81 | 81 | $this->resultObject = new Result(); |
82 | - $check = ['os','device', 'browser', 'robots']; |
|
82 | + $check = ['os', 'device', 'browser', 'robots']; |
|
83 | 83 | foreach ($check as $detectionType) { |
84 | 84 | $className = sprintf('\\EndorphinStudio\\Detector\\Detection\\%s', ucfirst(sprintf('%sDetector', $detectionType))); |
85 | - if(class_exists($className)) { |
|
85 | + if (class_exists($className)) { |
|
86 | 86 | $this->detectors[$detectionType] = new $className(); |
87 | 87 | $this->detectors[$detectionType]->init($this); |
88 | 88 | } |
@@ -10,7 +10,6 @@ |
||
10 | 10 | namespace EndorphinStudio\Detector\Storage; |
11 | 11 | |
12 | 12 | use Symfony\Component\Yaml\Parser; |
13 | -use Symfony\Component\Yaml\Yaml; |
|
14 | 13 | |
15 | 14 | /** |
16 | 15 | * Class YamlStorage |