public function setSize($size)
    {
        if (!is_numeric($size) || $size < 1) {
            throw new \InvalidArgumentException(
                "An invalid identicon size was specified. ".
                "A numeric value >= 1 was expected. Specified value: $size.");
        }
        
        $this->size = (int)$size;
    }
public function setSize($size)
    {
        if (!is_numeric($size) || $size < 1) {
            throw new \InvalidArgumentException(
                "An invalid identicon size was specified. ".
                "A numeric value >= 1 was expected. Specified value: $size.");
        }
        
        $this->size = (int)$size;
    }
public function setSize ( $ size ) { if ( ! is_numeric ( $ size ) || $ size < 1 ) { throw new \ InvalidArgumentException ( "An invalid identicon size was specified. " . "A numeric value >= 1 was expected. Specified value: $size." ) ; } $ this -> size = ( int ) $ size ; }
Sets the size of this icon in pixels.

@param int|float|double $size The width and height of the icon.
Sets the size of this icon in pixels .