Beberlei Asserts - assertions and guard methods for input validation

Code
<?php

use Assert\Assertion;

class 
Foo
{
    public function 
intOnly($value)
    {
        
Assertion::integer($value);
        return 
$value;
    }
    
    public function 
floatOnly($value)
    {
        
Assertion::float($value);
        return 
$value;
    }
    
    public function 
sum($collection)
    {
        
Assertion::isTraversable($collection);
        
$result 0;
        foreach (
$collection as $value) {
            
Assertion::integer($value);
            
$result += $value;
        }
        return 
$result;
    }
}

$foo = new Foo();

try {
    
$foo->intOnly('1');
} catch (
Exception $e) {
    
dump($e->getMessage());
}


try {
    
$foo->floatOnly(1);
} catch (
Exception $e) {
    
dump($e->getMessage());
}


try {
    
$foo->sum([11'1']);
} catch (
Exception $e) {
    
dump($e->getMessage());
}

try {
    
$foo->sum(4);
} catch (
Exception $e) {
    
dump($e->getMessage());
}
Result
"Value "1" is not an integer."

"Value "1" is not a float."

"Value "1" is not an integer."

"Value "4" is not an array and does not implement Traversable."
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6