YetiForceCompany/YetiForceCRM

View on GitHub
app/Conditions/RecordFields/DateField.php

Summary

Maintainability
B
6 hrs
Test Coverage
F
6%

DateField has 36 functions (exceeds 20 allowed). Consider refactoring.
Open

class DateField extends BaseField
{
    use \App\Conditions\RecordTraits\Comparison;
    use \App\Conditions\RecordTraits\ComparisonField;

Severity: Minor
Found in app/Conditions/RecordFields/DateField.php - About 4 hrs to fix

    The class DateField has 35 non-getter- and setter-methods. Consider refactoring DateField to keep number of methods under 25.
    Open

    class DateField extends BaseField
    {
        use \App\Conditions\RecordTraits\Comparison;
        use \App\Conditions\RecordTraits\ComparisonField;
    
    

    TooManyMethods

    Since: 0.1

    A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    The default was changed from 10 to 25 in PHPMD 2.3.

    Example

    Source https://phpmd.org/rules/codesize.html#toomanymethods

    The class DateField has an overall complexity of 59 which is very high. The configured complexity threshold is 50.
    Open

    class DateField extends BaseField
    {
        use \App\Conditions\RecordTraits\Comparison;
        use \App\Conditions\RecordTraits\ComparisonField;
    
    

    The class DateField has 35 public methods. Consider refactoring DateField to keep number of public methods under 10.
    Open

    class DateField extends BaseField
    {
        use \App\Conditions\RecordTraits\Comparison;
        use \App\Conditions\RecordTraits\ComparisonField;
    
    

    TooManyPublicMethods

    Since: 0.1

    A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    Example

    Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

    Class "DateField" has 36 methods, which is greater than 20 authorized. Split it into smaller classes.
    Open

    class DateField extends BaseField

    A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

    Avoid using static access to class '\DateTimeRange' in method 'getStdOperator'.
    Open

            $value = \DateTimeRange::getDateRangeByType($this->operator);

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Log' in method 'check'.
    Open

                Log::trace("Entering to $fn in " . __CLASS__);

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Log' in method 'check'.
    Open

            Log::error("Not found operator: $fn in  " . __CLASS__);

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Define a constant instead of duplicating this literal "Y-m-d" 62 times.
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "+6 day" 3 times.
    Open

            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "Y-m-01" 3 times.
    Open

            return ($dateValue >= date('Y-m-01', strtotime('first day of last month'))) && ($dateValue <= date('Y-m-t', strtotime('first day of last month')));

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "Y-m-t" 3 times.
    Open

            return ($dateValue >= date('Y-m-01', strtotime('first day of last month'))) && ($dateValue <= date('Y-m-t', strtotime('first day of last month')));

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Call to method error from undeclared class \App\Log
    Open

            Log::error("Not found operator: $fn in  " . __CLASS__);
    Severity: Critical
    Found in app/Conditions/RecordFields/DateField.php by phan

    Call to method trace from undeclared class \App\Log
    Open

                Log::trace("Entering to $fn in " . __CLASS__);
    Severity: Critical
    Found in app/Conditions/RecordFields/DateField.php by phan

    Returning type bool but operatorSmallerthannow() is declared to return array
    Open

            return $this->operatorSmaller();

    Returning type bool but operatorBw() is declared to return array
    Open

            return $this->operatorCustom();

    Returning type bool but operatorGreaterthannow() is declared to return array
    Open

            return $this->operatorGreater();

    Returning type false but check() is declared to return void
    Open

            return false;

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

        public function operatorThisweek()
        {
            $startDay = date('Y-m-d', strtotime('this week'));
            $dateValue = date('Y-m-d', strtotime($this->getValue()));
            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));
    Severity: Minor
    Found in app/Conditions/RecordFields/DateField.php and 2 other locations - About 30 mins to fix
    app/Conditions/RecordFields/DateField.php on lines 177..182
    app/Conditions/RecordFields/DateField.php on lines 201..206

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

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

        public function operatorLastweek()
        {
            $startDay = date('Y-m-d', strtotime('last week'));
            $dateValue = date('Y-m-d', strtotime($this->getValue()));
            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));
    Severity: Minor
    Found in app/Conditions/RecordFields/DateField.php and 2 other locations - About 30 mins to fix
    app/Conditions/RecordFields/DateField.php on lines 189..194
    app/Conditions/RecordFields/DateField.php on lines 201..206

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

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

        public function operatorNextweek()
        {
            $startDay = date('Y-m-d', strtotime('next week'));
            $dateValue = date('Y-m-d', strtotime($this->getValue()));
            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));
    Severity: Minor
    Found in app/Conditions/RecordFields/DateField.php and 2 other locations - About 30 mins to fix
    app/Conditions/RecordFields/DateField.php on lines 177..182
    app/Conditions/RecordFields/DateField.php on lines 189..194

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

    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

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

            $fn = 'operator' . ucfirst($this->operator);

    ShortVariable

    Since: 0.2

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

