mirror of
https://github.com/pi-hole/web.git
synced 2026-02-15 07:25:39 +00:00
Added phpstan
Signed-off-by: buchwasa <17461354+buchwasa@users.noreply.github.com>
This commit is contained in:
26
.github/workflows/phpstan.yml
vendored
Normal file
26
.github/workflows/phpstan.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: PHPStan
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
- name: Run phpstan
|
||||
run: composer run-script phpstan
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -15,3 +15,6 @@ test.html
|
||||
|
||||
# vim
|
||||
*.swp
|
||||
|
||||
# Composer
|
||||
/vendor/
|
||||
|
||||
19
composer.json
Normal file
19
composer.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "pi-hole/adminlte",
|
||||
"type": "project",
|
||||
"description": "Pi-hole Dashboard for stats and more",
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"phpstan/phpstan": "^0.12.42"
|
||||
},
|
||||
"license": "EUPL-1.2",
|
||||
"minimum-stability": "stable",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"scripts/vendor/qrcode.php"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"phpstan": "vendor/phpstan/phpstan/phpstan analyse -c phpstan.neon.dist"
|
||||
}
|
||||
}
|
||||
81
composer.lock
generated
Normal file
81
composer.lock
generated
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ba7e1b2ae29157ca9224ed7c390d5b78",
|
||||
"packages": [
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "0.12.58",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "2a4847df6047b30af28854ed9dc95304cdb56ae5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a4847df6047b30af28854ed9dc95304cdb56ae5",
|
||||
"reference": "2a4847df6047b30af28854ed9dc95304cdb56ae5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan-shim": "*"
|
||||
},
|
||||
"bin": [
|
||||
"phpstan",
|
||||
"phpstan.phar"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.58"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/ondrejmirtes",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/phpstan",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-29T13:32:03+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
8
phpstan.neon.dist
Normal file
8
phpstan.neon.dist
Normal file
@@ -0,0 +1,8 @@
|
||||
parameters:
|
||||
level: 0
|
||||
excludes_analyse:
|
||||
- vendor
|
||||
scanDirectories:
|
||||
- .
|
||||
paths:
|
||||
- .
|
||||
Reference in New Issue
Block a user