Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | function __construct( $type, $content, $responseCode = null ) |
||
|
|||
35 | { |
||
36 | $this->type = $type; |
||
37 | $this->content = $content; |
||
38 | |||
39 | // Response code defaults |
||
40 | if( null == $responseCode ){ |
||
41 | if( $type == "redirect" ){ |
||
42 | $responseCode = 301; |
||
43 | }else{ |
||
44 | $responseCode = 200; |
||
45 | } |
||
46 | } |
||
47 | $this->responseCode = $responseCode; |
||
48 | } |
||
49 | } |
||
50 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.