    Example

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

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

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function check()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            [$startDate, $endDate] = explode(',', $this->value);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y', strtotime($this->getValue())) === date('Y', strtotime('last year'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            Log::error("Not found operator: $fn in  " . __CLASS__);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Smaller operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Prevfq operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorCustom()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Today operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y', strtotime($this->getValue())) === date('Y');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        use \App\Conditions\RecordTraits\ComparisonField;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                Log::trace("Entering to $fn in " . __CLASS__);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorToday()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y-m-d', strtotime($this->getValue())) === date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y-m-d', strtotime($this->getValue())) > date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNextfy()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Custom operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorPrevfq()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $fn = 'operator' . ucfirst($this->operator);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (method_exists($this, $fn)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y', strtotime($this->getValue())) === date('Y', strtotime('next year'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorThisfy()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /** {@inheritdoc} */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        use \App\Conditions\RecordTraits\Comparison;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Line exceeds 120 characters; contains 122 characters
    Open

            return ($dateValue >= date('Y-m-d', strtotime($startDate))) && ($dateValue <= date('Y-m-d', strtotime($endDate)));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorPrevfy()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorGreater()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Nextfy operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y-m-d', strtotime($this->getValue())) < date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNextfq()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return (ceil(date('n', strtotime($this->value)) / 3)) === (ceil(date('n') / 3) + 1);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorYesterday()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $startDay = date('Y-m-d', strtotime('last week'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($today . '-14 day'))) && ($dateValue <= $today);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (isset(\App\Condition::DATE_OPERATORS[$this->operator]) && !method_exists($this, $fn)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($startDate))) && ($dateValue <= date('Y-m-d', strtotime($endDate)));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Greater operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorSmaller()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Greater operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Thisfy operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Yesterday operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $startDay = date('Y-m-d', strtotime('this week'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Line exceeds 120 characters; contains 155 characters
    Open

            return ($dateValue >= date('Y-m-01', strtotime('first day of next month'))) && ($dateValue <= date('Y-m-t', strtotime('first day of next month')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $fn = 'getStdOperator';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $this->{$fn}();

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Lastweek operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Last7days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Last15days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLast15days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y-m-d', strtotime($this->getValue())) === date('Y-m-d', strtotime('last day'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y-m-d', strtotime($this->getValue())) === date('Y-m-d', strtotime('tomorrow'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLastweek()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLastmonth()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorUntiltoday()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-01', strtotime('this month'))) && ($dateValue <= date('Y-m-t', strtotime('this month')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return date('Y-m-d', strtotime($this->getValue())) <= date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($today . '-6 day'))) && ($dateValue <= $today);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLast30days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Thisfq operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Nextfq operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorThisweek()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorThismonth()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-01', strtotime('first day of next month'))) && ($dateValue <= date('Y-m-t', strtotime('first day of next month')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Last30days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Untiltoday operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Line exceeds 120 characters; contains 155 characters
    Open

            return ($dateValue >= date('Y-m-01', strtotime('first day of last month'))) && ($dateValue <= date('Y-m-t', strtotime('first day of last month')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Thismonth operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Tomorrow operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $startDay = date('Y-m-d', strtotime('next week'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNextmonth()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Next120days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorThisfq()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Lastmonth operator.

    Line exceeds 120 characters; contains 129 characters
    Open

            return ($dateValue >= date('Y-m-01', strtotime('this month'))) && ($dateValue <= date('Y-m-t', strtotime('this month')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Last60days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNext15days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Last90days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Next15days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Smaller operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorTomorrow()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Thisweek operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLast7days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($today . '-29 day'))) && ($dateValue <= $today);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLast60days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($today . '-59 day'))) && ($dateValue <= $today);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return (ceil(date('n', strtotime($this->value)) / 3)) === (ceil(date('n') / 3) - 1);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return (ceil(date('n', strtotime($this->value)) / 3)) === (ceil(date('n') / 3));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-01', strtotime('first day of last month'))) && ($dateValue <= date('Y-m-t', strtotime('first day of last month')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Next30days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $today) && ($dateValue <= date('Y-m-d', strtotime($today . '+59 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->operatorSmaller();

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $value = \DateTimeRange::getDateRangeByType($this->operator);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->operatorCustom();

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return array

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return array

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorSmallerthannow()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $startDay) && ($dateValue <= date('Y-m-d', strtotime($startDay . '+6 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Nextweek operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNextweek()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Nextmonth operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $today) && ($dateValue <= date('Y-m-d', strtotime($today . '+29 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Between operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Greater operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $today) && ($dateValue <= date('Y-m-d', strtotime($today . '+14 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNext30days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Next60days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Last120days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Next90days operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->getValue() <= date('Y-m-d', strtotime('-' . $this->value . ' days'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return mixed

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $dateValue <= $value[0];

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $value[0]) && ($dateValue <= $value[1]);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($today . '-89 day'))) && ($dateValue <= $today);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNext120days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLast90days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $today = date('Y-m-d');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorGreaterthannow()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->operatorGreater();

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getStdOperator()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNext90days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorMoreThanDaysAgo()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorBw()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return array

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorLast120days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= date('Y-m-d', strtotime($today . '-119 day'))) && ($dateValue <= $today);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function operatorNext60days()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $today) && ($dateValue <= date('Y-m-d', strtotime($today . '+89 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return ($dateValue >= $today) && ($dateValue <= date('Y-m-d', strtotime($today . '+119 day')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * MoreThanDaysAgo operator.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Get value.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $dateValue = date('Y-m-d', strtotime($this->getValue()));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($value[0] === $value[1]) {

    There are no issues that match your filters.

    Category
    Status