Skip to content

Commit 5f4e2aa

Browse files
committed
make condition more compact
1 parent 256353e commit 5f4e2aa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Asset/EntrypointLookup.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,8 @@ private function getEntriesData(): array
117117
}
118118

119119
if (!file_exists($this->entrypointJsonPath)) {
120-
if ($this->strictMode) {
121-
throw new \InvalidArgumentException(sprintf('Could not find the entrypoints file from Webpack: the file "%s" does not exist.', $this->entrypointJsonPath));
122-
} else {
123-
return [];
124-
}
120+
if (!$this->strictMode) return [];
121+
throw new \InvalidArgumentException(sprintf('Could not find the entrypoints file from Webpack: the file "%s" does not exist.', $this->entrypointJsonPath));
125122
}
126123

127124
$this->entriesData = json_decode(file_get_contents($this->entrypointJsonPath), true);

0 commit comments

Comments
 (0)