Skip to content

Commit 816e604

Browse files
committed
Merge branch 'main' into ci
2 parents 7c0303b + 9c879cc commit 816e604

File tree

6 files changed

+433
-21
lines changed

6 files changed

+433
-21
lines changed

app/Analytics/Chart.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace App\Analytics;
44

5-
use Tempest\Support\ArrayHelper;
5+
use Tempest\Support\Arr\ImmutableArray;
66

77
final readonly class Chart
88
{
99
public function __construct(
10-
public ArrayHelper $labels,
11-
public ArrayHelper $values,
10+
public ImmutableArray $labels,
11+
public ImmutableArray $values,
1212
) {
1313
}
1414
}

app/Front/Blog/BlogController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Tempest\Router\Responses\NotFound;
1010
use Tempest\Router\Responses\Ok;
1111
use Tempest\Router\StaticPage;
12-
use Tempest\Support\ArrayHelper;
12+
use Tempest\Support\Arr\ImmutableArray;
1313
use Tempest\View\View;
1414
use Tempest\View\ViewRenderer;
1515

@@ -54,7 +54,7 @@ public function rss(
5454
->addHeader('Content-Type', 'application/xml;charset=UTF-8');
5555
}
5656

57-
private function renderRssFeed(ArrayHelper $posts): string
57+
private function renderRssFeed(ImmutableArray $posts): string
5858
{
5959
ob_start();
6060

app/Front/Blog/BlogRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use League\CommonMark\Extension\FrontMatter\Output\RenderedContentWithFrontMatter;
88
use League\CommonMark\MarkdownConverter;
99
use Spatie\YamlFrontMatter\YamlFrontMatter;
10-
use Tempest\Support\ArrayHelper;
10+
use Tempest\Support\Arr\ImmutableArray;
1111

1212
use function Tempest\map;
1313
use function Tempest\Support\arr;
@@ -20,9 +20,9 @@ public function __construct(
2020
}
2121

2222
/**
23-
* @return ArrayHelper<\App\Front\Blog\BlogPost>
23+
* @return \Tempest\Support\Arr\ImmutableArray<\App\Front\Blog\BlogPost>
2424
*/
25-
public function all(bool $loadContent = false): ArrayHelper
25+
public function all(bool $loadContent = false): ImmutableArray
2626
{
2727
return arr(glob(__DIR__ . '/Content/*.md'))
2828
->reverse()

app/Front/Docs/DocsRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use League\CommonMark\Extension\FrontMatter\Output\RenderedContentWithFrontMatter;
88
use League\CommonMark\MarkdownConverter;
99
use Spatie\YamlFrontMatter\YamlFrontMatter;
10-
use Tempest\Support\ArrayHelper;
10+
use Tempest\Support\Arr\ImmutableArray;
1111

1212
use function Tempest\Support\arr;
1313
use function Tempest\Support\str;
@@ -51,7 +51,7 @@ public function find(string $category, string $slug): ?DocsChapter
5151
/**
5252
* @return \App\Front\Docs\DocsChapter[]
5353
*/
54-
public function all(string $category = '*'): ArrayHelper
54+
public function all(string $category = '*'): ImmutableArray
5555
{
5656
return arr(glob(__DIR__ . "/Content/{$category}/*.md"))
5757
->map(function (string $path) {
@@ -64,7 +64,7 @@ public function all(string $category = '*'): ArrayHelper
6464
return [
6565
'slug' => $matches['slug'],
6666
'index' => $matches['index'],
67-
'category' => $category,
67+
'category' => $category->toString(),
6868
...YamlFrontMatter::parse($content)->matter(),
6969
];
7070
})

app/Front/Docs/DocsView.php

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

55
namespace App\Front\Docs;
66

7-
use Tempest\Support\ArrayHelper;
7+
use Tempest\Support\Arr\ImmutableArray;
88
use Tempest\View\IsView;
99
use Tempest\View\View;
1010

@@ -37,7 +37,7 @@ public function getSubChapters(): array
3737
return $subChapters;
3838
}
3939

40-
public function chaptersForCategory(string $category): ArrayHelper
40+
public function chaptersForCategory(string $category): ImmutableArray
4141
{
4242
return $this->chapterRepository->all($category);
4343
}

0 commit comments

Comments
 (0)