@@ -26,7 +26,7 @@ class GitTest extends UnitTestCase {
2626 * @param bool $with_commits
2727 * Whether to add commits to the repository.
2828 *
29- * @return array{string, Git}
29+ * @return array{string, \DrevOps\VortexInstaller\Utils\ Git}
3030 * Array with temp directory path and Git object.
3131 */
3232 protected function createTempGitRepo (bool $ with_remote = FALSE , bool $ with_commits = FALSE ): array {
@@ -123,7 +123,8 @@ public function testRun(): void {
123123 // Test with another command.
124124 $ result = $ repo ->run ('log ' , '--oneline ' , '--max-count=1 ' );
125125 $ this ->assertInstanceOf (RunnerResult::class, $ result );
126- } finally {
126+ }
127+ finally {
127128 $ this ->cleanupTempGitRepo ($ temp_dir );
128129 }
129130 }
@@ -134,7 +135,8 @@ public function testListRemotesEmpty(): void {
134135 try {
135136 $ remotes = $ repo ->listRemotes ();
136137 $ this ->assertEmpty ($ remotes );
137- } finally {
138+ }
139+ finally {
138140 $ this ->cleanupTempGitRepo ($ temp_dir );
139141 }
140142 }
@@ -148,7 +150,8 @@ public function testListRemotesWithRemotes(): void {
148150 $ this ->assertArrayHasKey ('upstream ' , $ remotes );
149151 $ this ->assertEquals ('https://github.com/owner/repo.git ' , $ remotes ['origin ' ]);
150152 $ this ->assertEquals ('https://github.com/upstream/repo.git ' , $ remotes ['upstream ' ]);
151- } finally {
153+ }
154+ finally {
152155 $ this ->cleanupTempGitRepo ($ temp_dir );
153156 }
154157 }
@@ -162,7 +165,8 @@ public function testGetTrackedFilesNonGitDirectory(): void {
162165
163166 try {
164167 Git::getTrackedFiles ($ temp_dir );
165- } finally {
168+ }
169+ finally {
166170 rmdir ($ temp_dir );
167171 }
168172 }
@@ -173,7 +177,8 @@ public function testGetTrackedFilesEmptyRepo(): void {
173177 try {
174178 $ tracked = Git::getTrackedFiles ($ temp_dir );
175179 $ this ->assertEmpty ($ tracked );
176- } finally {
180+ }
181+ finally {
177182 $ this ->cleanupTempGitRepo ($ temp_dir );
178183 }
179184 }
@@ -186,7 +191,8 @@ public function testGetTrackedFilesWithFiles(): void {
186191 $ this ->assertCount (2 , $ tracked );
187192 $ this ->assertContains ($ temp_dir . DIRECTORY_SEPARATOR . 'test.txt ' , $ tracked );
188193 $ this ->assertContains ($ temp_dir . DIRECTORY_SEPARATOR . 'another.txt ' , $ tracked );
189- } finally {
194+ }
195+ finally {
190196 $ this ->cleanupTempGitRepo ($ temp_dir );
191197 }
192198 }
@@ -198,7 +204,8 @@ public function testGetLastShortCommitId(): void {
198204 $ short_id = $ repo ->getLastShortCommitId ();
199205 $ this ->assertEquals (7 , strlen ($ short_id ));
200206 $ this ->assertMatchesRegularExpression ('/^[0-9a-f]{7}$/ ' , $ short_id );
201- } finally {
207+ }
208+ finally {
202209 $ this ->cleanupTempGitRepo ($ temp_dir );
203210 }
204211 }
0 commit comments