-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
chore: adjust code to adhere to coding standard #47789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks a bit funny
| 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