diff --git a/application/Espo/Core/Formula/FunctionFactory.php b/application/Espo/Core/Formula/FunctionFactory.php index 5bb896be27..0911ba4a2c 100644 --- a/application/Espo/Core/Formula/FunctionFactory.php +++ b/application/Espo/Core/Formula/FunctionFactory.php @@ -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; } } diff --git a/application/Espo/Core/Formula/Functions/DatetimeGroup/ClosestType.php b/application/Espo/Core/Formula/Functions/DatetimeGroup/ClosestType.php index 819820b56d..fd818982b2 100644 --- a/application/Espo/Core/Formula/Functions/DatetimeGroup/ClosestType.php +++ b/application/Espo/Core/Formula/Functions/DatetimeGroup/ClosestType.php @@ -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();