Fixing strict types

This commit is contained in:
Dennis Eichhorn 2017-01-26 12:06:54 +01:00
parent d9749dd3bf
commit 7faae589c3
2 changed files with 3 additions and 3 deletions

View File

@ -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.');

View File

@ -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'];
} }
} }