def _detect(self):
        """
        Detects pragma statements that allow for outdated solc versions.
        :return: Returns the relevant JSON data for the findings.
        """
        # Detect all version related pragmas and check if they are disallowed.
        results = []
        pragma = self.slither.pragma_directives
        disallowed_pragmas = []
        detected_version = False
        for p in pragma:
            # Skip any pragma directives which do not refer to version
            if len(p.directive) < 1 or p.directive[0] != "solidity":
                continue

            # This is version, so we test if this is disallowed.
            detected_version = True
            reason = self._check_pragma(p.version)
            if reason:
                disallowed_pragmas.append((reason, p))

        # If we found any disallowed pragmas, we output our findings.
        if disallowed_pragmas:
            info = "Detected issues with version pragma in {}:\n".format(self.filename)
            for (reason, p) in disallowed_pragmas:
                info += "\t- {} ({}): {}\n".format(p, p.source_mapping_str, reason)

            json = self.generate_json_result(info)

            # follow the same format than add_nodes_to_json
            json['elements'] = [{'type': 'expression',
                                 'expression': p.version,
                                 'source_mapping': p.source_mapping} for (reason, p) in disallowed_pragmas]
            results.append(json)

        return results
Detects pragma statements that allow for outdated solc versions.
        :return: Returns the relevant JSON data for the findings.