mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Apply fixes from StyleCI
[ci skip] [skip ci]
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Flarum\Extend;
|
namespace Flarum\Extend;
|
||||||
|
|
||||||
use Flarum\Extension\Extension;
|
use Flarum\Extension\Extension;
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Flarum\Extend;
|
namespace Flarum\Extend;
|
||||||
|
|
||||||
use Flarum\Extension\Extension;
|
use Flarum\Extension\Extension;
|
||||||
|
@@ -11,7 +11,6 @@ namespace Flarum\User\Concerns;
|
|||||||
|
|
||||||
trait DeprecatedUserNotificationPreferences
|
trait DeprecatedUserNotificationPreferences
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode an array of preferences for storage in the database.
|
* Encode an array of preferences for storage in the database.
|
||||||
*
|
*
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Flarum\User\Concerns;
|
namespace Flarum\User\Concerns;
|
||||||
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
@@ -16,6 +23,7 @@ trait UserPreferences
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $preferences = [];
|
protected static $preferences = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the values of all registered preferences for this user, by
|
* Get the values of all registered preferences for this user, by
|
||||||
* transforming their stored preferences and merging them with the defaults.
|
* transforming their stored preferences and merging them with the defaults.
|
||||||
@@ -76,5 +84,4 @@ trait UserPreferences
|
|||||||
{
|
{
|
||||||
static::$preferences[$key] = compact('transformer', 'default');
|
static::$preferences[$key] = compact('transformer', 'default');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,6 @@ use Flarum\User\Event\Registered;
|
|||||||
use Flarum\User\Event\Renamed;
|
use Flarum\User\Event\Renamed;
|
||||||
use Illuminate\Contracts\Hashing\Hasher;
|
use Illuminate\Contracts\Hashing\Hasher;
|
||||||
use Illuminate\Contracts\Session\Session;
|
use Illuminate\Contracts\Session\Session;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property int $id
|
* @property int $id
|
||||||
|
@@ -1,26 +1,30 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Flarum\Tests\integration\extenders;
|
namespace Flarum\Tests\integration\extenders;
|
||||||
|
|
||||||
use Flarum\Extend\NotificationChannel;
|
use Flarum\Extend\NotificationChannel;
|
||||||
use Flarum\Extend\UserPreferences;
|
|
||||||
use Flarum\Tests\integration\RetrievesAuthorizedUsers;
|
use Flarum\Tests\integration\RetrievesAuthorizedUsers;
|
||||||
use Flarum\Tests\integration\TestCase;
|
use Flarum\Tests\integration\TestCase;
|
||||||
use Flarum\User\User;
|
use Flarum\User\User;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
|
|
||||||
class NotificationChannelTest extends TestCase
|
class NotificationChannelTest extends TestCase
|
||||||
{
|
{
|
||||||
use RetrievesAuthorizedUsers;
|
use RetrievesAuthorizedUsers;
|
||||||
|
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->prepareDatabase([
|
$this->prepareDatabase([
|
||||||
'users' => [
|
'users' => [
|
||||||
$this->normalUser()
|
$this->normalUser()
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -39,6 +43,5 @@ class NotificationChannelTest extends TestCase
|
|||||||
|
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = User::find(2);
|
$user = User::find(2);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Flarum\Tests\integration\extenders;
|
namespace Flarum\Tests\integration\extenders;
|
||||||
|
|
||||||
use Flarum\Extend\UserPreferences;
|
use Flarum\Extend\UserPreferences;
|
||||||
@@ -12,14 +19,13 @@ class UserPreferencesTest extends TestCase
|
|||||||
{
|
{
|
||||||
use RetrievesAuthorizedUsers;
|
use RetrievesAuthorizedUsers;
|
||||||
|
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->prepareDatabase([
|
$this->prepareDatabase([
|
||||||
'users' => [
|
'users' => [
|
||||||
$this->normalUser()
|
$this->normalUser()
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user