Skip to content

Commit

Permalink
Add Comunidate Islamica of Portugal as a method
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Dec 13, 2023
1 parent 41b7639 commit 0a7262f
Show file tree
Hide file tree
Showing 5 changed files with 361 additions and 352 deletions.
1 change: 1 addition & 0 deletions api/Utils/ClassMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static function method($methodId)
19 => Method::METHOD_ALGERIA,
20 => Method::METHOD_KEMENAG,
21 => Method::METHOD_MOROCCO,
22 => Method::METHOD_PORTUGAL,
99 => Method::METHOD_CUSTOM,
];

Expand Down
3 changes: 3 additions & 0 deletions api/Utils/PrayerTimesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ public static function applyMethodSpecificTuning(PrayerTimes $pt, ?array $tune,
case Method::METHOD_MOROCCO:
$pt->tune($tune[0], $tune[1], $tune[2], 5, $tune[4], 5, $tune[6], $tune[7], $tune[8]);
break;
case Method::METHOD_PORTUGAL:
$pt->tune($tune[0], $tune[1], $tune[2], 5, $tune[4], $tune[4], $tune[6], $tune[7], $tune[8]);
break;
default:
$pt->tune($tune[0], $tune[1], $tune[2], $tune[3], $tune[4], $tune[5], $tune[6], $tune[7], $tune[8]);
break;
Expand Down
2 changes: 1 addition & 1 deletion api/Utils/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function method($data, $latitude = null, $longitude= null): int

return 2; // ISNA
}
if (!in_array($data, [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 99])) {
if (!in_array($data, [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 99])) {
return 2; // ISNA
} else {
return (int) $data;
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"require": {
"7x/sdk": "^1.4",
"islamic-network/alqibla": "^1.2",
"islamic-network/prayer-times": "^1.0.26",
"mamluk/kipchak": "^0.33",
"islamic-network/prayer-times": "^1.0.27",
"mamluk/kipchak": "^0.35",
"rafaelfragoso/haversini-formula": "dev-master",
"p3k/emoji-detector": "^0.2.1"
},
Expand Down
Loading

0 comments on commit 0a7262f

Please sign in to comment.