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 Jan 21, 2025
1 parent 7eeeda2 commit d0c951d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 26 deletions.
4 changes: 1 addition & 3 deletions src/DataObject/Hydrator/FormatedPathHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/



namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Hydrator;

use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\FormatedPath;
Expand All @@ -29,4 +27,4 @@ public function hydrate(string|int $objectReference, int|string $path): Formated
{
return new FormatedPath($objectReference, $path);
}
}
}
4 changes: 1 addition & 3 deletions src/DataObject/Hydrator/FormatedPathHydratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/



namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Hydrator;

use Pimcore\Bundle\StudioBackendBundle\DataObject\Schema\FormatedPath;
Expand All @@ -26,4 +24,4 @@
interface FormatedPathHydratorInterface
{
public function hydrate(string|int $objectReference, int|string $path): FormatedPath;
}
}
8 changes: 2 additions & 6 deletions src/DataObject/Legacy/PathFormatterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/



namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Legacy;

use Pimcore\Bundle\StaticResolverBundle\Models\DataObject\FieldCollection\DefinitionResolverInterface as FieldCollectionDefinitionResolverInterface;
Expand All @@ -31,14 +29,12 @@
*
* @internal
*/

final readonly class PathFormatterHelper implements PathFormatterHelperInterface
{
public function __construct(
private ObjectBrickDefinitionResolverInterface $objectBrickDefinitionResolver,
private FieldCollectionDefinitionResolverInterface $fieldCollectionDefinitionResolver
)
{
) {
}

public function getPathFormatterFieldDefinition(Concrete $source, array $context): Data|bool|null
Expand Down Expand Up @@ -80,4 +76,4 @@ public function getPathFormatterFieldDefinition(Concrete $source, array $context

return $fd;
}
}
}
4 changes: 1 addition & 3 deletions src/DataObject/Legacy/PathFormatterHelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/



namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Legacy;

use Pimcore\Model\DataObject\ClassDefinition\Data;
Expand All @@ -31,4 +29,4 @@
interface PathFormatterHelperInterface
{
public function getPathFormatterFieldDefinition(Concrete $source, array $context): Data|bool|null;
}
}
11 changes: 3 additions & 8 deletions src/DataObject/Service/PathFormatterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/



namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Service;

use Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ConcreteObjectResolverInterface;
Expand All @@ -35,15 +33,13 @@
*/
final readonly class PathFormatterService implements PathFormatterServiceInterface
{

public function __construct(
private ConcreteObjectResolverInterface $concreteObjectResolver,
private PathFormatterHelperInterface $pathFormatterHelper,
private FormatedPathHydratorInterface $formatedPathHydrator,
private EventDispatcherInterface $eventDispatcher,
private \Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface $pathFormatterResolver

Check failure on line 41 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.3, lowest, false, true) / Static analysis with phpstan

Parameter $pathFormatterResolver of method Pimcore\Bundle\StudioBackendBundle\DataObject\Service\PathFormatterService::__construct() has invalid type Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface.

Check failure on line 41 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.3, lowest, false, true) / Static analysis with phpstan

Property Pimcore\Bundle\StudioBackendBundle\DataObject\Service\PathFormatterService::$pathFormatterResolver has unknown class Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface as its type.

Check failure on line 41 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.4, highest, false, true) / Static analysis with phpstan

Parameter $pathFormatterResolver of method Pimcore\Bundle\StudioBackendBundle\DataObject\Service\PathFormatterService::__construct() has invalid type Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface.

Check failure on line 41 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.4, highest, false, true) / Static analysis with phpstan

Property Pimcore\Bundle\StudioBackendBundle\DataObject\Service\PathFormatterService::$pathFormatterResolver has unknown class Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface as its type.

Check failure on line 41 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.4, highest, 12.x-dev as 12.99.9, true, true) / Static analysis with phpstan

Parameter $pathFormatterResolver of method Pimcore\Bundle\StudioBackendBundle\DataObject\Service\PathFormatterService::__construct() has invalid type Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface.

Check failure on line 41 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.4, highest, 12.x-dev as 12.99.9, true, true) / Static analysis with phpstan

Property Pimcore\Bundle\StudioBackendBundle\DataObject\Service\PathFormatterService::$pathFormatterResolver has unknown class Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface as its type.
)
{
) {
}

public function formatPath(PathFormatterParameter $parameter): array
Expand Down Expand Up @@ -92,7 +88,7 @@ protected function convert(Concrete $source, array $context, array $targets): ar

$pathFormatter = $this->pathFormatterResolver->resolvePathFormatter($formatterClass);

Check failure on line 89 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.3, lowest, false, true) / Static analysis with phpstan

Call to method resolvePathFormatter() on an unknown class Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface.

Check failure on line 89 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.4, highest, false, true) / Static analysis with phpstan

Call to method resolvePathFormatter() on an unknown class Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface.

Check failure on line 89 in src/DataObject/Service/PathFormatterService.php

View workflow job for this annotation

GitHub Actions / static-analysis (8.4, highest, 12.x-dev as 12.99.9, true, true) / Static analysis with phpstan

Call to method resolvePathFormatter() on an unknown class Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassDefinition\Helper\PathFormatterResolverInterface.

if(!$pathFormatter instanceof PathFormatterInterface) {
if (!$pathFormatter instanceof PathFormatterInterface) {
throw new InvalidArgumentException('PathFormatter is not an instance of PathFormatterInterface');
}

Expand All @@ -101,5 +97,4 @@ protected function convert(Concrete $source, array $context, array $targets): ar
'context' => $context,
]);
}

}
}
4 changes: 1 addition & 3 deletions src/DataObject/Service/PathFormatterServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* @license http://www.pimcore.org/license GPLv3 and PCL
*/



namespace Pimcore\Bundle\StudioBackendBundle\DataObject\Service;

use Pimcore\Bundle\StudioBackendBundle\DataObject\MappedParameter\PathFormatterParameter;
Expand All @@ -26,4 +24,4 @@
interface PathFormatterServiceInterface
{
public function formatPath(PathFormatterParameter $parameter): array;
}
}

0 comments on commit d0c951d

Please sign in to comment.