type fixes
This commit is contained in:
@@ -65,6 +65,9 @@ class FunctionFactory
|
||||
$this->classNameMap = $classNameMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Espo\Core\Formula\Functions\BaseFunction|\Espo\Core\Formula\Functions\Base
|
||||
*/
|
||||
public function create(string $name, ?Entity $entity = null, ?stdClass $variables = null): object
|
||||
{
|
||||
if ($this->classNameMap && array_key_exists($name, $this->classNameMap)) {
|
||||
@@ -105,6 +108,7 @@ class FunctionFactory
|
||||
$object->setAttributeFetcher($this->attributeFetcher);
|
||||
}
|
||||
|
||||
/** @var \Espo\Core\Formula\Functions\BaseFunction|\Espo\Core\Formula\Functions\Base */
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Formula\Functions\DateTimeGroup;
|
||||
namespace Espo\Core\Formula\Functions\DatetimeGroup;
|
||||
|
||||
use Espo\Core\Di;
|
||||
|
||||
@@ -93,6 +93,7 @@ class ClosestType extends BaseFunction implements Di\ConfigAware
|
||||
|
||||
$format = 'Y-m-d H:i:s';
|
||||
|
||||
/** @var DateTime */
|
||||
$dt = DateTime::createFromFormat($format, $value, new DateTimeZone($timezone));
|
||||
$valueTimestamp = $dt->getTimestamp();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user