apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -37,7 +37,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../config'));
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
$loader->load('services.yaml');
$loader->load('services/controller.yaml');
$loader->load('services/form.yaml');
@@ -70,7 +70,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
protected function preprendRoutes(ContainerBuilder $container)
{
//declare routes for 3party bundle
// declare routes for 3party bundle
$container->prependExtensionConfig('chill_main', [
'routing' => [
'resources' => [
@@ -130,8 +130,8 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
'class' => \Chill\ThirdPartyBundle\Entity\ThirdParty::class,
'name' => 'thirdparty',
'base_path' => '/api/1.0/thirdparty/thirdparty',
//'base_role' => \Chill\ThirdPartyBundle\Security\Authorization\ThirdPartyVoter::SHOW,
//'controller' => \Chill\ThirdPartyBundle\Controller\ThirdPartyApiController::class,
// 'base_role' => \Chill\ThirdPartyBundle\Security\Authorization\ThirdPartyVoter::SHOW,
// 'controller' => \Chill\ThirdPartyBundle\Controller\ThirdPartyApiController::class,
'actions' => [
'_entity' => [
'methods' => [

View File

@@ -12,13 +12,10 @@ declare(strict_types=1);
namespace Chill\ThirdPartyBundle\DependencyInjection\CompilerPass;
use Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager;
use LogicException;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use function in_array;
/**
* Load services tagged chill_3party.provider and add them to the service
* definition of manager.
@@ -37,11 +34,8 @@ class ThirdPartyTypeCompilerPass implements CompilerPassInterface
// check forr keys already in use :
$key = $taggedService->getClass()::getKey();
if (in_array($key, $usedKeys, true)) {
throw new LogicException(sprintf(
'Tag with key "%s" is already in used',
$key
));
if (\in_array($key, $usedKeys, true)) {
throw new \LogicException(sprintf('Tag with key "%s" is already in used', $key));
}
$usedKeys[] = $key;
// alter the service definition of manager