Showing 19 of 21 total issues
File list_event.php
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php defined('C5_EXECUTE') or die('Access denied.');
?>
<?php echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Event Calendar')); ?>
Method view
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$db = Loader::db();
if (!empty($_POST)) {
Method installSettings
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function installSettings()
{
$db = Loader::db();
//check is settings are duplicate
Function view
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
$db = Loader::db();
if (!empty($_POST)) {
- 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 view
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
$db = Loader::db();
if (!empty($_POST)) {
- 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 view
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$db = Loader::db();
if (!empty($_POST)) {
Method updateEvent
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateEvent()
{
if (isset($_POST) && !empty($_POST)) {
//if calendarID === 0 -> is bad !!
if ($_POST['calendarID'] == 0)
Method getEventsFromCalendar
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getEventsFromCalendar($calendarID, $typeID = 0)
{
$db = Loader::db();
$q = "SELECT ECE.eventID as id, ";
Method installSP
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function installSP($pkg)
{
Loader::model('single_page');
$p1 = SinglePage::add('/dashboard/event_calendar', $pkg);
Method view
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$db = Loader::db();
Function installSettings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function installSettings()
{
$db = Loader::db();
//check is settings are duplicate
- 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 getEventsFromCalendar
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getEventsFromCalendar($calendarID, $typeID = 0)
{
$db = Loader::db();
$q = "SELECT ECE.eventID as id, ";
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
$db = Loader::db();
- 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 updateEvent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateEvent()
{
if (isset($_POST) && !empty($_POST)) {
//if calendarID === 0 -> is bad !!
if ($_POST['calendarID'] == 0)
- 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 removeEvent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function removeEvent(){
if (isset($_POST) && !empty($_POST)) {
$eventID = $this->post('eventID');
if(is_numeric($eventID))
{
- 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 update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function update($calendar_id)
{
if (is_numeric($calendar_id)) {
$db = Loader::db();
$sql = "SELECT * FROM dsEventCalendar WHERE calendarID=" . $calendar_id;
- 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 updateDateEvent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateDateEvent(){
if (isset($_POST) && !empty($_POST)) {
//if calendarID === 0 -> is bad !!
if ($_POST['calendarID'] == 0)
die("ERROR");
- 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 installSP
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function installSP($pkg)
{
Loader::model('single_page');
$p1 = SinglePage::add('/dashboard/event_calendar', $pkg);
- 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 updateDateEventRange
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function updateDateEventRange(){
if (isset($_POST) && !empty($_POST)) {
//if calendarID === 0 -> is bad !!
if ($_POST['calendarID'] == 0)
die("ERROR");
- 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"