@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | // TODO: Needs some type of encoding to allow "accents" now it shows as a question mark |
| 74 | 74 | |
| 75 | - if (! is_array($exec_result)) { |
|
| 75 | + if (!is_array($exec_result)) { |
|
| 76 | 76 | throw new Exception('Ping failed'); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'ping'); |
| 54 | 54 | |
| 55 | 55 | // Register the main class to use with the facade |
| 56 | - $this->app->singleton('ping', function () { |
|
| 56 | + $this->app->singleton('ping', function() { |
|
| 57 | 57 | return new Ping; |
| 58 | 58 | }); |
| 59 | 59 | } |
@@ -180,12 +180,12 @@ discard block |
||
| 180 | 180 | { |
| 181 | 181 | $command = ['ping -n']; |
| 182 | 182 | |
| 183 | - (! isset($this->version)) ?: array_push($command, '-'.$this->version); |
|
| 184 | - (! isset($this->count)) ?: array_push($command, '-c '.$this->count); |
|
| 185 | - (! isset($this->interval)) ?: array_push($command, '-i '.$this->interval); |
|
| 186 | - (! isset($this->packet_size)) ?: array_push($command, '-s '.$this->packet_size); |
|
| 187 | - (! isset($this->timeout)) ?: array_push($command, '-W '.$this->timeout); |
|
| 188 | - (! isset($this->ttl)) ?: array_push($command, '-t '.$this->ttl); |
|
| 183 | + (!isset($this->version)) ?: array_push($command, '-'.$this->version); |
|
| 184 | + (!isset($this->count)) ?: array_push($command, '-c '.$this->count); |
|
| 185 | + (!isset($this->interval)) ?: array_push($command, '-i '.$this->interval); |
|
| 186 | + (!isset($this->packet_size)) ?: array_push($command, '-s '.$this->packet_size); |
|
| 187 | + (!isset($this->timeout)) ?: array_push($command, '-W '.$this->timeout); |
|
| 188 | + (!isset($this->ttl)) ?: array_push($command, '-t '.$this->ttl); |
|
| 189 | 189 | |
| 190 | 190 | array_push($command, $this->host); |
| 191 | 191 | |
@@ -201,12 +201,12 @@ discard block |
||
| 201 | 201 | { |
| 202 | 202 | $command = ['ping']; |
| 203 | 203 | |
| 204 | - (! isset($this->version)) ?: array_push($command, '-'.$this->version); |
|
| 205 | - (! isset($this->count)) ?: array_push($command, '-c '.$this->count); |
|
| 206 | - (! isset($this->interval)) ?: array_push($command, '-i '.$this->interval); |
|
| 207 | - (! isset($this->packet_size)) ?: array_push($command, '-s '.$this->packet_size); |
|
| 208 | - (! isset($this->timeout)) ?: array_push($command, '-t '.($this->timeout * 1000)); |
|
| 209 | - (! isset($this->ttl)) ?: array_push($command, '-m '.$this->ttl); |
|
| 204 | + (!isset($this->version)) ?: array_push($command, '-'.$this->version); |
|
| 205 | + (!isset($this->count)) ?: array_push($command, '-c '.$this->count); |
|
| 206 | + (!isset($this->interval)) ?: array_push($command, '-i '.$this->interval); |
|
| 207 | + (!isset($this->packet_size)) ?: array_push($command, '-s '.$this->packet_size); |
|
| 208 | + (!isset($this->timeout)) ?: array_push($command, '-t '.($this->timeout * 1000)); |
|
| 209 | + (!isset($this->ttl)) ?: array_push($command, '-m '.$this->ttl); |
|
| 210 | 210 | |
| 211 | 211 | array_push($command, $this->host); |
| 212 | 212 | |
@@ -222,11 +222,11 @@ discard block |
||
| 222 | 222 | { |
| 223 | 223 | $command = ['ping']; |
| 224 | 224 | |
| 225 | - (! isset($this->version)) ?: array_push($command, '-'.$this->version); |
|
| 226 | - (! isset($this->count)) ?: array_push($command, '-n '.$this->count); |
|
| 227 | - (! isset($this->packet_size)) ?: array_push($command, '-l '.$this->packet_size); |
|
| 228 | - (! isset($this->timeout)) ?: array_push($command, '-w '.($this->timeout * 1000)); |
|
| 229 | - (! isset($this->ttl)) ?: array_push($command, '-i '.$this->ttl); |
|
| 225 | + (!isset($this->version)) ?: array_push($command, '-'.$this->version); |
|
| 226 | + (!isset($this->count)) ?: array_push($command, '-n '.$this->count); |
|
| 227 | + (!isset($this->packet_size)) ?: array_push($command, '-l '.$this->packet_size); |
|
| 228 | + (!isset($this->timeout)) ?: array_push($command, '-w '.($this->timeout * 1000)); |
|
| 229 | + (!isset($this->ttl)) ?: array_push($command, '-i '.$this->ttl); |
|
| 230 | 230 | |
| 231 | 231 | array_push($command, $this->host); |
| 232 | 232 | |
@@ -244,12 +244,12 @@ discard block |
||
| 244 | 244 | 'host' => $this->host, |
| 245 | 245 | ]; |
| 246 | 246 | |
| 247 | - (! isset($this->count)) ?: $options['count'] = $this->count; |
|
| 248 | - (! isset($this->interval)) ?: $options['interval'] = $this->interval; |
|
| 249 | - (! isset($this->packet_size)) ?: $options['packet_size'] = $this->packet_size; |
|
| 250 | - (! isset($this->timeout)) ?: $options['timeout'] = $this->timeout; |
|
| 251 | - (! isset($this->ttl)) ?: $options['ttl'] = $this->ttl; |
|
| 252 | - (! isset($this->version)) ?: $options['version'] = $this->version; |
|
| 247 | + (!isset($this->count)) ?: $options['count'] = $this->count; |
|
| 248 | + (!isset($this->interval)) ?: $options['interval'] = $this->interval; |
|
| 249 | + (!isset($this->packet_size)) ?: $options['packet_size'] = $this->packet_size; |
|
| 250 | + (!isset($this->timeout)) ?: $options['timeout'] = $this->timeout; |
|
| 251 | + (!isset($this->ttl)) ?: $options['ttl'] = $this->ttl; |
|
| 252 | + (!isset($this->version)) ?: $options['version'] = $this->version; |
|
| 253 | 253 | |
| 254 | 254 | return (object) $options; |
| 255 | 255 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function Stop(): float |
| 64 | 64 | { |
| 65 | - if (! isset($this->start)) { |
|
| 65 | + if (!isset($this->start)) { |
|
| 66 | 66 | throw new TimerNotStartedException(); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function GetResults(): object |
| 78 | 78 | { |
| 79 | - if (! isset($this->stop)) { |
|
| 79 | + if (!isset($this->stop)) { |
|
| 80 | 80 | $this->stop = microtime(true); |
| 81 | 81 | } |
| 82 | 82 | |