mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-16 02:09:44 +00:00
fix code style for AccompanyingPeriodWorkEvaluation
This commit is contained in:
@@ -50,6 +50,27 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
|
||||
$this->prependApis($container);
|
||||
}
|
||||
|
||||
protected function prependApis(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'apis' => [
|
||||
[
|
||||
'class' => \Chill\DocStoreBundle\Entity\StoredObject::class,
|
||||
'name' => 'stored_object',
|
||||
'base_path' => '/api/1.0/docstore/stored-object',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'actions' => [
|
||||
'_entity' => [
|
||||
'methods' => [
|
||||
Request::METHOD_POST => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
protected function prependAuthorization(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('security', [
|
||||
@@ -86,25 +107,4 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
|
||||
];
|
||||
$container->prependExtensionConfig('twig', $twigConfig);
|
||||
}
|
||||
|
||||
protected function prependApis(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'apis' => [
|
||||
[
|
||||
'class' => \Chill\DocStoreBundle\Entity\StoredObject::class,
|
||||
'name' => 'stored_object',
|
||||
'base_path' => '/api/1.0/docstore/stored-object',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'actions' => [
|
||||
'_entity' => [
|
||||
'methods' => [
|
||||
Request::METHOD_POST => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -15,9 +15,11 @@ use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Chill\DocStoreBundle\Repository\StoredObjectRepository;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use function array_key_exists;
|
||||
use function is_array;
|
||||
|
||||
class StoredObjectDenormalizer implements DenormalizerInterface {
|
||||
|
||||
class StoredObjectDenormalizer implements DenormalizerInterface
|
||||
{
|
||||
private StoredObjectRepository $storedObjectRepository;
|
||||
|
||||
public function __construct(StoredObjectRepository $storedObjectRepository)
|
||||
@@ -44,8 +46,6 @@ class StoredObjectDenormalizer implements DenormalizerInterface {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $type === StoredObject::class;
|
||||
|
||||
return StoredObject::class === $type;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user