1 | <?php namespace Modules\Blog\Presenters; |
||
6 | class PostPresenter extends Presenter |
||
7 | { |
||
8 | /** |
||
9 | * @var \Modules\Blog\Entities\Status |
||
10 | */ |
||
11 | protected $status; |
||
12 | /** |
||
13 | * @var \Modules\Blog\Repositories\PostRepository |
||
14 | */ |
||
15 | private $post; |
||
16 | |||
17 | public function __construct($entity) |
||
23 | |||
24 | /** |
||
25 | * Get the previous post of the current post |
||
26 | * @return object |
||
27 | */ |
||
28 | public function previous() |
||
32 | |||
33 | /** |
||
34 | * Get the next post of the current post |
||
35 | * @return object |
||
36 | */ |
||
37 | public function next() |
||
41 | |||
42 | /** |
||
43 | * Get the post status |
||
44 | * @return string |
||
45 | */ |
||
46 | public function status() |
||
50 | |||
51 | /** |
||
52 | * Getting the label class for the appropriate status |
||
53 | * @return string |
||
54 | */ |
||
55 | public function statusLabelClass() |
||
75 | } |
||
76 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.