From e53cd48aaa17db37b7d33082977b9bc7aaddf7cb Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Thu, 23 Nov 2023 13:47:15 +0100 Subject: [PATCH] Simplify code in Executable.php --- webapp/src/Entity/Executable.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/webapp/src/Entity/Executable.php b/webapp/src/Entity/Executable.php index 3203d23004..2beff3a635 100644 --- a/webapp/src/Entity/Executable.php +++ b/webapp/src/Entity/Executable.php @@ -187,10 +187,8 @@ public function getZipfileContent(string $tempdir): string */ public function checkUsed(array $configScripts): bool { - foreach ($configScripts as $config_script) { - if ($this->execid === $config_script) { - return true; - } + if (in_array($this->execid, $configScripts, true)) { + return true; } if (count($this->problems_compare) || count($this->problems_run)) { return true;