Completed
Push — develop ( 6a854b...315b5b )
by Alireza
03:39
created
src/BaseFraud.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @var array
28 28
      **/
29
-    protected $except = [];
29
+    protected $except = [ ];
30 30
 
31 31
     /**
32 32
      * Bots list
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
         // set user agent
47 47
         $this->agent = $request->header('user-agent');
48 48
 
49
-        if(function_exists('config_path')) {
49
+        if (function_exists('config_path')) {
50 50
 
51 51
             // if exists bots file then include list
52
-            if(file_exists(config_path('bots.php'))) {
52
+            if (file_exists(config_path('bots.php'))) {
53 53
 
54 54
                 // require bots list
55 55
                 $this->bots = include config_path('bots.php');
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $agent = new Agent;
71 71
 
72 72
         $agent->setUserAgent($this->agent);
73
-        if(! $agent->browser() 
73
+        if ( ! $agent->browser() 
74 74
             || ! $agent->device()
75 75
             || ! $agent->platform($this->agent)
76 76
             || ! $agent->version($agent->browser())
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function isCurl()
93 93
     {
94
-        if(preg_match('/curl/', $this->agent)) {
94
+        if (preg_match('/curl/', $this->agent)) {
95 95
             return true;
96 96
         }
97 97
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function isHttpie()
109 109
     {
110
-        if(preg_match('/HTTPie/', $this->agent)) {
110
+        if (preg_match('/HTTPie/', $this->agent)) {
111 111
             return true;
112 112
         }
113 113
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function isRobot()
124 124
     {
125
-        foreach ($this->bots as $bot){
126
-            if(preg_match('/' . $bot . '/', $this->agent)) {
125
+        foreach ($this->bots as $bot) {
126
+            if (preg_match('/' . $bot . '/', $this->agent)) {
127 127
                 return true;
128 128
             }
129 129
         }
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
      */
142 142
     public function checkExcept($method)
143 143
     {
144
-        if(!empty($this->except)) {
145
-            foreach ($this->except as $except){
146
-                if($except === $method) {
144
+        if ( ! empty($this->except)) {
145
+            foreach ($this->except as $except) {
146
+                if ($except === $method) {
147 147
                     return true;
148 148
                 }
149 149
             }
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $methods = get_class_methods($this);
166 166
 
167
-        foreach ($methods as $key => $method){
168
-            if(substr($method, 0, 2) !== 'is' || $this->checkExcept($method)) {
169
-                unset($methods[$key]);
167
+        foreach ($methods as $key => $method) {
168
+            if (substr($method, 0, 2) !== 'is' || $this->checkExcept($method)) {
169
+                unset($methods[ $key ]);
170 170
             }
171 171
         }
172 172
 
Please login to merge, or discard this patch.