Conditions | 4 |
Paths | 6 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function handle() |
||
44 | { |
||
45 | $this->comment('Deleting photos...'); |
||
46 | $allPhotos = $this->photos->all(); |
||
47 | foreach ($allPhotos as $photo) { |
||
48 | $this->photos->delete($photo); |
||
49 | } |
||
50 | |||
51 | $this->comment('Deleting albums...'); |
||
52 | $allAlbums = $this->albums->all(); |
||
53 | foreach ($allAlbums as $album) { |
||
54 | if($album->getId() != 1) |
||
55 | { |
||
56 | $this->albums->delete($album); |
||
57 | } |
||
58 | } |
||
59 | |||
60 | $this->info('Gallery cleared!'); |
||
61 | } |
||
62 | |||
63 | } |
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.