@@ -56,7 +56,8 @@ discard block |
||
| 56 | 56 | if ($this->option('pop') || $delete) { |
| 57 | 57 | if ($delete) { |
| 58 | 58 | $device = Device::find($delete); |
| 59 | - } else { |
|
| 59 | + } |
|
| 60 | + else { |
|
| 60 | 61 | $device = Device::orderBy('device_id', 'desc')->first(); |
| 61 | 62 | } |
| 62 | 63 | |
@@ -67,20 +68,24 @@ discard block |
||
| 67 | 68 | if ($this->option('list') || is_null($this->option())) { |
| 68 | 69 | event(new ListDevices()); |
| 69 | 70 | echo "Sending Device List Event\n"; |
| 70 | - } else { |
|
| 71 | + } |
|
| 72 | + else { |
|
| 71 | 73 | // Fire off an event, just randomly grabbing the first user for now |
| 72 | 74 | $id = $this->option('id'); |
| 73 | 75 | |
| 74 | 76 | if ($id == 'all') { |
| 75 | 77 | $this->info('all'); |
| 76 | 78 | $devices = Device::all(); |
| 77 | - } elseif ($this->option('push')) { |
|
| 79 | + } |
|
| 80 | + elseif ($this->option('push')) { |
|
| 78 | 81 | $this->info('push'); |
| 79 | 82 | $devices = [new Device(['hostname' => 'Mockery'])]; |
| 80 | - } elseif ($id === null) { |
|
| 83 | + } |
|
| 84 | + elseif ($id === null) { |
|
| 81 | 85 | $this->info('first'); |
| 82 | 86 | $devices = [Device::first()]; |
| 83 | - } else { |
|
| 87 | + } |
|
| 88 | + else { |
|
| 84 | 89 | $this->info('findOrNew'); |
| 85 | 90 | $devices = [Device::findOrNew($id)]; |
| 86 | 91 | } |