mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-03-07 15:16:40 +08:00
clear unused imported namespaces
This commit is contained in:
parent
13e51464f6
commit
2461b47d75
@ -2,18 +2,14 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use View;
|
||||
use Utils;
|
||||
use Option;
|
||||
use Datatables;
|
||||
use App\Events;
|
||||
use App\Models\User;
|
||||
use App\Models\Player;
|
||||
use App\Models\Texture;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\OptionForm;
|
||||
use App\Exceptions\PrettyPageException;
|
||||
use App\Services\Repositories\UserRepository;
|
||||
|
||||
class AdminController extends Controller
|
||||
@ -38,10 +34,9 @@ class AdminController extends Controller
|
||||
|
||||
$homepage = Option::form('homepage', OptionForm::AUTO_DETECT, function($form)
|
||||
{
|
||||
$form->text('home_pic_url')->hint(OptionForm::AUTO_DETECT);
|
||||
$form->text('home_pic_url')->hint();
|
||||
|
||||
$form->text('favicon_url')->hint(OptionForm::AUTO_DETECT)
|
||||
->description(OptionForm::AUTO_DETECT);
|
||||
$form->text('favicon_url')->hint()->description();
|
||||
|
||||
$form->select('copyright_prefer')
|
||||
->option('0', 'Powered with ❤ by Blessing Skin Server.')
|
||||
@ -49,10 +44,9 @@ class AdminController extends Controller
|
||||
->option('2', 'Proudly powered by Blessing Skin Server.')
|
||||
->option('3', '由 Blessing Skin Server 强力驱动.')
|
||||
->option('4', '自豪地采用 Blessing Skin Server.')
|
||||
->description(OptionForm::AUTO_DETECT);
|
||||
->description();
|
||||
|
||||
$form->textarea('copyright_text')->rows(6)
|
||||
->description(OptionForm::AUTO_DETECT);
|
||||
$form->textarea('copyright_text')->rows(6)->description();
|
||||
|
||||
})->handle();
|
||||
|
||||
@ -60,7 +54,7 @@ class AdminController extends Controller
|
||||
{
|
||||
$form->textarea('custom_css', 'CSS')->rows(6);
|
||||
$form->textarea('custom_js', 'JavaScript')->rows(6);
|
||||
})->addMessage(OptionForm::AUTO_DETECT)->handle();
|
||||
})->addMessage()->handle();
|
||||
|
||||
return view('admin.customize', ['forms' => compact('homepage', 'customJsCss')]);
|
||||
}
|
||||
@ -69,18 +63,17 @@ class AdminController extends Controller
|
||||
{
|
||||
$rate = Option::form('rate', OptionForm::AUTO_DETECT, function($form)
|
||||
{
|
||||
$form->group('score_per_storage')->text('score_per_storage')->addon(OptionForm::AUTO_DETECT);
|
||||
$form->group('score_per_storage')->text('score_per_storage')->addon();
|
||||
|
||||
$form->group('private_score_per_storage')
|
||||
->text('private_score_per_storage')->addon(OptionForm::AUTO_DETECT)
|
||||
->hint(OptionForm::AUTO_DETECT);
|
||||
->text('private_score_per_storage')->addon()->hint();
|
||||
|
||||
$form->group('score_per_closet_item')
|
||||
->text('score_per_closet_item')->addon(OptionForm::AUTO_DETECT);
|
||||
->text('score_per_closet_item')->addon();
|
||||
|
||||
$form->checkbox('return_score')->label(OptionForm::AUTO_DETECT);
|
||||
$form->checkbox('return_score')->label();
|
||||
|
||||
$form->group('score_per_player')->text('score_per_player')->addon(OptionForm::AUTO_DETECT);
|
||||
$form->group('score_per_player')->text('score_per_player')->addon();
|
||||
|
||||
$form->text('user_initial_score');
|
||||
|
||||
@ -186,7 +179,7 @@ class AdminController extends Controller
|
||||
return Datatables::of($users)->editColumn('email', function ($user) {
|
||||
return $user->email ?: 'EMPTY';
|
||||
})->editColumn('permission', function ($user) use ($permissionTextMap) {
|
||||
return Arr::get($permissionTextMap, $user->permission);
|
||||
return array_get($permissionTextMap, $user->permission);
|
||||
})
|
||||
->setRowId('uid')
|
||||
->editColumn('score', 'vendor.admin-operations.users.score')
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Session;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\Repositories\UserRepository;
|
||||
|
||||
|
@ -7,7 +7,6 @@ use Utils;
|
||||
use Storage;
|
||||
use Response;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use App\Events\GetPlayerJson;
|
||||
use App\Events\PlayerProfileUpdated;
|
||||
use App\Exceptions\PrettyPageException;
|
||||
|
@ -3,10 +3,8 @@
|
||||
namespace App\Models;
|
||||
|
||||
use DB;
|
||||
use App;
|
||||
use Utils;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Arr;
|
||||
use App\Events\EncryptUserPassword;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -97,7 +95,7 @@ class User extends Model
|
||||
{
|
||||
$responses = event(new EncryptUserPassword($rawPasswd, $user));
|
||||
|
||||
return Arr::get($responses, 0);
|
||||
return array_get($responses, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,14 +2,10 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use View;
|
||||
use Event;
|
||||
use Utils;
|
||||
use Validator;
|
||||
use App\Events;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use App\Exceptions\PrettyPageException;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -35,7 +31,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
Event::listen(Events\RenderingHeader::class, function($event) {
|
||||
// provide some application information for javascript
|
||||
$blessing = array_merge(Arr::except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
|
||||
$blessing = array_merge(array_except(config('app'), ['key', 'providers', 'aliases', 'cipher', 'log', 'url']), [
|
||||
'base_url' => url('/'),
|
||||
'site_name' => option('site_name')
|
||||
]);
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace App\Services;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Support\Arr;
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
@ -49,7 +48,7 @@ class Database
|
||||
$e->getMessage(), $e->getCode());
|
||||
}
|
||||
|
||||
$this->database = Arr::get($config, 'database', config('database.connections.mysql.database'));
|
||||
$this->database = array_get($config, 'database', config('database.connections.mysql.database'));
|
||||
$this->connection->query("SET names 'utf8'");
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,6 @@ namespace App\Services;
|
||||
use Event;
|
||||
use Closure;
|
||||
use App\Events;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Hook
|
||||
{
|
||||
|
@ -4,7 +4,6 @@ namespace App\Services;
|
||||
|
||||
use ArrayAccess;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Contracts\Support\Arrayable;
|
||||
|
||||
/**
|
||||
@ -79,7 +78,7 @@ class Plugin implements Arrayable, ArrayAccess
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
return $this->packageInfoAttribute(Str::snake($name, '-'));
|
||||
return $this->packageInfoAttribute(snake_case($name, '-'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,7 +86,7 @@ class Plugin implements Arrayable, ArrayAccess
|
||||
*/
|
||||
public function __isset($name)
|
||||
{
|
||||
return isset($this->{$name}) || $this->packageInfoAttribute(Str::snake($name, '-'));
|
||||
return isset($this->{$name}) || $this->packageInfoAttribute(snake_case($name, '-'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user