Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Jan 23, 2024
1 parent 3db668c commit 9f45e43
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Countries/Turkmenistan.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
use Carbon\CarbonImmutable;
use DateTime;
use DateTimeZone;
use DateInterval;
use IntlDateFormatter;

class Turkmenistan extends Country
{
protected string $timezone = "Asia/Ashgabat";
protected string $timezone = 'Asia/Ashgabat';

public function countryCode(): string
{
Expand Down Expand Up @@ -47,7 +46,7 @@ protected function islamicCalendar(string $input, int $year, $nextYear = false):
$hijriYear = $this->getHijriYear(year: $year, nextYear: $nextYear);
$formatter = $this->getIslamicFormatter();

$timeStamp = $formatter->parse($input . '/' . $hijriYear . ' AH');
$timeStamp = $formatter->parse($input.'/'.$hijriYear.' AH');
$dateTime = date_create()->setTimeStamp($timeStamp)->setTimezone(new DateTimeZone($this->timezone));

Check failure on line 50 in src/Countries/Turkmenistan.php

View workflow job for this annotation

GitHub Actions / phpstan

Cannot call method setTimeStamp() on DateTime|false.

return $dateTime->format('m-d');
Expand All @@ -68,7 +67,7 @@ protected function getHijriYear(int $year, $nextYear = false): int
{
$formatter = $this->getIslamicFormatter();
$formatter->setPattern('yyyy');
$dateTime = DateTime::createFromFormat('d/m/Y', '01/01/' . ($nextYear ? $year + 1 : $year));
$dateTime = DateTime::createFromFormat('d/m/Y', '01/01/'.($nextYear ? $year + 1 : $year));

return (int) $formatter->format($dateTime);

Check failure on line 72 in src/Countries/Turkmenistan.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $datetime of method IntlDateFormatter::format() expects array|DateTimeInterface|float|int|IntlCalendar|string, DateTime|false given.
}
Expand Down

0 comments on commit 9f45e43

Please sign in to comment.