Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG USER_GID=${USER_UID}
RUN groupadd --gid ${USER_GID} ${USERNAME} && \
useradd -s /bin/bash --uid ${USER_UID} --gid ${USERNAME} -m ${USERNAME}

COPY --from=composer:2.9 /usr/bin/composer /usr/bin/composer
COPY --from=composer:2.10 /usr/bin/composer /usr/bin/composer

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \
bash /tmp/library-scripts/dev.sh "${USERNAME}"
Expand Down
4 changes: 2 additions & 2 deletions src/TestCase/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function expectedOutput(): string
foreach (\explode(PHP_EOL, $this->code) as $line) {
\preg_match("/\/\/\s*@prints\s*(?<text>[^\s].*)$/", $line, $matches);

if (\array_key_exists("text", $matches)) {
if ($matches !== []) {
$expectedOutput[] = $matches["text"];
}
}
Expand Down Expand Up @@ -81,7 +81,7 @@ private static function expectedFailureFromLine(string $line): ?ExpectedFailure
{
\preg_match("/\/\/\s*@throws\s*(?<class>[^ ]+)\s+(?<message>[^\s].*[^\s])\s*/", $line, $matches);

if (!\array_key_exists("class", $matches) || !\array_key_exists("message", $matches)) {
if ($matches === []) {
return null;
}

Expand Down