Skip to content

Commit b758eb4

Browse files
committed
Remove unnecessary type hints
1 parent 70fe6cc commit b758eb4

File tree

5 files changed

+0
-20
lines changed

5 files changed

+0
-20
lines changed

application/controllers/EventRuleController.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ public function indexAction(): void
4747
$this->addTitleTab(t('Event Rule'));
4848
$this->controls->addAttributes(['class' => 'event-rule-detail']);
4949

50-
/** @var string $ruleId */
5150
$ruleId = $this->params->getRequired('id');
52-
/** @var array<string, mixed>|null $configValues */
5351
$configValues = $this->sessionNamespace->get($ruleId);
5452
$this->controls->addAttributes(['class' => 'event-rule-detail']);
5553

@@ -96,7 +94,6 @@ public function indexAction(): void
9694
})
9795
->handleRequest($this->getServerRequest());
9896

99-
/** @var array<string, mixed> $cache */
10097
$cache = $this->sessionNamespace->get($ruleId);
10198
$discardChangesButton = null;
10299
if ($cache !== null) {
@@ -189,7 +186,6 @@ public function fromDb(int $ruleId): array
189186
foreach ($rule->rule_escalation as $re) {
190187
foreach ($re as $k => $v) {
191188
if (in_array($k, ['id', 'condition'])) {
192-
/** @var int|string|null $v */
193189
$config[$re->getTableName()][$re->position][$k] = (string) $v;
194190
}
195191
}
@@ -244,7 +240,6 @@ public function searchEditorAction(): void
244240

245241
$editor = new SearchEditor();
246242

247-
/** @var string $objectFilter */
248243
$objectFilter = $eventRule['object_filter'] ?? '';
249244
$editor->setQueryString($objectFilter)
250245
->setAction(Url::fromRequest()->getAbsoluteUrl())
@@ -296,7 +291,6 @@ public function editAction(): void
296291
{
297292
/** @var string $ruleId */
298293
$ruleId = $this->params->getRequired('id');
299-
/** @var array<string, mixed>|null $config */
300294
$config = $this->sessionNamespace->get($ruleId);
301295
if ($config === null) {
302296
if ($ruleId === '-1') {

application/controllers/EventRulesController.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ public function addAction(): void
163163

164164
public function searchEditorAction(): void
165165
{
166-
/** @var string $ruleId */
167166
$ruleId = $this->params->shiftRequired('id');
168-
169-
/** @var array<string, mixed>|null $eventRule */
170167
$eventRule = $this->sessionNamespace->get($ruleId);
171168

172169
if ($eventRule === null) {
@@ -175,7 +172,6 @@ public function searchEditorAction(): void
175172

176173
$editor = new SearchEditor();
177174

178-
/** @var string $objectFilter */
179175
$objectFilter = $eventRule['object_filter'] ?? '';
180176
$editor->setQueryString($objectFilter)
181177
->setAction(Url::fromRequest()->getAbsoluteUrl())

application/forms/EventRuleConfigElements/EscalationCondition.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ protected function assemble(): void
4141
// Escalation Id to which the condition belongs
4242
$this->addElement('hidden', 'id');
4343

44-
/** @var SubmitButtonElement $addCondition */
4544
$addCondition = $this->createElement(
4645
'submitButton',
4746
'add-condition',

application/forms/EventRuleConfigElements/EscalationRecipient.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ protected function assemble(): void
2929
{
3030
$this->addElement('hidden', 'recipient-count', ['value' => '1']);
3131

32-
/** @var SubmitButtonElement $addRecipientButton */
3332
$addRecipientButton = $this->createElement(
3433
'submitButton',
3534
'add-recipient',
@@ -69,7 +68,6 @@ protected function assemble(): void
6968

7069
$options = $defaultOption + Channel::fetchChannelNames(Database::get());
7170

72-
/** @var SelectElement $val */
7371
$val = $this->createElement(
7472
'select',
7573
'val_' . $i,
@@ -81,7 +79,6 @@ protected function assemble(): void
8179
]
8280
);
8381

84-
/** @var string $recipientVal */
8582
$recipientVal = $this->getValue('column_' . $i);
8683
if ($recipientVal !== null) {
8784
$recipient = explode('_', $recipientVal);
@@ -200,7 +197,6 @@ public function getRecipients(): array
200197
$count += 1;
201198
}
202199

203-
/** @var array<int, array<string, mixed>> $values */
204200
$values = [];
205201
for ($i = 1; $i <= $count; $i++) {
206202
if ($i === (int) $removePosition) {

application/forms/EventRuleConfigForm.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ public function getValues(): array
339339
{
340340
$values = [];
341341
$escalations = [];
342-
/** @var string $prefixesString */
343342
$prefixesString = $this->getValue('prefixes-map', '');
344343

345344
/** @var string[] $prefixesMap */
@@ -442,7 +441,6 @@ public function addOrUpdateRule(int $id, array $config): int
442441
$escalationsFromDb = RuleEscalation::on($db)
443442
->filter(Filter::equal('rule_id', $id));
444443

445-
/** @var array<int, array<string, mixed>> $escalationsInCache */
446444
$escalationsInCache = $config['rule_escalation'];
447445

448446
$escalationsToUpdate = [];
@@ -504,7 +502,6 @@ private function insertOrUpdateEscalations(int $ruleId, array $escalations, bool
504502
{
505503
$db = Database::get();
506504
foreach ($escalations as $position => $escalationConfig) {
507-
/** @var array<int, array<string, mixed>> $recipientsFromConfig */
508505
$recipientsFromConfig = $escalationConfig['recipients'] ?? [];
509506
if ($insert) {
510507
$db->insert('rule_escalation', [
@@ -515,7 +512,6 @@ private function insertOrUpdateEscalations(int $ruleId, array $escalations, bool
515512
'fallback_for' => $escalationConfig['fallback_for'] ?? null
516513
]);
517514

518-
/** @var string $escalationId */
519515
$escalationId = $db->lastInsertId();
520516
} else {
521517
/** @var string $escalationId */
@@ -555,7 +551,6 @@ function (array $element) use ($recipientId) {
555551
}
556552
}
557553

558-
/** @var array<string, mixed> $recipientConfig */
559554
foreach ($recipientsFromConfig as $recipientConfig) {
560555
$data = [
561556
'rule_escalation_id' => $escalationId,

0 commit comments

Comments
 (0)