phpstan config
This commit is contained in:
parent
a453148193
commit
fd9f522f46
8
.phpstan.neon
Normal file
8
.phpstan.neon
Normal file
|
@ -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"]
|
||||
|
|
14
kril.php
14
kril.php
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
2
run.php
2
run.php
|
@ -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);
|
||||
}
|
||||
|
|
4
wiki.php
4
wiki.php
|
@ -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');
|
||||
|
|
Reference in a new issue