mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 07:18:39 +00:00
Fixing strict types
This commit is contained in:
parent
d9749dd3bf
commit
7faae589c3
|
|
@ -63,7 +63,7 @@ class CacheFactory
|
||||||
{
|
{
|
||||||
switch ($cacheData['type']) {
|
switch ($cacheData['type']) {
|
||||||
case 'file':
|
case 'file':
|
||||||
return new FileCache($cacheData);
|
return new FileCache($cacheData['path']);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new \InvalidArgumentException('Cache "' . $cacheData['type'] . '" is not supported.');
|
throw new \InvalidArgumentException('Cache "' . $cacheData['type'] . '" is not supported.');
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ class SmartDateTime extends \DateTime
|
||||||
*/
|
*/
|
||||||
public function getDaysOfMonth() : int
|
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
|
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