oc-shopaholic/oc-shopaholic-plugin

View on GitHub

Showing 402 of 402 total issues

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

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

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

            $fPrice = $obPriceModel->old_price_value;
Severity: Minor
Found in models/Offer.php by phpcodesniffer

Doc comment for parameter "$obProgressBar" missing
Open

    /**

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

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

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

Expected 7 spaces after parameter type; 2 found
Open

     * @param array  $arRemoveParamList
Severity: Minor
Found in classes/item/ProductItem.php by phpcodesniffer

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

            $arResult[$obPrice->price_type_id] = [
Severity: Minor
Found in models/Offer.php by phpcodesniffer

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

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

Doc comment for parameter "$iSiteID" missing
Open

    /**

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

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

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

        $iMeasureID = $this->measure_of_unit_id;
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 "price_link" is not in valid camel caps format
Open

            $obPriceModel = $this->price_link->where('price_type_id', $iPriceTypeID)->first();
Severity: Minor
Found in models/Offer.php by phpcodesniffer

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

        $fPrice = $obPriceModel->discount_price_value;
Severity: Minor
Found in models/Offer.php by phpcodesniffer

Missing @return tag in function comment
Open

     */
Severity: Minor
Found in controllers/Brands.php by phpcodesniffer

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

        $obCategoryItem = CategoryItem::make($obProduct->category_id);

Missing parameter name
Open

     * @param $obProgressBar

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

        $fPrice = PriceHelper::round($this->discount_price_with_tax_value - $this->discount_price_without_tax_value);
Severity: Minor
Found in classes/item/OfferItem.php by phpcodesniffer

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

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

use Lovata\Toolbox\Classes\Store\AbstractStoreWithoutParam;

use Lovata\Shopaholic\Models\Offer;
Severity: Major
Found in classes/store/offer/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/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
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

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

Severity
Category
Status
Source
Language