Skip to content

Commit 7fa2dee

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 18ee375 + d934553 commit 7fa2dee

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `inspirecms-core` will be documented in this file.
44

5+
## 0.0.53 - 2025-05-20
6+
7+
**Full Changelog**: https://github.com/solutionforest/Inspirecms-core/compare/0.0.52...0.0.53
8+
59
## 0.0.52 - 2025-05-13
610

711
### What's Changed

src/Commands/ImportDefaultData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ protected function publishRouteDefinition(): void
184184
$routeFile = base_path('routes/web.php');
185185

186186
// Check file exists and contains the definition
187-
if (file_exists($routeFile) && !Str::contains(file_get_contents($routeFile), 'InspireCms::routes()')) {
187+
if (file_exists($routeFile) && ! Str::contains(file_get_contents($routeFile), 'InspireCms::routes()')) {
188188
// Append at the end of the file
189189
file_put_contents($routeFile, PHP_EOL . $this->cmsRouteDefinition(), FILE_APPEND);
190190
}

src/Content/DefaultSegmentProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getSegments($content)
7070
return $slugs;
7171
}
7272

73-
public function getRouteSegmentWithPrefix($slug, ... $prefixes)
73+
public function getRouteSegmentWithPrefix($slug, ...$prefixes)
7474
{
7575
$prefixes = collect(is_string($prefixes) ? [$prefixes] : $prefixes)
7676
->flatten()

src/Content/SegmentProviderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ public function getSegments($content);
3232
/**
3333
* Retrieves a route segment based on the given slug and prefixes.
3434
*
35-
* @param string $slug The slug to use for the route segment
36-
* @param string|string[] ...$prefixes Variable number of prefixes to apply to the route segment
35+
* @param string $slug The slug to use for the route segment
36+
* @param string|string[] ...$prefixes Variable number of prefixes to apply to the route segment
3737
* @return string
3838
*/
39-
public function getRouteSegmentWithPrefix($slug, ... $prefixes);
39+
public function getRouteSegmentWithPrefix($slug, ...$prefixes);
4040

4141
/**
4242
* @param Model & Content $content

src/Dtos/NavigationDto.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public function toArray(): array
7676
$list = parent::toArray();
7777
$list['children'] = $this->children->map(fn ($child) => $child->toArray())->all();
7878
unset($list['translatableAttributes']);
79+
7980
return $list;
8081
}
8182
}

src/Observers/ContentRouteObserver.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,21 @@ protected function clearCached()
5353
InspireCms::forgetCachedContentRoutes();
5454
}
5555

56-
protected function updateChildrenRoutes(ContentRoute $contentRoute, ?Content $content): void {
56+
protected function updateChildrenRoutes(ContentRoute $contentRoute, ?Content $content): void
57+
{
5758

5859
if (! $contentRoute->is_default_pattern) {
5960
return;
6061
}
61-
62+
6263
$segmentProvider = ContentSegmentFactory::create();
6364

6465
$child = $content->children()
65-
->whereHas('routes', fn ($query) => $query
66-
->where('is_default_pattern', true)
67-
->where('language_id', $contentRoute->language_id)
66+
->whereHas(
67+
'routes',
68+
fn ($query) => $query
69+
->where('is_default_pattern', true)
70+
->where('language_id', $contentRoute->language_id)
6871
)
6972
->with(['routes'])
7073
->get();

0 commit comments

Comments
 (0)