Showing 20 of 22 total issues
File list_event.php
has 452 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 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$this->addFooterItem(Loader::helper('html')->css('jquery.datetimepicker.min.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->javascript('moment.min.js', 'dsEventCalendar'));
Function view
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
$this->addFooterItem(Loader::helper('html')->css('colorpicker.min.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->javascript('colorpicker.min.js', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendar'));
- 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()
{
$this->addFooterItem(Loader::helper('html')->css('jquery.datetimepicker.min.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->javascript('moment.min.js', 'dsEventCalendar'));
- 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 installSettings
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function installSettings()
{
$db = Loader::db();
//check is settings are duplicate
Method view
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$this->addFooterItem(Loader::helper('html')->css('colorpicker.min.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->javascript('colorpicker.min.js', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendar'));
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 action_ical
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function action_ical()
{
$db = Loader::db();
$caltitle = $db->fetchColumn("select title from dsEventCalendar where calendarID = ?", array($this->calendarID), 0);
if ($this->calendarID == 0) {
Method view
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$this->addFooterItem(Loader::helper('html')->css('colorpicker.min.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->javascript('colorpicker.min.js', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendar'));
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, ";
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 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
$this->addFooterItem(Loader::helper('html')->css('colorpicker.min.css', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->javascript('colorpicker.min.js', 'dsEventCalendar'));
$this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendar'));
- 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 install
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install() {
$pkg = parent::install();
// install block
BlockType::installBlockTypeFromPackage('event_calendar', $pkg);
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 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 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)
- 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)
{
$this->set('pageTitle', t("Manage calendar"));
if (is_numeric($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 install
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function install() {
$pkg = parent::install();
// install block
BlockType::installBlockTypeFromPackage('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)
- 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"