2424
2525class CloudTasksQueue extends LaravelQueue implements QueueContract
2626{
27- private Closure | array $ headers = [];
27+ private Closure | array $ headers = [];
2828 private static ?Closure $ handlerUrlCallback = null ;
2929
3030 public function __construct (public array $ config , public CloudTasksClient $ client , public $ dispatchAfterCommit = false )
@@ -160,7 +160,7 @@ private function taskName(string $queueName, array $payload): string
160160 $ this ->config ['project ' ],
161161 $ this ->config ['location ' ],
162162 $ queueName ,
163- $ displayName .'- ' . bin2hex (random_bytes (8 )),
163+ $ displayName .'- ' .bin2hex (random_bytes (8 )),
164164 );
165165 }
166166
@@ -180,8 +180,7 @@ private function enrichPayloadWithInternalData(
180180 string $ queueName ,
181181 string $ taskName ,
182182 string $ connectionName ,
183- ): array
184- {
183+ ): array {
185184 $ payload ['internal ' ] = [
186185 'attempts ' => $ payload ['internal ' ]['attempts ' ] ?? 0 ,
187186 'queue ' => $ queueName ,
@@ -197,7 +196,7 @@ public function addPayloadToTask(array $payload, Task $task, mixed $job): Task
197196 {
198197 $ headers = value ($ this ->headers , $ payload ) ?: [];
199198
200- if (!empty ($ this ->config ['app_engine ' ])) {
199+ if (! empty ($ this ->config ['app_engine ' ])) {
201200 $ path = \Safe \parse_url (route ('cloud-tasks.handle-task ' ), PHP_URL_PATH );
202201
203202 $ appEngineRequest = new AppEngineHttpRequest ();
@@ -206,7 +205,7 @@ public function addPayloadToTask(array $payload, Task $task, mixed $job): Task
206205 $ appEngineRequest ->setBody (json_encode ($ payload ));
207206 $ appEngineRequest ->setHeaders ($ headers );
208207
209- if (!empty ($ service = $ this ->config ['app_engine_service ' ])) {
208+ if (! empty ($ service = $ this ->config ['app_engine_service ' ])) {
210209 $ routing = new AppEngineRouting ();
211210 $ routing ->setService ($ service );
212211 $ appEngineRequest ->setAppEngineRouting ($ routing );
@@ -264,14 +263,14 @@ public function getHandler(mixed $job): string
264263
265264 $ handler = rtrim ($ this ->config ['handler ' ], '/ ' );
266265
267- if (str_ends_with ($ handler , '/ ' . config ('cloud-tasks.uri ' ))) {
266+ if (str_ends_with ($ handler , '/ ' .config ('cloud-tasks.uri ' ))) {
268267 return $ handler ;
269268 }
270269
271- return $ handler .'/ ' . config ('cloud-tasks.uri ' );
270+ return $ handler .'/ ' .config ('cloud-tasks.uri ' );
272271 }
273272
274- public function setTaskHeaders (Closure | array $ headers ): void
273+ public function setTaskHeaders (Closure | array $ headers ): void
275274 {
276275 $ this ->headers = $ headers ;
277276 }
0 commit comments