@@ -42,7 +42,7 @@ public function __construct(WpClient $client, MessageParser $parser, CacheInterf
42
42
*/
43
43
public function listPosts (string $ query = '' ): array
44
44
{
45
- return $ this ->cache ->get ($ this ->getCacheKey ('query ' , $ query ), function (/* ItemInterface*/ CacheItemInterface $ item ) use ($ query ) {
45
+ return $ this ->cache ->get ($ this ->getCacheKey ('query ' , $ query ), function (ItemInterface $ item ) use ($ query ) {
46
46
$ data = $ this ->client ->getPostList ($ query );
47
47
if (!$ this ->isValidResponse ($ data )) {
48
48
$ item ->expiresAfter (30 );
@@ -62,7 +62,7 @@ public function listPosts(string $query = ''): array
62
62
63
63
public function getPage (string $ slug ): ?Page
64
64
{
65
- return $ this ->cache ->get ($ this ->getCacheKey ('page ' , $ slug ), function (/* ItemInterface*/ CacheItemInterface $ item ) use ($ slug ) {
65
+ return $ this ->cache ->get ($ this ->getCacheKey ('page ' , $ slug ), function (ItemInterface $ item ) use ($ slug ) {
66
66
$ data = $ this ->client ->getPage ($ slug );
67
67
if (!$ this ->isValidResponse ($ data )) {
68
68
$ item ->expiresAfter (300 );
@@ -78,7 +78,7 @@ public function getPage(string $slug): ?Page
78
78
79
79
public function getMenu (string $ slug ): ?Menu
80
80
{
81
- return $ this ->cache ->get ($ this ->getCacheKey ('menu ' , $ slug ), function (/* ItemInterface*/ CacheItemInterface $ item ) use ($ slug ) {
81
+ return $ this ->cache ->get ($ this ->getCacheKey ('menu ' , $ slug ), function (ItemInterface $ item ) use ($ slug ) {
82
82
$ data = $ this ->client ->getMenu ($ slug );
83
83
if (!$ this ->isValidResponse ($ data )) {
84
84
$ item ->expiresAfter (300 );
@@ -94,7 +94,7 @@ public function getMenu(string $slug): ?Menu
94
94
95
95
public function getCategories (string $ slug = '' ): array
96
96
{
97
- return $ this ->cache ->get ($ this ->getCacheKey ('categories ' , $ slug ), function (/* ItemInterface*/ CacheItemInterface $ item ) use ($ slug ) {
97
+ return $ this ->cache ->get ($ this ->getCacheKey ('categories ' , $ slug ), function (ItemInterface $ item ) use ($ slug ) {
98
98
$ data = $ this ->client ->getUri ('/wp/v2/categories ' .$ slug );
99
99
if (!$ this ->isValidResponse ($ data )) {
100
100
$ item ->expiresAfter (300 );
@@ -110,7 +110,7 @@ public function getCategories(string $slug = ''): array
110
110
111
111
public function getMedia (string $ slug = '' ): array
112
112
{
113
- return $ this ->cache ->get ($ this ->getCacheKey ('media ' , $ slug ), function (/* ItemInterface*/ CacheItemInterface $ item ) use ($ slug ) {
113
+ return $ this ->cache ->get ($ this ->getCacheKey ('media ' , $ slug ), function (ItemInterface $ item ) use ($ slug ) {
114
114
$ data = $ this ->client ->getUri ('/wp/v2/media ' .$ slug );
115
115
if (!$ this ->isValidResponse ($ data )) {
116
116
$ item ->expiresAfter (300 );
0 commit comments