Conversation
2bf4959 to
25c7cb4
Compare
34029a8 to
3af0375
Compare
sukhwinder33445
left a comment
There was a problem hiding this comment.
I have looked through the files up to MoveRotationForm.php.
3af0375 to
3723f76
Compare
0094a30 to
c043776
Compare
library/Notifications/Web/Control/SearchBar/ExtraTagSuggestions.php
Outdated
Show resolved
Hide resolved
1fa2990 to
5820718
Compare
5820718 to
3cfc457
Compare
|
The last force push did not change anything, but only moved a change from one commit into another. |
| '24-7' => $rotation->options['at'], | ||
| 'partial' => $rotation->options['from'], | ||
| 'multi' => $rotation->options['from_at'], | ||
| default => throw new LogicException('Invalid mode') |
There was a problem hiding this comment.
This is about modernizing code. A logic exception is something that must not happen. It's simply a programming error and an end-user should never face it. As such, this is only to prevent the routine continue and to not run into a even more convoluted error.
So, back to modernizing, what does a match expression do without a default case? Right, complain.
It's as simple as that. What does the logic exception do? Complain. The same thing. So let's get rid of it already.
| property: 'data', | ||
| ref: '#/components/schemas/' . $entityName, | ||
| description: sprintf('Successfull response with the %s object', $entityName), | ||
| description: sprintf('Successful response with the %s object', $entityName), |
There was a problem hiding this comment.
This has an influence on the rendered api description. Update it by running icingacli notifications openapi generate.
| $this->object instanceof Event => new EventRenderer(), | ||
| $this->object instanceof Incident => new IncidentRenderer(), | ||
| $this->object instanceof Contactgroup => new ContactgroupRenderer(), | ||
| default => throw new NotImplementedError('Not implemented') |
3cfc457 to
33260df
Compare
As we now use php 8.2 as minimal version, the following modernizations have been added to the code:
str_contains(),str_starts_with()andstr_ends_with())Additionally the import blocks have been sorted, indentation has been fixed, and some smaller adjustments.
resolve #378
require Icinga/ipl-web/pull/342