aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/ContentProxy.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-09-07 13:46:30 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-09-07 13:46:30 +0200
commit7083c0a21d27e7e1bf45a9807a76844116d61fb8 (patch)
treeb72b5a0516d9114aeeccd6ecdb055ee240bda66a /src/Wallabag/CoreBundle/Helper/ContentProxy.php
parent44043ebe82a22470e2514d05efac324035ee809a (diff)
parent495f83c92539444bff7dfd6cd647b7d65a74f949 (diff)
downloadwallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.tar.gz
wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.tar.zst
wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.zip
Merge remote-tracking branch 'origin/master' into 2.4
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/ContentProxy.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index fe795d42..3fe31c2c 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -85,7 +85,7 @@ class ContentProxy
85 (new LocaleConstraint()) 85 (new LocaleConstraint())
86 ); 86 );
87 87
88 if (0 === count($errors)) { 88 if (0 === \count($errors)) {
89 $entry->setLanguage($value); 89 $entry->setLanguage($value);
90 90
91 return; 91 return;
@@ -107,7 +107,7 @@ class ContentProxy
107 (new UrlConstraint()) 107 (new UrlConstraint())
108 ); 108 );
109 109
110 if (0 === count($errors)) { 110 if (0 === \count($errors)) {
111 $entry->setPreviewPicture($value); 111 $entry->setPreviewPicture($value);
112 112
113 return; 113 return;
@@ -212,7 +212,7 @@ class ContentProxy
212 $entry->setHttpStatus($content['status']); 212 $entry->setHttpStatus($content['status']);
213 } 213 }
214 214
215 if (!empty($content['authors']) && is_array($content['authors'])) { 215 if (!empty($content['authors']) && \is_array($content['authors'])) {
216 $entry->setPublishedBy($content['authors']); 216 $entry->setPublishedBy($content['authors']);
217 } 217 }
218 218
@@ -233,7 +233,7 @@ class ContentProxy
233 } 233 }
234 234
235 // if content is an image, define it as a preview too 235 // if content is an image, define it as a preview too
236 if (!empty($content['content_type']) && in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { 236 if (!empty($content['content_type']) && \in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) {
237 $this->updatePreviewPicture($entry, $content['url']); 237 $this->updatePreviewPicture($entry, $content['url']);
238 } 238 }
239 239