protected function validateExtensions($extensions): Extensions
    {
        if (empty($extensions)) {
            $extensions = new Extensions(['']);
        }

        if (! $extensions instanceof Extensions) {
            $extensions = new Extensions((array)$extensions);
        }

        return $extensions;
    }
protected function validateExtensions($extensions): Extensions
    {
        if (empty($extensions)) {
            $extensions = new Extensions(['']);
        }

        if (! $extensions instanceof Extensions) {
            $extensions = new Extensions((array)$extensions);
        }

        return $extensions;
    }
protected function validateExtensions ( $ extensions ) : Extensions { if ( empty ( $ extensions ) ) { $ extensions = new Extensions ( [ '' ] ) ; } if ( ! $ extensions instanceof Extensions ) { $ extensions = new Extensions ( ( array ) $ extensions ) ; } return $ extensions ; }
Validate the extensions and return a collection.

@since 0.1.1

@param Extensions|array|string|null $extensions Extensions to validate.

@return Extensions Validated extensions collection.
Validate the extensions and return a collection .