for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Phalcon.
*
* (c) Phalcon Team <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Phalcon\Helper;
* This class offers quick boolean functions throughout the framework
class BoolVal
{
* Checks if the passed value is false
* @param mixed $input
* @return bool
final public static function isFalse($input): bool
$false = [
'0' => 1,
'f' => 1,
'false' => 1,
'n' => 1,
'no' => 1,
];
return isset($false[Str::lower((string) $input)]);
}
* Checks if the passed value is true
final public static function isTrue($input): bool
'1' => 1,
'true' => 1,
't' => 1,
'y' => 1,
'yes' => 1,