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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],

"require": {
"php": ">=8.0",
"php": ">=8.2",
"phpgt/cli": "^1.3.5"
},
"require-dev": {
Expand Down
101 changes: 51 additions & 50 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<rule ref="Generic.Files.OneObjectStructurePerFile" />
<rule ref="Generic.Files.OneTraitPerFile" />
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<rule ref="Generic.Formatting.NoSpaceAfterCast" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Generic.Metrics.CyclomaticComplexity" />
Expand Down
2 changes: 1 addition & 1 deletion phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="exceptions" value="a,b,i" />
<property name="exceptions" value="a,b,i,dt" />
</properties>
</rule>
<rule ref="rulesets/naming.xml/ShortMethodName">
Expand Down
10 changes: 8 additions & 2 deletions src/Cli/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class StartCommand extends Command {
private bool $log404ToErrorLog = true;

// phpcs:disable Generic.Metrics.CyclomaticComplexity
public function run(?ArgumentValueList $arguments = null):void {
public function run(?ArgumentValueList $arguments = null):int {
$goPath = implode(DIRECTORY_SEPARATOR, [
"vendor",
"phpgt",
Expand All @@ -30,7 +30,7 @@ public function run(?ArgumentValueList $arguments = null):void {
"Error: Current directory is not a WebEngine project",
Stream::ERROR
);
return;
return 1;
}
$this->loadLoggerOutputConfig();

Expand Down Expand Up @@ -80,6 +80,8 @@ public function run(?ArgumentValueList $arguments = null):void {
usleep(250000); // 1/4 second
}
while($process->isRunning());

return 2;
}

public function getName():string {
Expand Down Expand Up @@ -150,6 +152,10 @@ private function buildCommand(
return $cmd;
}

/**
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
* @SuppressWarnings("PHPMD.NPathComplexity")
*/
private function filterErrorOutput(string $errorOutput):string {
if($errorOutput === "") {
return "";
Expand Down
Loading