Completed
Push — 4.0 ( c06a8c...7dd182 )
by Serhii
02:13
created
src/Tools.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -66,6 +66,9 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Detector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Detection/AbstractDetection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.