From d9179453f7c9ec2c032cf6d2155b604010bf8470 Mon Sep 17 00:00:00 2001 From: aweichler Date: Thu, 13 Jun 2024 06:32:38 +0000 Subject: [PATCH] Apply php-cs-fixer changes --- src/Controller/ClassController.php | 18 ++++++++---------- src/Event/GroupClassificationStoreEvent.php | 3 +-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Controller/ClassController.php b/src/Controller/ClassController.php index 4f84e48..3ace618 100644 --- a/src/Controller/ClassController.php +++ b/src/Controller/ClassController.php @@ -148,10 +148,9 @@ private function considerClassificationStoreForColumnConfig(Request $request, ?D } } - if ($displayMode == ColumnConfigDisplayMode::ALL && $grouped === true) { $class->setFieldDefinitions($fieldDefinitions); - $classString = "Pimcore\\Model\\DataObject\\" . $class->getName(); + $classString = 'Pimcore\\Model\\DataObject\\' . $class->getName(); $targetObjectId = intval($request->get('target_oid')); $targetObject = DataObject\Concrete::getById($targetObjectId); $tmpObject = new $classString(); @@ -160,22 +159,22 @@ private function considerClassificationStoreForColumnConfig(Request $request, ?D if (!$fieldDefinition instanceof DataObject\ClassDefinition\Data\Classificationstore) { continue; } - + $storeId = $fieldDefinition->getStoreId(); $store = new DataObject\Classificationstore(); $groupIds = []; - $sql = "SELECT `id` FROM `classificationstore_groups`"; + $sql = 'SELECT `id` FROM `classificationstore_groups`'; if ($storeId > 0) { - $sql = "SELECT `id` FROM `classificationstore_groups` WHERE `storeId` = " . intval($storeId); + $sql = 'SELECT `id` FROM `classificationstore_groups` WHERE `storeId` = ' . intval($storeId); } - + $queryResult = $db->executeQuery($sql); while ($row = $queryResult->fetchAssociative()) { $groupIds[intval($row['id'])] = true; } - + $event = new Event\GroupClassificationStoreEvent($targetObject, $tmpObject, $fieldDefinition, $groupIds, $storeId); $eventDispatcher->dispatch($event, Event\OutputDataConfigToolkitEvents::GROUP_CLASSIFICATION_STORE_EVENT); @@ -185,7 +184,7 @@ private function considerClassificationStoreForColumnConfig(Request $request, ?D $store->setObject($tmpObject); $tmpObject->set($fieldDefinition->getName(), $store); } - + DataObject\Service::enrichLayoutDefinition($result['objectColumns']['children'][0], $tmpObject); } @@ -237,12 +236,11 @@ public function setClassificationGroupedDisplay(bool $grouped) } /** - * + * * @return bool */ public function getClassificationGroupedDisplay(): bool { return $this->classificationGroupedDisplay; } - } diff --git a/src/Event/GroupClassificationStoreEvent.php b/src/Event/GroupClassificationStoreEvent.php index 65feb70..d32925d 100644 --- a/src/Event/GroupClassificationStoreEvent.php +++ b/src/Event/GroupClassificationStoreEvent.php @@ -1,8 +1,7 @@