Code Duplication    Length = 13-13 lines in 2 locations

src/CalendarSettings/Gregorian.php 1 location

@@ 150-162 (lines=13) @@
147
148
    },
149
150
    'day_of_week' => function ($date_time) {
151
152
        $config = include 'Gregorian.php';
153
154
        $day = $date_time->format('l');
155
156
        foreach ($config['days_of_week'] as $key => $value) {
157
            if ($value == $day) {
158
                return $key += 1;
159
            }
160
        }
161
162
    },
163
164
    /************************************************************
165
    *                       Leap year

src/CalendarSettings/Julian.php 1 location

@@ 174-186 (lines=13) @@
171
172
    },
173
174
    'day_of_week' => function ($date_time) {
175
176
        $config = include 'Julian.php';
177
178
        $day = $date_time->format('l');
179
180
        foreach ($config['days_of_week'] as $key => $value) {
181
            if ($value == $day) {
182
                return $key += 1;
183
            }
184
        }
185
186
    },
187
188
    /************************************************************
189
    *                       Leap year