function DevelGenerateBase::isNumber
Same name in other branches
- 8.x-1.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::isNumber()
- 4.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::isNumber()
Check if a given param is a number.
Parameters
mixed $number: The parameter to check.
Return value
bool TRUE if the parameter is a number, FALSE otherwise.
3 calls to DevelGenerateBase::isNumber()
- MenuDevelGenerate::validateDrushParams in devel_generate/
src/ Plugin/ DevelGenerate/ MenuDevelGenerate.php - Responsible for validating Drush params.
- TermDevelGenerate::validateDrushParams in devel_generate/
src/ Plugin/ DevelGenerate/ TermDevelGenerate.php - Responsible for validating Drush params.
- VocabularyDevelGenerate::validateDrushParams in devel_generate/
src/ Plugin/ DevelGenerate/ VocabularyDevelGenerate.php - Responsible for validating Drush params.
File
-
devel_generate/
src/ DevelGenerateBase.php, line 196
Class
- DevelGenerateBase
- Provides a base DevelGenerate plugin implementation.
Namespace
Drupal\devel_generateCode
public static function isNumber(mixed $number) : bool {
if ($number === NULL) {
return FALSE;
}
return is_numeric($number);
}