Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexz707 authored and github-actions[bot] committed Jan 26, 2024
1 parent a821a5b commit 96f7c16
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 17 deletions.
7 changes: 2 additions & 5 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PCL
* @license http://www.pimcore.org/license PCL
*/

namespace Pimcore\Bundle\StudioApiBundle\DependencyInjection;
Expand Down
13 changes: 6 additions & 7 deletions src/DependencyInjection/PimcoreStudioApiExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;


/**
* This is the class that loads and manages your bundle configuration.
*
Expand Down Expand Up @@ -58,12 +57,12 @@ public function load(array $configs, ContainerBuilder $container): void
public function prepend(ContainerBuilder $container): void
{
$apiPlatformConfig = [
"mapping"=>[
"paths"=> [
__DIR__ . '/../../config/api_platform/'
]
]
'mapping'=>[
'paths'=> [
__DIR__ . '/../../config/api_platform/',
],
],
];
$container->prependExtensionConfig('api_platform', $apiPlatformConfig);
}
}
}
10 changes: 10 additions & 0 deletions src/Dto/ResetPasswordRequest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/

namespace Pimcore\Bundle\StudioApiBundle\Dto;

use Symfony\Component\Validator\Constraints as Assert;
Expand Down
3 changes: 2 additions & 1 deletion src/PimcoreStudioApiBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
use Pimcore\HttpKernel\BundleCollection\BundleCollection;

class PimcoreStudioApiBundle extends AbstractPimcoreBundle implements
EnterpriseBundleInterface, DependentBundleInterface
EnterpriseBundleInterface,
DependentBundleInterface
{
private const ENTERPRISE_BUNDLE_LICENSE_ID = 'xLicensex';

Expand Down
14 changes: 12 additions & 2 deletions src/Serializer/AssetNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php

/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/

namespace Pimcore\Bundle\StudioApiBundle\Serializer;

use Pimcore\Model\Asset;
Expand All @@ -10,15 +20,15 @@

final class AssetNormalizer implements NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
use NormalizerAwareTrait;

private const ALREADY_CALLED = 'ASSET_NORMALIZER_ALREADY_CALLED';

public function __construct(private RequestStack $requestStack)
{
}

public function normalize($object, $format = null, array $context = array()): array
public function normalize($object, $format = null, array $context = []): array
{
$context[self::ALREADY_CALLED] = true;

Expand Down
12 changes: 11 additions & 1 deletion src/State/AssetProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/

namespace Pimcore\Bundle\StudioApiBundle\State;

use ApiPlatform\Metadata\CollectionOperationInterface;
Expand All @@ -11,7 +21,6 @@

final class AssetProvider implements ProviderInterface
{

public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
{
// collection of assets, needs to be further investigated
Expand All @@ -22,6 +31,7 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
if (isset($context['filters']['page'])) {
$assetListing->setOffset(10 * $context['filters']['page']);
}

return $assetListing;
}
// getting a single asset by id
Expand Down
12 changes: 11 additions & 1 deletion src/State/ResetPasswordProcessor.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/

namespace Pimcore\Bundle\StudioApiBundle\State;

use ApiPlatform\Exception\InvalidValueException;
Expand All @@ -22,7 +32,6 @@
use Symfony\Component\RateLimiter\RateLimiterFactory;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;


final class ResetPasswordProcessor implements ProcessorInterface
{
public function __construct(
Expand Down Expand Up @@ -109,6 +118,7 @@ public function process(mixed $data, Operation $operation, array $uriVariables =
if ($error) {
Logger::error('Lost password service: ' . $error);
}

return $data;
}
}

0 comments on commit 96f7c16

Please sign in to comment.