mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
parent
1298814521
commit
3cdc267809
3 changed files with 2 additions and 3 deletions
|
|
@ -6,7 +6,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
|
|
||||||
class Playlist extends Model
|
class Playlist extends Model
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class IcalResponseParser implements ResponseParser
|
||||||
$filteredEvents = array_values(array_filter($events, function (array $event) use ($windowStart, $windowEnd): bool {
|
$filteredEvents = array_values(array_filter($events, function (array $event) use ($windowStart, $windowEnd): bool {
|
||||||
$startDate = $this->asCarbon($event['DTSTART'] ?? null);
|
$startDate = $this->asCarbon($event['DTSTART'] ?? null);
|
||||||
|
|
||||||
if (!$startDate instanceof \Carbon\Carbon) {
|
if (! $startDate instanceof Carbon) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class DevicePaletteFactory extends Factory
|
||||||
public function definition(): array
|
public function definition(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => 'test-' . $this->faker->unique()->slug(),
|
'id' => 'test-'.$this->faker->unique()->slug(),
|
||||||
'name' => $this->faker->words(3, true),
|
'name' => $this->faker->words(3, true),
|
||||||
'grays' => $this->faker->randomElement([2, 4, 16, 256]),
|
'grays' => $this->faker->randomElement([2, 4, 16, 256]),
|
||||||
'colors' => $this->faker->optional()->passthrough([
|
'colors' => $this->faker->optional()->passthrough([
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue