Skip to content

Commit 2ddd219

Browse files
authored
Cleanup, improve psalm, improve rendering views starting with slash (#167)
* Add yml section to .editorconfig * Remove extra line in .gitattributes * Update of workflow actions * Remove extra line in .scrutinizer.yml * Format yml files * Add changelog * Format phpunit.xml.dist * Improve readme * Improve Theme class * Improve psalm * Cleanup dockBlocs * Improve rendering views starting with slash * Add functions Import
1 parent ebd8c11 commit 2ddd219

27 files changed

Lines changed: 520 additions & 409 deletions

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ trim_trailing_whitespace = true
1212

1313
[*.md]
1414
trim_trailing_whitespace = false
15+
16+
[*.yml]
17+
indent_size = 2

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@
3434
# Avoid merge conflicts in CHANGELOG
3535
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
3636
/CHANGELOG.md merge=union
37-

.github/dependabot.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
version: 2
22
updates:
3-
# Maintain dependencies for GitHub Actions.
4-
- package-ecosystem: "github-actions"
5-
directory: "/"
6-
schedule:
7-
interval: "daily"
8-
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
9-
open-pull-requests-limit: 0
3+
# Maintain dependencies for GitHub Actions.
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
9+
open-pull-requests-limit: 0
1010

11-
# Maintain dependencies for Composer
12-
- package-ecosystem: "composer"
13-
directory: "/"
14-
schedule:
15-
interval: "daily"
16-
versioning-strategy: increase-if-necessary
11+
# Maintain dependencies for Composer
12+
- package-ecosystem: "composer"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"
16+
versioning-strategy: increase-if-necessary

.github/workflows/bc.yml_

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
on:
2-
- pull_request
3-
- push
2+
- pull_request
3+
- push
44

55
name: backwards compatibility
66
jobs:
7-
roave_bc_check:
8-
name: Roave BC Check
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@master
12-
- name: fetch tags
13-
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
14-
- name: Roave BC Check
15-
uses: docker://nyholm/roave-bc-check-ga
7+
roave_bc_check:
8+
name: Roave BC Check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: fetch tags
13+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
14+
- name: Roave BC Check
15+
uses: docker://nyholm/roave-bc-check-ga

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,8 @@ jobs:
5454
- name: Update composer
5555
run: composer self-update
5656

57-
- name: Install dependencies with composer php 7.4
58-
if: matrix.php == '7.4'
57+
- name: Install dependencies with composer
5958
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
6059

61-
- name: Install dependencies with composer php 8.0
62-
if: matrix.php == '8.0'
63-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
64-
6560
- name: Run tests with phpunit
6661
run: vendor/bin/phpunit --colors=always

.github/workflows/mutation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- name: Install PHP
2828
uses: shivammathur/setup-php@v2
2929
with:
30-
php-version: "${{ matrix.php }}"
30+
php-version: ${{ matrix.php }}
3131
ini-values: memory_limit=-1
32-
coverage: "pcov"
32+
coverage: pcov
3333
tools: composer:v2
3434

3535
- name: Determine composer cache directory

.github/workflows/static.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717

1818
php:
1919
- "7.4"
20+
- "8.0"
2021

2122
steps:
2223
- name: Checkout

.phpunit-watcher.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
watch:
2-
directories:
3-
- src
4-
- tests
5-
fileMask: '*.php'
2+
directories:
3+
- src
4+
- tests
5+
fileMask: '*.php'
66
notifications:
7-
passingTests: false
8-
failingTests: false
7+
passingTests: false
8+
failingTests: false
99
phpunit:
10-
binaryPath: vendor/bin/phpunit
11-
timeout: 180
10+
binaryPath: vendor/bin/phpunit
11+
timeout: 180

.scrutinizer.yml

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
checks:
2-
php: true
2+
php: true
33

44
filter:
5-
paths:
6-
- "src/*"
5+
paths:
6+
- "src/*"
77

88
build:
9-
nodes:
10-
analysis:
11-
environment:
12-
php: 7.4.12
13-
14-
tests:
15-
override:
16-
- php-scrutinizer-run
17-
18-
tests-and-coverage:
19-
environment:
20-
php: 7.4.12
21-
22-
dependencies:
23-
override:
24-
- composer self-update
25-
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
26-
27-
tests:
28-
override:
29-
-
30-
command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml"
31-
on_node: 1
32-
coverage:
33-
file: coverage.xml
34-
format: php-clover
35-
36-
9+
nodes:
10+
analysis:
11+
environment:
12+
php: 7.4.12
13+
14+
tests:
15+
override:
16+
- php-scrutinizer-run
17+
18+
tests-and-coverage:
19+
environment:
20+
php: 7.4.12
21+
22+
dependencies:
23+
override:
24+
- composer self-update
25+
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
26+
27+
tests:
28+
override:
29+
- command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml"
30+
on_node: 1
31+
coverage:
32+
file: coverage.xml
33+
format: php-clover

.styleci.yml

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4,86 +4,86 @@ risky: true
44
version: 8
55

66
finder:
7-
exclude:
8-
- docs
9-
- vendor
10-
- resources
11-
- views
12-
- public
13-
- templates
14-
not-name:
15-
- UnionCar.php
16-
- TimerUnionTypes.php
17-
- schema1.php
7+
exclude:
8+
- docs
9+
- vendor
10+
- resources
11+
- views
12+
- public
13+
- templates
14+
not-name:
15+
- UnionCar.php
16+
- TimerUnionTypes.php
17+
- schema1.php
1818

1919
enabled:
20-
- alpha_ordered_traits
21-
- array_indentation
22-
- array_push
23-
- combine_consecutive_issets
24-
- combine_consecutive_unsets
25-
- combine_nested_dirname
26-
- declare_strict_types
27-
- dir_constant
28-
- final_static_access
29-
- fully_qualified_strict_types
30-
- function_to_constant
31-
- hash_to_slash_comment
32-
- is_null
33-
- logical_operators
34-
- magic_constant_casing
35-
- magic_method_casing
36-
- method_separation
37-
- modernize_types_casting
38-
- native_function_casing
39-
- native_function_type_declaration_casing
40-
- no_alias_functions
41-
- no_empty_comment
42-
- no_empty_phpdoc
43-
- no_empty_statement
44-
- no_extra_block_blank_lines
45-
- no_short_bool_cast
46-
- no_superfluous_elseif
47-
- no_unneeded_control_parentheses
48-
- no_unneeded_curly_braces
49-
- no_unneeded_final_method
50-
- no_unset_cast
51-
- no_unused_imports
52-
- no_unused_lambda_imports
53-
- no_useless_else
54-
- no_useless_return
55-
- normalize_index_brace
56-
- php_unit_dedicate_assert
57-
- php_unit_dedicate_assert_internal_type
58-
- php_unit_expectation
59-
- php_unit_mock
60-
- php_unit_mock_short_will_return
61-
- php_unit_namespaced
62-
- php_unit_no_expectation_annotation
63-
- phpdoc_no_empty_return
64-
- phpdoc_no_useless_inheritdoc
65-
- phpdoc_order
66-
- phpdoc_property
67-
- phpdoc_scalar
68-
- phpdoc_separation
69-
- phpdoc_singular_inheritdoc
70-
- phpdoc_trim
71-
- phpdoc_trim_consecutive_blank_line_separation
72-
- phpdoc_type_to_var
73-
- phpdoc_types
74-
- phpdoc_types_order
75-
- print_to_echo
76-
- regular_callable_call
77-
- return_assignment
78-
- self_accessor
79-
- self_static_accessor
80-
- set_type_to_cast
81-
- short_array_syntax
82-
- short_list_syntax
83-
- simplified_if_return
84-
- single_quote
85-
- standardize_not_equals
86-
- ternary_to_null_coalescing
87-
- trailing_comma_in_multiline_array
88-
- unalign_double_arrow
89-
- unalign_equals
20+
- alpha_ordered_traits
21+
- array_indentation
22+
- array_push
23+
- combine_consecutive_issets
24+
- combine_consecutive_unsets
25+
- combine_nested_dirname
26+
- declare_strict_types
27+
- dir_constant
28+
- final_static_access
29+
- fully_qualified_strict_types
30+
- function_to_constant
31+
- hash_to_slash_comment
32+
- is_null
33+
- logical_operators
34+
- magic_constant_casing
35+
- magic_method_casing
36+
- method_separation
37+
- modernize_types_casting
38+
- native_function_casing
39+
- native_function_type_declaration_casing
40+
- no_alias_functions
41+
- no_empty_comment
42+
- no_empty_phpdoc
43+
- no_empty_statement
44+
- no_extra_block_blank_lines
45+
- no_short_bool_cast
46+
- no_superfluous_elseif
47+
- no_unneeded_control_parentheses
48+
- no_unneeded_curly_braces
49+
- no_unneeded_final_method
50+
- no_unset_cast
51+
- no_unused_imports
52+
- no_unused_lambda_imports
53+
- no_useless_else
54+
- no_useless_return
55+
- normalize_index_brace
56+
- php_unit_dedicate_assert
57+
- php_unit_dedicate_assert_internal_type
58+
- php_unit_expectation
59+
- php_unit_mock
60+
- php_unit_mock_short_will_return
61+
- php_unit_namespaced
62+
- php_unit_no_expectation_annotation
63+
- phpdoc_no_empty_return
64+
- phpdoc_no_useless_inheritdoc
65+
- phpdoc_order
66+
- phpdoc_property
67+
- phpdoc_scalar
68+
- phpdoc_separation
69+
- phpdoc_singular_inheritdoc
70+
- phpdoc_trim
71+
- phpdoc_trim_consecutive_blank_line_separation
72+
- phpdoc_type_to_var
73+
- phpdoc_types
74+
- phpdoc_types_order
75+
- print_to_echo
76+
- regular_callable_call
77+
- return_assignment
78+
- self_accessor
79+
- self_static_accessor
80+
- set_type_to_cast
81+
- short_array_syntax
82+
- short_list_syntax
83+
- simplified_if_return
84+
- single_quote
85+
- standardize_not_equals
86+
- ternary_to_null_coalescing
87+
- trailing_comma_in_multiline_array
88+
- unalign_double_arrow
89+
- unalign_equals

0 commit comments

Comments
 (0)