imagecms/ImageCMS

View on GitHub

Showing 470 of 1,858 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public static function addInstanceToPool($obj, $key = null)
    {
        if (Propel::isInstancePoolingEnabled()) {
            if (null === $key) {
                $key = serialize([(null === $obj->getId() || is_scalar($obj->getId()) || is_callable([$obj->getId(), '__toString']) ? (string) $obj->getId() : $obj->getId()), (null === $obj->getLocale() || is_scalar($obj->getLocale()) || is_callable([$obj->getLocale(), '__toString']) ? (string) $obj->getLocale() : $obj->getLocale())]);
application/modules/xbanners/models/Map/BannerImageI18nTableMap.php on lines 187..195

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public static function addInstanceToPool($obj, $key = null)
    {
        if (Propel::isInstancePoolingEnabled()) {
            if (null === $key) {
                $key = serialize([(null === $obj->getId() || is_scalar($obj->getId()) || is_callable([$obj->getId(), '__toString']) ? (string) $obj->getId() : $obj->getId()), (null === $obj->getLocale() || is_scalar($obj->getLocale()) || is_callable([$obj->getLocale(), '__toString']) ? (string) $obj->getLocale() : $obj->getLocale())]);
application/modules/xbanners/models/Map/BannersI18nTableMap.php on lines 169..177

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

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

    public function countSCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collSCategoriesPartial && !$this->isNew();
        if (null === $this->collSCategories || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collSCategories) {
Severity: Major
Found in application/modules/core/models/Base/Route.php and 4 other locations - About 5 hrs to fix
application/modules/core/models/Base/Route.php on lines 1719..1742
application/modules/xbanners/models/Base/BannerImage.php on lines 1801..1824
application/modules/xbanners/models/Base/Banners.php on lines 1523..1546
application/modules/xbanners/models/Base/Banners.php on lines 1751..1774

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

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

    public function countSProductss(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collSProductssPartial && !$this->isNew();
        if (null === $this->collSProductss || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collSProductss) {
Severity: Major
Found in application/modules/core/models/Base/Route.php and 4 other locations - About 5 hrs to fix
application/modules/core/models/Base/Route.php on lines 1469..1492
application/modules/xbanners/models/Base/BannerImage.php on lines 1801..1824
application/modules/xbanners/models/Base/Banners.php on lines 1523..1546
application/modules/xbanners/models/Base/Banners.php on lines 1751..1774

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

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

    public function countBannersI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collBannersI18nsPartial && !$this->isNew();
        if (null === $this->collBannersI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collBannersI18ns) {
Severity: Major
Found in application/modules/xbanners/models/Base/Banners.php and 4 other locations - About 5 hrs to fix
application/modules/core/models/Base/Route.php on lines 1469..1492
application/modules/core/models/Base/Route.php on lines 1719..1742
application/modules/xbanners/models/Base/BannerImage.php on lines 1801..1824
application/modules/xbanners/models/Base/Banners.php on lines 1523..1546

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

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

    public function countBannerImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collBannerImagesPartial && !$this->isNew();
        if (null === $this->collBannerImages || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collBannerImages) {
Severity: Major
Found in application/modules/xbanners/models/Base/Banners.php and 4 other locations - About 5 hrs to fix
application/modules/core/models/Base/Route.php on lines 1469..1492
application/modules/core/models/Base/Route.php on lines 1719..1742
application/modules/xbanners/models/Base/BannerImage.php on lines 1801..1824
application/modules/xbanners/models/Base/Banners.php on lines 1751..1774

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

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

    public function countBannerImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collBannerImageI18nsPartial && !$this->isNew();
        if (null === $this->collBannerImageI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collBannerImageI18ns) {
Severity: Major
Found in application/modules/xbanners/models/Base/BannerImage.php and 4 other locations - About 5 hrs to fix
application/modules/core/models/Base/Route.php on lines 1469..1492
application/modules/core/models/Base/Route.php on lines 1719..1742
application/modules/xbanners/models/Base/Banners.php on lines 1523..1546
application/modules/xbanners/models/Base/Banners.php on lines 1751..1774

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

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

    public static function addSelectColumns(Criteria $criteria, $alias = null)
    {
        if (null === $alias) {
            $criteria->addSelectColumn(BannerImageI18nTableMap::COL_ID);
            $criteria->addSelectColumn(BannerImageI18nTableMap::COL_LOCALE);
application/modules/xbanners/models/Map/BannersTableMap.php on lines 353..370

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

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

    public static function addSelectColumns(Criteria $criteria, $alias = null)
    {
        if (null === $alias) {
            $criteria->addSelectColumn(BannersTableMap::COL_ID);
            $criteria->addSelectColumn(BannersTableMap::COL_PLACE);
Severity: Major
Found in application/modules/xbanners/models/Map/BannersTableMap.php and 1 other location - About 5 hrs to fix
application/modules/xbanners/models/Map/BannerImageI18nTableMap.php on lines 376..393

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

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

    public function filterByWidth($width = null, $comparison = null)
    {
        if (is_array($width)) {
            $useMinMax = false;
            if (isset($width['min'])) {
Severity: Major
Found in application/modules/xbanners/models/Base/BannersQuery.php and 16 other locations - About 5 hrs to fix
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterByTarget($target = null, $comparison = null)
    {
        if (is_array($target)) {
            $useMinMax = false;
            if (isset($target['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterById($id = null, $comparison = null)
    {
        if (is_array($id)) {
            $useMinMax = false;
            if (isset($id['min'])) {
Severity: Major
Found in application/modules/core/models/Base/RouteQuery.php and 16 other locations - About 5 hrs to fix
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterByEntityId($entityId = null, $comparison = null)
    {
        if (is_array($entityId)) {
            $useMinMax = false;
            if (isset($entityId['min'])) {
Severity: Major
Found in application/modules/core/models/Base/RouteQuery.php and 16 other locations - About 5 hrs to fix
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterById($id = null, $comparison = null)
    {
        if (is_array($id)) {
            $useMinMax = false;
            if (isset($id['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterByActiveTo($activeTo = null, $comparison = null)
    {
        if (is_array($activeTo)) {
            $useMinMax = false;
            if (isset($activeTo['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterByActive($active = null, $comparison = null)
    {
        if (is_array($active)) {
            $useMinMax = false;
            if (isset($active['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterByPermanent($permanent = null, $comparison = null)
    {
        if (is_array($permanent)) {
            $useMinMax = false;
            if (isset($permanent['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterById($id = null, $comparison = null)
    {
        if (is_array($id)) {
            $useMinMax = false;
            if (isset($id['min'])) {
Severity: Major
Found in application/modules/xbanners/models/Base/BannersQuery.php and 16 other locations - About 5 hrs to fix
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterById($id = null, $comparison = null)
    {
        if (is_array($id)) {
            $useMinMax = false;
            if (isset($id['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 322..343
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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

    public function filterById($id = null, $comparison = null)
    {
        if (is_array($id)) {
            $useMinMax = false;
            if (isset($id['min'])) {
application/modules/core/models/Base/RouteQuery.php on lines 299..320
application/modules/core/models/Base/RouteQuery.php on lines 340..361
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 304..325
application/modules/xbanners/models/Base/BannerImageI18nQuery.php on lines 420..441
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 365..386
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 406..427
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 472..493
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 513..534
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 554..575
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 595..616
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 636..657
application/modules/xbanners/models/Base/BannerImageQuery.php on lines 677..698
application/modules/xbanners/models/Base/BannersI18nQuery.php on lines 289..310
application/modules/xbanners/models/Base/BannersQuery.php on lines 303..324
application/modules/xbanners/models/Base/BannersQuery.php on lines 369..390
application/modules/xbanners/models/Base/BannersQuery.php on lines 410..431

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

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