Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Feb 1, 2024
1 parent ac4ec7f commit 5d269bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/Api/AddUserAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

class AddUserAttributes
{


public function __invoke(UserSerializer $serializer, User $user, array $attributes): array
{
$attributes['canBeFollowed'] = $serializer->getActor()->can('follow', $user);
Expand Down
16 changes: 13 additions & 3 deletions tests/integration/api/FollowingUserTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php

/*
* This file is part of ianm/follow-users
*
* Copyright (c) Ian Morland.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*
*/

namespace IanM\FollowUsers\Tests\integration\api;

use Flarum\Notification\Notification;
Expand All @@ -9,7 +19,7 @@
class FollowingUserTest extends TestCase
{
use RetrievesAuthorizedUsers;

public function setUp(): void
{
parent::setUp();
Expand All @@ -25,7 +35,7 @@ public function setUp(): void
'user_followers' => [
['id' => 1, 'user_id' => 2, 'followed_user_id' => 3, 'created_at' => '2020-01-01 00:00:00', 'updated_at' => '2020-01-01 00:00:00', 'subscription' => 'follow'],
['id' => 2, 'user_id' => 2, 'followed_user_id' => 4, 'created_at' => '2020-01-01 00:00:00', 'updated_at' => '2020-01-01 00:00:00', 'subscription' => 'lurk'],

],
]);
}
Expand Down Expand Up @@ -103,7 +113,7 @@ public function unfollowUsersDataProvider(): array

/**
* @dataProvider unfollowUsersDataProvider
*
*
* @test
*/
public function can_unfollow_users(int $actorId, int $unfollowId)
Expand Down

0 comments on commit 5d269bb

Please sign in to comment.