Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 6 additions & 5 deletions .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist --optimize-autoloader"
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v8.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Build the code coverage report
run: composer coverage:clover
- name: Upload code coverage report
uses: qltysh/qlty-action/coverage@v1
with:
coverageCommand: "composer coverage:clover"
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: clover.xml
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Set autocrlf on windows
Expand All @@ -25,9 +25,5 @@ jobs:
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist --optimize-autoloader"
- name: Check coding standard
run: composer cs:check
- name: Static analysis tool
run: composer analytics
- name: Test suite
run: composer test
106 changes: 106 additions & 0 deletions .qlty/qlty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# This file was automatically generated by `qlty init`.
# You can modify it to suit your needs.
# We recommend you to commit this file to your repository.
#
# This configuration is used by both Qlty CLI and Qlty Cloud.
#
# Qlty CLI -- Code quality toolkit for developers
# Qlty Cloud -- Fully automated Code Health Platform
#
# Try Qlty Cloud: https://qlty.sh
#
# For a guide to configuration, visit https://qlty.sh/d/config
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
config_version = "0"

exclude_patterns = [
"*_min.*",
"*-min.*",
"*.min.*",
"**/*.d.ts",
"**/.yarn/**",
"**/bower_components/**",
"**/build/**",
"**/cache/**",
"**/config/**",
"**/db/**",
"**/deps/**",
"**/dist/**",
"**/extern/**",
"**/external/**",
"**/generated/**",
"**/Godeps/**",
"**/gradlew/**",
"**/mvnw/**",
"**/node_modules/**",
"**/protos/**",
"**/seed/**",
"**/target/**",
"**/testdata/**",
"**/vendor/**",
"**/assets/**",
]

test_patterns = [
"**/test/**",
"**/spec/**",
"**/*.test.*",
"**/*.spec.*",
"**/*_test.*",
"**/*_spec.*",
"**/test_*.*",
"**/spec_*.*",
"**/tests/**"
]

[smells]
mode = "comment"

[[source]]
name = "default"
default = true

[[plugin]]
name = "actionlint"

[[plugin]]
name = "dotenv-linter"
mode = "comment"

[[plugin]]
name = "golangci-lint"
mode = "comment"

[[plugin]]
name = "markdownlint"
mode = "comment"

[[plugin]]
name = "php-codesniffer"
mode = "comment"

[[plugin]]
name = "php-cs-fixer"

[[plugin]]
name = "prettier"

[[plugin]]
name = "radarlint-php"

[[plugin]]
name = "ripgrep"
mode = "comment"

[[plugin]]
name = "trivy"
drivers = [
"config",
"fs-vuln",
]

[[plugin]]
name = "trufflehog"

[[plugin]]
name = "yamllint"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Parameter Resolver

![Test Suite](https://github.com/susina/param-resolver/actions/workflows/test.yml/badge.svg)
[![Test Coverage](https://api.codeclimate.com/v1/badges/b2ce3e357481f2742e36/test_coverage)](https://codeclimate.com/github/susina/param-resolver/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/b2ce3e357481f2742e36/maintainability)](https://codeclimate.com/github/susina/param-resolver/maintainability)
[![Maintainability](https://qlty.sh/badges/15b08566-7e7a-46ca-b120-2e24af96de83/maintainability.svg)](https://qlty.sh/gh/susina/projects/param-resolver)
[![Code Coverage](https://qlty.sh/badges/15b08566-7e7a-46ca-b120-2e24af96de83/test_coverage.svg)](https://qlty.sh/gh/susina/projects/param-resolver)

ParamResolver is a small class to resolve parameters in configuration arrays.
It's heavily inspired on [Symfony ParameterBag](src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php) class.
Expand Down Expand Up @@ -75,7 +75,8 @@ You can escape the special character % by doubling it:

jeans property now contains the string '20%'.

> _Note_: Both keys and values of your array can contain parameters.
> [!Note]
> Both keys and values of your array can contain parameters.

### Special parameters: environment variables

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
}
},
"require-dev": {
"psalm/phar": "^5",
"psalm/phar": "^6",
"susina/coding-standard": "^2",
"pestphp/pest": "^2"
"pestphp/pest": "^3"
},
"scripts": {
"analytics": "php vendor/bin/psalm.phar",
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ParamResolverException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

namespace Susina\ParamResolver\Exception;

class ParamResolverException extends \RuntimeException
final class ParamResolverException extends \RuntimeException
{
}
2 changes: 1 addition & 1 deletion src/ParamResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Generator;
use Susina\ParamResolver\Exception\ParamResolverException;

class ParamResolver
final class ParamResolver
{
/**
* If the array with parameters is resolved.
Expand Down
2 changes: 1 addition & 1 deletion src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Utility class to perform validations.
*/
class Validator
final class Validator
{
/**
* Check if a value is only numeric or string.
Expand Down