File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ public function getAuthenticatedUser(): User
105105
106106 /**
107107 * Search for projects by name
108- * @param string $query
108+ * @param string $query The search query (max length: 100 characters)
109109 * @return ProjectListItem[]
110110 * @throws ApiException
111111 */
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ public function getData(): UserModel
3030 */
3131 public function getProjects (): array
3232 {
33- return array_filter ($ this ->client ->listProjects (), function (ProjectListItem $ project ): bool {
33+ return array_values ( array_filter ($ this ->client ->listProjects (), function (ProjectListItem $ project ): bool {
3434 return $ project ->getData ()->getOwner () === $ this ->data ->getName ();
35- });
35+ })) ;
3636 }
3737}
Original file line number Diff line number Diff line change 22
33namespace Aternos \BlobBuild \Test \Unit ;
44
5- use Aternos \BlobBuild \Client \Project ;
5+
6+ use Aternos \BlobBuild \Client \ProjectListItem ;
67
78class UserTest extends UnitTestCase
89{
@@ -21,7 +22,7 @@ public function testGetAuthenticatedUser(): void
2122 $ projects = $ user ->getProjects ();
2223 $ this ->assertCount (1 , $ projects );
2324 $ project = $ projects [0 ];
24- $ this ->assertInstanceOf (Project ::class, $ project );
25+ $ this ->assertInstanceOf (ProjectListItem ::class, $ project );
2526 $ this ->assertSoundMuffler ($ project ->getData ());
2627 }
2728}
You can’t perform that action at this time.
0 commit comments