public static function unwrap(array $input, $default = null)
    {
        if (count($input) > 1) {
            return $input;
        }

        return ! empty($input) ? current($input) : $default;
    }
public static function unwrap(array $input, $default = null)
    {
        if (count($input) > 1) {
            return $input;
        }

        return ! empty($input) ? current($input) : $default;
    }
public static function unwrap ( array $ input , $ default = null ) { if ( count ( $ input ) > 1 ) { return $ input ; } return ! empty ( $ input ) ? current ( $ input ) : $ default ; }
Unwraps a single item array into the item. If the array contains more than one item, it will be returned as-is.
A default value can be provided, and will be used when an empty array is given.

@param array      $input
@param mixed|null $default

@return mixed
Unwraps a single item array into the item . If the array contains more than one item it will be returned as - is . A default value can be provided and will be used when an empty array is given .