for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace Backpack\PermissionManager\app\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UserStoreCrudRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
// only allow updates if the user is logged in
return backpack_auth()->check();
}
* Get the validation rules that apply to the request.
* @return array
array<string,string>
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
public function rules()
return [
'email' => 'required|unique:'.config('permission.table_names.users', 'users').',email',
'name' => 'required',
'password' => 'required|confirmed',
];
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.