Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
],
"require": {
"php": ">=8.0",
"illuminate/database": "^8.43",
"illuminate/support": "^8.43",
"illuminate/collections": "^8.43",
"illuminate/config": "^8.43",
"illuminate/cache": "^8.43",
"symfony/console": "^5.3"
"illuminate/database": "^10.2",
"illuminate/support": "^10.2",
"illuminate/collections": "^10.2",
"illuminate/config": "^10.2",
"illuminate/cache": "^10.2",
"symfony/console": "^6.0.3"
},
"require-dev": {
"mockery/mockery": "^1.4.3",
Expand Down
1 change: 1 addition & 0 deletions src/Migrator/Pipes/CreateNewMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ protected function fillSettings(Metadata $metadata, Collection $models): int
// simply inserting them by each user. We will also point the ID of
// both the Metadata parent and user, along with the default value.
foreach ($models as $model) {
$morphClass = str_replace('\\', '\\\\', $model->getMorphClass());
$affected += Setting::query()->insertUsing(
['metadata_id', 'settable_id', 'settable_type', 'value', 'created_at', 'updated_at'],
$model->newQuery()
Expand Down
12 changes: 6 additions & 6 deletions src/SettingsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public function groups(): static
/**
* Returns the value of a setting.
*
* @param string $name
* @param $name
* @param mixed|null $default
*
* @return \Illuminate\Support\Carbon|\Illuminate\Support\Collection|array|string|int|float|bool|null
*/
public function value(string $name, mixed $default = null): Carbon|Collection|array|string|int|float|bool|null
public function value($name, mixed $default = null): Carbon|Collection|array|string|int|float|bool|null
{
$setting = $this->get($name, $default);

Expand Down Expand Up @@ -99,7 +99,7 @@ public function set(string|array $name, mixed $value = null, bool $force = true)
}

foreach ($name as $key => $setting) {
if (! $instance = $this->get($key)) {
if (!$instance = $this->get($key)) {
throw new RuntimeException("The setting [$key] doesn't exist.");
}

Expand Down Expand Up @@ -152,7 +152,7 @@ public function isEnabled(string $name): bool
*/
public function isDisabled(string $name): bool
{
return ! $this->isEnabled($name);
return !$this->isEnabled($name);
}

/**
Expand Down Expand Up @@ -229,7 +229,7 @@ public function except($keys): static
{
if ($keys instanceof Enumerable) {
$keys = $keys->all();
} elseif (! is_array($keys)) {
} elseif (!is_array($keys)) {
$keys = func_get_args();
}

Expand Down Expand Up @@ -325,4 +325,4 @@ public function __get($key): mixed

return $this->__dynamicget($key);
}
}
}