Skip to content

Commit

Permalink
composer json update
Browse files Browse the repository at this point in the history
  • Loading branch information
systream committed Nov 24, 2016
1 parent 735d95d commit 811657b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ script:
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
"description": "This package provides feature switch functionality. A/B test support and time based switcher.",
"minimum-stability": "dev",
"license": "MIT",
"keywords": ["feature", "flag", "toggle", "switch", "flipper", "flip", "switcher", "AB test"],
"keywords": ["feature", "toggle", "switch", "flipper", "flip", "switcher", "AB test", "flag", "feature switch"],
"authors": [
{
"name": "Peter Tihanyi",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/systream/feature-switch/issues",
"source": "https://github.com/systream/feature-switch"
},
"autoload": {
"psr-4": {
"Systream\\": "src/",
"Tests\\Systream\\": "tests/"
}
},
"require": {
"php": ">=5.4.0"
"php": ">=5.6.0"
},
"require-dev": {
"phpunit/phpunit": "~5.3",
Expand Down
6 changes: 3 additions & 3 deletions src/FeatureSwitch/Feature/Switcher/AB.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public function isEnabled(FeatureInterface $feature)
*/
protected function getRandomState()
{
$state = $this->lastState === null ? $this->getRandomStateByMicroTime() : !$this->lastState;
$this->lastState = $state;
$this->lastState =
($this->lastState === null ? $this->getRandomStateByMicroTime() : !$this->lastState);

return $state ? 'TRUE' : 'FALSE';
return $this->lastState ? 'TRUE' : 'FALSE';

}

Expand Down
1 change: 1 addition & 0 deletions tests/Unit/FeatureSwitch/FeatureSwitchArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function iterator()
*/
public function iterator_isset()
{
/** @var FeatureSwitch\Feature[] $featureSwitch */
$featureSwitch = $this->getClass();
$featureSwitch->addFeature($featureSwitch::buildFeature('foo', true));

Expand Down

0 comments on commit 811657b

Please sign in to comment.