| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function handle() |
||
| 41 | { |
||
| 42 | $this->validateEndpoint(); |
||
| 43 | |||
| 44 | $frequency = is_numeric($this->option('frequency')) ? $this->option('frequency') : 5; |
||
| 45 | |||
| 46 | Endpoint::create([ |
||
| 47 | 'uri' => $this->uri, |
||
| 48 | 'frequency' => $frequency, |
||
| 49 | ]); |
||
| 50 | |||
| 51 | $this->info("Endpoint {$this->uri} is now being monitored."); |
||
| 52 | |||
| 53 | $this->call('uptime:status'); |
||
| 54 | } |
||
| 55 | |||
| 76 |
Adding a
@returnannotation 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.