mirror of
https://github.com/humhub/humhub.git
synced 2025-02-25 03:34:10 +01:00
Fix: Minor clean up
This commit is contained in:
parent
fe7c9095fa
commit
960d0bc622
@ -1,15 +1,14 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace humhub\libs;
|
||||
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Json;
|
||||
|
||||
class UrlOembedHttpClient implements UrlOembedClient
|
||||
{
|
||||
const RESPONSE_UNAUTHORIZED = 'Unauthorized';
|
||||
|
||||
const RESPONSE_NOT_FOUND = 'Not Found';
|
||||
|
||||
const ERROR_RESPONSES = [
|
||||
@ -59,7 +58,7 @@ class UrlOembedHttpClient implements UrlOembedClient
|
||||
protected function parseJson($json)
|
||||
{
|
||||
try {
|
||||
if(!empty($json) && !in_array($json, static::ERROR_RESPONSES, true)) {
|
||||
if (!empty($json) && !in_array($json, static::ERROR_RESPONSES, true)) {
|
||||
return Json::decode($json);
|
||||
}
|
||||
} catch (\Exception $ex) {
|
||||
@ -68,4 +67,4 @@ class UrlOembedHttpClient implements UrlOembedClient
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user