protected function exportArray(array $array, $quoteStyle = '\'')
    {

        $pairs = [];
        foreach ($array as $key => $val) {

            $pair = $this->exportScalar($key, $quoteStyle).' => ';

            if (is_array($val))
                $pair .= $this->exportArray($val, $quoteStyle);
            else if ($this->isVariable($val))
                $pair .= "isset($val) ? $val : null";
            else if ($this->isScalar($val) || in_array($val, [true, false, null], true))
                $pair .= $this->exportScalar($val, $quoteStyle);
            else
                $pair .= (string)$val;

            $pairs[] = $pair;
        }

        return '['.implode(', ', $pairs).']';
    }