Skip to content

Commit

Permalink
fix phpstan errors, add phpstan to ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Feb 24, 2023
1 parent 8fc9bd6 commit 6163f15
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -63,3 +63,20 @@ jobs:
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
phpstan:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0

- name: Checkout
uses: actions/checkout@v2

- name: Install the dependencies
run: composer install --no-interaction

- name: PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon
1 change: 1 addition & 0 deletions src/Util/Request/UrlUtil.php
Expand Up @@ -101,6 +101,7 @@ public function makeUrlRelative(string $url, array $options = []): string
'removeLeadingSlash' => false,
], $options);

/** @var array|false $urlParts */
$urlParts = parse_url($url);

if (false === $urlParts) {
Expand Down
8 changes: 7 additions & 1 deletion src/Util/Ui/AccordionUtil.php
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2022 Heimrich & Hannot GmbH
* Copyright (c) 2023 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand All @@ -18,6 +18,12 @@ class AccordionUtil
*/
private $contaoFramework;

/** @var array */
private $accordionStartStopCache = [];

/** @var array */
private $accordionSingleCache;

public function __construct(ContaoFramework $contaoFramework)
{
$this->contaoFramework = $contaoFramework;
Expand Down

0 comments on commit 6163f15

Please sign in to comment.