/vendor/phpunit/phpunit/src/Framework/Constraint/IsFinite.php
https://bitbucket.org/alan_cordova/api-sb-map · PHP · 38 lines · 12 code · 2 blank · 24 comment · 0 complexity · 460ab8d0456f9cc6b6ad2305f64cd89a MD5 · raw file
- <?php
- /*
- * This file is part of PHPUnit.
- *
- * (c) Sebastian Bergmann <sebastian@phpunit.de>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- /**
- * Constraint that accepts finite.
- */
- class PHPUnit_Framework_Constraint_IsFinite extends PHPUnit_Framework_Constraint
- {
- /**
- * Evaluates the constraint for parameter $other. Returns true if the
- * constraint is met, false otherwise.
- *
- * @param mixed $other Value or object to evaluate.
- *
- * @return bool
- */
- protected function matches($other)
- {
- return is_finite($other);
- }
- /**
- * Returns a string representation of the constraint.
- *
- * @return string
- */
- public function toString()
- {
- return 'is finite';
- }
- }