@@ -20,7 +20,6 @@ public static function fromJson(array $data): self
2020 ? self ::convertFields (collect (Arr::get ($ data , 'Fields ' )))
2121 : null ;
2222
23-
2423 return new self (
2524 id: $ data ['Id ' ],
2625 file_size: $ data ['FileSize ' ],
@@ -52,20 +51,19 @@ protected static function convertSuggestions(Collection $suggestions): Collectio
5251 }
5352
5453 public function __construct (
55- public int $ id ,
56- public int $ file_size ,
57- public int $ total_pages ,
58- public string $ title ,
59- public string |null $ extension ,
60- public string $ content_type ,
61- public string $ file_cabinet_id ,
62- public string |null $ intellixTrust ,
63- public Carbon $ created_at ,
64- public Carbon $ updated_at ,
54+ public int $ id ,
55+ public int $ file_size ,
56+ public int $ total_pages ,
57+ public string $ title ,
58+ public string |null $ extension ,
59+ public string $ content_type ,
60+ public string $ file_cabinet_id ,
61+ public string |null $ intellixTrust ,
62+ public Carbon $ created_at ,
63+ public Carbon $ updated_at ,
6564 public Collection |null $ fields ,
6665 public Collection |null $ suggestions ,
67- )
68- {
66+ ) {
6967 }
7068
7169 public function isPdf (): bool
@@ -107,35 +105,34 @@ public function fileName(): string
107105 }
108106
109107 public static function fake (
110- ?int $ id = null ,
111- ?int $ file_size = null ,
112- ?int $ total_pages = null ,
113- ?string $ title = null ,
114- ?string $ extension = null ,
115- ?string $ content_type = null ,
116- ?string $ file_cabinet_id = null ,
117- ?string $ intellixTrust = null ,
118- ?Carbon $ created_at = null ,
119- ?Carbon $ updated_at = null ,
108+ ?int $ id = null ,
109+ ?int $ file_size = null ,
110+ ?int $ total_pages = null ,
111+ ?string $ title = null ,
112+ ?string $ extension = null ,
113+ ?string $ content_type = null ,
114+ ?string $ file_cabinet_id = null ,
115+ ?string $ intellixTrust = null ,
116+ ?Carbon $ created_at = null ,
117+ ?Carbon $ updated_at = null ,
120118 ?Collection $ fields = null ,
121119 ?Collection $ suggestions = null ,
122- ): self
123- {
124- return new static (
120+ ): self {
121+ return new self (
125122 id: $ id ?? random_int (1 , 999999 ),
126123 file_size: $ file_size ?? random_int (1000 , 999999 ),
127124 total_pages: $ total_pages ?? random_int (1 , 100 ),
128125 title: $ title ?? 'Fake Title ' ,
129126 extension: $ extension ?? '.pdf ' ,
130127 content_type: $ content_type ?? 'application/pdf ' ,
131- file_cabinet_id: $ file_cabinet_id ?? (string )Str::uuid (),
128+ file_cabinet_id: $ file_cabinet_id ?? (string ) Str::uuid (),
132129 intellixTrust: $ intellixTrust ?? 'Red ' ,
133130 created_at: $ created_at ?? now ()->subDay (),
134131 updated_at: $ updated_at ?? now (),
135132 fields: $ fields ?? collect ([
136- DocumentField::fake (),
137- DocumentField::fake (),
138- ]),
133+ DocumentField::fake (),
134+ DocumentField::fake (),
135+ ]),
139136 suggestions: $ suggestions ?? null
140137 );
141138 }
0 commit comments