Method explode_str_on_words
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function explode_str_on_words($text) {
$search = [
"'ё'",
"'<script[^>]*?>.*?</script>'si",
- Create a ticketCreate a ticket
File lib_seo.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
- Create a ticketCreate a ticket
Function renderGAForCart
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function renderGAForCart($model = null, $GAid = null) {
/* Show Google Analytics code if some value inserted in admin panel */
if ($GAid['google_analytics_id']) {
if ($this->getCustomParams()) {
- 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 renderGAForCart
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function renderGAForCart($model = null, $GAid = null) {
/* Show Google Analytics code if some value inserted in admin panel */
if ($GAid['google_analytics_id']) {
if ($this->getCustomParams()) {
- Create a ticketCreate a ticket
Method renderYaMetrica
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function renderYaMetrica($YaMetricaId = null) {
$YandexMetrik = '';
if ($YaMetricaId['yandex_metric']) {
$YandexMetrik = '<!-- Yandex.Metrika counter -->
- Create a ticketCreate a ticket
Function count_words
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function count_words() {
$tmp_arr = [];
foreach ($this->origin_arr as $val) {
if (strlen(utf8_decode($val)) >= $this->min_word_length) {
- 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 renderGA
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function renderGA($GAid = null) {
/* Show Google Analytics code if some value inserted in admin panel */
if ($GAid['google_analytics_id']) {
if ($this->getCustomParams()) {
- 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"