mirror of
https://github.com/flarum/framework.git
synced 2025-01-06 02:23:36 +08:00
Fix coding standards to conform to PSR-2
This commit is contained in:
parent
dcd67b9d5c
commit
0ca4e1ab7b
|
@ -17,6 +17,5 @@ class ConsoleServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@ use Illuminate\Foundation\Application;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
|
||||||
class InstallCommand extends Command {
|
class InstallCommand extends Command
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command name.
|
* The console command name.
|
||||||
|
@ -75,5 +76,4 @@ class InstallCommand extends Command {
|
||||||
// ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
|
// ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@ use Illuminate\Foundation\Application;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
|
||||||
class SeedCommand extends Command {
|
class SeedCommand extends Command
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command name.
|
* The console command name.
|
||||||
|
@ -67,5 +68,4 @@ class SeedCommand extends Command {
|
||||||
// ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
|
// ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
$this->app->when('Flarum\Core\Handlers\Commands\UploadAvatarCommandHandler')
|
$this->app->when('Flarum\Core\Handlers\Commands\UploadAvatarCommandHandler')
|
||||||
->needs('League\Flysystem\FilesystemInterface')
|
->needs('League\Flysystem\FilesystemInterface')
|
||||||
->give(function(Container $app) {
|
->give(function (Container $app) {
|
||||||
return $app->make('Illuminate\Contracts\Filesystem\Factory')->disk('flarum-avatars')->getDriver();
|
return $app->make('Illuminate\Contracts\Filesystem\Factory')->disk('flarum-avatars')->getDriver();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
|
|
||||||
class Extension
|
class Extension
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
|
|
||||||
class ExtensionManager
|
class ExtensionManager
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,5 @@ class EmailConfirmationMailer
|
||||||
|
|
||||||
public function whenEmailWasChanged(EmailWasChanged $event)
|
public function whenEmailWasChanged(EmailWasChanged $event)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,5 +69,4 @@ class GambitManager
|
||||||
$searcher->addActiveGambit($gambit);
|
$searcher->addActiveGambit($gambit);
|
||||||
$gambit->apply($string, $searcher);
|
$gambit->apply($string, $searcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use DB;
|
use DB;
|
||||||
|
|
||||||
class ConfigTableSeeder extends Seeder {
|
class ConfigTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the database seeds.
|
* Run the database seeds.
|
||||||
|
@ -20,9 +21,8 @@ class ConfigTableSeeder extends Seeder {
|
||||||
'welcome_title' => 'Welcome to Flarum Demo Forum'
|
'welcome_title' => 'Welcome to Flarum Demo Forum'
|
||||||
];
|
];
|
||||||
|
|
||||||
DB::table('config')->insert(array_map(function($key, $value) {
|
DB::table('config')->insert(array_map(function ($key, $value) {
|
||||||
return compact('key', 'value');
|
return compact('key', 'value');
|
||||||
}, array_keys($config), $config));
|
}, array_keys($config), $config));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,6 @@ class DiscussionsTableSeeder extends Seeder
|
||||||
'read_time' => $faker->dateTimeBetween($discussion->start_time, 'now')
|
'read_time' => $faker->dateTimeBetween($discussion->start_time, 'now')
|
||||||
]);
|
]);
|
||||||
} catch (\Illuminate\Database\QueryException $e) {
|
} catch (\Illuminate\Database\QueryException $e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Flarum\Core\Models\Group;
|
use Flarum\Core\Models\Group;
|
||||||
|
|
||||||
class GroupsTableSeeder extends Seeder {
|
class GroupsTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the database seeds.
|
* Run the database seeds.
|
||||||
|
@ -30,5 +31,4 @@ class GroupsTableSeeder extends Seeder {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Flarum\Core\Models\Permission;
|
use Flarum\Core\Models\Permission;
|
||||||
|
|
||||||
class PermissionsTableSeeder extends Seeder {
|
class PermissionsTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the database seeds.
|
* Run the database seeds.
|
||||||
|
@ -39,5 +40,4 @@ class PermissionsTableSeeder extends Seeder {
|
||||||
}
|
}
|
||||||
Permission::insert($permissions);
|
Permission::insert($permissions);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,8 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class MappedMorphTo extends MorphTo {
|
class MappedMorphTo extends MorphTo
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -14,7 +14,9 @@ class ExtensionsServiceProvider extends ServiceProvider
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
// Extensions will not be registered if Flarum is not installed yet
|
// Extensions will not be registered if Flarum is not installed yet
|
||||||
if (!Core::isInstalled()) return;
|
if (!Core::isInstalled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$extensions = json_decode(DB::table('config')->where('key', 'extensions_enabled')->pluck('value'), true);
|
$extensions = json_decode(DB::table('config')->where('key', 'extensions_enabled')->pluck('value'), true);
|
||||||
$providers = [];
|
$providers = [];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user