2424
2525class CloudTasksQueue extends LaravelQueue implements QueueContract
2626{
27- private Closure | array $ headers = [];
27+ private Closure | array $ headers = [];
2828
2929 public function __construct (public array $ config , public CloudTasksClient $ client , public $ dispatchAfterCommit = false )
3030 {
@@ -152,7 +152,7 @@ private function taskName(string $queueName, array $payload): string
152152 $ this ->config ['project ' ],
153153 $ this ->config ['location ' ],
154154 $ queueName ,
155- $ displayName .'- ' . bin2hex (random_bytes (8 )),
155+ $ displayName .'- ' .bin2hex (random_bytes (8 )),
156156 );
157157 }
158158
@@ -172,8 +172,7 @@ private function enrichPayloadWithInternalData(
172172 string $ queueName ,
173173 string $ taskName ,
174174 string $ connectionName ,
175- ): array
176- {
175+ ): array {
177176 $ payload ['internal ' ] = [
178177 'attempts ' => $ payload ['internal ' ]['attempts ' ] ?? 0 ,
179178 'queue ' => $ queueName ,
@@ -188,7 +187,7 @@ public function addPayloadToTask(array $payload, Task $task): Task
188187 {
189188 $ headers = value ($ this ->headers , $ payload ) ?: [];
190189
191- if (!empty ($ this ->config ['app_engine ' ])) {
190+ if (! empty ($ this ->config ['app_engine ' ])) {
192191 $ path = \Safe \parse_url (route ('cloud-tasks.handle-task ' ), PHP_URL_PATH );
193192
194193 $ appEngineRequest = new AppEngineHttpRequest ();
@@ -197,7 +196,7 @@ public function addPayloadToTask(array $payload, Task $task): Task
197196 $ appEngineRequest ->setBody (json_encode ($ payload ));
198197 $ appEngineRequest ->setHeaders ($ headers );
199198
200- if (!empty ($ service = $ this ->config ['app_engine_service ' ])) {
199+ if (! empty ($ service = $ this ->config ['app_engine_service ' ])) {
201200 $ routing = new AppEngineRouting ();
202201 $ routing ->setService ($ service );
203202 $ appEngineRequest ->setAppEngineRouting ($ routing );
@@ -250,14 +249,14 @@ public function getHandler(): string
250249
251250 $ handler = rtrim ($ this ->config ['handler ' ], '/ ' );
252251
253- if (str_ends_with ($ handler , '/ ' . config ('cloud-tasks.uri ' ))) {
252+ if (str_ends_with ($ handler , '/ ' .config ('cloud-tasks.uri ' ))) {
254253 return $ handler ;
255254 }
256255
257- return $ handler .'/ ' . config ('cloud-tasks.uri ' );
256+ return $ handler .'/ ' .config ('cloud-tasks.uri ' );
258257 }
259258
260- public function setTaskHeaders (Closure | array $ headers ): void
259+ public function setTaskHeaders (Closure | array $ headers ): void
261260 {
262261 $ this ->headers = $ headers ;
263262 }
0 commit comments