Skip to content

Commit

Permalink
Remove FQCN type hints on properties
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 8, 2021
1 parent 0f56750 commit a0a03f9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Exception/MaxWaitDurationExceededException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class MaxWaitDurationExceededException extends \RuntimeException
{
private RateLimit $rateLimit;
private $rateLimit;

public function __construct(string $message, RateLimit $rateLimit, int $code = 0, \Throwable $previous = null)
{
Expand Down
2 changes: 1 addition & 1 deletion Exception/RateLimitExceededException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class RateLimitExceededException extends \RuntimeException
{
private RateLimit $rateLimit;
private $rateLimit;

public function __construct(RateLimit $rateLimit, int $code = 0, \Throwable $previous = null)
{
Expand Down
6 changes: 2 additions & 4 deletions Policy/ResetLimiterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@

namespace Symfony\Component\RateLimiter\Policy;

use Symfony\Component\Lock\LockInterface;
use Symfony\Component\RateLimiter\Storage\StorageInterface;

trait ResetLimiterTrait
{
private LockInterface $lock;
private StorageInterface $storage;
private $lock;
private $storage;
private string $id;

/**
Expand Down
2 changes: 1 addition & 1 deletion Policy/TokenBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class TokenBucket implements LimiterStateInterface
{
private string $stringRate;
private string $id;
private Rate $rate;
private $rate;
private int $tokens;
private int $burstSize;
private float $timer;
Expand Down
2 changes: 1 addition & 1 deletion Policy/TokenBucketLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class TokenBucketLimiter implements LimiterInterface
use ResetLimiterTrait;

private int $maxBurst;
private Rate $rate;
private $rate;

public function __construct(string $id, int $maxBurst, Rate $rate, StorageInterface $storage, LockInterface $lock = null)
{
Expand Down
4 changes: 2 additions & 2 deletions RateLimiterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
final class RateLimiterFactory
{
private array $config;
private StorageInterface $storage;
private ?LockFactory $lockFactory;
private $storage;
private $lockFactory;

public function __construct(array $config, StorageInterface $storage, LockFactory $lockFactory = null)
{
Expand Down
2 changes: 1 addition & 1 deletion Reservation.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
final class Reservation
{
private float $timeToAct;
private RateLimit $rateLimit;
private $rateLimit;

/**
* @param float $timeToAct Unix timestamp in seconds when this reservation should act
Expand Down
2 changes: 1 addition & 1 deletion Storage/CacheStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class CacheStorage implements StorageInterface
{
private CacheItemPoolInterface $pool;
private $pool;

public function __construct(CacheItemPoolInterface $pool)
{
Expand Down

0 comments on commit a0a03f9

Please sign in to comment.