From 7c21770fe74c709dec0430e2630b85a0b1f30ad4 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:15:19 -0300 Subject: [PATCH] Docs folder standardization and other fixes --- docs/internals.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ psalm.xml | 2 +- src/Json.php | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 docs/internals.md diff --git a/docs/internals.md b/docs/internals.md new file mode 100644 index 0000000..b715d9f --- /dev/null +++ b/docs/internals.md @@ -0,0 +1,46 @@ +# Internals + +## Unit testing + +The package is tested with [PHPUnit](https://phpunit.de/). To run tests: + +```shell +./vendor/bin/phpunit +``` + +## Mutation testing + +The package tests are checked with [Infection](https://infection.github.io/) mutation framework with +[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: + +```shell +./vendor/bin/roave-infection-static-analysis-plugin +``` + +## Static analysis + +The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: + +```shell +./vendor/bin/psalm +``` + +## Rector + +Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or +use either newest or any specific version of PHP: + +```shell +./vendor/bin/rector +``` + +## Dependencies + +Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive +[Composer](https://getcomposer.org/) dependencies. + +To run the checker, execute the following command: + +```shell +./vendor/bin/composer-require-checker +``` diff --git a/psalm.xml b/psalm.xml index 5a95a3a..f8ac92e 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,7 +1,7 @@ diff --git a/src/Json.php b/src/Json.php index 7b77f82..758154d 100644 --- a/src/Json.php +++ b/src/Json.php @@ -33,7 +33,7 @@ final class Json * * @param mixed $value The data to be encoded. * @param int $options The encoding options. For more details please refer to - * {@see http://www.php.net/manual/en/function.json-encode.php}. + * {@see https://www.php.net/manual/en/function.json-encode.php}. * Default is `JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR`. * @param int $depth The maximum depth. *