phpstan config
This commit is contained in:
parent
a453148193
commit
fd9f522f46
|
@ -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
|
- id: php-md
|
||||||
files: \.(php)$
|
files: \.(php)$
|
||||||
args: ["codesize,controversial,design,naming,unusedcode"]
|
args: ["codesize,controversial,design,naming,unusedcode"]
|
||||||
|
# - id: php-stan
|
||||||
|
# files: \.(php)$
|
||||||
|
# args: ["--configuration=.phpstan.neon"]
|
||||||
|
|
14
kril.php
14
kril.php
|
@ -33,14 +33,6 @@ $client = new GuzzleClient([
|
||||||
'timeout' => 30,
|
'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'));
|
$api = json_decode(file_get_contents('http://forum.ifiction.ru/extern.php?action=kril2018'));
|
||||||
foreach ($api as $category) {
|
foreach ($api as $category) {
|
||||||
$category_title = $category->category;
|
$category_title = $category->category;
|
||||||
|
@ -81,9 +73,7 @@ foreach ($api as $category) {
|
||||||
$game->url_online = $files[1]->url;
|
$game->url_online = $files[1]->url;
|
||||||
$game->url_online_description = $files[1]->title;
|
$game->url_online_description = $files[1]->title;
|
||||||
}
|
}
|
||||||
if ($game) {
|
$page = new Wikipage($game);
|
||||||
$page = new Wikipage($game);
|
$page->create();
|
||||||
$page->create();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
run.php
2
run.php
|
@ -33,7 +33,7 @@ $parsers = 'all';
|
||||||
if (PHP_SAPI !== 'cli') {
|
if (PHP_SAPI !== 'cli') {
|
||||||
ob_start();
|
ob_start();
|
||||||
echo '<!DOCTYPE html><html><body><code><pre>';
|
echo '<!DOCTYPE html><html><body><code><pre>';
|
||||||
if (isset($_GET) && isset($_GET['parsers'])) {
|
if (isset($_GET['parsers'])) {
|
||||||
$parsers = $_GET['parsers'];
|
$parsers = $_GET['parsers'];
|
||||||
$parsers = explode(',', $parsers);
|
$parsers = explode(',', $parsers);
|
||||||
}
|
}
|
||||||
|
|
4
wiki.php
4
wiki.php
|
@ -33,7 +33,7 @@ if (!isset($argv[1])) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
$url = $argv[1];
|
$url = $argv[1];
|
||||||
$game = new Game;
|
$game = new Game();
|
||||||
|
|
||||||
function check($classname) {
|
function check($classname) {
|
||||||
global $game;
|
global $game;
|
||||||
|
@ -54,7 +54,7 @@ function check($classname) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
check ('Urq', 'urq');
|
check ('Urq');
|
||||||
check ('Qsp');
|
check ('Qsp');
|
||||||
check ('Kvester');
|
check ('Kvester');
|
||||||
check ('Apero');
|
check ('Apero');
|
||||||
|
|
Reference in New Issue