Passed
Push — develop ( 7fbd2c...82694f )
by nguereza
02:49
created
src/Entity/Engine.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,6 +51,5 @@
 block discarded – undo
51 51
  * Class Engine
52 52
  * @package Platine\UserAgent\Entity
53 53
  */
54
-class Engine extends BaseEntity
55
-{
54
+class Engine extends BaseEntity {
56 55
 }
Please login to merge, or discard this patch.
src/UserAgent.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
  * Class UserAgent
63 63
  * @package Platine\UserAgent
64 64
  */
65
-class UserAgent
66
-{
65
+class UserAgent {
67 66
 
68 67
     /**
69 68
      * Operating System detector
@@ -135,8 +134,7 @@  discard block
 block discarded – undo
135 134
      * Create new instance
136 135
      * @param string|null $userAgent
137 136
      */
138
-    public function __construct(?string $userAgent = null)
139
-    {
137
+    public function __construct(?string $userAgent = null) {
140 138
         $this->browserDetector = new BrowserDetector();
141 139
         $this->cpuDetector = new CpuDetector();
142 140
         $this->engineDetector = new EngineDetector();
Please login to merge, or discard this patch.
src/Util/Helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * Class Helper
52 52
  * @package Platine\UserAgent\Util
53 53
  */
54
-class Helper
55
-{
54
+class Helper {
56 55
 
57 56
 
58 57
     /**
Please login to merge, or discard this patch.
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.