mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 23:35:45 +01:00
Most changes was made by php-cs-fixer. Also removes unused `RecursiveTreeIterator` class.
10 lines
213 B
PHP
10 lines
213 B
PHP
<?php
|
|
namespace Respect\Validation\Rules;
|
|
|
|
class PerfectSquare extends AbstractRule
|
|
{
|
|
public function validate($input)
|
|
{
|
|
return is_numeric($input) && sqrt($input) * sqrt($input) == $input;
|
|
}
|
|
}
|