into Assertion and the Assertion::notFalse() method was missing. Using Assertion::true($filename !== false) IMO loses the benefit of using Assertion as nice readable wrappers around simple conditions.
notFalse() is similar to notNull(). Especially some PHP internal functions return type of <result>|bool but actually bool there is false -> <result>|false which stands for failure. This is handy instrument how to handle it.
I was rewriting this code
into Assertion and the
Assertion::notFalse()
method was missing. UsingAssertion::true($filename !== false)
IMO loses the benefit of using Assertion as nice readable wrappers around simple conditions.notFalse()
is similar tonotNull()
. Especially some PHP internal functions return type of<result>|bool
but actuallybool
there isfalse
-><result>|false
which stands for failure. This is handy instrument how to handle it.