Skip to content

Commit 84ce8ea

Browse files
committed
use stable version of contracts
1 parent 99706c4 commit 84ce8ea

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Service/Wordpress.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(WpClient $client, MessageParser $parser, CacheInterf
4242
*/
4343
public function listPosts(string $query = ''): array
4444
{
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) {
4646
$data = $this->client->getPostList($query);
4747
if (!$this->isValidResponse($data)) {
4848
$item->expiresAfter(30);
@@ -62,7 +62,7 @@ public function listPosts(string $query = ''): array
6262

6363
public function getPage(string $slug): ?Page
6464
{
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) {
6666
$data = $this->client->getPage($slug);
6767
if (!$this->isValidResponse($data)) {
6868
$item->expiresAfter(300);
@@ -78,7 +78,7 @@ public function getPage(string $slug): ?Page
7878

7979
public function getMenu(string $slug): ?Menu
8080
{
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) {
8282
$data = $this->client->getMenu($slug);
8383
if (!$this->isValidResponse($data)) {
8484
$item->expiresAfter(300);
@@ -94,7 +94,7 @@ public function getMenu(string $slug): ?Menu
9494

9595
public function getCategories(string $slug = ''): array
9696
{
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) {
9898
$data = $this->client->getUri('/wp/v2/categories'.$slug);
9999
if (!$this->isValidResponse($data)) {
100100
$item->expiresAfter(300);
@@ -110,7 +110,7 @@ public function getCategories(string $slug = ''): array
110110

111111
public function getMedia(string $slug = ''): array
112112
{
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) {
114114
$data = $this->client->getUri('/wp/v2/media'.$slug);
115115
if (!$this->isValidResponse($data)) {
116116
$item->expiresAfter(300);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"psr/http-client": "^1.0",
88
"psr/http-factory": "^1.0",
99
"symfony/config": "^4.1",
10-
"symfony/contracts": "dev-master",
10+
"symfony/contracts": "^1.0",
1111
"symfony/dependency-injection": "^4.1",
1212
"symfony/framework-bundle": "^4.1",
1313
"symfony/http-kernel": "^4.1",

0 commit comments

Comments
 (0)