Browse Source

phpstan config

master
Alexander Yakovlev 1 year ago
parent
commit
fd9f522f46
Signed by: oreolek GPG Key ID: 1CDC4B7820C93BD3
5 changed files with 16 additions and 15 deletions
  1. +8
    -0
      .phpstan.neon
  2. +3
    -0
      .pre-commit-config.yaml
  3. +2
    -12
      kril.php
  4. +1
    -1
      run.php
  5. +2
    -2
      wiki.php

+ 8
- 0
.phpstan.neon View File

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

+ 3
- 0
.pre-commit-config.yaml View File

@@ -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"]

+ 2
- 12
kril.php View File

@@ -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();
}
}

+ 1
- 1
run.php View File

@@ -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);
}


+ 2
- 2
wiki.php View File

@@ -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');