mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
30 lines
493 B
PHP
30 lines
493 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Validation;
|
|
|
|
class OtherRules
|
|
{
|
|
/**
|
|
* Is a boolean (true or false)
|
|
*/
|
|
public function is_boolean(mixed $str = null): bool
|
|
{
|
|
return is_bool($str);
|
|
}
|
|
|
|
/**
|
|
* Is it an array?
|
|
*/
|
|
public function is_list(mixed $str = null): bool
|
|
{
|
|
return is_array($str);
|
|
}
|
|
|
|
public function is_string_or_list(mixed $str = null): bool
|
|
{
|
|
return is_string($str) || is_array($str);
|
|
}
|
|
}
|