public function getNumberFromString( $string )
    {
        preg_match( '/(?P<digit>\d+)/', $string, $result );
        Assertion::assertNotEmpty( $result['digit'], "Expected to find a number in '$string' found none" );
        return (int)$result['digit'];
    }
public function getNumberFromString( $string )
    {
        preg_match( '/(?P<digit>\d+)/', $string, $result );
        Assertion::assertNotEmpty( $result['digit'], "Expected to find a number in '$string' found none" );
        return (int)$result['digit'];
    }
public function getNumberFromString ( $ string ) { preg_match ( '/(?P<digit>\d+)/' , $ string , $ result ) ; Assertion :: assertNotEmpty ( $ result [ 'digit' ] , "Expected to find a number in '$string' found none" ) ; return ( int ) $ result [ 'digit' ] ; }
Fetchs the first integer in the string

@param string $string Text

@return int Integer found on text

@throws \PHPUnit_Framework_AssertionFailedError
Fetchs the first integer in the string