private function arrayKeyTypeErrorMessage(array $contents, string $key, string $type, string ...$path): string
    {
        $arr = array_reduce($path, function (array $arr, string $key) {
            return $arr[$key];
        }, $contents);

        return vsprintf('The key [%s] of the configuration array must be an array of %s, %s given for key [%s] (%s)', [
            implode('.', $path),
            $type,
            gettype($arr[$key]),
            $key,
            realpath($this->path),
        ]);
    }
private function arrayKeyTypeErrorMessage(array $contents, string $key, string $type, string ...$path): string
    {
        $arr = array_reduce($path, function (array $arr, string $key) {
            return $arr[$key];
        }, $contents);

        return vsprintf('The key [%s] of the configuration array must be an array of %s, %s given for key [%s] (%s)', [
            implode('.', $path),
            $type,
            gettype($arr[$key]),
            $key,
            realpath($this->path),
        ]);
    }
private function arrayKeyTypeErrorMessage ( array $ contents , string $ key , string $ type , string ... $ path ) : string { $ arr = array_reduce ( $ path , function ( array $ arr , string $ key ) { return $ arr [ $ key ] ; } , $ contents ) ; return vsprintf ( 'The key [%s] of the configuration array must be an array of %s, %s given for key [%s] (%s)' , [ implode ( '.' , $ path ) , $ type , gettype ( $ arr [ $ key ] ) , $ key , realpath ( $ this -> path ) , ] ) ; }
Return the error message of the exception thrown when a key of an array
is associated to a value with an unexpected type.

@param array     $contents
@param string    $key
@param string    $type
@param string    ...$path
@return string
Return the error message of the exception thrown when a key of an array is associated to a value with an unexpected type .