Method processRaffleAction
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processRaffleAction($request = null){
if ($request === null){
$request = $this->request;
}
File MainController.php
has 473 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 processRaffleAction
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
private function processRaffleAction($request = null){
if ($request === null){
$request = $this->request;
}
- 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 processAdminAction
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private function processAdminAction($request = null){
if ($request === null){
$request = $this->request;
}
- 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 processAdminAction
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processAdminAction($request = null){
if ($request === null){
$request = $this->request;
}
Method getListRaffleFilterArray
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getListRaffleFilterArray($userId, $isAdmin = false, $request = null){
if ($request === null){
$request = $this->request;
}
Function getListRaffleFilterArray
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function getListRaffleFilterArray($userId, $isAdmin = false, $request = null){
if ($request === null){
$request = $this->request;
}
- 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 14 arguments (exceeds 4 allowed). Consider refactoring. Open
$request,
$client_id = null,
$client_secret = null,
$redirect_uri = null,
$admin_redirect_uri = null,
Method processUserAction
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processUserAction($request = null){
if ($request === null){
$request = $this->request;
}
Method process
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(){
if (!isset($this->request['collection'])){
throw new Exception(
'The request does not contain a collection.',
Function processUserAction
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function processUserAction($request = null){
if ($request === null){
$request = $this->request;
}
- 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 process
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function process(){
if (!isset($this->request['collection'])){
throw new Exception(
'The request does not contain a collection.',
- 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"