Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -47,7 +47,7 @@ class CustomFieldProvider implements ContainerAwareInterface
* @param type $type The type of the service (that is used in the form to
* add this type)
*/
public function addCustomField($serviceName, $type)
public function addCustomField($serviceName, $type): void
{
$this->servicesByType[$type] = $serviceName;
}
@@ -57,7 +57,7 @@ class CustomFieldProvider implements ContainerAwareInterface
*
* @return array array of the known custom fields indexed by the type
*/
public function getAllFields()
public function getAllFields(): array
{
return $this->servicesByType;
}
@@ -84,7 +84,7 @@ class CustomFieldProvider implements ContainerAwareInterface
*
* @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
*/
public function setContainer(?ContainerInterface $container = null)
public function setContainer(?ContainerInterface $container = null): void
{
if (null === $container) {
throw new \LogicException('container should not be null');

View File

@@ -13,12 +13,12 @@ namespace Chill\CustomFieldsBundle\Service;
class CustomFieldsHelperException extends \Exception
{
public static function customFieldsGroupNotFound($entity)
public static function customFieldsGroupNotFound($entity): \Chill\CustomFieldsBundle\Service\CustomFieldsHelperException
{
return new CustomFieldsHelperException("The customFieldsGroups associated with {$entity} are not found");
}
public static function slugIsMissing()
public static function slugIsMissing(): \Chill\CustomFieldsBundle\Service\CustomFieldsHelperException
{
return new CustomFieldsHelperException('The slug is missing');
}