Passed
Push — main ( d5b4d9...0df0a9 )
by PRATIK
04:50 queued 01:52
created

DateConverterTestDouble   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getTotalEnglishDays() 0 3 1
A getCalendarData() 0 3 1
A getTotalNepaliDays() 0 3 1
A isInRangeNep() 0 3 1
A isLeapYear() 0 3 1
A isInRangeEng() 0 3 1
1
<?php
2
3
namespace Pratiksh\Nepalidate\Tests\Unit\Doubles;
4
5
use Pratiksh\Nepalidate\Services\DateConverter;
6
7
class DateConverterTestDouble extends DateConverter
8
{
9
    // Expose protected methods for testing
10
    public function isInRangeEng($yy, $mm, $dd)
11
    {
12
        return $this->is_in_range_eng($yy, $mm, $dd);
13
    }
14
15
    public function isInRangeNep($yy, $mm, $dd)
16
    {
17
        return $this->is_in_range_nep($yy, $mm, $dd);
18
    }
19
20
    public function isLeapYear($year)
21
    {
22
        return $this->is_leap_year($year);
23
    }
24
25
    public function getTotalEnglishDays($year, $month, $day)
26
    {
27
        return $this->calculateTotalEnglishDays($year, $month, $day);
28
    }
29
30
    public function getTotalNepaliDays($year, $month, $day)
31
    {
32
        return $this->calculateTotalNepaliDays($year, $month, $day);
33
    }
34
35
    public function getCalendarData()
36
    {
37
        return $this->calendarData;
38
    }
39
}
40