Showing 32 of 910 total issues
File urls.php
has 570 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return array(
// ************************************************************* Domain
array( // Create
'regex' => '#^/domain/new$#',
Method init
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_part';
$this->_a['verbose'] = 'ELearn_Part';
$this->_a['cols'] = array(
Method init
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_comment';
$this->_a['verbose'] = 'ELearn_Comment';
$this->_a['cols'] = array(
Method init
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_topic';
$this->_a['verbose'] = 'ELearn_Topic';
$this->_a['cols'] = array(
Method init
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_course';
$this->_a['verbose'] = 'ELearn_Course';
$this->_a['cols'] = array(
Method init
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_vote';
$this->_a['verbose'] = 'ELearn_Vote';
$this->_a['cols'] = array(
Method init
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_lesson';
$this->_a['verbose'] = 'ELearn_Lesson';
$this->_a['cols'] = array(
Method init
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_domain';
$this->_a['verbose'] = 'ELearn_Domain';
$this->_a['cols'] = array(
Method init
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_parthistory';
$this->_a['verbose'] = 'ELearn_PartHistory';
$this->_a['cols'] = array(
Method init
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
$this->_a['table'] = 'elearn_graid';
$this->_a['verbose'] = 'ELearn_Graid';
$this->_a['cols'] = array(
Method find
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function find($request, $match)
{
// check for lesson
if (isset($match['lessonId'])) {
$lessonId = $match['lessonId'];
Function filter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function filter()
{
if (strlen($this->where_clause) > 0) {
return $this->where_clause;
}
- 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 find
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function find($request, $match)
{
// check for domain
if (isset($match['domainId'])) {
$domainId = $match['domainId'];
Method find
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function find($request, $match)
{
// check for topic
if (isset($match['topicId'])) {
$topicId = $match['topicId'];
Method findAll
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function findAll($request, $match)
{
// check for domain
if (isset($match['domainId'])) {
$domainId = $match['domainId'];
Method find
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function find($request, $match)
{
// check for course
if (isset($match['courseId'])) {
$courseId = $match['courseId'];
Function remove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function remove($request, $match)
{
if (isset($match['topicId'])) {
$topicId = $match['topicId'];
} else {
- 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 get
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function get($request, $match)
{
// Check and fetch Part
if (array_key_exists('partId', $match)) {
$part = Pluf_Shortcuts_GetObjectOr404('ELearn_Part', $match['partId']);
- 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 remove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function remove($request, $match)
{
if (isset($match['lessonId'])) {
$lessonId = $match['lessonId'];
} else {
- 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 remove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function remove($request, $match)
{
if (isset($match['courseId'])) {
$courseId = $match['courseId'];
} else {
- 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"