oreolek
/
news-script
Архивировано
1
0
Форкнуть 0
Этот коммит содержится в:
Alexander Yakovlev 2019-05-16 01:27:32 +07:00
родитель a453148193
Коммит fd9f522f46
Подписано: oreolek
Идентификатор ключа GPG: 1CDC4B7820C93BD3
5 изменённых файлов: 16 добавлений и 15 удалений

8
.phpstan.neon Обычный файл
Просмотреть файл

@ -0,0 +1,8 @@
parameters:
level: 5
autoload_files:
ignoreErrors:
excludes_analyse:
- vendor/
- vndb-client-php/
- tests/

Просмотреть файл

@ -8,3 +8,6 @@ repos:
- id: php-md
files: \.(php)$
args: ["codesize,controversial,design,naming,unusedcode"]
# - id: php-stan
# files: \.(php)$
# args: ["--configuration=.phpstan.neon"]

Просмотреть файл

@ -33,14 +33,6 @@ $client = new GuzzleClient([
'timeout' => 30,
]);
/**
* Function to download images.
*
* @return string
*/
function get_file($url) {
}
$api = json_decode(file_get_contents('http://forum.ifiction.ru/extern.php?action=kril2018'));
foreach ($api as $category) {
$category_title = $category->category;
@ -81,9 +73,7 @@ foreach ($api as $category) {
$game->url_online = $files[1]->url;
$game->url_online_description = $files[1]->title;
}
if ($game) {
$page = new Wikipage($game);
$page->create();
}
$page = new Wikipage($game);
$page->create();
}
}

Просмотреть файл

@ -33,7 +33,7 @@ $parsers = 'all';
if (PHP_SAPI !== 'cli') {
ob_start();
echo '<!DOCTYPE html><html><body><code><pre>';
if (isset($_GET) && isset($_GET['parsers'])) {
if (isset($_GET['parsers'])) {
$parsers = $_GET['parsers'];
$parsers = explode(',', $parsers);
}

Просмотреть файл

@ -33,7 +33,7 @@ if (!isset($argv[1])) {
die();
}
$url = $argv[1];
$game = new Game;
$game = new Game();
function check($classname) {
global $game;
@ -54,7 +54,7 @@ function check($classname) {
}
}
check ('Urq', 'urq');
check ('Urq');
check ('Qsp');
check ('Kvester');
check ('Apero');