Skip to content

Commit 4ed1fd8

Browse files
author
roadiz-ci
committed
perf: Missing node_parent_position composite index
1 parent 9e57626 commit 4ed1fd8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/AjaxControllers/AjaxAttributeValuesController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ public function editAction(Request $request, int $attributeValueId): Response
6464
}
6565

6666
/**
67-
* @param array $parameters
67+
* @param array $parameters
6868
* @param AttributeValue $attributeValue
6969
*
7070
* @return array
7171
*/
72-
protected function updatePosition($parameters, AttributeValue $attributeValue): array
72+
protected function updatePosition(array $parameters, AttributeValue $attributeValue): array
7373
{
7474
$attributable = $attributeValue->getAttributable();
7575
$details = [
7676
'%name%' => $attributeValue->getAttribute()->getLabelOrCode(),
77-
'%nodeName%' => $attributable instanceof Node ? $attributable->getNodeName() : '',
77+
'%nodeName%' => $attributable->getNodeName(),
7878
];
7979
/*
8080
* First, we set the new parent

src/Forms/NodeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
3131

3232
/** @var Node|null $node */
3333
$node = $builder->getData();
34-
$isReachable = null !== $node && $node->getNodeType()?->isReachable();
34+
$isReachable = null !== $node && $node->getNodeType()->isReachable();
3535
if ($isReachable) {
3636
$builder->add('home', CheckboxType::class, [
3737
'label' => 'node.isHome',

src/Models/NodeModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function toArray(): array
3737
'nodeName' => $this->node->getNodeName(),
3838
'isPublished' => $this->node->isPublished(),
3939
'nodeType' => [
40-
'color' => $this->node->getNodeType()?->getColor() ?? '#000000',
40+
'color' => $this->node->getNodeType()->getColor() ?? '#000000',
4141
]
4242
];
4343
if ($this->security->isGranted(NodeVoter::EDIT_SETTING, $this->node)) {
@@ -60,7 +60,7 @@ public function toArray(): array
6060
'nodeName' => $this->node->getNodeName(),
6161
'isPublished' => $this->node->isPublished(),
6262
'nodeType' => [
63-
'color' => $this->node->getNodeType()?->getColor() ?? '#000000',
63+
'color' => $this->node->getNodeType()->getColor() ?? '#000000',
6464
]
6565
];
6666

src/Models/NodeSourceModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function toArray(): array
4040
'thumbnail' => $thumbnail ? $thumbnail->getDocument() : null,
4141
'isPublished' => $node->isPublished(),
4242
'nodeType' => [
43-
'color' => $node->getNodeType()?->getColor() ?? '#000000',
43+
'color' => $node->getNodeType()->getColor() ?? '#000000',
4444
]
4545
];
4646

0 commit comments

Comments
 (0)