This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,696 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace AppBundle\Organizations; | ||
|
||
interface RepositoryInterface | ||
{ | ||
/** | ||
* @return array | ||
*/ | ||
public function getTeams(); | ||
|
||
/** | ||
* @param string $teamName | ||
*/ | ||
public function getTeam(string $teamName); | ||
|
||
/** | ||
* @param string $teamName | ||
* | ||
* @return \Guzzle\Http\EntityBodyInterface|mixed|string | ||
*/ | ||
public function getTeamMembers(string $teamName); | ||
|
||
/** | ||
* Check if a user is a member of the organisation. | ||
* | ||
* @param string $userLogin | ||
* | ||
* @return bool | ||
*/ | ||
public function isMember(string $userLogin); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace AppBundle\Search; | ||
|
||
interface RepositoryInterface | ||
{ | ||
/** | ||
* @param array $filters | ||
* | ||
* @return array | ||
*/ | ||
public function getPullRequests($filters = []): array; | ||
|
||
/** | ||
* @param $query | ||
* @param array $variables | ||
* | ||
* @return array | ||
*/ | ||
public function graphQL($query, $variables = []): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Tests\AppBundle\Organisations; | ||
|
||
use AppBundle\Organizations\RepositoryInterface; | ||
|
||
class FakeRepository implements RepositoryInterface | ||
{ | ||
private $members; | ||
|
||
public function __construct($members = []) | ||
{ | ||
$this->members = $members; | ||
} | ||
|
||
public function getTeams() | ||
{ | ||
// TODO: Implement getTeams() method. | ||
} | ||
|
||
public function getTeam(string $teamName) | ||
{ | ||
// TODO: Implement getTeam() method. | ||
} | ||
|
||
public function getTeamMembers(string $teamName) | ||
{ | ||
// TODO: Implement getTeamMembers() method. | ||
} | ||
|
||
public function isMember(string $userLogin) | ||
{ | ||
return \in_array($userLogin, $this->members, true); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.