protected function descendants(array $array, ?string $key = null)
    {
        if (\is_null($key)) {
            return $array;
        }

        $keys = \explode('.', $key);
        $first = \array_shift($keys);

        if (! isset($array[$first])) {
            return null;
        }

        return $this->resolveLastDecendant($array[$first], $keys);
    }