require 'cc/engine/analyzers/php/parser'
require "cc/engine/analyzers/analyzer_base"
require 'flay'
require 'json'

module CC
  module Engine
    module Analyzers
      module Php
        class Main < CC::Engine::Analyzers::Base
          LANGUAGE = "php"
          DEFAULT_PATHS = [
            "**/*.php",
            "**/*.inc",
            "**/*.module"
          ]
          DEFAULT_MASS_THRESHOLD = 10
          POINTS_PER_OVERAGE = 100_000

          private

          def process_file(path)
            code = File.binread(path)
            parser = php_parser.new(code, path).parse
            syntax_tree = parser.syntax_tree

            if syntax_tree
              syntax_tree.to_sexp
            end
          end

          def php_parser
            ::CC::Engine::Analyzers::Php::Parser
          end
        end
      end
    end
  end
end

require 'cc/engine/analyzers/php/parser'
require "cc/engine/analyzers/analyzer_base"
require 'flay'
require 'json'

module CC
  module Engine
    module Analyzers
      module Php
        class Main < CC::Engine::Analyzers::Base
          LANGUAGE = "php"
          DEFAULT_PATHS = [
            "**/*.php",
            "**/*.inc",
            "**/*.module"
          ]
          DEFAULT_MASS_THRESHOLD = 28
          POINTS_PER_OVERAGE = 100_000

          private

          def process_file(path)
            code = File.binread(path)
            parser = php_parser.new(code, path).parse
            syntax_tree = parser.syntax_tree

            if syntax_tree
              syntax_tree.to_sexp
            end
          end

          def php_parser
            ::CC::Engine::Analyzers::Php::Parser
          end
        end
      end
    end
  end
end

Move PHP default threshold to 28
Move PHP default threshold to 28

When analyzing the WordPress project at the current default mass
threshold of 10, it was observed that Duplications found only by
Platform had masses of 27 or less, while Duplications found by both
Platform and Classic had masses of 28 or greater. Note: there were no
Duplications found only by Classic.

Therefore, a threshold of 28 should ensure an analysis on Platform emits
the same Duplication issues as on Classic.
