Skip to content

Commit

Permalink
Merge pull request #92 from qandidate-labs/php-cs-fixer
Browse files Browse the repository at this point in the history
Apply coding standards
  • Loading branch information
wjzijderveld authored Dec 20, 2023
2 parents 82e1b31 + 0843312 commit 27fd02e
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 73 deletions.
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class Context

/**
* @param int|string $key
*
* @return mixed
*/
public function get($key)

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.

Check failure on line 30 in lib/Qandidate/Toggle/Context.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Context::get() has no return type specified.
{
Expand All @@ -36,7 +34,6 @@ public function get($key)

/**
* @param int|string $key
* @param mixed $value
*
* @return $this
*/
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/ExpressionCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public function __construct(string $expression, ExpressionLanguage $language)
$this->language = $language;
}

/**
* {@inheritdoc}
*/
public function holdsFor(Context $context): bool
{
return true === $this->language->evaluate($this->expression, $context->toArray());
Expand Down
2 changes: 0 additions & 2 deletions lib/Qandidate/Toggle/Operator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
abstract class Operator
{
/**
* @param mixed $argument
*
* @return bool True, if the operator applies to the argument
*/
abstract public function appliesTo($argument): bool;

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.

Check failure on line 24 in lib/Qandidate/Toggle/Operator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator::appliesTo() has parameter $argument with no type specified.
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/EqualTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class EqualTo extends EqualityOperator
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/EqualTo.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualTo::appliesTo() has parameter $argument with no type specified.
{
return $argument === $this->value;
Expand Down
6 changes: 0 additions & 6 deletions lib/Qandidate/Toggle/Operator/EqualityOperator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@
*/
abstract class EqualityOperator extends Operator
{
/**
* @var mixed
*/
protected $value;

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

Check failure on line 23 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Property Qandidate\Toggle\Operator\EqualityOperator::$value has no type specified.

/**
* @param mixed $value
*/
public function __construct($value)

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.

Check failure on line 25 in lib/Qandidate/Toggle/Operator/EqualityOperator.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\EqualityOperator::__construct() has parameter $value with no type specified.
{
$this->value = $value;
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/GreaterThan.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class GreaterThan extends EqualityOperator
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThan.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThan::appliesTo() has parameter $argument with no type specified.
{
return $argument > $this->value;
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/GreaterThanEqual.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class GreaterThanEqual extends EqualityOperator
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.

Check failure on line 18 in lib/Qandidate/Toggle/Operator/GreaterThanEqual.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\GreaterThanEqual::appliesTo() has parameter $argument with no type specified.
{
return $argument >= $this->value;
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/HasIntersection.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public function __construct(array $values)
$this->values = $values;
}

/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.

Check failure on line 28 in lib/Qandidate/Toggle/Operator/HasIntersection.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Qandidate\Toggle\Operator\HasIntersection::appliesTo() has parameter $argument with no type specified.
{
return null !== $argument
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/InSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public function __construct(array $values)
$this->values = $values;
}

/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool
{
return null !== $argument
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/LessThan.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class LessThan extends EqualityOperator
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool
{
return $argument < $this->value;
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/LessThanEqual.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class LessThanEqual extends EqualityOperator
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool
{
return $argument <= $this->value;
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/MatchesRegex.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class MatchesRegex extends EqualityOperator
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool
{
return (bool) preg_match($this->value, $argument);
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/Operator/NotInSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

class NotInSet extends InSet
{
/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool
{
return !parent::appliesTo($argument);
Expand Down
7 changes: 2 additions & 5 deletions lib/Qandidate/Toggle/Operator/Percentage.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ public function __construct(int $percentage, int $shift = 0)
$this->shift = $shift;
}

/**
* {@inheritdoc}
*/
public function appliesTo($argument): bool
{
$asPercentage = (int) $argument % 100;

return $asPercentage >= $this->shift &&
$asPercentage < ($this->percentage + $this->shift);
return $asPercentage >= $this->shift
&& $asPercentage < ($this->percentage + $this->shift);
}

public function getPercentage(): int
Expand Down
3 changes: 0 additions & 3 deletions lib/Qandidate/Toggle/OperatorCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public function __construct(string $key, Operator $operator)
$this->operator = $operator;
}

/**
* {@inheritdoc}
*/
public function holdsFor(Context $context): bool
{
if (!$context->has($this->key)) {
Expand Down
12 changes: 0 additions & 12 deletions lib/Qandidate/Toggle/ToggleCollection/InMemoryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ class InMemoryCollection extends ToggleCollection
*/
private $toggles = [];

/**
* {@inheritdoc}
*/
public function all(): array
{
return $this->toggles;
}

/**
* {@inheritdoc}
*/
public function get(string $name): ?Toggle
{
if (!array_key_exists($name, $this->toggles)) {
Expand All @@ -47,17 +41,11 @@ public function get(string $name): ?Toggle
return $this->toggles[$name];
}

/**
* {@inheritdoc}
*/
public function set(string $name, Toggle $toggle): void
{
$this->toggles[$name] = $toggle;
}

/**
* {@inheritdoc}
*/
public function remove(string $name): void
{
if (array_key_exists($name, $this->toggles)) {
Expand Down
12 changes: 0 additions & 12 deletions lib/Qandidate/Toggle/ToggleCollection/PredisCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public function getNamespace(): string
return $this->namespace;
}

/**
* {@inheritdoc}
*/
public function all(): array
{
$keys = $this->client->keys($this->namespace.'__TOGGLE__*');
Expand All @@ -66,25 +63,16 @@ public function all(): array
return $toggles;
}

/**
* {@inheritdoc}
*/
public function get(string $name): ?Toggle
{
return $this->getFromKey($this->namespace.'__TOGGLE__'.$name);
}

/**
* {@inheritdoc}
*/
public function set(string $name, Toggle $toggle): void
{
$this->client->set($this->namespace.'__TOGGLE__'.$name, serialize($toggle));
}

/**
* {@inheritdoc}
*/
public function remove(string $name): void
{
$this->client->del([$this->namespace.'__TOGGLE__'.$name]);
Expand Down

0 comments on commit 27fd02e

Please sign in to comment.