mirror of
https://github.com/flarum/core.git
synced 2025-08-02 22:47:33 +02:00
Apply fixes from StyleCI
This commit is contained in:
@@ -32,7 +32,7 @@ use Tobyz\JsonApiServer\Schema\CustomFilter;
|
||||
|
||||
class ExternalExtensionResource extends AbstractResource implements Listable, Paginatable, Countable
|
||||
{
|
||||
protected int|null $totalResults = null;
|
||||
protected ?int $totalResults = null;
|
||||
|
||||
public function __construct(
|
||||
protected Repository $cache,
|
||||
|
@@ -108,27 +108,27 @@ class Context extends BaseContext
|
||||
return $this->parameters[$key] ?? $default;
|
||||
}
|
||||
|
||||
public function creating(string|null $resource = null): bool
|
||||
public function creating(?string $resource = null): bool
|
||||
{
|
||||
return $this->endpoint instanceof Endpoint\Create && (! $resource || is_a($this->collection, $resource));
|
||||
}
|
||||
|
||||
public function updating(string|null $resource = null): bool
|
||||
public function updating(?string $resource = null): bool
|
||||
{
|
||||
return $this->endpoint instanceof Endpoint\Update && (! $resource || is_a($this->collection, $resource));
|
||||
}
|
||||
|
||||
public function deleting(string|null $resource = null): bool
|
||||
public function deleting(?string $resource = null): bool
|
||||
{
|
||||
return $this->endpoint instanceof Endpoint\Delete && (! $resource || is_a($this->collection, $resource));
|
||||
}
|
||||
|
||||
public function showing(string|null $resource = null): bool
|
||||
public function showing(?string $resource = null): bool
|
||||
{
|
||||
return $this->endpoint instanceof Endpoint\Show && (! $resource || is_a($this->collection, $resource));
|
||||
}
|
||||
|
||||
public function listing(string|null $resource = null): bool
|
||||
public function listing(?string $resource = null): bool
|
||||
{
|
||||
return $this->endpoint instanceof Endpoint\Index && (! $resource || is_a($this->collection, $resource));
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ trait HasAuthorization
|
||||
: ($this->authenticated)($context));
|
||||
}
|
||||
|
||||
public function getAuthorized(Context $context): string|null
|
||||
public function getAuthorized(Context $context): ?string
|
||||
{
|
||||
if (! is_callable($this->ability)) {
|
||||
return $this->ability;
|
||||
|
@@ -19,8 +19,8 @@ use s9e\TextFormatter\Utils;
|
||||
|
||||
class Link implements ExtenderInterface
|
||||
{
|
||||
protected Closure|null $setRel = null;
|
||||
protected Closure|null $setTarget = null;
|
||||
protected ?Closure $setRel = null;
|
||||
protected ?Closure $setTarget = null;
|
||||
|
||||
public function setRel(Closure $callable): self
|
||||
{
|
||||
|
Reference in New Issue
Block a user