Skip to content

Commit

Permalink
Fix psalm errors + Fix StyleCI config + Fix BC checker (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Mar 31, 2023
1 parent 34fab11 commit aead5ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/bc.yml
Expand Up @@ -3,13 +3,12 @@ on:
- push

name: backwards compatibility

jobs:
roave_bc_check:
name: Roave BC Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
uses: yiisoft/actions/.github/workflows/bc.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.0']
17 changes: 7 additions & 10 deletions .styleci.yml
@@ -1,20 +1,12 @@
preset: psr12
risky: true

version: 8
version: 8.1

finder:
exclude:
- docs
- vendor
- resources
- views
- public
- templates
not-name:
- UnionCar.php
- TimerUnionTypes.php
- schema1.php

enabled:
- alpha_ordered_traits
Expand Down Expand Up @@ -64,7 +56,6 @@ enabled:
- phpdoc_order
- phpdoc_property
- phpdoc_scalar
- phpdoc_separation
- phpdoc_singular_inheritdoc
- phpdoc_trim
- phpdoc_trim_consecutive_blank_line_separation
Expand All @@ -86,3 +77,9 @@ enabled:
- trailing_comma_in_multiline_array
- unalign_double_arrow
- unalign_equals
- empty_loop_body_braces
- integer_literal_case
- union_type_without_spaces

disabled:
- function_declaration
2 changes: 2 additions & 0 deletions psalm.xml
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
1 change: 1 addition & 0 deletions src/MiddlewareFactory.php
Expand Up @@ -142,6 +142,7 @@ private function wrapCallable(array|callable $callable): MiddlewareInterface
private function createCallableWrapper(callable $callback): MiddlewareInterface
{
return new class ($callback, $this->container, $this->parametersResolver) implements MiddlewareInterface {
/** @var callable */
private $callback;
/** @var ReflectionParameter[] */
private array $callableParameters;
Expand Down

0 comments on commit aead5ca

Please sign in to comment.