Showing 286 of 512 total issues
Method create
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create(Request $request, Validator $validator)
{
if (! is_writable(resource_path('views/' . $this->path))) {
abort(200, __('admin.files.directory_not_writable', ['dir' => $this->path]));
}
Method recovery
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function recovery(Request $request, Validator $validator)
{
if (getUser()) {
setFlash('danger', __('main.already_authorized'));
Method index
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(Request $request, Validator $validator)
{
$login = $request->input('user');
if ($request->isMethod('post')) {
Method editComment
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function editComment(int $id, int $cid, Request $request, Validator $validator)
{
$page = int($request->input('page', 1));
/** @var News $news */
Method change
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function change(Request $request, Validator $validator)
{
$user = User::query()->where('login', $request->input('user'))->with('lastBan')->first();
if (! $user) {
Method perform
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function perform(Request $request, Validator $validator): Response
{
if (! $request->ajax()) {
return redirect('/');
}
Method file
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function file(?UploadedFile $input, array $rules, $label, bool $required = true): Validator
{
if (! $required && blank($input)) {
return $this;
}
Method user
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function user(Request $request): Response
{
/** @var User $user */
$user = $request->attributes->get('user');
Method topics
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function topics(int $id): Response
{
/** @var Topic $topic */
$topic = Topic::query()->find($id);
Method send
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(Request $request, Validator $validator): RedirectResponse
{
$money = int($request->input('money'));
$msg = $request->input('msg');
Method index
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(Request $request, Validator $validator)
{
$login = $request->input('user');
if ($request->isMethod('post')) {
Method index
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(Request $request, Validator $validator)
{
if ($request->isMethod('post')) {
$page = int($request->input('page', 1));
$choice = intar($request->input('choice'));
Method index
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(
Request $request,
Validator $validator,
ImageManager $imageManager,
) {
Method send
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(Request $request, Validator $validator, Flood $flood): RedirectResponse
{
$login = $request->input('user');
$msg = $request->input('msg');
Method edit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit(int $id, Request $request, Validator $validator)
{
if (! isAdmin(User::BOSS)) {
abort(403, __('errors.forbidden'));
}
Method index
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(Request $request)
{
if ($request->isMethod('post')) {
$client = new Client(['timeout' => 30.0]);
Method create
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create(Request $request, Validator $validator, Flood $flood)
{
if (! $user = getUser()) {
abort(403, __('main.not_authorized'));
}
Method resizeProcess
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resizeProcess(?string $path, array $params = []): array
{
if (empty($params['alt'])) {
$params['alt'] = basename($path);
}
Method editPassword
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function editPassword(Request $request, Validator $validator): RedirectResponse
{
if (! $user = getUser()) {
abort(403, __('main.not_authorized'));
}
Method setting
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setting(Request $request, Validator $validator)
{
if (! $user = getUser()) {
abort(403, __('main.not_authorized'));
}