RebelCode/rcmod-eddbk-session-generator

View on GitHub
src/Generator/MonthlyRepeatingRule.php

Summary

Maintainability
A
50 mins
Test Coverage

Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $periodFactory,
        $start,
        $end,
        $repeatFreq = null,
        $repeatEnd = null,
Severity: Major
Found in src/Generator/MonthlyRepeatingRule.php - About 50 mins to fix

    Avoid using static access to class '\Carbon\Carbon' in method '_getNextOccurrence'.
    Open

            $datetime = Carbon::createFromTimestampUTC($timestamp);

    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

    There are no issues that match your filters.

    Category
    Status