Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed php-cs-fixer version and applied coding style #87

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"require-dev": {
"atoum/atoum": "4.0.3",
"atoum/stubs": "*",
"m6web/php-cs-fixer-config": "2.0.0"
"m6web/php-cs-fixer-config": "2.0.0",
"friendsofphp/php-cs-fixer": "3.34.1",
"guzzlehttp/promises": "^1"
},
"autoload": {
"psr-4": {"M6Web\\Bundle\\GuzzleHttpBundle\\": "src/"}
Expand Down
15 changes: 0 additions & 15 deletions src/Cache/InMemory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ class InMemory implements CacheInterface
protected $cache = [];
protected $ttl = [];

/**
* {@inheritdoc}
*/
public function has($key)
{
if (array_key_exists($key, $this->cache)) {
Expand All @@ -25,9 +22,6 @@ public function has($key)
return false;
}

/**
* {@inheritdoc}
*/
public function get($key)
{
if ($this->has($key)) {
Expand All @@ -37,18 +31,12 @@ public function get($key)
return null;
}

/**
* {@inheritdoc}
*/
public function set($key, $value, $ttl = null)
{
$this->cache[$key] = $value;
$this->ttl[$key] = is_null($ttl) ? null : microtime(true) + $ttl;
}

/**
* {@inheritdoc}
*/
public function remove($key)
{
unset(
Expand All @@ -57,9 +45,6 @@ public function remove($key)
);
}

/**
* {@inheritdoc}
*/
public function ttl($key)
{
if ($this->has($key)) {
Expand Down
3 changes: 0 additions & 3 deletions src/DependencyInjection/M6WebGuzzleHttpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*/
class M6WebGuzzleHttpExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
Expand Down
2 changes: 0 additions & 2 deletions src/Handler/CacheTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ protected function getCacheTtl(Response $response)
* Cache response
*
* @param int $ttl
*
* @return mixed
*/
protected function cacheResponse(RequestInterface $request, Response $response, $ttl = null)
{
Expand Down
3 changes: 0 additions & 3 deletions src/Handler/CurlFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class CurlFactory extends GuzzleCurlFactory
{
/**
* {@inheritdoc}
*/
public function release(EasyHandle $easy): void
{
if (!is_null($easy->response)) {
Expand Down
6 changes: 0 additions & 6 deletions src/M6WebGuzzleHttpBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@

class M6WebGuzzleHttpBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function getContainerExtension(): ?ExtensionInterface
{
return new DependencyInjection\M6WebGuzzleHttpExtension();
}

/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
Expand Down
2 changes: 0 additions & 2 deletions src/Middleware/EventDispatcherMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ protected function sendEvent(RequestInterface $request, ResponseInterface $respo

/**
* Dispatch event
*
* @param mixed $reason
*/
protected function sendErrorEvent(RequestInterface $request, $reason)
{
Expand Down