@@ -66,6 +66,9 @@ |
||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | + /** |
|
70 | + * @param Data\Result $object |
|
71 | + */ |
|
69 | 72 | public static function runGetter(&$object, string $key) |
70 | 73 | { |
71 | 74 | $methodName = static::getMethodName($key, 'get'); |
@@ -28,13 +28,13 @@ |
||
28 | 28 | if (preg_match($version, $uaString)) { |
29 | 29 | preg_match($version, $uaString, $v); |
30 | 30 | $version = $v[0]; |
31 | - $version = preg_replace('/' . $phrase . '/', '', $version); |
|
31 | + $version = preg_replace('/'.$phrase.'/', '', $version); |
|
32 | 32 | $version = str_replace(';', '', $version); |
33 | 33 | $version = str_replace(' ', '', $version); |
34 | 34 | $version = str_replace('/', '', $version); |
35 | 35 | $version = str_replace('_', '.', $version); |
36 | 36 | |
37 | - if(preg_match('/ Windows /', $uaString)) { |
|
37 | + if (preg_match('/ Windows /', $uaString)) { |
|
38 | 38 | $version = static::getWindowsVersion($version); |
39 | 39 | } |
40 | 40 | return $version; |
@@ -79,11 +79,11 @@ |
||
79 | 79 | $this->setDataProvider($dataProvider); |
80 | 80 | $this->detectors = []; |
81 | 81 | $this->resultObject = new Result(); |
82 | - $check = ['os','device', 'browser', 'robot']; |
|
82 | + $check = ['os', 'device', 'browser', 'robot']; |
|
83 | 83 | Tools::setWindowsConfig($dataProvider->getConfig()['windows']); |
84 | 84 | foreach ($check as $detectionType) { |
85 | 85 | $className = sprintf('\\EndorphinStudio\\Detector\\Detection\\%s', ucfirst(sprintf('%sDetector', $detectionType))); |
86 | - if(class_exists($className)) { |
|
86 | + if (class_exists($className)) { |
|
87 | 87 | $this->detectors[$detectionType] = new $className(); |
88 | 88 | $this->detectors[$detectionType]->init($this); |
89 | 89 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | protected function initResultObject() |
30 | 30 | { |
31 | - if(!array_key_exists('default', $this->config)) { |
|
31 | + if (!array_key_exists('default', $this->config)) { |
|
32 | 32 | return null; |
33 | 33 | } |
34 | 34 | // init default value from data |