-
app/helpers.php
Open in GitHubif (!function_exists('is_digit')) { /** * Deal with normal (and irritating) PHP behavior to determine if * a value is a non-float positive integer. * * @param mixed $value * * @return bool */ function is_digit($value) { return is_bool($value) ? false : ctype_digit(strval($value)); } } //
-
app/Repositories/Eloquent/EggRepository.php
Open in GitHubuse Pterodactyl\Contracts\Repository\EggRepositoryInterface; class EggRepository extends EloquentRepository implements EggRepositoryInterface { // public function getWithCopyAttributes($value, string $column = 'id'): Egg { Assert::true((is_digit($value) || is_string($value)), 'First argument passed to getWithCopyAttributes must be an integer or string, received %s.'); } // }