-
-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Labels
Description
The Deprecated
attribute is being copied from the TYPES
constant to the neighbouring $attributes
property for some reason. I have to remove it manually whenever I format this file.
@prettier/plugin-php v0.22.4
Playground link
Input:
<?php
namespace App\Models;
class QuoteSearch extends Model
{
#[Deprecated(message: 'use \App\Enums\MoveType')]
public const TYPES = [
'IMPORT' => 'import',
'EXPORT' => 'export',
];
protected $attributes = [
'search_job_completed' => false,
];
}
Output:
<?php
namespace App\Models;
class QuoteSearch extends Model
{
#[Deprecated(message: "use \App\Enums\MoveType")]
public const TYPES = [
"IMPORT" => "import",
"EXPORT" => "export",
];
#[Deprecated(message: "use \App\Enums\MoveType")]
protected $attributes = [
"search_job_completed" => false,
];
}