mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Various code cleanup.
This commit is contained in:
@@ -74,7 +74,7 @@ class BelongsUser implements Rule
|
||||
{
|
||||
$attribute = $this->parseAttribute($attribute);
|
||||
if (!auth()->check()) {
|
||||
return true; // @codeCoverageIgnore
|
||||
return true;
|
||||
}
|
||||
$attribute = (string)$attribute;
|
||||
Log::debug(sprintf('Going to validate %s', $attribute));
|
||||
@@ -97,7 +97,7 @@ class BelongsUser implements Rule
|
||||
case 'destination_id':
|
||||
return $this->validateAccountId((int)$value);
|
||||
default:
|
||||
throw new FireflyException(sprintf('Rule BelongUser cannot handle "%s"', $attribute)); // @codeCoverageIgnore
|
||||
throw new FireflyException(sprintf('Rule BelongUser cannot handle "%s"', $attribute));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class BelongsUser implements Rule
|
||||
return $parts[2];
|
||||
}
|
||||
|
||||
return $attribute; // @codeCoverageIgnore
|
||||
return $attribute;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,10 +87,10 @@ class UniqueAccountNumber implements Rule
|
||||
public function passes($attribute, $value): bool
|
||||
{
|
||||
if (!auth()->check()) {
|
||||
return true; // @codeCoverageIgnore
|
||||
return true;
|
||||
}
|
||||
if (null === $this->expectedType) {
|
||||
return true; // @codeCoverageIgnore
|
||||
return true;
|
||||
}
|
||||
$maxCounts = $this->getMaxOccurrences();
|
||||
|
||||
|
||||
@@ -84,10 +84,10 @@ class UniqueIban implements Rule
|
||||
public function passes($attribute, $value): bool
|
||||
{
|
||||
if (!auth()->check()) {
|
||||
return true; // @codeCoverageIgnore
|
||||
return true;
|
||||
}
|
||||
if (null === $this->expectedType) {
|
||||
return true; // @codeCoverageIgnore
|
||||
return true;
|
||||
}
|
||||
$maxCounts = $this->getMaxOccurrences();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user