diff --git a/DataStorage/Cache/Connection/RedisCache.php b/DataStorage/Cache/Connection/RedisCache.php index 46613e979..3fdd6337e 100755 --- a/DataStorage/Cache/Connection/RedisCache.php +++ b/DataStorage/Cache/Connection/RedisCache.php @@ -131,10 +131,10 @@ final class RedisCache extends ConnectionAbstract } if ($expire > 0) { - return $this->con->set((string) $key, $this->build($value), $expire); + return $this->con->set((string) $key, $this->build($value), ['nx', 'ex' => $expire]); } - return $this->con->set((string) $key, $this->build($value)); + return $this->con->set((string) $key, $this->build($value), ['nx']); } /** diff --git a/Math/Number/Numbers.php b/Math/Number/Numbers.php index 0b7945724..5a4bba289 100755 --- a/Math/Number/Numbers.php +++ b/Math/Number/Numbers.php @@ -139,9 +139,8 @@ final class Numbers } $exponent = ($number / $max) * $exp; - $mapped = (\exp($exponent) - 1) / (\exp($exp) - 1) * 100; - - return $mapped; + + return (\exp($exponent) - 1) / (\exp($exp) - 1) * 100; } /** diff --git a/tests/Stdlib/Graph/GraphTest.php b/tests/Stdlib/Graph/GraphTest.php index 1a97f7eb7..5e33bf1e4 100755 --- a/tests/Stdlib/Graph/GraphTest.php +++ b/tests/Stdlib/Graph/GraphTest.php @@ -861,7 +861,7 @@ final class GraphTest extends \PHPUnit\Framework\TestCase /** * 1 - 3 - 5 - * / |\ / + * |\ / * 0 | \ / * \ | \ / * 2 4 @@ -883,7 +883,6 @@ final class GraphTest extends \PHPUnit\Framework\TestCase $this->graph->setNode($node4); $this->graph->setNode($node5); - $node0->setNodeRelative($node1); $node0->setNodeRelative($node2); $node1->setNodeRelative($node2); $node1->setNodeRelative($node3);