File AdminDAO.php
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* gplusraffle - Google API PHP OAuth 2.0 and FusionTables client based raffle
* management system
*
Function setClient
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function setClient(
$accessToken = null,
$client_id = null,
$client_secret = null,
$redirect_uri = null,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
$client_id = null,
$client_secret = null,
$redirect_uri = null,
$adminId = null,
Function readAdminSettings
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function readAdminSettings($fileName = null){
if ($fileName === null) { $fileName = $this->fileName; }
if (file_exists($fileName)){
require $fileName;
if (!isset($settings)||!is_array($settings)){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method saveAdminSettings
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function saveAdminSettings(
$adminId = null,
$adminToken = null,
$tableIds = null,
$fileName = null
Method createTables
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createTables(
$client = null,
$tableSchema = null,
$debug = null
){
Function __construct
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
$client_id = null,
$client_secret = null,
$redirect_uri = null,
$adminId = null,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function saveAdminSettings
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function saveAdminSettings(
$adminId = null,
$adminToken = null,
$tableIds = null,
$fileName = null
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setClient
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setClient(
$accessToken = null,
$client_id = null,
$client_secret = null,
$redirect_uri = null,
Function createTables
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function createTables(
$client = null,
$tableSchema = null,
$debug = null
){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function authenticate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate(
$client = null,
$code = null,
$token = null
){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method readAdminSettings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function readAdminSettings($fileName = null){
if ($fileName === null) { $fileName = $this->fileName; }
if (file_exists($fileName)){
require $fileName;
if (!isset($settings)||!is_array($settings)){
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
$client_id = null,
$client_secret = null,
$redirect_uri = null,
$adminId = null,
$accessToken = null,
Method setClient
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$accessToken = null,
$client_id = null,
$client_secret = null,
$redirect_uri = null,
$client = null