psalm happiness

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

psalm happiness

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/27189/head
Arthur Schiwon 3 years ago
parent 8ec640d14a
commit 35d5395089
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23

@ -1769,9 +1769,6 @@
</TooManyArguments>
</file>
<file src="apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php">
<InvalidArrayOffset occurrences="1">
<code>$publicData[IAccountManager::PROPERTY_DISPLAYNAME]['value']</code>
</InvalidArrayOffset>
<InvalidScalarArgument occurrences="1">
<code>$this-&gt;retries + 1</code>
</InvalidScalarArgument>

@ -59,7 +59,7 @@ class Account implements IAccount {
if ($this->isCollection($property)) {
throw new \InvalidArgumentException('getProperty cannot retrieve an IAccountsPropertyCollection');
}
if (!array_key_exists($property, $this->properties)) {
if (!array_key_exists($property, $this->properties) || !$this->properties[$property] instanceof IAccountProperty) {
throw new PropertyDoesNotExistException($property);
}
return $this->properties[$property];

@ -142,7 +142,7 @@ class AccountManager implements IAccountManager {
}
protected function sanitizeLength(array &$propertyData, bool $throwOnData = false): void {
if (isset($propertyData) && isset($propertyData['value']) && strlen($propertyData['value']) > 2048) {
if (isset($propertyData['value']) && strlen($propertyData['value']) > 2048) {
if ($throwOnData) {
throw new \InvalidArgumentException();
} else {

Loading…
Cancel
Save