Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function handle() |
||
43 | { |
||
44 | $this->validateEndpoint(); |
||
45 | |||
46 | $frequency = is_numeric($this->option('frequency')) ? $this->option('frequency') : 5; |
||
47 | |||
48 | Endpoint::create([ |
||
49 | 'uri' => $this->uri, |
||
50 | 'frequency' => $frequency, |
||
51 | ]); |
||
52 | |||
53 | $this->info("Endpoint {$this->uri} is now being monitored."); |
||
54 | |||
55 | $this->call('uptime:status'); |
||
56 | } |
||
57 | |||
75 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.