Class: PhpCop::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/phpcop/runner.rb

Overview

This class runner

Constant Summary collapse

EXT =
%w(.php .phtml .php.dist).freeze
EXCLUDE_FOLDER =
%w(. .. .git .gitignore vendor).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_store) ⇒ Runner

Returns a new instance of Runner.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/phpcop/runner.rb', line 12

def initialize(config_store)
  @count_files = 0
  @count_errors = 0
  @conf = config_store
  @rules = @conf.rules
  @types = { files: false }

  Dir.foreach(Dir.pwd) do |file|
    run_folder(file, Dir.pwd)
  end
end

Instance Attribute Details

#count_errorsObject (readonly)

Returns the value of attribute count_errors.



10
11
12
# File 'lib/phpcop/runner.rb', line 10

def count_errors
  @count_errors
end

#count_filesObject (readonly)

Returns the value of attribute count_files.



10
11
12
# File 'lib/phpcop/runner.rb', line 10

def count_files
  @count_files
end