mirror of
https://github.com/flarum/core.git
synced 2025-10-12 07:24:27 +02:00
More indentation cleanup
This commit is contained in:
@@ -86,8 +86,9 @@ class ListPostsController extends AbstractCollectionController
|
||||
|
||||
if (($near = array_get($queryParams, 'page.near')) > 1) {
|
||||
if (count($filter) > 1 || ! isset($filter['discussion']) || $sort) {
|
||||
throw new InvalidParameterException('You can only use page[near] with '
|
||||
.'filter[discussion] and the default sort order');
|
||||
throw new InvalidParameterException(
|
||||
'You can only use page[near] with filter[discussion] and the default sort order'
|
||||
);
|
||||
}
|
||||
|
||||
$offset = $this->posts->getIndexForNumber($filter['discussion'], $near, $actor);
|
||||
|
@@ -121,8 +121,9 @@ abstract class AbstractSerializer extends BaseAbstractSerializer
|
||||
);
|
||||
|
||||
if ($relationship && ! ($relationship instanceof Relationship)) {
|
||||
throw new LogicException('GetApiRelationship handler must return an instance of '
|
||||
.Relationship::class);
|
||||
throw new LogicException(
|
||||
'GetApiRelationship handler must return an instance of '.Relationship::class
|
||||
);
|
||||
}
|
||||
|
||||
return $relationship;
|
||||
|
@@ -29,8 +29,9 @@ class DiscussionBasicSerializer extends AbstractSerializer
|
||||
protected function getDefaultAttributes($discussion)
|
||||
{
|
||||
if (! ($discussion instanceof Discussion)) {
|
||||
throw new InvalidArgumentException(get_class($this)
|
||||
.' can only serialize instances of '.Discussion::class);
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Discussion::class
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
|
@@ -43,8 +43,9 @@ class GroupSerializer extends AbstractSerializer
|
||||
protected function getDefaultAttributes($group)
|
||||
{
|
||||
if (! ($group instanceof Group)) {
|
||||
throw new InvalidArgumentException(get_class($this)
|
||||
.' can only serialize instances of '.Group::class);
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Group::class
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
|
@@ -37,8 +37,9 @@ class NotificationSerializer extends AbstractSerializer
|
||||
protected function getDefaultAttributes($notification)
|
||||
{
|
||||
if (! ($notification instanceof Notification)) {
|
||||
throw new InvalidArgumentException(get_class($this)
|
||||
.' can only serialize instances of '.Notification::class);
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Notification::class
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
|
@@ -30,8 +30,9 @@ class PostBasicSerializer extends AbstractSerializer
|
||||
protected function getDefaultAttributes($post)
|
||||
{
|
||||
if (! ($post instanceof Post)) {
|
||||
throw new InvalidArgumentException(get_class($this)
|
||||
.' can only serialize instances of '.Post::class);
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Post::class
|
||||
);
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
|
@@ -29,8 +29,9 @@ class UserBasicSerializer extends AbstractSerializer
|
||||
protected function getDefaultAttributes($user)
|
||||
{
|
||||
if (! ($user instanceof User)) {
|
||||
throw new InvalidArgumentException(get_class($this)
|
||||
.' can only serialize instances of '.User::class);
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.User::class
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
|
Reference in New Issue
Block a user