* @param string $action
* @param array $values
*/
- public function __construct($entity, $action, $values = []) {
+ public function __construct(string $entity, string $action, array $values = []) {
$this->entity = $entity;
$this->action = $action;
$this->entityTableName = CoreUtil::getTableName($entity);
/**
* Returns a RequestSpec with all the fields available. Uses spec providers
* to add or modify field specifications.
- * @see \Civi\Api4\Service\Spec\Provider\CustomFieldCreationSpecProvider
*
* @param string $entity
* @param string $action
* @param array $values
*
* @return \Civi\Api4\Service\Spec\RequestSpec
+ * @throws \CRM_Core_Exception
+ * @see \Civi\Api4\Service\Spec\Provider\CustomFieldCreationSpecProvider
+ *
*/
- public function getSpec($entity, $action, $includeCustom, $values = []) {
+ public function getSpec(string $entity, string $action, bool $includeCustom, array $values = []): RequestSpec {
$specification = new RequestSpec($entity, $action, $values);
// Real entities
*
* @return string
*/
- public static function getTableName($entityName) {
+ public static function getTableName(string $entityName) {
return self::getInfoItem($entityName, 'table_name');
}