-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
chore: adjust code to adhere to coding standard #47789
Conversation
Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@@ -397,8 +397,7 @@ private function doSoftValidation(): void { | |||
} | |||
|
|||
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
$calendar = $this->caldavBackend->getCalendarByUri($this->principalInfo['uri'], $name); | ||
if(!empty($calendar)) { | ||
if (!empty($calendar)) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
return ['old' => null, 'new' => $newEventComponents]; | ||
} | ||
|
||
$oldEventComponents = $old->getComponents(); | ||
if(is_array($oldEventComponents) && !empty($oldEventComponents)) { | ||
if (is_array($oldEventComponents) && !empty($oldEventComponents)) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType Note
@@ -151,7 +151,7 @@ | |||
|
|||
// 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 Note
@@ -151,7 +151,7 @@ | |||
|
|||
// 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 Note
/** @var Parameter $partstat */ | ||
$partstat = $organizer['PARTSTAT']; | ||
if(strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { | ||
if (strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
@@ -101,7 +101,7 @@ | |||
if (isset($component['DTSTART']) && $userStatusTimestamp !== null) { | |||
/** @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 Note
@@ -58,7 +58,7 @@ | |||
} | |||
|
|||
// 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 Note
@@ -83,7 +83,7 @@ | |||
} | |||
|
|||
// 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 Note
@@ -499,10 +499,10 @@ | |||
return; | |||
} | |||
// If there is a custom message, don't overwrite it | |||
if(empty($status->getCustomMessage())) { | |||
if (empty($status->getCustomMessage())) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
$status->setCustomMessage($predefinedMessage['message']); | ||
} | ||
if(empty($status->getCustomIcon())) { | ||
if (empty($status->getCustomIcon())) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
Summary
New coding standard fixes
Checklist