Skip to content

Commit cd70152

Browse files
tonysmgithub-actions[bot]
authored andcommitted
Fix styling
1 parent c270299 commit cd70152

File tree

8 files changed

+11
-10
lines changed

8 files changed

+11
-10
lines changed

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
return RectorConfig::configure()
99
->withPaths([
10-
__DIR__ . '/src',
11-
__DIR__ . '/tests',
10+
__DIR__.'/src',
11+
__DIR__.'/tests',
1212
])
1313
->withPreparedSets(
1414
deadCode: true,

src/Actions/FragmentByCanonicalizingAttachmentGalleries.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class FragmentByCanonicalizingAttachmentGalleries
1515
{
1616
public function __invoke($content, callable $next)
1717
{
18-
return $next($this->fragmentByReplacingAttachmentGalleryNodes($content, fn(DOMElement $node): \DOMDocument => HtmlConversion::document(sprintf(
18+
return $next($this->fragmentByReplacingAttachmentGalleryNodes($content, fn (DOMElement $node): \DOMDocument => HtmlConversion::document(sprintf(
1919
'<%s>%s</%s>',
2020
AttachmentGallery::TAG_NAME,
2121
$this->getInnerHtmlOfNode($node),

src/Attachment.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public static function fromAttributes(array $attributes = [], ?AttachableContrac
5454
if (($node = static::nodeFromAttributes($attributes)) instanceof \DOMElement) {
5555
return static::fromNode($node, $attachable);
5656
}
57+
5758
return null;
5859
}
5960

src/Attachments/Minification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ trait Minification
1010
{
1111
public static function fragmentByMinifyingAttachments($content)
1212
{
13-
return Fragment::wrap($content)->replace(Attachment::$TAG_NAME, fn(DOMElement $node): \DOMElement => $node->cloneNode(deep: false));
13+
return Fragment::wrap($content)->replace(Attachment::$TAG_NAME, fn (DOMElement $node): \DOMElement => $node->cloneNode(deep: false));
1414
}
1515
}

src/Attachments/TrixConvertion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ trait TrixConvertion
1010
{
1111
public static function fragmentByConvertingTrixAttachments($content)
1212
{
13-
return Fragment::wrap($content)->replace(TrixAttachment::$SELECTOR, fn(DOMElement $node) => static::fromTrixAttachment(new TrixAttachment($node)));
13+
return Fragment::wrap($content)->replace(TrixAttachment::$SELECTOR, fn (DOMElement $node) => static::fromTrixAttachment(new TrixAttachment($node)));
1414
}
1515

1616
public static function fragmentByConvertingTrixContent($content)
1717
{
18-
return Fragment::wrap($content)->replace(TrixAttachment::$SELECTOR, fn(DOMElement $node) => static::fromTrixAttachment(new TrixAttachment($node)));
18+
return Fragment::wrap($content)->replace(TrixAttachment::$SELECTOR, fn (DOMElement $node) => static::fromTrixAttachment(new TrixAttachment($node)));
1919
}
2020

2121
public static function fromTrixAttachment(TrixAttachment $attachment)

src/Commands/InstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private function jsDependencies(): array
9999

100100
private function updateJsDependenciesWithNpm(): void
101101
{
102-
static::updateNodePackages(fn($packages): array => $this->jsDependencies() + $packages);
102+
static::updateNodePackages(fn ($packages): array => $this->jsDependencies() + $packages);
103103

104104
if (file_exists(base_path('pnpm-lock.yaml'))) {
105105
$this->runCommands(['pnpm install', 'pnpm run build']);

src/Content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function galleryAttachments(): Collection
8989

9090
public function renderAttachments(array $options, callable $callback): static
9191
{
92-
$content = $this->fragment->replace(Attachment::$SELECTOR, fn(DOMNode $node) => $callback($this->attachmentForNode($node, $options)));
92+
$content = $this->fragment->replace(Attachment::$SELECTOR, fn (DOMNode $node) => $callback($this->attachmentForNode($node, $options)));
9393

9494
return new static($content, ['canonicalize' => false]);
9595
}
@@ -135,7 +135,7 @@ public function renderWithAttachments(): string
135135

136136
public function renderAttachmentGalleries(callable $renderer): static
137137
{
138-
$content = (new FragmentByCanonicalizingAttachmentGalleries)->fragmentByReplacingAttachmentGalleryNodes($this->fragment, fn(DOMElement $node): \DOMDocument => HtmlConversion::document($renderer($this->attachmentGalleryForNode($node))));
138+
$content = (new FragmentByCanonicalizingAttachmentGalleries)->fragmentByReplacingAttachmentGalleryNodes($this->fragment, fn (DOMElement $node): \DOMDocument => HtmlConversion::document($renderer($this->attachmentGalleryForNode($node))));
139139

140140
return new static($content, ['canonicalize' => false]);
141141
}

tests/FragmentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function replaces_fragments(): void
6262

6363
$fragment = Fragment::wrap($source);
6464

65-
$newFragment = $fragment->replace('//h1', fn(DOMNode $node): \Tonysm\RichTextLaravel\Fragment => HtmlConversion::fragmentForHtml('<h1>new title</h1>'));
65+
$newFragment = $fragment->replace('//h1', fn (DOMNode $node): \Tonysm\RichTextLaravel\Fragment => HtmlConversion::fragmentForHtml('<h1>new title</h1>'));
6666

6767
$this->assertNotSame($fragment, $newFragment);
6868
$this->assertStringNotContainsString('<h1>old title</h1>', $newFragment->toHtml());

0 commit comments

Comments
 (0)