Passed
Push — develop ( 7fbd2c...82694f )
by nguereza
02:49
created
src/Detector/AbstractDetector.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $match = null;
119 119
         $matches = [];
120 120
 
121
-        while ($i < $regexLength && ! $matches) {
121
+        while ($i < $regexLength && !$matches) {
122 122
             $reg = $regex[$i];
123 123
             $property = $regex[$i + 1];
124 124
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $k = 0;
127 127
 
128 128
             $regLength = count($reg);
129
-            while ($j < $regLength && ! $matches) {
129
+            while ($j < $regLength && !$matches) {
130 130
                 $pattern = $reg[$j++];
131 131
                 if (is_string($pattern)) {
132 132
                     preg_match($pattern, $userAgent, $matches);
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
  * Class AbstractDetector
60 60
  * @package Platine\UserAgent\Detector
61 61
  */
62
-abstract class AbstractDetector
63
-{
62
+abstract class AbstractDetector {
64 63
 
65 64
     /**
66 65
      * Data type and definitions
@@ -99,8 +98,7 @@  discard block
 block discarded – undo
99 98
     /**
100 99
      * Create new instance
101 100
      */
102
-    public function __construct()
103
-    {
101
+    public function __construct() {
104 102
         $this->maps = $this->maps();
105 103
         $this->regex = $this->regex();
106 104
     }
@@ -199,8 +197,7 @@  discard block
 block discarded – undo
199 197
      * Return the entity instance
200 198
      * @return Browser|Cpu|Os|Device|Engine
201 199
      */
202
-    public function entity()
203
-    {
200
+    public function entity() {
204 201
         return $this->entity;
205 202
     }
206 203
 
@@ -245,8 +242,7 @@  discard block
 block discarded – undo
245 242
      * @param string $str
246 243
      * @return string|string[]|null
247 244
      */
248
-    protected function trim(string $str)
249
-    {
245
+    protected function trim(string $str) {
250 246
         return preg_replace(
251 247
             '/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/',
252 248
             '',
Please login to merge, or discard this patch.
src/Detector/CpuDetector.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * Class CpuDetector
54 54
  * @package Platine\UserAgent\Detector
55 55
  */
56
-class CpuDetector extends AbstractDetector
57
-{
56
+class CpuDetector extends AbstractDetector {
58 57
 
59 58
     /**
60 59
      * {@inheritdoc}
61 60
      */
62
-    public function __construct()
63
-    {
61
+    public function __construct() {
64 62
         parent::__construct();
65 63
 
66 64
         $this->entity = new Cpu();
Please login to merge, or discard this patch.
src/Detector/OsDetector.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
 {
58 58
 
59 59
     /**
60
-    * {@inheritdoc}
61
-    */
60
+     * {@inheritdoc}
61
+     */
62 62
     public function __construct()
63 63
     {
64 64
         parent::__construct();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * Class OsDetector
54 54
  * @package Platine\UserAgent\Detector
55 55
  */
56
-class OsDetector extends AbstractDetector
57
-{
56
+class OsDetector extends AbstractDetector {
58 57
 
59 58
     /**
60 59
     * {@inheritdoc}
61 60
     */
62
-    public function __construct()
63
-    {
61
+    public function __construct() {
64 62
         parent::__construct();
65 63
 
66 64
         $this->entity = new Os();
Please login to merge, or discard this patch.
src/Detector/EngineDetector.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
 {
58 58
 
59 59
     /**
60
-    * {@inheritdoc}
61
-    */
60
+     * {@inheritdoc}
61
+     */
62 62
     public function __construct()
63 63
     {
64 64
         parent::__construct();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * Class EngineDetector
54 54
  * @package Platine\UserAgent\Detector
55 55
  */
56
-class EngineDetector extends AbstractDetector
57
-{
56
+class EngineDetector extends AbstractDetector {
58 57
 
59 58
     /**
60 59
     * {@inheritdoc}
61 60
     */
62
-    public function __construct()
63
-    {
61
+    public function __construct() {
64 62
         parent::__construct();
65 63
 
66 64
         $this->entity = new Engine();
Please login to merge, or discard this patch.
src/Detector/DeviceDetector.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
 class DeviceDetector extends AbstractDetector
57 57
 {
58 58
 
59
-     /**
60
-     * {@inheritdoc}
61
-     */
59
+        /**
60
+         * {@inheritdoc}
61
+         */
62 62
     public function __construct()
63 63
     {
64 64
         parent::__construct();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * Class DeviceDetector
54 54
  * @package Platine\UserAgent\Detector
55 55
  */
56
-class DeviceDetector extends AbstractDetector
57
-{
56
+class DeviceDetector extends AbstractDetector {
58 57
 
59 58
      /**
60 59
      * {@inheritdoc}
61 60
      */
62
-    public function __construct()
63
-    {
61
+    public function __construct() {
64 62
         parent::__construct();
65 63
 
66 64
         $this->entity = new Device();
Please login to merge, or discard this patch.
src/Detector/BrowserDetector.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * Class BrowserDetector
54 54
  * @package Platine\UserAgent\Detector
55 55
  */
56
-class BrowserDetector extends AbstractDetector
57
-{
56
+class BrowserDetector extends AbstractDetector {
58 57
 
59 58
     /**
60 59
      * {@inheritdoc}
61 60
      */
62
-    public function __construct()
63
-    {
61
+    public function __construct() {
64 62
         parent::__construct();
65 63
 
66 64
         $this->entity = new Browser();
Please login to merge, or discard this patch.