protected function assertData($data, string $file): void
    {
        if ($data === false || $data === null) {
            throw new LoadException("Failed to load settings from '$file'");
        }

        if (!$data instanceof stdClass && !is_associative_array($data)) {
            throw new LoadException("Failed to load settings from '$file': data should be key/value pairs");
        }
    }