ImpressCMS/impresscms

View on GitHub
htdocs/modules/system/admin/adsense/class/adsense.php

Summary

Maintainability
B
4 hrs
Test Coverage

Method buildFormats has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function buildFormats() {
        $this->adFormats['728x90_as'] = array(
            'caption' => '728 X 90 Leaderboard',
            'width' => 728,
            'height' => 90,
Severity: Major
Found in htdocs/modules/system/admin/adsense/class/adsense.php - About 2 hrs to fix

    The method render uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $ret = '<div>';
            }

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class 'icms_core_DataFilter' in method 'generateTag'.
    Open

            $title = icms_core_DataFilter::icms_substr($title, 0, 10, '');

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid unused local variables such as '$title'.
    Open

                $obj->setVar('tag', $title  = $obj->generateTag());

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('color_link', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_LINK, _CO_ICMS_ADSENSE_COLOR_LINK_DSC);

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('color_text', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_TEXT, _CO_ICMS_ADSENSE_COLOR_TEXT_DSC);

    Call to undeclared method \SystemAdsense::setControl
    Open

            $this->setControl('color_border', 'color');

    Call to undeclared method \SystemAdsense::setControl
    Open

            $this->setControl('color_link', 'color');

    Returning type void but color_text() is declared to return string
    Open

            if ($value == "") return;

    Reference to undeclared constant \XOBJ_DTYPE_TXTAREA
    Open

            $this->quickInitVar('description', XOBJ_DTYPE_TXTAREA, TRUE, _CO_ICMS_ADSENSE_DESCRIPTION, _CO_ICMS_ADSENSE_DESCRIPTION_DSC);

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('format', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_FORMAT, _CO_ICMS_ADSENSE_FORMAT_DSC);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('color_background', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_BACKGROUND, _CO_ICMS_ADSENSE_COLOR_BORDER_DSC);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('color_text', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_TEXT, _CO_ICMS_ADSENSE_COLOR_TEXT_DSC);

    Assigning array|array{} to property but \SystemAdsenseHandler->_objects is false
    Open

                $this->_objects = $ret;

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('tag', XOBJ_DTYPE_TXTBOX, FALSE, _CO_ICMS_ADSENSE_TAG, _CO_ICMS_ADSENSE_TAG_DSC);

    Reference to undeclared constant \XOBJ_DTYPE_TXTAREA
    Open

            $this->quickInitVar('style', XOBJ_DTYPE_TXTAREA, FALSE, _CO_ICMS_ADSENSE_STYLE, _CO_ICMS_ADSENSE_STYLE_DSC);

    Call to undeclared method \SystemAdsense::setControl
    Open

            $this->setControl('format', array('method' => 'getFormats'));

    Call to undeclared method \SystemAdsense::setControl
    Open

            $this->setControl('color_url', 'color');

    Reference to undeclared class \icms_ipf_Handler
    Open

            parent::__construct($db, 'adsense', 'adsenseid', 'tag', 'description', 'system');

    Reference to undeclared property \SystemAdsense->handler
    Open

                . 'google_ad_width = ' . $this->handler->adFormats[$this->getVar('format', 'n')]['width'] . ';'

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('adsenseid', XOBJ_DTYPE_INT, TRUE);

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('color_border', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_BORDER, _CO_ICMS_ADSENSE_COLOR_BORDER_DSC);

    Returning type void but color_url() is declared to return string
    Open

            if ($value == "") return;

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('client_id', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_CLIENT_ID, _CO_ICMS_ADSENSE_CLIENT_ID_DSC);

    Reference to undeclared class \icms_ipf_Object
    Open

            parent::__construct($handler);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('client_id', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_CLIENT_ID, _CO_ICMS_ADSENSE_CLIENT_ID_DSC);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('color_link', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_LINK, _CO_ICMS_ADSENSE_COLOR_LINK_DSC);

    Returning type void but color_background() is declared to return string
    Open

            if ($value == "") return;

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('slot', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_SLOT, _CO_ICMS_ADSENSE_SLOT_DSC);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('tag', XOBJ_DTYPE_TXTBOX, FALSE, _CO_ICMS_ADSENSE_TAG, _CO_ICMS_ADSENSE_TAG_DSC);

    Returning type void but color_border() is declared to return string
    Open

            if ($value == "") return;

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('description', XOBJ_DTYPE_TXTAREA, TRUE, _CO_ICMS_ADSENSE_DESCRIPTION, _CO_ICMS_ADSENSE_DESCRIPTION_DSC);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('slot', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_SLOT, _CO_ICMS_ADSENSE_SLOT_DSC);

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('color_background', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_BACKGROUND, _CO_ICMS_ADSENSE_COLOR_BORDER_DSC);

    Call to undeclared method \SystemAdsense::setControl
    Open

            $this->setControl('color_text', 'color');

    Call to method icms_substr from undeclared class \icms_core_DataFilter
    Open

            $title = icms_core_DataFilter::icms_substr($title, 0, 10, '');

    Returning type false but getAdsensesByTag() is declared to return array
    Open

            return $this->_objects;

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('format', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_FORMAT, _CO_ICMS_ADSENSE_FORMAT_DSC);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('style', XOBJ_DTYPE_TXTAREA, FALSE, _CO_ICMS_ADSENSE_STYLE, _CO_ICMS_ADSENSE_STYLE_DSC);

    Call to undeclared method \SystemAdsense::id
    Open

                . $this->id() . '"><img src="' . ICMS_IMAGES_SET_URL . '/actions/editcopy.png" style="vertical-align: middle;" alt="'

    Class extends undeclared class \icms_ipf_Object
    Open

    class SystemAdsense extends icms_ipf_Object {

    Reference to undeclared constant \XOBJ_DTYPE_INT
    Open

            $this->quickInitVar('adsenseid', XOBJ_DTYPE_INT, TRUE);

    Call to undeclared method \SystemAdsenseHandler::getObjects
    Open

                $adsensesObj = $this->getObjects(NULL, TRUE);

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('color_border', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_BORDER, _CO_ICMS_ADSENSE_COLOR_BORDER_DSC);

    Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
    Open

            $this->quickInitVar('color_url', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_URL, _CO_ICMS_ADSENSE_COLOR_URL_DSC);

    Reference to undeclared class \icms_ipf_Object
    Open

            return parent::getVar($key, $format);

    Reference to undeclared property \SystemAdsense->handler
    Open

                . 'google_ad_height = ' . $this->handler->adFormats[$this->getVar('format', 'n')]['height'] . ';'

    Class extends undeclared class \icms_ipf_Handler
    Open

    class SystemAdsenseHandler extends icms_ipf_Handler {

    Call to undeclared method \SystemAdsense::quickInitVar
    Open

            $this->quickInitVar('color_url', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_URL, _CO_ICMS_ADSENSE_COLOR_URL_DSC);

    Call to undeclared method \SystemAdsense::setControl
    Open

            $this->setControl('color_background', 'color');

    Returning type void but color_link() is declared to return string
    Open

            if ($value == "") return;

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            $pattern = array ("/%09/", "/%20/", "/%21/", "/%22/", "/%23/", "/%25/", "/%26/", "/%27/", "/%28/", "/%29/", "/%2C/", "/%2F/", "/%3A/", "/%3B/", "/%3C/", "/%3D/", "/%3E/", "/%3F/", "/%40/", "/%5B/", "/%5C/", "/%5D/", "/%5E/", "/%7B/", "/%7C/", "/%7D/", "/%7E/", "/\./" );
    Severity: Major
    Found in htdocs/modules/system/admin/adsense/class/adsense.php and 4 other locations - About 35 mins to fix
    htdocs/install/modulesadmin.php on lines 25..25
    htdocs/modules/system/admin/adsense/class/adsense.php on lines 185..185
    htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 124..152
    htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 605..633

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            $rep_pat = array ("-", "-", "-", "-", "-", "-100", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-at-", "-", "-", "-", "-", "-", "-", "-", "-", "-" );
    Severity: Major
    Found in htdocs/modules/system/admin/adsense/class/adsense.php and 4 other locations - About 35 mins to fix
    htdocs/install/modulesadmin.php on lines 25..25
    htdocs/modules/system/admin/adsense/class/adsense.php on lines 184..184
    htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 124..152
    htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 605..633

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class SystemAdsense extends icms_ipf_Object {

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class SystemAdsenseHandler extends icms_ipf_Handler {

    The property $_adFormatsList is not named in camelCase.
    Open

    class SystemAdsenseHandler extends icms_ipf_Handler {
        public $adFormats = array();
        private $_adFormatsList = array();
        private $_objects = FALSE;
    
    

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    Avoid variables with short names like $db. Configured minimum length is 3.
    Open

        public function __construct(&$db) {

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#shortvariable

    The property $_objects is not named in camelCase.
    Open

    class SystemAdsenseHandler extends icms_ipf_Handler {
        public $adFormats = array();
        private $_adFormatsList = array();
        private $_objects = FALSE;
    
    

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    Each class must be in a file by itself
    Open

    class SystemAdsenseHandler extends icms_ipf_Handler {

    TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
    Open

        private $_objects = FALSE;

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('color_link', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_LINK, _CO_ICMS_ADSENSE_COLOR_LINK_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('color_text', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_TEXT, _CO_ICMS_ADSENSE_COLOR_TEXT_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            return TRUE;

    TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
    Open

        public $content = FALSE;

    Method name "SystemAdsense::color_url" is not in camel caps format
    Open

        public function color_url() {

    Method name "SystemAdsense::color_text" is not in camel caps format
    Open

        public function color_text() {

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('slot', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_SLOT, _CO_ICMS_ADSENSE_SLOT_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('color_border', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_BORDER, _CO_ICMS_ADSENSE_COLOR_BORDER_DSC);

    Method name "SystemAdsense::color_background" is not in camel caps format
    Open

        public function color_background() {

    Method name "SystemAdsense::color_link" is not in camel caps format
    Open

        public function color_link() {

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('adsenseid', XOBJ_DTYPE_INT, TRUE);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('format', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_FORMAT, _CO_ICMS_ADSENSE_FORMAT_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
    Open

            $this->quickInitVar('style', XOBJ_DTYPE_TXTAREA, FALSE, _CO_ICMS_ADSENSE_STYLE, _CO_ICMS_ADSENSE_STYLE_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('color_background', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_BACKGROUND, _CO_ICMS_ADSENSE_COLOR_BORDER_DSC);

    The closing brace for the class must go on the next line after the body
    Open

    }

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('description', XOBJ_DTYPE_TXTAREA, TRUE, _CO_ICMS_ADSENSE_DESCRIPTION, _CO_ICMS_ADSENSE_DESCRIPTION_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('color_url', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_COLOR_URL, _CO_ICMS_ADSENSE_COLOR_URL_DSC);

    TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
    Open

            $this->quickInitVar('tag', XOBJ_DTYPE_TXTBOX, FALSE, _CO_ICMS_ADSENSE_TAG, _CO_ICMS_ADSENSE_TAG_DSC);

    Method name "SystemAdsense::color_border" is not in camel caps format
    Open

        public function color_border() {

    TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
    Open

                $adsensesObj = $this->getObjects(NULL, TRUE);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

                $adsensesObj = $this->getObjects(NULL, TRUE);

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            $this->quickInitVar('client_id', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_ADSENSE_CLIENT_ID, _CO_ICMS_ADSENSE_CLIENT_ID_DSC);

    Inline control structures are not allowed
    Open

            if ($value == "") return;

    Inline control structures are not allowed
    Open

            if ($value == "") return;

    Inline control structures are not allowed
    Open

            if ($value == "") return;

    Inline control structures are not allowed
    Open

            if ($value == "") return;

    Inline control structures are not allowed
    Open

            if ($value == "") return;

    Expected 0 spaces before closing bracket; 1 found
    Open

                . 'google_color_bg = ' . json_encode($this->getVar('color_background', 'n') ). ';'

    Expected 0 spaces before closing bracket; 1 found
    Open

                . 'google_color_border = ' . json_encode($this->getVar('color_border', 'n') ). ';'

    The variable $rep_pat is not named in camelCase.
    Open

        public function generateTag() {
            $title = rawurlencode(strtolower($this->getVar('description', 'e')));
            $title = icms_core_DataFilter::icms_substr($title, 0, 10, '');
    
            $pattern = array ("/%09/", "/%20/", "/%21/", "/%22/", "/%23/", "/%25/", "/%26/", "/%27/", "/%28/", "/%29/", "/%2C/", "/%2F/", "/%3A/", "/%3B/", "/%3C/", "/%3D/", "/%3E/", "/%3F/", "/%40/", "/%5B/", "/%5C/", "/%5D/", "/%5E/", "/%7B/", "/%7C/", "/%7D/", "/%7E/", "/\./" );

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $rep_pat is not named in camelCase.
    Open

        public function generateTag() {
            $title = rawurlencode(strtolower($this->getVar('description', 'e')));
            $title = icms_core_DataFilter::icms_substr($title, 0, 10, '');
    
            $pattern = array ("/%09/", "/%20/", "/%21/", "/%22/", "/%23/", "/%25/", "/%26/", "/%27/", "/%28/", "/%29/", "/%2C/", "/%2F/", "/%3A/", "/%3B/", "/%3C/", "/%3D/", "/%3E/", "/%3F/", "/%40/", "/%5B/", "/%5C/", "/%5D/", "/%5E/", "/%7B/", "/%7C/", "/%7D/", "/%7E/", "/\./" );

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $rep_pat is not named in camelCase.
    Open

        public function generateTag() {
            $title = rawurlencode(strtolower($this->getVar('description', 'e')));
            $title = icms_core_DataFilter::icms_substr($title, 0, 10, '');
    
            $pattern = array ("/%09/", "/%20/", "/%21/", "/%22/", "/%23/", "/%25/", "/%26/", "/%27/", "/%28/", "/%29/", "/%2C/", "/%2F/", "/%3A/", "/%3B/", "/%3C/", "/%3D/", "/%3E/", "/%3F/", "/%40/", "/%5B/", "/%5C/", "/%5D/", "/%5E/", "/%7B/", "/%7C/", "/%7D/", "/%7E/", "/\./" );

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $rep_pat is not named in camelCase.
    Open

        public function generateTag() {
            $title = rawurlencode(strtolower($this->getVar('description', 'e')));
            $title = icms_core_DataFilter::icms_substr($title, 0, 10, '');
    
            $pattern = array ("/%09/", "/%20/", "/%21/", "/%22/", "/%23/", "/%25/", "/%26/", "/%27/", "/%28/", "/%29/", "/%2C/", "/%2F/", "/%3A/", "/%3B/", "/%3C/", "/%3D/", "/%3E/", "/%3F/", "/%40/", "/%5B/", "/%5C/", "/%5D/", "/%5E/", "/%7B/", "/%7C/", "/%7D/", "/%7E/", "/\./" );

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The method color_text is not named in camelCase.
    Open

        public function color_text() {
            $value = $this->getVar("color_text", "n");
            if ($value == "") return;
            return "#" . $value;
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method color_background is not named in camelCase.
    Open

        public function color_background() {
            $value = $this->getVar("color_background", "n");
            if ($value == "") return;
            return "#" . $value;
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method color_link is not named in camelCase.
    Open

        public function color_link() {
            $value = $this->getVar("color_link", "n");
            if ($value == "") return;
            return "#" . $value;
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method color_url is not named in camelCase.
    Open

        public function color_url() {
            $value = $this->getVar("color_url", "n");
            if ($value == "") return;
            return "#" . $value;
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method color_border is not named in camelCase.
    Open

        public function color_border() {
            $value = $this->getVar("color_border", "n");
            if ($value == "") return;
            return "#" . $value;
        }

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status