class/SOAP.php
SOAP
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class SOAP
{
// User types
const ADMIN_USER = 'A';
- Create a ticketCreate a ticket
Function getInstance
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function getInstance($username, $userType)
{
if(!isset($username) || is_null($username)){
throw new \InvalidArgumentException('Missing Username.');
}
- Read upRead up
- Create a ticketCreate a ticket
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 addRoomDamageToStudentAccount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public abstract function addRoomDamageToStudentAccount($bannerId, $term, $amount, $damageDescription, $detailCode);
- Create a ticketCreate a ticket
Method removeRoomAssignment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public abstract function removeRoomAssignment($bannerId, $term, $building, $bannerBedId, $percentRefund);
- Create a ticketCreate a ticket
Method logSoap
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected static function logSoap($function, $result, Array $params, $responseCode = null, $errorMessage = null)
- Create a ticketCreate a ticket
Method reportRoomAssignment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function reportRoomAssignment($username, $term, $building_code, $room_code, $plan_code)
- Create a ticketCreate a ticket
Function logSoap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
protected static function logSoap($function, $result, Array $params, $responseCode = null, $errorMessage = null)
{
$args = '';
foreach($params as $p){
- Read upRead up
- Create a ticketCreate a ticket
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"