Cml\dBug::error PHP Метод

error() приватный Метод

error
private error ( $type )
    private function error($type)
    {
        $error = "Error: Variable cannot be a";
        // this just checks if the type starts with a vowel or "x" and displays either "a" or "an"
        if (in_array(substr($type, 0, 1), ["a", "e", "i", "o", "u", "x"])) {
            $error .= "n";
        }
        return $error . " " . $type . " type";
    }