for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of slick/filter package
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Slick\Filter;
* Number filter
* @package Slick\Filter
* @author Filipe Silva <[email protected]>
class Number implements FilterInterface
{
* Returns the result of filtering $value
* @param mixed $value
* @throws Exception\CannotFilterValueException
* If filtering $value is impossible.
* @return mixed
public function filter($value)
return filter_var($value, FILTER_SANITIZE_NUMBER_INT);
}