Skip to content

Commit 42082d6

Browse files
tonysmgithub-actions[bot]
authored andcommitted
Fix styling
1 parent ee815a3 commit 42082d6

16 files changed

+39
-40
lines changed

src/Broadcasters/Broadcaster.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ public function broadcast(
2020
array $channels,
2121
bool $later,
2222
string $action,
23-
string $target = null,
24-
string $targets = null,
25-
string $partial = null,
23+
?string $target = null,
24+
?string $targets = null,
25+
?string $partial = null,
2626
?array $partialData = [],
27-
string $inlineContent = null,
27+
?string $inlineContent = null,
2828
bool $escapeInlineContent = true,
2929
array $attributes = [],
30-
string $exceptSocket = null,
30+
?string $exceptSocket = null,
3131
): void;
3232
}

src/Broadcasters/LaravelBroadcaster.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ public function broadcast(
2121
array $channels,
2222
bool $later,
2323
string $action,
24-
string $target = null,
25-
string $targets = null,
26-
string $partial = null,
24+
?string $target = null,
25+
?string $targets = null,
26+
?string $partial = null,
2727
?array $partialData = [],
28-
string $inlineContent = null,
28+
?string $inlineContent = null,
2929
bool $escapeInlineContent = true,
3030
array $attributes = [],
31-
string $exceptSocket = null,
31+
?string $exceptSocket = null,
3232
): void {
3333
$job = new BroadcastAction(
3434
$channels,

src/Broadcasting/Factory.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,42 +52,42 @@ public function fake()
5252
return $this;
5353
}
5454

55-
public function broadcastAppend($content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
55+
public function broadcastAppend($content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
5656
{
5757
return $this->broadcastAction('append', $content, $target, $targets, $channel, $attributes);
5858
}
5959

60-
public function broadcastPrepend($content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
60+
public function broadcastPrepend($content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
6161
{
6262
return $this->broadcastAction('prepend', $content, $target, $targets, $channel, $attributes);
6363
}
6464

65-
public function broadcastBefore($content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
65+
public function broadcastBefore($content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
6666
{
6767
return $this->broadcastAction('before', $content, $target, $targets, $channel, $attributes);
6868
}
6969

70-
public function broadcastAfter($content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
70+
public function broadcastAfter($content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
7171
{
7272
return $this->broadcastAction('after', $content, $target, $targets, $channel, $attributes);
7373
}
7474

75-
public function broadcastUpdate($content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
75+
public function broadcastUpdate($content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
7676
{
7777
return $this->broadcastAction('update', $content, $target, $targets, $channel, $attributes);
7878
}
7979

80-
public function broadcastReplace($content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
80+
public function broadcastReplace($content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
8181
{
8282
return $this->broadcastAction('replace', $content, $target, $targets, $channel, $attributes);
8383
}
8484

85-
public function broadcastRemove(Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
85+
public function broadcastRemove(Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
8686
{
8787
return $this->broadcastAction('remove', null, $target, $targets, $channel, $attributes);
8888
}
8989

90-
public function broadcastRefresh(Channel|Model|Collection|array|string $channel = null)
90+
public function broadcastRefresh(Channel|Model|Collection|array|string|null $channel = null)
9191
{
9292
return $this->broadcastAction(
9393
action: 'refresh',
@@ -98,7 +98,7 @@ public function broadcastRefresh(Channel|Model|Collection|array|string $channel
9898
));
9999
}
100100

101-
public function broadcastAction(string $action, $content = null, Model|string $target = null, string $targets = null, Channel|Model|Collection|array|string $channel = null, array $attributes = [])
101+
public function broadcastAction(string $action, $content = null, Model|string|null $target = null, ?string $targets = null, Channel|Model|Collection|array|string|null $channel = null, array $attributes = [])
102102
{
103103
$broadcast = new PendingBroadcast(
104104
channels: $channel ? $this->resolveChannels($channel) : [],

src/Broadcasting/PendingBroadcast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class PendingBroadcast
7070
*/
7171
protected array $deferredCancelCallbacks = [];
7272

73-
public function __construct(array $channels, string $action, Rendering $rendering, string $target = null, string $targets = null, array $attributes = [])
73+
public function __construct(array $channels, string $action, Rendering $rendering, ?string $target = null, ?string $targets = null, array $attributes = [])
7474
{
7575
$this->action = $action;
7676
$this->target = $target;

src/Broadcasting/Rendering.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Rendering
1717

1818
public bool $escapeInlineContent = true;
1919

20-
public function __construct(string $partial = null, ?array $data = [], string $inlineContent = null, ?bool $escapeInlineContent = true)
20+
public function __construct(?string $partial = null, ?array $data = [], ?string $inlineContent = null, ?bool $escapeInlineContent = true)
2121
{
2222
$this->partial = $partial;
2323
$this->data = $data;

src/Events/TurboStreamBroadcast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TurboStreamBroadcast implements ShouldBroadcastNow
3131

3232
public bool $escapeInlineContent = true;
3333

34-
public function __construct(array $channels, string $action, string $target = null, string $targets = null, string $partial = null, ?array $partialData = [], string $inlineContent = null, bool $escapeInlineContent = true, array $attributes = [])
34+
public function __construct(array $channels, string $action, ?string $target = null, ?string $targets = null, ?string $partial = null, ?array $partialData = [], ?string $inlineContent = null, bool $escapeInlineContent = true, array $attributes = [])
3535
{
3636
$this->channels = $channels;
3737
$this->action = $action;

src/Http/Middleware/TurboMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function turboVisit($request)
151151
/**
152152
* @param \Illuminate\Http\Request $request
153153
*/
154-
private function guessFormRedirectUrl($request, string $defaultRedirectUrl = null)
154+
private function guessFormRedirectUrl($request, ?string $defaultRedirectUrl = null)
155155
{
156156
if ($this->inExceptArray($request)) {
157157
return $defaultRedirectUrl;

src/Http/PendingTurboStreamResponse.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PendingTurboStreamResponse implements Htmlable, Renderable, Responsable
3535

3636
private array $useCustomAttributes = [];
3737

38-
public static function forModel(Model $model, string $action = null): self
38+
public static function forModel(Model $model, ?string $action = null): self
3939
{
4040
$builder = new self();
4141

@@ -242,7 +242,7 @@ public function refresh(): self
242242
->attributes(array_filter(['request-id' => Turbo::currentRequestId()]));
243243
}
244244

245-
private function buildAction(string $action, Model|string $target = null, $content = null, Rendering $rendering = null, array $attributes = [])
245+
private function buildAction(string $action, Model|string|null $target = null, $content = null, ?Rendering $rendering = null, array $attributes = [])
246246
{
247247
$this->useAction = $action;
248248
$this->useTarget = $target instanceof Model ? $this->resolveTargetFor($target) : $target;
@@ -265,7 +265,7 @@ private function buildActionAll(string $action, Model|string $targets, $content
265265
return $this;
266266
}
267267

268-
public function broadcastTo($channel, callable $callback = null)
268+
public function broadcastTo($channel, ?callable $callback = null)
269269
{
270270
$callback = $callback ?? function () {
271271
};
@@ -275,7 +275,7 @@ public function broadcastTo($channel, callable $callback = null)
275275
});
276276
}
277277

278-
public function broadcastToPrivateChannel($channel, callable $callback = null)
278+
public function broadcastToPrivateChannel($channel, ?callable $callback = null)
279279
{
280280
$callback = $callback ?? function () {
281281
};
@@ -286,7 +286,7 @@ public function broadcastToPrivateChannel($channel, callable $callback = null)
286286
});
287287
}
288288

289-
public function broadcastToPresenceChannel($channel, callable $callback = null)
289+
public function broadcastToPresenceChannel($channel, ?callable $callback = null)
290290
{
291291
$callback = $callback ?? function () {
292292
};

src/Jobs/BroadcastAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class BroadcastAction implements ShouldQueue
3232

3333
public ?string $socket = null;
3434

35-
public function __construct(array $channels, string $action, string $target = null, string $targets = null, string $partial = null, ?array $partialData = [], string $inlineContent = null, bool $escapeInlineContent = true, array $attributes = [], $socket = null)
35+
public function __construct(array $channels, string $action, ?string $target = null, ?string $targets = null, ?string $partial = null, ?array $partialData = [], ?string $inlineContent = null, bool $escapeInlineContent = true, array $attributes = [], $socket = null)
3636
{
3737
$this->channels = $channels;
3838
$this->action = $action;

src/Models/Broadcasts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function asTurboStreamBroadcastingChannel()
170170
return $this->toChannels(Collection::wrap($this->broadcastDefaultStreamables($this->wasRecentlyCreated)));
171171
}
172172

173-
protected function broadcastActionTo($streamables, string $action, Rendering $rendering, string $target = null): PendingBroadcast
173+
protected function broadcastActionTo($streamables, string $action, Rendering $rendering, ?string $target = null): PendingBroadcast
174174
{
175175
return TurboStream::broadcastAction(
176176
action: $action,

0 commit comments

Comments
 (0)