Skip to content

Commit

Permalink
Update meta
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Jul 22, 2020
1 parent 38020b5 commit cce58e4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/PrayerTimes/PrayerTimes.php
Original file line number Diff line number Diff line change
Expand Up @@ -770,25 +770,28 @@ public function getMethod()
return $this->method;
}

/**
* [getMeta description]
* @return [type] [description]
*/
public function getMeta()

public function getMeta(): array
{
$result = [
'latitude' => $this->latitude,
'longitude' => $this->longitude,
'timezone' => ($this->date->getTimezone())->getName(),
'method' => $this->methods[$this->method],
'latitudeAdjustmentMethod' => $this->latitudeAdjustmentMethod,
'shafaq' => $this->shafaq,
'midnightMode' => $this->midnightMode,
'school' => $this->school,
'offset' => $this->offset,
];
if (isset($result['method']['offset'])) {
unset($result['method']['offset']);
}
if ($this->method == Method::METHOD_MOONSIGHTING) {
$result['latitudeAdjustmentMethod'] = self::LATITUDE_ADJUSTMENT_METHOD_NONE;
} else {
unset($result['shafaq']);
}

return $result;
}
Expand Down

0 comments on commit cce58e4

Please sign in to comment.