oc-shopaholic/oc-shopaholic-plugin

View on GitHub

Showing 402 of 402 total issues

Variable "parent_id" is not in valid camel caps format
Open

        if (!empty($obCategoryItem->parent_id)) {
Severity: Minor
Found in components/Breadcrumbs.php by phpcodesniffer

Exception type missing for @throws tag in function comment
Open

     * @throws

Variable "old_price_value" is not in valid camel caps format
Open

        $fOldPrice = $this->old_price_value;
Severity: Minor
Found in classes/item/OfferItem.php by phpcodesniffer

Expected 1 space after FUNCTION keyword; 0 found
Open

        $arElementIDList = (array) Product::whereHas('site', function($obQuery) {

Variable "category_id" is not in valid camel caps format
Open

        $this->addCategoryData($obProductItem->category_id);
Severity: Minor
Found in components/Breadcrumbs.php by phpcodesniffer

Variable "updated_at" is not in valid camel caps format
Open

            'mtime'   => $obCategoryItem->updated_at,

Doc comment for parameter "$obProgressBar" missing
Open

    /**

Doc comment for parameter "$iSiteID" missing
Open

    /**

Variable "price_value" is not in valid camel caps format
Open

        $fPrice = $this->price_value;
Severity: Minor
Found in classes/item/OfferItem.php by phpcodesniffer

Variable "category_id" is not in valid camel caps format
Open

        $this->addCategoryData($obTagItem->category_id);
Severity: Minor
Found in components/Breadcrumbs.php by phpcodesniffer

Declare public methods first,then protected ones and finally private ones
Open

    public function handle()

Variable "tax_percent" is not in valid camel caps format
Open

        $fPrice = TaxHelper::instance()->getPriceWithTax($this->discount_price_value, $this->tax_percent);
Severity: Minor
Found in classes/item/OfferItem.php by phpcodesniffer

Doc comment for parameter "$arAddParamList" missing
Open

    /**

Missing blank line before return statement
Open

            return;

Variable "price_list" is not in valid camel caps format
Open

            $fPrice = array_get($this->price_list, $iActivePriceType.'.price');
Severity: Minor
Found in classes/item/OfferItem.php by phpcodesniffer

Doc comment for parameter "$obProgressBar" missing
Open

    /**

Expected 1 space after FUNCTION keyword; 0 found
Open

                ->sort(function($obPrevItem, $obNextItem) {
Severity: Minor
Found in classes/item/ProductItem.php by phpcodesniffer

Variable "product_id_list" is not in valid camel caps format
Open

        $arProductIDList = (array) $this->product_id_list;
Severity: Minor
Found in classes/item/TaxItem.php by phpcodesniffer

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

<?php namespace Lovata\Shopaholic\Classes\Store\Tax;

use Lovata\Toolbox\Classes\Store\AbstractStoreWithoutParam;

use Lovata\Shopaholic\Models\Tax;
Severity: Major
Found in classes/store/tax/ActiveListStore.php and 7 other locations - About 30 mins to fix
classes/store/brand/ActiveListStore.php on lines 1..26
classes/store/category/ActiveListStore.php on lines 1..26
classes/store/currency/ActiveListStore.php on lines 1..26
classes/store/offer/ActiveListStore.php on lines 1..26
classes/store/promoblock/ActiveListStore.php on lines 1..36
classes/store/promoblock/HiddenListStore.php on lines 1..35
classes/store/promoblock/NotHiddenListStore.php on lines 1..35

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 46.

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 8 locations. Consider refactoring.
Open

<?php namespace Lovata\Shopaholic\Classes\Store\PromoBlock;

use Lovata\Toolbox\Classes\Store\AbstractStoreWithoutParam;

use Lovata\Shopaholic\Models\PromoBlock;
Severity: Major
Found in classes/store/promoblock/ActiveListStore.php and 7 other locations - About 30 mins to fix
classes/store/brand/ActiveListStore.php on lines 1..26
classes/store/category/ActiveListStore.php on lines 1..26
classes/store/currency/ActiveListStore.php on lines 1..26
classes/store/offer/ActiveListStore.php on lines 1..26
classes/store/promoblock/HiddenListStore.php on lines 1..35
classes/store/promoblock/NotHiddenListStore.php on lines 1..35
classes/store/tax/ActiveListStore.php on lines 1..26

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 46.

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

Severity
Category
Status
Source
Language