Showing 1,397 of 1,397 total issues
Function getPrintableGenderAbbreviation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getPrintableGenderAbbreviation()
{
$gender = $this->getGender();
if ($gender === '' || is_null($gender)) {
- 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
Function getEnabledFeaturesForStudent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getEnabledFeaturesForStudent(Student $student, $term)
{
$db = new PHPWS_DB('hms_application_feature');
$db->addWhere('enabled', 1);
$db->addWhere('term', $term);
- 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
Function reportToStudentAccount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function reportToStudentAccount()
{
$soap = SOAP::getInstance(UserStatus::getUsername(), SOAP::ADMIN_USER);
$damage = RoomDamageFactory::getDamageById($this->getDamageId());
- 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
Function getFullName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getFullName()
{
if (isset($this->preferred_name) && $this->preferred_name != '') {
$firstName = $this->getPreferredName();
if (isset($this->middle_name) && $this->middle_name != $this->preferred_name) {
- 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
Function getMembership
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getMembership($permission=null, $object=null, $username=null, $display_name=false){
$db = self::getDb();
$db->addJoin('left outer', 'hms_permission', 'hms_role_perm', 'id', 'permission');
$db->addJoin('left outer', 'hms_role_perm', 'hms_role', 'role', 'id');
$db->addJoin('left outer', 'hms_role', 'hms_user_role', 'id', 'role');
- 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
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$semester = Term::getTermSem(Term::getSelectedTerm());
if($semester != TERM_FALL && $semester != TERM_SPRING){
- 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
Function assign
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function assign(AssignmentPairing $pair, Room $room)
{
if(!$this->allowed($pair, $room)) {
throw new AssignmentException('Cannot assign ' . $pair->__tostring() . ' to ' . $room->__tostring());
}
- 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
Function render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function render() {
$hall = null;
$tpl = new \PHPWS_Template('hms');
$tpl->setFile('admin/reports/FloorRoster.tpl');
- 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
Function getPagerTags
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getPagerTags()
{
$tpl = array();
try {
- 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
Function initializeArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function initializeArray(Array &$arr)
{
// Initialize the multi-dimensional array
foreach($this->studentTypes as $t){
foreach($this->classes as $c){
- 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
Function show
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
if(!UserStatus::isAdmin() || !\Current_User::allow('hms', 'edit_terms')){
throw new PermissionException('You do not have permission to edit terms.');
}
- 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
Function updateEnvelope
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function updateEnvelope()
{
$docusignUsername = \PHPWS_Settings::get('hms', 'docusign_username');
if ($docusignUsername === null || $docusignUsername == '') {
throw new InvalidConfigurationException('Missing docusign 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
Function getStudentProfile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getStudentProfile($bannerId, $term)
{
// Sanity checking on the username
if(empty($bannerId) || is_null($bannerId) || !isset($bannerId)){
throw new \InvalidArgumentException('Bad BannerId.');
- 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
Function getClient
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getClient()
{
$docusignUsername = \PHPWS_Settings::get('hms', 'docusign_username');
if ($docusignUsername === null || $docusignUsername == '') {
throw new InvalidConfigurationException('Missing docusign 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
Function show
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
//Seriously php? Can't resolve context without this? Fail.
$context = $this->context;
- 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
Function __construct
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($id = 0, $user_id = null, $timestamp = null,
$activity = null, $actor = null, $notes = null)
{
$this->activity_text = HMS_Activity_Log::getActivityMapping();
- 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
Function sendContractToStudent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function sendContractToStudent($student, $term, $docusignClient, $http, $templateId, $under18TemplateId)
{
$under18 = $student->isUnder18();
$templateRoles = array(
- 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"