filestack/filestack-php

View on GitHub
tests/FilestackTransformTest.php

Summary

Maintainability
F
6 days
Test Coverage

File FilestackTransformTest.php has 753 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
namespace Filestack\Tests;

use Filestack\FilestackConfig;
use Filestack\Filelink;
Severity: Major
Found in tests/FilestackTransformTest.php - About 1 day to fix

    FilestackTransformTest has 40 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class FilestackTransformTest extends BaseTest
    {
        /**
         * Test debugging a transformation url of a chained call
         */
    Severity: Minor
    Found in tests/FilestackTransformTest.php - About 5 hrs to fix

      Method testCollageSuccess has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testCollageSuccess()
          {
              $filelink = new Filelink($this->test_file_handle,
                              $this->test_api_key,
                              $this->test_security);
      Severity: Minor
      Found in tests/FilestackTransformTest.php - About 1 hr to fix

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

            public function testPartialBlurSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 1 other location - About 4 hrs to fix
        tests/FilestackTransformTest.php on lines 671..696

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

        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 function testPartialPixelateSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 1 other location - About 4 hrs to fix
        tests/FilestackTransformTest.php on lines 641..666

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

        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 function testTransformInvalidTaskThrowsException()
            {
                $mock_response = new MockHttpResponse(
                    400,
                    'Invalid transformation task'
        Severity: Major
        Found in tests/FilestackTransformTest.php and 1 other location - About 2 hrs to fix
        tests/FilestackTransformTest.php on lines 91..112

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

        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 function testTransformationFailed()
            {
                $mock_response = new MockHttpResponse(
                    403,
                    'Forbidden, Missing credentials'
        Severity: Major
        Found in tests/FilestackTransformTest.php and 1 other location - About 2 hrs to fix
        tests/FilestackTransformTest.php on lines 117..138

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

        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 function testBorderSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 1 other location - About 2 hrs to fix
        tests/FilestackTransformTest.php on lines 725..747

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

        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 function testPolaroidSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 1 other location - About 2 hrs to fix
        tests/FilestackTransformTest.php on lines 350..372

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

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

            public function testBlurSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 302..321
        tests/FilestackTransformTest.php on lines 617..636
        tests/FilestackTransformTest.php on lines 701..720
        tests/FilestackTransformTest.php on lines 752..771
        tests/FilestackTransformTest.php on lines 881..900
        tests/FilestackTransformTest.php on lines 905..924

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

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

            public function testQualitySuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 302..321
        tests/FilestackTransformTest.php on lines 326..345
        tests/FilestackTransformTest.php on lines 617..636
        tests/FilestackTransformTest.php on lines 701..720
        tests/FilestackTransformTest.php on lines 881..900
        tests/FilestackTransformTest.php on lines 905..924

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

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

            public function testBlackwhiteSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 326..345
        tests/FilestackTransformTest.php on lines 617..636
        tests/FilestackTransformTest.php on lines 701..720
        tests/FilestackTransformTest.php on lines 752..771
        tests/FilestackTransformTest.php on lines 881..900
        tests/FilestackTransformTest.php on lines 905..924

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

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

            public function testSepiaSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 302..321
        tests/FilestackTransformTest.php on lines 326..345
        tests/FilestackTransformTest.php on lines 617..636
        tests/FilestackTransformTest.php on lines 701..720
        tests/FilestackTransformTest.php on lines 752..771
        tests/FilestackTransformTest.php on lines 905..924

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

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

            public function testOilPaintSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 302..321
        tests/FilestackTransformTest.php on lines 326..345
        tests/FilestackTransformTest.php on lines 701..720
        tests/FilestackTransformTest.php on lines 752..771
        tests/FilestackTransformTest.php on lines 881..900
        tests/FilestackTransformTest.php on lines 905..924

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

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

            public function testSharpenSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 302..321
        tests/FilestackTransformTest.php on lines 326..345
        tests/FilestackTransformTest.php on lines 617..636
        tests/FilestackTransformTest.php on lines 701..720
        tests/FilestackTransformTest.php on lines 752..771
        tests/FilestackTransformTest.php on lines 881..900

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

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

            public function testPixelateSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 6 other locations - About 1 hr to fix
        tests/FilestackTransformTest.php on lines 302..321
        tests/FilestackTransformTest.php on lines 326..345
        tests/FilestackTransformTest.php on lines 617..636
        tests/FilestackTransformTest.php on lines 752..771
        tests/FilestackTransformTest.php on lines 881..900
        tests/FilestackTransformTest.php on lines 905..924

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

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

            public function testNegativeSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 3 other locations - About 55 mins to fix
        tests/FilestackTransformTest.php on lines 521..539
        tests/FilestackTransformTest.php on lines 571..589
        tests/FilestackTransformTest.php on lines 776..794

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

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

            public function testRedEyeSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 3 other locations - About 55 mins to fix
        tests/FilestackTransformTest.php on lines 521..539
        tests/FilestackTransformTest.php on lines 571..589
        tests/FilestackTransformTest.php on lines 594..612

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

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

            public function testEnhanceSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 3 other locations - About 55 mins to fix
        tests/FilestackTransformTest.php on lines 571..589
        tests/FilestackTransformTest.php on lines 594..612
        tests/FilestackTransformTest.php on lines 776..794

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

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

            public function testMonochromeSuccess()
            {
                $filelink = new Filelink($this->test_file_handle,
                                $this->test_api_key,
                                $this->test_security);
        Severity: Major
        Found in tests/FilestackTransformTest.php and 3 other locations - About 55 mins to fix
        tests/FilestackTransformTest.php on lines 521..539
        tests/FilestackTransformTest.php on lines 594..612
        tests/FilestackTransformTest.php on lines 776..794

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

        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

        There are no issues that match your filters.

        Category
        Status