3scale/porta

View on GitHub
app/lib/three_scale/oauth2/client.rb

Summary

Maintainability
A
0 mins
Test Coverage

ThreeScale::OAuth2::Client#client_class is controlled by argument 'kind'
Open

        case kind
Severity: Minor
Found in app/lib/three_scale/oauth2/client.rb by reek

Control Parameter is a special case of Control Couple

Example

A simple example would be the "quoted" parameter in the following method:

def write(quoted)
  if quoted
    write_quoted @value
  else
    write_unquoted @value
  end
end

Fixing those problems is out of the scope of this document but an easy solution could be to remove the "write" method alltogether and to move the calls to "writequoted" / "writeunquoted" in the initial caller of "write".

ThreeScale::OAuth2::Client::Options#to_hash has the variable name 'v'
Open

          { site: site, token_url: token_url, authorize_url: authorize_url, connection_opts: connection_opts }.reject { |_, v| !v }
Severity: Minor
Found in app/lib/three_scale/oauth2/client.rb by reek

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

ThreeScale::OAuth2 has the name 'OAuth2'
Open

  module OAuth2
Severity: Minor
Found in app/lib/three_scale/oauth2/client.rb by reek

An Uncommunicative Module Name is a module name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

There are no issues that match your filters.

Category
Status