Skip to content

Commit df981bb

Browse files
committed
rector
1 parent 39ecdf0 commit df981bb

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

app/Actions/Projects/CreateProject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CreateProject
1414
public function create(User $user, array $input): Project
1515
{
1616
if (isset($input['name'])) {
17-
$input['name'] = strtolower($input['name']);
17+
$input['name'] = strtolower((string) $input['name']);
1818
}
1919

2020
$this->validate($input);

app/Actions/Projects/UpdateProject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class UpdateProject
1414
public function update(Project $project, array $input): Project
1515
{
1616
if (isset($input['name'])) {
17-
$input['name'] = strtolower($input['name']);
17+
$input['name'] = strtolower((string) $input['name']);
1818
}
1919

2020
$this->validate($project, $input);

app/Models/ServerLog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function getContent(?int $lines = null): ?string
140140
}
141141

142142
if (Storage::disk($this->disk)->exists($this->name)) {
143-
if ($lines) {
143+
if ($lines !== null && $lines !== 0) {
144144
return tail(Storage::disk($this->disk)->path($this->name), $lines);
145145
}
146146

app/ServerProviders/DigitalOcean.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private function getImageId(string $os, string $region): int
221221
$images = $result['images'] ?? []; // Ensure $images is an array
222222

223223
$image = collect($images)
224-
->filter(fn (array $image): bool => in_array($region, $image['regions']) && str_contains((string) $image['name'], (string) $version)
224+
->filter(fn (array $image): bool => in_array($region, $image['regions']) && str_contains($image['name'], (string) $version)
225225
)
226226
->where('distribution', 'Ubuntu')
227227
->where('status', 'available')

app/Support/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function show_vito_version(): string
4444

4545
function convert_time_format(string $string): string
4646
{
47-
$string = preg_replace('/(\d+)m/', '$1 minutes', (string) $string);
47+
$string = preg_replace('/(\d+)m/', '$1 minutes', $string);
4848
$string = preg_replace('/(\d+)s/', '$1 seconds', (string) $string);
4949
$string = preg_replace('/(\d+)d/', '$1 days', (string) $string);
5050

0 commit comments

Comments
 (0)