[.travis] Fix several phpcs and phpunit errors (#1799)

This commit is contained in:
Eugene Molotov 2020-10-15 12:53:19 +05:00 committed by GitHub
parent 64ec488f70
commit 645a8f62c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 41 additions and 47 deletions

View file

@ -2,7 +2,7 @@
class WorldCosplayBridge extends BridgeAbstract {
const NAME = 'WorldCosplay Bridge';
const URI = 'https://worldcosplay.net/';
const DESCRIPTION ='Returns WorldCosplay photos';
const DESCRIPTION = 'Returns WorldCosplay photos';
const MAINTAINER = 'AxorPL';
const API_CHARACTER = 'api/photo/list.json?character_id=%u&limit=%u';
@ -95,14 +95,12 @@ class WorldCosplayBridge extends BridgeAbstract {
$json = json_decode(getContents($url))
or returnServerError(sprintf(self::ERR_QUERY, $url));
if($json->has_error)
{
if($json->has_error) {
returnServerError($json->message);
}
$list = $json->list;
foreach($list as $img)
{
foreach($list as $img) {
$item = array();
$item['uri'] = self::URI . substr($img->photo->url, 1);
$item['title'] = $img->photo->subject;