Skip to content

Commit a8ea5be

Browse files
christoph2497Thomas-Gelf
authored andcommitted
fix code styling
1 parent c8e70ee commit a8ea5be

File tree

7 files changed

+10
-82
lines changed

7 files changed

+10
-82
lines changed

application/controllers/ConfigurationController.php

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,12 @@ public function channelrulesAction()
173173
'action' => 'add']
174174
)));
175175

176-
// $this->actions()->add(Link::create($this->translate('Edit'), 'TODO', [
177-
// 'what' => 'ever'
178-
// ], [
179-
// 'class' => 'icon-edit'
180-
// ]));
181176
$uuid = $this->requireUuid();
182177
$ns = $this->Window()->getSessionNamespace('eventtracker');
183178
$sessionKey = 'simulationObject/'. $uuid->toString();
184179

185180
$form = $this->getForm($action); // TODO: w/o form
186181
$modifierRuleStore = new ModifierRuleStore($ns, $uuid, $form);
187-
$rules = $modifierRuleStore->getStoredRules();
188-
$rules = $modifierRuleStore->getRules();
189-
// $form->addElement('submit', 'submit', ['label' => $this->translate('Save32')]);
190-
// $this->addContent($form);
191182
if ($this->params->get('action') === 'add') {
192183
$ruleForm = new ChannelRuleForm();
193184
$ruleForm->handleRequest($this->getServerRequest());
@@ -659,7 +650,6 @@ protected function showRules(
659650
UuidInterface $uuid,
660651
UuidObjectForm $form
661652
) {
662-
$sessionKey = 'channelrules/' . $uuid->toString();
663653
$form->addElement('submit', 'add_modifier', []);
664654

665655
if ($modifierRuleStore->getSessionRules() !== null) {
@@ -670,9 +660,6 @@ protected function showRules(
670660
$message = Hint::warning(
671661
'The order has been modified please safe if you want to preserver the new order'
672662
);
673-
// $form->addHtml(Hint::warning(
674-
// 'The order has been modified please safe if you want to preserver the new order'
675-
// ));
676663
if ($newForm->hasBeenSubmitted()) {
677664
$form->populate(['rules' => JsonString::encode($modifierRuleStore->getRules())]);
678665
$form->storeObject();
@@ -681,21 +668,11 @@ protected function showRules(
681668
}
682669
$this->content()->add([$message, $newForm]);
683670
}
684-
// $modifierRuleStore->setModifierRules($modifierRuleStore->getSessionRules());
685671
}
686672
if ($modifierRuleStore->getRules() === null) {
687-
var_dump("foobar");
688-
return;
689-
}
690-
try {
691-
$modifiers = $modifierRuleStore->getRules();
692-
} catch (JsonDecodeException $e) {
693-
$this->content()->add(Hint::error(sprintf(
694-
$this->translate('Configured rules are invalid: %s'),
695-
$e->getMessage()
696-
)));
697673
return;
698674
}
675+
$modifiers = $modifierRuleStore->getRules();
699676
$url = Url::fromPath('eventtracker/configuration/channelrule', [
700677
'uuid' => $uuid->toString()
701678
]);

library/Eventtracker/Modifier/ModifierRuleStore.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ public function getStoredRules(): ModifierChain
6767
return ModifierChain::fromSerialization($modifier);
6868
}
6969

70-
/**
71-
* @return mixed
72-
*/
7370
public function getRules(): ModifierChain
7471
{
7572
return $this->getSessionRules() ?? $this->getStoredRules();

library/Eventtracker/Modifier/MoveProperty.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ public function describe(string $propertyName): ValidHtml
2929
public static function extendSettingsForm(ChannelRuleForm $form): void
3030
{
3131
$form->addElement('text', 'target_property', [
32-
'label' => $form->translate('Target Property'),
33-
'required' => false,
34-
'description' => $form->translate('The value of the given property'
35-
. ' will be moved to to target properties value'),
36-
]);
32+
'label' => $form->translate('Target Property'),
33+
'required' => false,
34+
'description' => $form->translate(
35+
'The value of the given property will be moved to to target properties value'
36+
)
37+
]);
3738
}
3839
}

library/Eventtracker/Modifier/SimpleNameValueParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public static function extendSettingsForm(ChannelRuleForm $form): void
4646
$form->addElement(
4747
'text',
4848
'catchall_key',
49-
['label' => $form->translate('catchall_key'),
49+
[
50+
'label' => $form->translate('catchall_key'),
5051
'required' => false,
5152
'description' => 'catchall_key'
5253
]

library/Eventtracker/Web/Form/SimulateRuleForm.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function __construct($ns, $sessionKey)
2020

2121
protected function assemble()
2222
{
23-
2423
$this->addElement('select', 'simulation_entries', [
2524
'label' => $this->translate('Simulation entries'),
2625
'description' => $this->translate('Simulation entries'),

library/Eventtracker/Web/Table/ChannelRulesTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function assemble()
110110
'class' => ['collapsible-table-row', 'collapsed']
111111
]),
112112
$this::td([
113-
$this->deleteButton($row),
113+
$this->deleteButton($row),
114114
$this->moveUpButton($row),
115115
$this->moveDownButton($row),
116116
])

public/js/sortable.js.deactivated

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)