Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "CodeQL"

on: [pull_request]
jobs:
lint:
name: CodeQL
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^2

- name: Run CodeQL
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --profile --ignore-platform-reqs && composer check"
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"squizlabs/php_codesniffer": "^3.6"
"squizlabs/php_codesniffer": "^3.6",
"phpstan/phpstan": "^1.9"
},
"scripts": {
"format": "vendor/bin/phpcbf",
"lint": "vendor/bin/phpcs",
"test": "docker-compose up -d && sleep 10 && docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml"
"test": "docker-compose up -d && sleep 10 && docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml",
"check": "./vendor/bin/phpstan analyse --level max src tests"
}
}
2 changes: 1 addition & 1 deletion src/Platform/Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function init(string $type): void
* @param Service $service
* @return void
*/
protected function initHttp(): void
protected function initHttp($service): void
{
foreach ($this->services[Service::TYPE_HTTP] as $service) {
foreach ($service->getActions() as $action) {
Expand Down