mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-24 15:44:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\CustomFieldsBundle\Service;
|
||||
|
||||
use LogicException;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
@@ -45,8 +44,8 @@ class CustomFieldProvider implements ContainerAwareInterface
|
||||
* Add a new custom field to the provider.
|
||||
*
|
||||
* @param type $serviceName The name of the service (declared in service.yml)
|
||||
* @param type $type The type of the service (that is used in the form to
|
||||
* add this type)
|
||||
* @param type $type The type of the service (that is used in the form to
|
||||
* add this type)
|
||||
*/
|
||||
public function addCustomField($serviceName, $type)
|
||||
{
|
||||
@@ -56,7 +55,7 @@ class CustomFieldProvider implements ContainerAwareInterface
|
||||
/**
|
||||
* Get all the custom fields known by the provider.
|
||||
*
|
||||
* @return array Array of the known custom fields indexed by the type.
|
||||
* @return array array of the known custom fields indexed by the type
|
||||
*/
|
||||
public function getAllFields()
|
||||
{
|
||||
@@ -77,8 +76,7 @@ class CustomFieldProvider implements ContainerAwareInterface
|
||||
return $this->servicesByType[$type];
|
||||
}
|
||||
|
||||
throw new LogicException('the custom field with type ' . $type . ' '
|
||||
. 'is not found');
|
||||
throw new \LogicException('the custom field with type '.$type.' is not found');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,10 +84,10 @@ class CustomFieldProvider implements ContainerAwareInterface
|
||||
*
|
||||
* @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
|
||||
*/
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
if (null === $container) {
|
||||
throw new LogicException('container should not be null');
|
||||
throw new \LogicException('container should not be null');
|
||||
}
|
||||
|
||||
$this->container = $container;
|
||||
|
Reference in New Issue
Block a user