mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Add phpdoc_align rule
This commit is contained in:
parent
1bf6a880fb
commit
d21740d458
@ -114,7 +114,7 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
@ -140,7 +140,7 @@ class Handler extends ExceptionHandler
|
||||
* Transform a validation exception into a consistent format to be returned for
|
||||
* calls to the API.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function invalidJson($request, ValidationException $exception): JsonResponse
|
||||
{
|
||||
@ -236,7 +236,7 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* Convert an authentication exception into an unauthenticated response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
protected function unauthenticated($request, AuthenticationException $exception): JsonResponse|RedirectResponse
|
||||
{
|
||||
|
@ -145,7 +145,7 @@ class BackupManager
|
||||
/**
|
||||
* Unset the given adapter instances.
|
||||
*
|
||||
* @param string|string[] $adapter
|
||||
* @param string|string[] $adapter
|
||||
*/
|
||||
public function forget(array|string $adapter): self
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ abstract class ApplicationApiController extends Controller
|
||||
*
|
||||
* @template T of \App\Transformers\Api\Application\BaseTransformer
|
||||
*
|
||||
* @param class-string<T> $abstract
|
||||
* @param class-string<T> $abstract
|
||||
*
|
||||
* @return T
|
||||
*
|
||||
|
@ -41,7 +41,7 @@ abstract class ClientApiController extends ApplicationApiController
|
||||
*
|
||||
* @template T of \App\Transformers\Api\Client\BaseClientTransformer
|
||||
*
|
||||
* @param class-string<T> $abstract
|
||||
* @param class-string<T> $abstract
|
||||
*
|
||||
* @return T
|
||||
*
|
||||
|
@ -29,7 +29,7 @@ class ForgotPasswordController extends Controller
|
||||
/**
|
||||
* Get the response for a successful password reset link.
|
||||
*
|
||||
* @param string $response
|
||||
* @param string $response
|
||||
*/
|
||||
protected function sendResetLinkResponse(Request $request, $response): JsonResponse
|
||||
{
|
||||
|
@ -64,8 +64,8 @@ class ResetPasswordController extends Controller
|
||||
* account do not automatically log them in. In those cases, send the user back to the login
|
||||
* form with a note telling them their password was changed and to log back in.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\CanResetPassword|\App\Models\User $user
|
||||
* @param string $password
|
||||
* @param \Illuminate\Contracts\Auth\CanResetPassword|\App\Models\User $user
|
||||
* @param string $password
|
||||
*
|
||||
* @throws \App\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ abstract class ApplicationApiRequest extends FormRequest
|
||||
*
|
||||
* @template T of \Illuminate\Database\Eloquent\Model
|
||||
*
|
||||
* @param class-string<T> $expect
|
||||
* @param class-string<T> $expect
|
||||
*
|
||||
* @return T
|
||||
*
|
||||
|
@ -11,7 +11,7 @@ class AdminServerFilter implements Filter
|
||||
* A multi-column filter for the servers table that allows an administrative user to search
|
||||
* across UUID, name, owner username, and owner email.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function __invoke(Builder $query, $value, string $property)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ class MultiFieldServerFilter implements Filter
|
||||
* search across multiple columns. This allows us to provide a very generic search ability for
|
||||
* the frontend.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function __invoke(Builder $query, $value, string $property)
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
|
||||
/**
|
||||
* Send the password reset notification.
|
||||
*
|
||||
* @param string $token
|
||||
* @param string $token
|
||||
*/
|
||||
public function sendPasswordResetNotification($token)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ class DaemonFileRepository extends DaemonRepository
|
||||
/**
|
||||
* Return the contents of a given file.
|
||||
*
|
||||
* @param int|null $notLargerThan the maximum content length in bytes
|
||||
* @param int|null $notLargerThan the maximum content length in bytes
|
||||
*
|
||||
* @throws \GuzzleHttp\Exception\TransferException
|
||||
* @throws \App\Exceptions\Http\Server\FileSizeTooLargeException
|
||||
|
@ -17,8 +17,8 @@ class Username implements Rule
|
||||
*
|
||||
* Allowed characters: a-z0-9_-.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function passes($attribute, $value): bool
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ class ActivityLogService
|
||||
*
|
||||
* @template T extends \Illuminate\Database\Eloquent\Model|\Illuminate\Contracts\Auth\Authenticatable
|
||||
*
|
||||
* @param T|T[]|null $subjects
|
||||
* @param T|T[]|null $subjects
|
||||
*/
|
||||
public function subject(...$subjects): self
|
||||
{
|
||||
@ -100,8 +100,8 @@ class ActivityLogService
|
||||
/**
|
||||
* Sets a custom property on the activity log instance.
|
||||
*
|
||||
* @param string|array $key
|
||||
* @param mixed $value
|
||||
* @param string|array $key
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function property($key, $value = null): self
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ class InitiateBackupService
|
||||
/**
|
||||
* Sets the files to be ignored by this backup.
|
||||
*
|
||||
* @param string[]|null $ignored
|
||||
* @param string[]|null $ignored
|
||||
*/
|
||||
public function setIgnoredFiles(?array $ignored): self
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ abstract class BaseTransformer extends TransformerAbstract
|
||||
*
|
||||
* @template T of \App\Transformers\Api\Application\BaseTransformer
|
||||
*
|
||||
* @param class-string<T> $abstract
|
||||
* @param class-string<T> $abstract
|
||||
*
|
||||
* @return T
|
||||
*
|
||||
|
@ -3,7 +3,6 @@
|
||||
"rules": {
|
||||
"not_operator_with_successor_space": false,
|
||||
"ordered_imports": false,
|
||||
"phpdoc_align": false,
|
||||
"phpdoc_separation": false
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ use App\Models\ActivityLogSubject;
|
||||
trait AssertsActivityLogged
|
||||
{
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Model|array $subjects
|
||||
* @param \Illuminate\Database\Eloquent\Model|array $subjects
|
||||
*/
|
||||
public function assertActivityFor(string $event, ?Model $actor, ...$subjects): void
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ class PowerControllerTest extends ClientApiIntegrationTestCase
|
||||
* an error in response. This checks against the specific permission needed to send
|
||||
* the command to the server.
|
||||
*
|
||||
* @param string[] $permissions
|
||||
* @param string[] $permissions
|
||||
*
|
||||
* @dataProvider invalidPermissionDataProvider
|
||||
*/
|
||||
|
@ -65,7 +65,7 @@ trait CreatesTestModels
|
||||
* Generates a user and a server for that user. If an array of permissions is passed it
|
||||
* is assumed that the user is actually a subuser of the server.
|
||||
*
|
||||
* @param string[] $permissions
|
||||
* @param string[] $permissions
|
||||
*
|
||||
* @return array{\App\Models\User, \App\Models\Server}
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user