Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -2,89 +2,103 @@
namespace Github;
use Github\Api\ApiInterface;
use Generator;
use Github\Api\AbstractApi;
/**
* Pager interface.
*
* @author Ramon de la Fuente <ramon@future500.nl>
* @author Mitchel Verschoof <mitchel@future500.nl>
* @author Graham Campbell <graham@alt-three.com>
*/
interface ResultPagerInterface
{
/**
* @return null|array pagination result of last request
*/
public function getPagination();
/**
* Fetch a single result (page) from an api call.
*
* @param ApiInterface $api the Api instance
* @param string $method the method name to call on the Api instance
* @param array $parameters the method parameters in an array
* @param AbstractApi $api the Api instance
* @param string $method the method name to call on the Api instance
* @param array $parameters the method parameters in an array
*
* @return array returns the result of the Api::$method() call
*/
public function fetch(ApiInterface $api, $method, array $parameters = []);
public function fetch(AbstractApi $api, string $method, array $parameters = []): array;
/**
* Fetch all results (pages) from an api call.
*
* Use with care - there is no maximum.
*
* @param ApiInterface $api the Api instance
* @param string $method the method name to call on the Api instance
* @param array $parameters the method parameters in an array
* @param AbstractApi $api the Api instance
* @param string $method the method name to call on the Api instance
* @param array $parameters the method parameters in an array
*
* @return array returns a merge of the results of the Api::$method() call
*/
public function fetchAll(ApiInterface $api, $method, array $parameters = []);
public function fetchAll(AbstractApi $api, string $method, array $parameters = []): array;
/**
* Lazily fetch all results (pages) from an api call.
*
* Use with care - there is no maximum.
*
* @param AbstractApi $api the Api instance
* @param string $method the method name to call on the Api instance
* @param array $parameters the method parameters in an array
*
* @return \Generator returns a merge of the results of the Api::$method() call
*/
public function fetchAllLazy(AbstractApi $api, string $method, array $parameters = []): Generator;
/**
* Method that performs the actual work to refresh the pagination property.
*
* @deprecated since 3.2 and will be removed in 4.0.
*
* @return void
*/
public function postFetch();
public function postFetch(): void;
/**
* Check to determine the availability of a next page.
*
* @return bool
*/
public function hasNext();
public function hasNext(): bool;
/**
* Check to determine the availability of a previous page.
*
* @return bool
*/
public function hasPrevious();
public function hasPrevious(): bool;
/**
* Fetch the next page.
*
* @return array
*/
public function fetchNext();
public function fetchNext(): array;
/**
* Fetch the previous page.
*
* @return array
*/
public function fetchPrevious();
public function fetchPrevious(): array;
/**
* Fetch the first page.
*
* @return array
*/
public function fetchFirst();
public function fetchFirst(): array;
/**
* Fetch the last page.
*
* @return array
*/
public function fetchLast();
public function fetchLast(): array;
}