Skip to content

Commit

Permalink
Ensure all string functions are multibyte-safe where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsmith committed Mar 14, 2020
1 parent 81d777c commit d5a6cee
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
/composer.lock
/vendor
/.idea
/.php_cs.cache
12 changes: 12 additions & 0 deletions .php_cs
@@ -0,0 +1,12 @@
<?php

$finder = PhpCsFixer\Finder::create()->in(__DIR__);

return PhpCsFixer\Config::create()
->setRules(
[
'mb_str_functions' => true,
]
)
->setRiskyAllowed(true)
->setFinder($finder);
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -6,6 +6,7 @@ before_script:
- composer self-update
- composer install
script:
- php vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no
- php vendor/bin/phpunit --coverage-clover=coverage.clover
- php vendor/bin/phpstan analyse --no-interaction
- php vendor/bin/psalm
Expand Down
9 changes: 7 additions & 2 deletions composer.json
Expand Up @@ -22,6 +22,7 @@
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"laminas/laminas-diactoros": "~2.2",
"phpstan/phpstan": "^0.12.14",
"phpunit/phpunit": "~7.0",
Expand All @@ -46,9 +47,13 @@
},
"scripts": {
"test": [
"phpunit",
"php-cs-fixer fix --verbose --dry-run",
"phpstan analyse",
"psalm"
"psalm",
"phpunit"
],
"fix": [
"php-cs-fixer fix --verbose"
]
}
}

0 comments on commit d5a6cee

Please sign in to comment.