1 | <?php |
||
8 | class FeatureContext implements SnippetAcceptingContext |
||
9 | { |
||
10 | /** |
||
11 | * @var \Redis |
||
12 | */ |
||
13 | private $redis; |
||
14 | |||
15 | /** |
||
16 | * @var RedisCache |
||
17 | */ |
||
18 | private $backend; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $result; |
||
24 | |||
25 | /** |
||
26 | * FeatureContext constructor. |
||
27 | */ |
||
28 | public function __construct() |
||
34 | |||
35 | /** |
||
36 | * @Given The cache is empty |
||
37 | */ |
||
38 | public function theCacheIsEmpty() |
||
42 | |||
43 | /** |
||
44 | * @Given I store a an item in the cache |
||
45 | */ |
||
46 | public function iStoreAAnItemInTheCache() |
||
50 | |||
51 | /** |
||
52 | * @When I retrieve it |
||
53 | */ |
||
54 | public function whenIRetrieved() |
||
58 | |||
59 | /** |
||
60 | * @Then I should get the same item |
||
61 | */ |
||
62 | public function iShouldGetTheSameItem() |
||
68 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.