Condition Coverage

blib/lib/PHP/Functions/Password.pm
Criterion Covered Total %
condition 54 110 49.0


and 3 conditions

line !l l&&!r l&&r condition
155 0 29 5 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
227 0 0 23 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
230 9 14 0 @_ && ref $_[0]
233 3 0 14 defined $options{'salt'} and length $options{'salt'}
279 0 12 12 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
282 0 0 24 @_ && ref $_[0]
294 0 4 4 defined $info{'options'}{'cost'} and $info{'options'}{'cost'} == $cost
315 2 0 0 defined $options{'salt'} && length $options{'salt'}
364 0 16 16 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
379 0 2 4 $new_crypt =~ m[^\$(2[abxy]?)\$([0-3]\d)\$([./A-Za-z0-9]{22})([./A-Za-z0-9]+)$] && $4 eq $hash
415 0 0 1 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
430 0 0 5 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
446 0 0 23 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
448 0 23 0 @_ && ref $_[0]
464 0 0 12 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
478 0 0 16 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
492 0 0 17 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
515 0 0 17 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
544 0 0 17 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')
560 0 0 20 @_ && UNIVERSAL::isa($_[0], 'PHP::Functions::Password')

or 2 conditions

line l !l condition
229 23 0 shift() // 1
242 14 3 $options{'cost'} || 10
252 0 6 $options{'memory_cost'} || 65536
253 0 6 $options{'time_cost'} || 4
254 0 6 $options{'threads'} || 1
255 0 6 $options{'tag_length'} || 32
281 24 0 shift @_ // 1
293 4 4 $options{'cost'} // 10
300 8 0 $options{'memory_cost'} // 65536
305 6 0 $options{'time_cost'} // 4
310 4 0 $options{'threads'} // 1
316 0 2 $options{'tag_length'} || 32
449 9 14 $options{'algo'} || 1

or 3 conditions

line l !l&&r !l&&!r condition
131 0 2 0 $INC{'Crypt/Argon2.pm'} or eval { do { require Crypt::Argon2 } }
231 3 3 0 $algo == 3 or $algo == 2
247 6 0 0 $INC{'Crypt/Argon2.pm'} or eval { do { require Crypt::Argon2 } }
251 0 6 0 $options{'salt'} || Crypt::OpenSSL::Random::random_bytes(16)
288 8 0 2 $algo == 3 or $algo == 2
318 1 1 0 $INC{'Crypt/Argon2.pm'} or eval { do { require Crypt::Argon2 } }
382 16 0 0 $INC{'Crypt/Argon2.pm'} or eval { do { require Crypt::Argon2 } }
517 17 0 0 $settings->{'key_nul'} or $password eq ''