chore: adjust code to adhere to coding standard#47789
Conversation
Signed-off-by: Anna Larch <[email protected]>
Signed-off-by: Anna Larch <[email protected]>
| foreach (['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute', | ||
| 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] | ||
| as $expertSetting => $effectiveSetting) { | ||
| 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] as $expertSetting => $effectiveSetting) { |
| if ($this->caldavBackend instanceof CalDavBackend) { | ||
| $calendar = $this->caldavBackend->getCalendarByUri($this->principalInfo['uri'], $name); | ||
| if(!empty($calendar)) { | ||
| if (!empty($calendar)) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison
|
|
||
| $oldEventComponents = $old->getComponents(); | ||
| if(is_array($oldEventComponents) && !empty($oldEventComponents)) { | ||
| if (is_array($oldEventComponents) && !empty($oldEventComponents)) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType
| // No changed events after all - this shouldn't happen if there is significant change yet here we are | ||
| // The scheduling status is debatable | ||
| if(empty($vEvent)) { | ||
| if (empty($vEvent)) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction
| // No changed events after all - this shouldn't happen if there is significant change yet here we are | ||
| // The scheduling status is debatable | ||
| if(empty($vEvent)) { | ||
| if (empty($vEvent)) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction
| /** @var Parameter $partstat */ | ||
| $partstat = $organizer['PARTSTAT']; | ||
| if(strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { | ||
| if (strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| /** @var DateTimeImmutable $dateTime */ | ||
| $dateTime = $component['DTSTART'][0]; | ||
| if($dateTime instanceof DateTimeImmutable && $userStatusTimestamp > $dateTime->getTimestamp()) { | ||
| if ($dateTime instanceof DateTimeImmutable && $userStatusTimestamp > $dateTime->getTimestamp()) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType
|
|
||
| // Don't add share for owner | ||
| if($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { | ||
| if ($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { |
Check notice
Code scanning / Psalm
PossiblyNullArgument
|
|
||
| // Don't add unshare for owner | ||
| if($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { | ||
| if ($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| } | ||
| // If there is a custom message, don't overwrite it | ||
| if(empty($status->getCustomMessage())) { | ||
| if (empty($status->getCustomMessage())) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison
| $status->setCustomMessage($predefinedMessage['message']); | ||
| } | ||
| if(empty($status->getCustomIcon())) { | ||
| if (empty($status->getCustomIcon())) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison
Summary
New coding standard fixes
Checklist