Skip to content

Commit

Permalink
just a bit of cleanup
Browse files Browse the repository at this point in the history
removing unused imports, other small cleanup
  • Loading branch information
ericsizemore committed Mar 24, 2024
1 parent 57b98ba commit 885041c
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 86 deletions.
44 changes: 33 additions & 11 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

declare(strict_types=1);

$header = <<<'EOF'
$currentYear = \date('Y');

$header = <<<EOF
This file is part of Esi\LibrariesIO.
(c) 2023-2024 Eric Sizemore <https://github.com/ericsizemore>
(c) 2023-$currentYear Eric Sizemore <https://github.com/ericsizemore>
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
Expand All @@ -22,7 +24,6 @@
'php_unit_internal_class' => ['types' => ['normal', 'final']],
'php_unit_namespaced' => true,
'php_unit_expectation' => true,
//'php_unit_strict' => ['assertions' => ['assertAttributeEquals', 'assertAttributeNotEquals', 'assertEquals', 'assertNotEquals']],
'php_unit_set_up_tear_down_visibility' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
Expand Down Expand Up @@ -56,14 +57,35 @@
'=>' => 'align_single_space_minimal',
],
],
'heredoc_to_nowdoc' => true,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const',]],
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => true,
//'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'header_comment' => ['comment_type' => 'PHPDoc', 'header' => $header, 'separate' => 'top'],
'ordered_class_elements' => ['order' => ['use_trait', 'case', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_public', 'method_protected', 'method_private'], 'sort_algorithm' => 'alpha'],
'heredoc_to_nowdoc' => true,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const',]],
'no_unused_imports' => true,
'single_import_per_statement' => true,
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => true,
//'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'header_comment' => ['comment_type' => 'PHPDoc', 'header' => $header, 'separate' => 'top'],
'ordered_class_elements' => [
'order' => [
'use_trait',
'case',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
'sort_algorithm' => 'alpha',
],
])
->setLineEnding("\n")
->setFinder(
Expand Down
88 changes: 44 additions & 44 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions src/AbstractClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,19 @@
use GuzzleHttp\Exception\InvalidArgumentException;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
use Kevinrob\GuzzleCache\{
CacheMiddleware,
Storage\Psr6CacheStorage,
Strategy\PrivateCacheStrategy
};
use Kevinrob\GuzzleCache\CacheMiddleware;
use Kevinrob\GuzzleCache\Storage\Psr6CacheStorage;
use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy;
use Psr\Http\Message\ResponseInterface;
use RuntimeException;
use SensitiveParameter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;

use function array_filter;
use function array_merge;
use function assert;
use function is_array;
use function is_dir;
use function is_writable;
use function preg_match;
use function sprintf;

use const ARRAY_FILTER_USE_BOTH;

Expand All @@ -58,8 +53,8 @@ abstract class AbstractClient
/**
* @param string $apiKey Your Libraries.io API Key
* @param ?string $cachePath The path to your cache on the filesystem
* @param array<string, mixed> $clientOptions An associative array with options to set in the initial config of the Guzzle
* client.
* @param array<string, mixed> $clientOptions An associative array with options to set in the initial config
* of the Guzzle client.
*
* @see https://docs.guzzlephp.org/en/stable/request-options.html
*
Expand Down
1 change: 0 additions & 1 deletion src/Exception/RateLimitExceededException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace Esi\LibrariesIO\Exception;

use GuzzleHttp\Exception\ClientException;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use RuntimeException;

Expand Down
Loading

0 comments on commit 885041c

Please sign in to comment.