diff --git a/README.md b/README.md index f01299f..32b4f02 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,14 @@ foreach ($domains as $domain) { } ``` +## Contributing + +When contributing to this project, you can run the following quality checks: + +```bash +$ vendor/bin/phpstan +``` + ## License The MIT License (MIT) @@ -223,4 +231,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/composer.json b/composer.json index 6986b83..46c413f 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,13 @@ "guzzlehttp/psr7": "^1.7", "psr/log": "^1.1", "spatie/enum": "^3.6", - "guzzlehttp/guzzle": ">=6" + "guzzlehttp/guzzle": ">=6", + "illuminate/pagination": "^5.8|^6.0|^7.0|^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", "php-http/mock-client": "^1.4", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^0.12.81", "phpunit/phpunit": "^8.5", "squizlabs/php_codesniffer": "^3.5", "monolog/monolog": "^2.1", diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..c3c98d3 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: 0 + paths: + - src diff --git a/src/Managers/FolderManager.php b/src/Managers/FolderManager.php index 1f2aa94..6f9dde9 100644 --- a/src/Managers/FolderManager.php +++ b/src/Managers/FolderManager.php @@ -29,10 +29,12 @@ class FolderManager extends AbstractManager implements FolderManagerInterface, L * * @param int $page * @param int $perPage + * @param array $filters * @return \DnsMadeEasy\Pagination\Paginator|mixed + * @throws \DnsMadeEasy\Exceptions\Client\Http\HttpException * @throws \ReflectionException */ - public function paginate(int $page = 1, int $perPage = 20) + public function paginate(int $page = 1, int $perPage = 20, $filters = []) { $response = $this->client->get($this->getBaseUri()); $data = json_decode((string)$response->getBody()); @@ -79,4 +81,4 @@ protected function transformConciseApiData(object $data): object 'label' => $data->label, ]; } -} \ No newline at end of file +}