File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/Symfony/Contracts/Tests/Cache Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ public function testSave()
43
43
$ cache ->expects ($ this ->once ())
44
44
->method ('save ' );
45
45
46
- $ callback = function (CacheItemInterface $ item ) {
47
- return 'computed data ' ;
48
- };
46
+ $ callback = fn (CacheItemInterface $ item ) => 'computed data ' ;
49
47
50
48
$ cache ->get ('key ' , $ callback );
51
49
}
@@ -101,9 +99,7 @@ public function testRecomputeOnBetaInf()
101
99
$ cache ->expects ($ this ->once ())
102
100
->method ('save ' );
103
101
104
- $ callback = function (CacheItemInterface $ item ) {
105
- return 'computed data ' ;
106
- };
102
+ $ callback = fn (CacheItemInterface $ item ) => 'computed data ' ;
107
103
108
104
$ cache ->get ('key ' , $ callback , \INF );
109
105
}
@@ -114,9 +110,7 @@ public function testExceptionOnNegativeBeta()
114
110
->onlyMethods (['getItem ' , 'save ' ])
115
111
->getMock ();
116
112
117
- $ callback = function (CacheItemInterface $ item ) {
118
- return 'computed data ' ;
119
- };
113
+ $ callback = fn (CacheItemInterface $ item ) => 'computed data ' ;
120
114
121
115
$ this ->expectException (\InvalidArgumentException::class);
122
116
$ cache ->get ('key ' , $ callback , -2 );
You can’t perform that action at this time.
0 commit comments