Skip to content

Commit 1e30945

Browse files
committed
test: fix failed
1 parent a03dee8 commit 1e30945

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.git-pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ for file in $FILES; do
55
./vendor/bin/phpcs --extensions=php --standard=PSR12 "$file"
66
./vendor/bin/phpmd "$file" text phpmd.xml --exclude vendor
77
done
8+
./vendor/bin/phpunit tests/

app/Commands/WithCoding.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@ private function setCodingApi(): void
1717
if (is_null($codingTeamDomain)) {
1818
$codingTeamDomain = config('coding.team_domain') ?? $this->ask('CODING 团队域名:');
1919
}
20-
$this->codingTeamDomain = str_replace('.coding.net', '', $codingTeamDomain);
20+
$this->codingTeamDomain = str_replace('.coding.net', '', "$codingTeamDomain");
2121

22-
$this->codingProjectUri = $this->option('coding_project_uri');
23-
if (is_null($this->codingProjectUri)) {
24-
$this->codingProjectUri = config('coding.project_uri') ?? $this->ask('CODING 项目标识:');
22+
$codingProjectUri = $this->option('coding_project_uri');
23+
if (is_null($codingProjectUri)) {
24+
$codingProjectUri = config('coding.project_uri') ?? $this->ask('CODING 项目标识:');
2525
}
26+
$this->codingProjectUri = "$codingProjectUri";
2627

27-
$this->codingToken = $this->option('coding_token');
28-
if (is_null($this->codingToken)) {
29-
$this->codingToken = config('coding.token') ?? $this->ask('CODING Token:');
28+
$codingToken = $this->option('coding_token');
29+
if (is_null($codingToken)) {
30+
$codingToken = config('coding.token') ?? $this->ask('CODING Token:');
3031
}
32+
$this->codingToken = "$codingToken";
3133
}
3234
}

0 commit comments

Comments
 (0)