mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-22 22:38:41 +00:00
Fixing strict types
This commit is contained in:
parent
d9749dd3bf
commit
7faae589c3
|
|
@ -63,7 +63,7 @@ class CacheFactory
|
|||
{
|
||||
switch ($cacheData['type']) {
|
||||
case 'file':
|
||||
return new FileCache($cacheData);
|
||||
return new FileCache($cacheData['path']);
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidArgumentException('Cache "' . $cacheData['type'] . '" is not supported.');
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class SmartDateTime extends \DateTime
|
|||
*/
|
||||
public function getDaysOfMonth() : int
|
||||
{
|
||||
return cal_days_in_month(CAL_GREGORIAN, $this->format('m'), $this->format('Y'));
|
||||
return cal_days_in_month(CAL_GREGORIAN, (int) $this->format('m'), (int) $this->format('Y'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -151,7 +151,7 @@ class SmartDateTime extends \DateTime
|
|||
*/
|
||||
public function getFirstDayOfMonth() : int
|
||||
{
|
||||
return getdate(mktime(null, null, null, $this->format('m'), 1, $this->format('Y')))['wday'];
|
||||
return getdate(mktime(null, null, null, (int) $this->format('m'), 1, (int) $this->format('Y')))['wday'];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user