public function join($type = null, $table = null, array $joinOn = null): Select
    {
        if (!\is_string($type) || !\preg_match('/left|right|inner|full/i', $type)) {
            throw new InvalidArgumentException('$type has to be left|right|inner|full');
        }
        if (!\is_string($table) && !\is_array($table)) {
            throw new InvalidArgumentException('$table has to be an array or a string');
        }
        if (!\is_array($joinOn)) {
            throw new InvalidArgumentException('$on has to be an array');
        }

        $this->join[] = \sprintf(
            ' %s JOIN %s ON %s',
            \strtoupper($type),
            \implode(', ', $this->namesClass->parse($table, true)),
            (new Condition($this->namesClass->getAliases()))->parse($joinOn)
        );

        return $this;
    }