Shipment/Gateway/Model/Label.php
public static function isValidSize($size, $throw = false)
    {
        if (in_array($size, static::getSizes(), true)) {
            return true;
        }

        if ($throw) {
            throw new InvalidArgumentException("Unknown size '$size'.");
        }

        return false;
    }
public static function isValidSize($size, $throw = false)
    {
        if (in_array($size, static::getSizes(), true)) {
            return true;
        }

        if ($throw) {
            throw new InvalidArgumentException("Unknown size '$size'.");
        }

        return false;
    }
public static function isValidSize ( $ size , $ throw = false ) { if ( in_array ( $ size , static :: getSizes ( ) , true ) ) { return true ; } if ( $ throw ) { throw new InvalidArgumentException ( "Unknown size '$size'." ) ; } return false ; }
Returns whether the given size is valid.

@param string $size
@param bool   $throw

@return bool
Returns whether the given size is valid .