Commit 27e99d4c authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Update dockerfile

parent b8955048
Pipeline #13194 failed with stages
in 1 minute
...@@ -2,6 +2,9 @@ FROM php:8.0-fpm-alpine ...@@ -2,6 +2,9 @@ FROM php:8.0-fpm-alpine
ENV PROJECT_DIR /var/www ENV PROJECT_DIR /var/www
# Make php-cs-fixer work with PHP 8 as it is not fully supported yet
ENV PHP_CS_FIXER_IGNORE_ENV 1
# Set working directory # Set working directory
WORKDIR ${PROJECT_DIR} WORKDIR ${PROJECT_DIR}
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Source\Entities; namespace Source\Entities;
use Carbon\Carbon; use Carbon\Carbon;
use JetBrains\PhpStorm\Pure; use JetBrains\PhpStorm\Pure;
......
...@@ -32,9 +32,9 @@ class InMemoryOverridesRepository implements OverridesRepository ...@@ -32,9 +32,9 @@ class InMemoryOverridesRepository implements OverridesRepository
if ($begin && $end) { if ($begin && $end) {
$include = $include && $include = $include &&
($begin->lessThanOrEqualTo($override->getEnd()) && $end->greaterThanOrEqualTo($override->getBegin())); ($begin->lessThanOrEqualTo($override->getEnd()) && $end->greaterThanOrEqualTo($override->getBegin()));
} else if ($begin) { } elseif ($begin) {
$include = $include && $begin->lessThanOrEqualTo($override->getEnd()); $include = $include && $begin->lessThanOrEqualTo($override->getEnd());
} else if ($end) { } elseif ($end) {
$include = $include && $end->greaterThanOrEqualTo($override->getBegin()); $include = $include && $end->greaterThanOrEqualTo($override->getBegin());
} }
......
...@@ -65,11 +65,11 @@ class ScheduleEvents implements ScheduleEventsUseCase ...@@ -65,11 +65,11 @@ class ScheduleEvents implements ScheduleEventsUseCase
$overrides = $this->overrides->activeOverridesForDoorBetween($doorId, $begin, $end); $overrides = $this->overrides->activeOverridesForDoorBetween($doorId, $begin, $end);
// Split overrides into open/closed types // Split overrides into open/closed types
$closed = SplittableDate::mergeSet( $closed = SplittableDate::mergeSet(
array_filter($overrides, static fn(Override $o) => $o->hasTypeOf(Override::TYPE_LOCKED)) array_filter($overrides, static fn (Override $o) => $o->hasTypeOf(Override::TYPE_LOCKED))
); );
$open = SplittableDate::mergeSet( $open = SplittableDate::mergeSet(
array_filter($overrides, static fn(Override $o) => $o->hasTypeOf(Override::TYPE_OPEN)) array_filter($overrides, static fn (Override $o) => $o->hasTypeOf(Override::TYPE_OPEN))
); );
$openSchedules = $this->doorSchedules->getSchedulesForDoorBetween($doorId, $begin, $end, Schedule::TYPE_OPEN_MODE); $openSchedules = $this->doorSchedules->getSchedulesForDoorBetween($doorId, $begin, $end, Schedule::TYPE_OPEN_MODE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment