Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
martineiber authored and github-actions[bot] committed Dec 11, 2024
1 parent 4887c1c commit 2cb483a
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct()
property: 'context',
type: 'object',
example: '{"containerType":"object","fieldname":"select","objectId":40,"layoutId":"0"}'
)
),
]
)
);
Expand Down
3 changes: 2 additions & 1 deletion src/DataObject/Controller/SelectOptionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Serializer\SerializerInterface;
use function count;

/**
* @internal
*/
final class SelectOptionsController extends AbstractApiController
{

use PaginatedResponseTrait;

public function __construct(
SerializerInterface $serializer,
private readonly SelectOptionsServiceInterface $selectOptionsService,
Expand Down
3 changes: 1 addition & 2 deletions src/DataObject/Hydrator/SelectOptionHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/


namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Hydrator;

use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\SelectOption;
Expand All @@ -31,4 +30,4 @@ public function hydrate(array $data): SelectOption
value: $data['value']
);
}
}
}
3 changes: 1 addition & 2 deletions src/DataObject/Hydrator/SelectOptionHydratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/


namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Hydrator;

use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\SelectOption;
Expand All @@ -25,4 +24,4 @@
interface SelectOptionHydratorInterface
{
public function hydrate(array $data): SelectOption;
}
}
10 changes: 6 additions & 4 deletions src/DataObject/Legacy/ApplyChangesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/


namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Legacy;

use Exception;
Expand All @@ -27,6 +26,10 @@
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\Element\DuplicateFullPathException;
use Psr\Log\LoggerInterface;
use function count;
use function in_array;
use function is_array;
use function is_null;

/**
* Copied from old admin-ui-classic-bundle
Expand All @@ -43,8 +46,7 @@ public function __construct(
private ClassDefinitionResolverInterface $classDefinitionResolver,
private DataObjectResolverInterface $dataObjectResolver,
private LoggerInterface $logger,
)
{
) {
}

/**
Expand Down Expand Up @@ -167,4 +169,4 @@ private function processRemoteOwnerRelations(Concrete $object, array $toDelete,
}
}
}
}
}
3 changes: 1 addition & 2 deletions src/DataObject/Legacy/ApplyChangesHelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/


namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Legacy;

use Pimcore\Model\DataObject\Concrete;
Expand All @@ -29,4 +28,4 @@
interface ApplyChangesHelperInterface
{
public function applyChanges(Concrete $object, array $changes): void;
}
}
7 changes: 2 additions & 5 deletions src/DataObject/MappedParameter/SelectOptionsParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/


namespace Pimcore\Bundle\StudioBackendBundle\DataObject\MappedParameter;

use Symfony\Component\Validator\Constraints\NotBlank;
Expand All @@ -24,7 +23,6 @@
*/
final readonly class SelectOptionsParameter
{

public function __construct(
#[NotBlank(message: 'The object id must not be empty.')]
private int $objectId,
Expand All @@ -33,8 +31,7 @@ public function __construct(
private array $context,
private array $changedData = [],

)
{
) {
}

public function getFieldName(): string
Expand All @@ -61,4 +58,4 @@ public function getContext(): array
{
return $this->context;
}
}
}
2 changes: 1 addition & 1 deletion src/DataObject/Schema/SelectOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Schema;


use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;
use Pimcore\Bundle\StudioBackendBundle\Util\Schema\AdditionalAttributesInterface;
Expand All @@ -41,6 +40,7 @@ public function __construct(
private readonly int|string $value,
) {
}

public function getKey(): string
{
return $this->key;
Expand Down
1 change: 0 additions & 1 deletion src/DataObject/Service/DataObjectServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\UserNotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Response\Collection;
use Pimcore\Model\DataObject as DataObjectModel;
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\UserInterface;

/**
Expand Down
8 changes: 3 additions & 5 deletions src/DataObject/Service/SelectOptionsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Service;

use Exception;
use Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\OptionsProviderResolverInterface;
use Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ConcreteObjectResolverInterface;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Event\PreResponse\DynamicSelectOptionEvent;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Hydrator\SelectOptionHydratorInterface;
Expand All @@ -27,7 +28,6 @@
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Model\DataObject\ClassDefinition\Data\Multiselect;
use Pimcore\Model\DataObject\ClassDefinition\Data\Select;
use Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\OptionsProviderResolverInterface;
use Pimcore\Model\DataObject\ClassDefinition\DynamicOptionsProvider\SelectOptionsProviderInterface;
use Pimcore\Model\DataObject\ClassDefinition\Helper\OptionsProviderResolver;
use Pimcore\Model\DataObject\Concrete;
Expand All @@ -38,16 +38,14 @@
*/
final readonly class SelectOptionsService implements SelectOptionsServiceInterface
{

public function __construct(
private ConcreteObjectResolverInterface $concreteObjectResolver,
private ApplyChangesHelperInterface $applyChangesHelper,
private OptionsProviderResolverInterface $optionsProviderResolver,
private SelectOptionHydratorInterface $selectOptionHydrator,
private EventDispatcherInterface $eventDispatcher,

)
{
) {
}

/**
Expand Down Expand Up @@ -150,4 +148,4 @@ private function getObject(int $objectId): Concrete

return $object;
}
}
}
2 changes: 1 addition & 1 deletion src/DataObject/Service/SelectOptionsServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ interface SelectOptionsServiceInterface
* @throws InvalidArgumentException
*/
public function getSelectOptions(SelectOptionsParameter $selectOptionsParameter): array;
}
}

0 comments on commit 2cb483a

Please sign in to comment.