Skip to content

Commit c4cec15

Browse files
committed
Use container instead of passing
1 parent e3f9894 commit c4cec15

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/StaticPHP/Runtime/Executor/WindowsCMakeExecutor.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,10 @@ class WindowsCMakeExecutor extends Executor
3535

3636
protected PackageInstaller $installer;
3737

38-
public function __construct(protected LibraryPackage $package, ?PackageBuilder $builder = null)
38+
public function __construct(protected LibraryPackage $package)
3939
{
4040
parent::__construct($this->package);
41-
if ($builder !== null) {
42-
$this->builder = $builder;
43-
} elseif (ApplicationContext::has(PackageBuilder::class)) {
44-
$this->builder = ApplicationContext::get(PackageBuilder::class);
45-
} else {
46-
throw new SPCInternalException('PackageBuilder not found in ApplicationContext.');
47-
}
41+
$this->builder = ApplicationContext::get(PackageBuilder::class);
4842
$this->installer = ApplicationContext::get(PackageInstaller::class);
4943
$this->initCmd();
5044

0 commit comments

Comments
 (0)