Conditions | 6 |
Paths | 6 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 6.0702 |
Changes | 0 |
1 | <?php |
||
50 | 9 | public function __construct( $summary = '', $minor = self::NOTMINOR, $bot = self::NOTBOT, $maxlag = self::OFFLAG ) { |
|
51 | 9 | if( !is_string( $summary ) ) { |
|
52 | 2 | throw new InvalidArgumentException( '$summary must be a string' ); |
|
53 | } |
||
54 | 7 | if( !is_bool( $minor ) ) { |
|
55 | 1 | throw new InvalidArgumentException( '$minor must be a bool' ); |
|
56 | } |
||
57 | 6 | if( !is_bool( $bot ) ) { |
|
58 | 1 | throw new InvalidArgumentException( '$bot must be a bool' ); |
|
59 | } |
||
60 | 5 | if( !is_int( $maxlag ) ) { |
|
61 | throw new InvalidArgumentException( '$maxlag must be an integer' ); |
||
62 | } |
||
63 | 5 | elseif( $maxlag < 0 ) { |
|
64 | throw new InvalidArgumentException( '$maxlag must have a positive value' ); |
||
65 | } |
||
66 | 5 | $this->summary = $summary; |
|
67 | 5 | $this->bot = $bot; |
|
68 | 5 | $this->minor = $minor; |
|
69 | 5 | $this->maxlag = $maxlag; |
|
70 | 5 | } |
|
71 | |||
101 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.