Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

pterodactyl/panel

8314 stars
2 code files
View pterodactyl/panel on GitHub

app/helpers.php

Open in GitHub
if (!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 GitHub
use 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.');
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.