mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 09:34:59 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -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');
|
||||
|
@@ -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');
|
||||
}
|
||||
|
Reference in New Issue
Block a user