diff --git a/.gitignore b/.gitignore index bf71063..0347121 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea /vendor example.php -.phpunit.result.cache \ No newline at end of file +.phpunit.result.cache +.phpunit.cache \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index fdb184e..08c6881 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: php php: - - '7.1' - - '7.2' + - '8.3' - nightly before_script: diff --git a/README.md b/README.md index 5c16164..2627e2e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ This package allows converting between different string formats. -[![Build Status](https://travis-ci.org/sebastiansulinski/string-converter.svg?branch=master)](https://travis-ci.org/sebastiansulinski/string-converter) - ## Usage examples ### Class-name diff --git a/composer.json b/composer.json index edac446..9a3b1ae 100644 --- a/composer.json +++ b/composer.json @@ -10,10 +10,11 @@ ], "minimum-stability": "stable", "require": { - "php": "^7.4|^8.0" + "php": "^8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "laravel/pint": "^1.0", + "phpunit/phpunit": "^10.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index c4fe212..616c5e6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,39 +4,48 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0646ad4dd617de2e0e089b0d42458be2", + "content-hash": "c124b8a81167d043aa8bd6d78fe2cd15", "packages": [], "packages-dev": [ { - "name": "doctrine/instantiator", - "version": "1.4.0", + "name": "laravel/pint", + "version": "v1.13.7", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "url": "https://github.com/laravel/pint.git", + "reference": "4157768980dbd977f1c4b4cc94997416d8b30ece" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/laravel/pint/zipball/4157768980dbd977f1c4b4cc94997416d8b30ece", + "reference": "4157768980dbd977f1c4b4cc94997416d8b30ece", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.1.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "friendsofphp/php-cs-fixer": "^3.38.0", + "illuminate/view": "^10.30.1", + "laravel-zero/framework": "^10.3.0", + "mockery/mockery": "^1.6.6", + "nunomaduro/larastan": "^2.6.4", + "nunomaduro/termwind": "^1.15.1", + "pestphp/pest": "^2.24.2" }, - "type": "library", + "bin": [ + "builds/pint" + ], + "type": "project", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" } }, "notification-url": "https://packagist.org/downloads/", @@ -45,70 +54,59 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", "keywords": [ - "constructor", - "instantiate" + "format", + "formatter", + "lint", + "linter", + "php" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2023-12-05T19:43:12+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -124,7 +122,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -132,20 +130,20 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", - "version": "v4.12.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -186,9 +184,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2021-07-21T10:44:31+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", @@ -252,16 +250,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -297,275 +295,50 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.13.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.6", + "version": "10.1.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735", + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -593,7 +366,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9" }, "funding": [ { @@ -601,32 +375,32 @@ "type": "github" } ], - "time": "2021-03-28T07:26:59+00:00" + "time": "2023-11-23T12:23:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -653,7 +427,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -661,28 +436,28 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -690,7 +465,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -716,7 +491,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -724,32 +499,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -775,7 +550,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -783,32 +559,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -834,7 +610,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -842,24 +618,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.5.8", + "version": "10.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb" + "reference": "5aedff46afba98dddecaa12349ec044d9103d4fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb", - "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5aedff46afba98dddecaa12349ec044d9103d4fe", + "reference": "5aedff46afba98dddecaa12349ec044d9103d4fe", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -869,32 +644,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -902,15 +671,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-main": "10.5-dev" } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -933,44 +702,49 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.2" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2021-07-31T15:17:34+00:00" + "time": "2023-12-05T14:54:33+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -993,7 +767,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -1001,32 +775,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1049,7 +823,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -1057,32 +831,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1104,7 +878,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -1112,34 +886,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1178,7 +954,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -1186,33 +963,33 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -1235,7 +1012,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -1243,33 +1021,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1301,7 +1079,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -1309,27 +1088,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -1337,7 +1116,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1356,7 +1135,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1364,7 +1143,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -1372,34 +1152,34 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1434,14 +1214,15 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -1449,38 +1230,35 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1505,7 +1283,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -1513,33 +1292,33 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1562,7 +1341,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -1570,34 +1350,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-08-31T09:25:50+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1619,7 +1399,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -1627,32 +1407,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1674,7 +1454,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -1682,32 +1462,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1734,10 +1514,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -1745,87 +1525,32 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1848,7 +1573,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -1856,29 +1581,29 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1901,7 +1626,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -1909,99 +1634,20 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -2030,7 +1676,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -2038,65 +1684,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], @@ -2105,8 +1693,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4|^8.0" + "php": "^8.2" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.6.0" } diff --git a/phpunit.xml b/phpunit.xml index 4dadc17..247fab8 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,21 +1,14 @@ - - - - ./tests/ - - - - - ./app - - + + + + ./tests/ + + + + + + ./app + + diff --git a/src/StringConverter/Container.php b/src/StringConverter/Container.php index d09aea4..1d8eb13 100644 --- a/src/StringConverter/Container.php +++ b/src/StringConverter/Container.php @@ -18,9 +18,6 @@ class Container /** * Container constructor. - * - * @param string $from - * @param string $to */ public function __construct(string $from, string $to) { @@ -30,8 +27,6 @@ public function __construct(string $from, string $to) /** * Get source class instance. - * - * @return \SSD\StringConverter\Types\Contract */ public function from(): Contract { @@ -42,8 +37,6 @@ public function from(): Contract /** * Get destination class instance. - * - * @return \SSD\StringConverter\Types\Contract */ public function to(): Contract { @@ -54,12 +47,9 @@ public function to(): Contract /** * Return formatted class name. - * - * @param string $name - * @return string */ private function className(string $name): string { - return "SSD\\StringConverter\\Types\\".ucfirst($name); + return 'SSD\\StringConverter\\Types\\'.ucfirst($name); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Converter.php b/src/StringConverter/Converter.php index 907b569..c682164 100644 --- a/src/StringConverter/Converter.php +++ b/src/StringConverter/Converter.php @@ -6,9 +6,6 @@ abstract class Converter { /** * Convert first letter to upper case. - * - * @param array $params - * @return string */ final protected function upperCaseFirst(array $params): string { @@ -17,50 +14,37 @@ final protected function upperCaseFirst(array $params): string /** * Prepend hyphen. - * - * @param array $params - * @return string */ final protected function hyphen(array $params): string { - return "-".$params[1]; + return '-'.$params[1]; } /** * Prepend underscore. - * - * @param array $params - * @return string */ final public function underscore(array $params): string { - return "_".$params[1]; + return '_'.$params[1]; } /** * Prepend space. - * - * @param array $params - * @return string */ final protected function space(array $params): string { - return " ".$params[1]; + return ' '.$params[1]; } /** * Callback. - * - * @param string $string - * @param callable|null $callback - * @return string */ - final protected function callback(string $string, callable $callback = null): string + final protected function callback(string $string, ?callable $callback = null): string { - if (!is_callable($callback)) { + if (! is_callable($callback)) { return $string; } return call_user_func($callback, $string); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Factory.php b/src/StringConverter/Factory.php index c6758af..2cd70d7 100644 --- a/src/StringConverter/Factory.php +++ b/src/StringConverter/Factory.php @@ -2,13 +2,42 @@ namespace SSD\StringConverter; +/** + * @method static string camelToClassName(string $string, callable $callback = null) + * @method static string camelToConstant(string $string, callable $callback = null) + * @method static string camelToHyphen(string $string, callable $callback = null) + * @method static string camelToUnderscore(string $string, callable $callback = null) + * @method static string camelToSpace(string $string, callable $callback = null) + * @method static string classNameToCamel(string $string, callable $callback = null) + * @method static string classNameToConstant(string $string, callable $callback = null) + * @method static string classNameToHyphen(string $string, callable $callback = null) + * @method static string classNameToUnderscore(string $string, callable $callback = null) + * @method static string classNameToSpace(string $string, callable $callback = null) + * @method static string constantToClassName(string $string, callable $callback = null) + * @method static string constantToCamel(string $string, callable $callback = null) + * @method static string constantToHyphen(string $string, callable $callback = null) + * @method static string constantToUnderscore(string $string, callable $callback = null) + * @method static string constantToSpace(string $string, callable $callback = null) + * @method static string hyphenToClassName(string $string, callable $callback = null) + * @method static string hyphenToCamel(string $string, callable $callback = null) + * @method static string hyphenToConstant(string $string, callable $callback = null) + * @method static string hyphenToUnderscore(string $string, callable $callback = null) + * @method static string hyphenToSpace(string $string, callable $callback = null) + * @method static string spaceToClassName(string $string, callable $callback = null) + * @method static string spaceToCamel(string $string, callable $callback = null) + * @method static string spaceToConstant(string $string, callable $callback = null) + * @method static string spaceToHyphen(string $string, callable $callback = null) + * @method static string spaceToUnderscore(string $string, callable $callback = null) + * @method static string underscoreToClassName(string $string, callable $callback = null) + * @method static string underscoreToCamel(string $string, callable $callback = null) + * @method static string underscoreToConstant(string $string, callable $callback = null) + * @method static string underscoreToHyphen(string $string, callable $callback = null) + * @method static string underscoreToSpace(string $string, callable $callback = null) + */ class Factory { /** * Split name into array using capital letters as delimiter. - * - * @param string $name - * @return array */ private static function splitName(string $name): array { @@ -17,9 +46,6 @@ private static function splitName(string $name): array /** * Get array of class names. - * - * @param string $name - * @return \SSD\StringConverter\Container */ private static function getClass(string $name): Container { @@ -28,10 +54,6 @@ private static function getClass(string $name): Container /** * Call the method statically on the Converter sub-class. - * - * @param string $name - * @param array $arguments - * @return string */ public static function __callStatic(string $name, array $arguments = []): string { @@ -41,4 +63,4 @@ public static function __callStatic(string $name, array $arguments = []): string return $container->to()->from(...$arguments); } -} \ No newline at end of file +} diff --git a/src/StringConverter/RegEx.php b/src/StringConverter/RegEx.php index 3a3ad61..b694157 100644 --- a/src/StringConverter/RegEx.php +++ b/src/StringConverter/RegEx.php @@ -31,4 +31,4 @@ class RegEx * @var string */ const REGEX_SPACE = '/\s(.)/'; -} \ No newline at end of file +} diff --git a/src/StringConverter/Types/Camel.php b/src/StringConverter/Types/Camel.php index 744b25f..560130e 100644 --- a/src/StringConverter/Types/Camel.php +++ b/src/StringConverter/Types/Camel.php @@ -2,21 +2,15 @@ namespace SSD\StringConverter\Types; -use SSD\StringConverter\{ - RegEx, Converter -}; +use SSD\StringConverter\Converter; +use SSD\StringConverter\RegEx; class Camel extends Converter implements Contract { /** * Convert to camel case. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string + public function from(Contract $contract, string $string, ?callable $callback = null): string { return $this->callback( $contract->recipe( @@ -38,12 +32,9 @@ function ($string) use ($contract) { /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string + public function recipe(string $string, string $method, ?callable $callback = null): string { return preg_replace_callback( RegEx::REGEX_CAPITAL_LETTERS, @@ -51,4 +42,4 @@ public function recipe(string $string, string $method, callable $callback = null $this->callback($string, $callback) ); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Types/ClassName.php b/src/StringConverter/Types/ClassName.php index 83dffff..9e4162e 100644 --- a/src/StringConverter/Types/ClassName.php +++ b/src/StringConverter/Types/ClassName.php @@ -2,21 +2,15 @@ namespace SSD\StringConverter\Types; -use SSD\StringConverter\{ - RegEx, Converter -}; +use SSD\StringConverter\Converter; +use SSD\StringConverter\RegEx; class ClassName extends Converter implements Contract { /** * Convert to class name. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string + public function from(Contract $contract, string $string, ?callable $callback = null): string { $string = ucwords( $contract->recipe( @@ -39,12 +33,9 @@ function ($string) use ($contract) { /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string + public function recipe(string $string, string $method, ?callable $callback = null): string { return preg_replace_callback( RegEx::REGEX_CAPITAL_LETTERS, @@ -52,4 +43,4 @@ public function recipe(string $string, string $method, callable $callback = null $this->callback($string, $callback) ); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Types/Constant.php b/src/StringConverter/Types/Constant.php index b73cb4d..a1a4b1c 100644 --- a/src/StringConverter/Types/Constant.php +++ b/src/StringConverter/Types/Constant.php @@ -2,21 +2,15 @@ namespace SSD\StringConverter\Types; -use SSD\StringConverter\{ - RegEx, Converter -}; +use SSD\StringConverter\Converter; +use SSD\StringConverter\RegEx; class Constant extends Converter implements Contract { /** * Convert to constant. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string + public function from(Contract $contract, string $string, ?callable $callback = null): string { return $this->callback( ltrim(strtoupper($contract->recipe($string, 'underscore')), '_'), @@ -27,12 +21,9 @@ public function from(Contract $contract, string $string, callable $callback = nu /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string + public function recipe(string $string, string $method, ?callable $callback = null): string { return preg_replace_callback( RegEx::REGEX_UNDERSCORE, @@ -40,4 +31,4 @@ public function recipe(string $string, string $method, callable $callback = null $this->callback($string, $callback) ); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Types/Contract.php b/src/StringConverter/Types/Contract.php index e103f2f..6f05fcd 100644 --- a/src/StringConverter/Types/Contract.php +++ b/src/StringConverter/Types/Contract.php @@ -6,21 +6,13 @@ interface Contract { /** * Convert to format. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string; + public function from(Contract $contract, string $string, ?callable $callback = null): string; /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string; -} \ No newline at end of file + public function recipe(string $string, string $method, ?callable $callback = null): string; +} diff --git a/src/StringConverter/Types/Hyphen.php b/src/StringConverter/Types/Hyphen.php index 8d92376..0842841 100644 --- a/src/StringConverter/Types/Hyphen.php +++ b/src/StringConverter/Types/Hyphen.php @@ -2,21 +2,15 @@ namespace SSD\StringConverter\Types; -use SSD\StringConverter\{ - RegEx, Converter -}; +use SSD\StringConverter\Converter; +use SSD\StringConverter\RegEx; class Hyphen extends Converter implements Contract { /** * Convert to hyphen. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string + public function from(Contract $contract, string $string, ?callable $callback = null): string { return $this->callback( ltrim($contract->recipe($string, 'hyphen'), '-'), @@ -27,12 +21,9 @@ public function from(Contract $contract, string $string, callable $callback = nu /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string + public function recipe(string $string, string $method, ?callable $callback = null): string { return preg_replace_callback( RegEx::REGEX_HYPHEN, @@ -40,4 +31,4 @@ public function recipe(string $string, string $method, callable $callback = null $this->callback($string, $callback) ); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Types/Space.php b/src/StringConverter/Types/Space.php index 40eff77..a856b22 100644 --- a/src/StringConverter/Types/Space.php +++ b/src/StringConverter/Types/Space.php @@ -2,22 +2,16 @@ namespace SSD\StringConverter\Types; -use SSD\StringConverter\{ - RegEx, Converter -}; +use SSD\StringConverter\Converter; +use SSD\StringConverter\RegEx; class Space extends Converter implements Contract { /** * Convert to space format. * Call optional function on callback. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string + public function from(Contract $contract, string $string, ?callable $callback = null): string { return $this->callback( trim($contract->recipe($string, 'space')), @@ -28,12 +22,9 @@ public function from(Contract $contract, string $string, callable $callback = nu /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string + public function recipe(string $string, string $method, ?callable $callback = null): string { return preg_replace_callback( RegEx::REGEX_SPACE, @@ -41,4 +32,4 @@ public function recipe(string $string, string $method, callable $callback = null $this->callback($string, $callback) ); } -} \ No newline at end of file +} diff --git a/src/StringConverter/Types/Underscore.php b/src/StringConverter/Types/Underscore.php index b7b6780..e45bc0b 100644 --- a/src/StringConverter/Types/Underscore.php +++ b/src/StringConverter/Types/Underscore.php @@ -2,21 +2,15 @@ namespace SSD\StringConverter\Types; -use SSD\StringConverter\{ - RegEx, Converter -}; +use SSD\StringConverter\Converter; +use SSD\StringConverter\RegEx; class Underscore extends Converter implements Contract { /** * Convert to underscore. - * - * @param \SSD\StringConverter\Types\Contract $contract - * @param string $string - * @param callable|null $callback - * @return string */ - public function from(Contract $contract, string $string, callable $callback = null): string + public function from(Contract $contract, string $string, ?callable $callback = null): string { return $this->callback( ltrim($contract->recipe($string, 'underscore'), '_'), @@ -27,12 +21,9 @@ public function from(Contract $contract, string $string, callable $callback = nu /** * Conversion recipe. * - * @param string $string - * @param string $method - * @param callable|null $callback * @return mixed */ - public function recipe(string $string, string $method, callable $callback = null): string + public function recipe(string $string, string $method, ?callable $callback = null): string { return preg_replace_callback( RegEx::REGEX_UNDERSCORE, @@ -40,4 +31,4 @@ public function recipe(string $string, string $method, callable $callback = null $this->callback($string, $callback) ); } -} \ No newline at end of file +} diff --git a/tests/BaseCase.php b/tests/BaseCase.php index e4d298a..94121e6 100644 --- a/tests/BaseCase.php +++ b/tests/BaseCase.php @@ -47,4 +47,4 @@ abstract class BaseCase extends TestCase * @var string */ const STRING_SPACE = 'php eol'; -} \ No newline at end of file +} diff --git a/tests/StringConverter/CamelConverterTest.php b/tests/StringConverter/CamelConverterTest.php index 3c76a88..141a194 100644 --- a/tests/StringConverter/CamelConverterTest.php +++ b/tests/StringConverter/CamelConverterTest.php @@ -2,15 +2,15 @@ namespace SSDTest\StringConverter; -use SSDTest\BaseCase; use SSD\StringConverter\Factory; +use SSDTest\BaseCase; -class CamelConverterCase extends BaseCase +class CamelConverterTest extends BaseCase { /** * @test */ - public function converts_camel_to_class_name() + public function converts_camel_to_class_name(): void { $this->assertSame('PhpEol', Factory::camelToClassName(parent::STRING_CAMEL)); } @@ -18,7 +18,7 @@ public function converts_camel_to_class_name() /** * @test */ - public function converts_camel_to_constant() + public function converts_camel_to_constant(): void { $this->assertSame('PHP_EOL', Factory::camelToConstant(parent::STRING_CAMEL)); } @@ -26,7 +26,7 @@ public function converts_camel_to_constant() /** * @test */ - public function converts_camel_to_hyphen() + public function converts_camel_to_hyphen(): void { $this->assertSame('php-Eol', Factory::camelToHyphen(parent::STRING_CAMEL)); } @@ -34,7 +34,7 @@ public function converts_camel_to_hyphen() /** * @test */ - public function converts_camel_to_underscore() + public function converts_camel_to_underscore(): void { $this->assertSame('php_Eol', Factory::camelToUnderscore(parent::STRING_CAMEL)); } @@ -42,7 +42,7 @@ public function converts_camel_to_underscore() /** * @test */ - public function converts_camel_to_space() + public function converts_camel_to_space(): void { $this->assertSame('php Eol', Factory::camelToSpace(parent::STRING_CAMEL)); } @@ -50,8 +50,8 @@ public function converts_camel_to_space() /** * @test */ - public function converts_camel_to_space_and_lower_case() + public function converts_camel_to_space_and_lower_case(): void { $this->assertSame('php eol', Factory::camelToSpace(parent::STRING_CAMEL, 'strtolower')); } -} \ No newline at end of file +} diff --git a/tests/StringConverter/ClassNameConverterTest.php b/tests/StringConverter/ClassNameConverterTest.php index 127c7eb..4607a95 100644 --- a/tests/StringConverter/ClassNameConverterTest.php +++ b/tests/StringConverter/ClassNameConverterTest.php @@ -2,15 +2,15 @@ namespace SSDTest\StringConverter; -use SSDTest\BaseCase; use SSD\StringConverter\Factory; +use SSDTest\BaseCase; -class ClassNameConverterCase extends BaseCase +class ClassNameConverterTest extends BaseCase { /** * @test */ - public function converts_class_name_to_camel() + public function converts_class_name_to_camel(): void { $this->assertSame('phpEol', Factory::classNameToCamel(parent::STRING_CLASS_NAME)); } @@ -18,7 +18,7 @@ public function converts_class_name_to_camel() /** * @test */ - public function converts_class_name_to_constant() + public function converts_class_name_to_constant(): void { $this->assertSame('PHP_EOL', Factory::classNameToConstant(parent::STRING_CLASS_NAME)); } @@ -26,7 +26,7 @@ public function converts_class_name_to_constant() /** * @test */ - public function converts_class_name_to_hyphen() + public function converts_class_name_to_hyphen(): void { $this->assertSame('Php-Eol', Factory::classNameToHyphen(parent::STRING_CLASS_NAME)); } @@ -34,7 +34,7 @@ public function converts_class_name_to_hyphen() /** * @test */ - public function converts_class_name_to_underscore() + public function converts_class_name_to_underscore(): void { $this->assertSame('Php_Eol', Factory::classNameToUnderscore(parent::STRING_CLASS_NAME)); } @@ -42,7 +42,7 @@ public function converts_class_name_to_underscore() /** * @test */ - public function converts_class_name_to_space() + public function converts_class_name_to_space(): void { $this->assertSame('Php Eol', Factory::classNameToSpace(parent::STRING_CLASS_NAME)); } @@ -50,8 +50,8 @@ public function converts_class_name_to_space() /** * @test */ - public function converts_class_name_to_space_and_lower_case() + public function converts_class_name_to_space_and_lower_case(): void { $this->assertSame('php eol', Factory::classNameToSpace(parent::STRING_CLASS_NAME, 'strtolower')); } -} \ No newline at end of file +} diff --git a/tests/StringConverter/ConstantConverterTest.php b/tests/StringConverter/ConstantConverterTest.php index 319b07a..507340d 100644 --- a/tests/StringConverter/ConstantConverterTest.php +++ b/tests/StringConverter/ConstantConverterTest.php @@ -2,15 +2,15 @@ namespace SSDTest\StringConverter; -use SSDTest\BaseCase; use SSD\StringConverter\Factory; +use SSDTest\BaseCase; -class ConstantConverterCase extends BaseCase +class ConstantConverterTest extends BaseCase { /** * @test */ - public function converts_constant_to_class_name() + public function converts_constant_to_class_name(): void { $this->assertSame('PhpEol', Factory::constantToClassName(parent::STRING_CONSTANT)); } @@ -18,7 +18,7 @@ public function converts_constant_to_class_name() /** * @test */ - public function converts_constant_to_camel() + public function converts_constant_to_camel(): void { $this->assertSame('phpEol', Factory::constantToCamel(parent::STRING_CONSTANT)); } @@ -26,7 +26,7 @@ public function converts_constant_to_camel() /** * @test */ - public function converts_constant_to_hyphen() + public function converts_constant_to_hyphen(): void { $this->assertSame('PHP-EOL', Factory::constantToHyphen(parent::STRING_CONSTANT)); } @@ -34,7 +34,7 @@ public function converts_constant_to_hyphen() /** * @test */ - public function converts_constant_to_underscore() + public function converts_constant_to_underscore(): void { $this->assertSame('PHP_EOL', Factory::constantToUnderscore(parent::STRING_CONSTANT)); } @@ -42,7 +42,7 @@ public function converts_constant_to_underscore() /** * @test */ - public function converts_constant_to_space() + public function converts_constant_to_space(): void { $this->assertSame('PHP EOL', Factory::constantToSpace(parent::STRING_CONSTANT)); } @@ -50,8 +50,8 @@ public function converts_constant_to_space() /** * @test */ - public function converts_constant_to_space_and_lower_case() + public function converts_constant_to_space_and_lower_case(): void { $this->assertSame('php eol', Factory::constantToSpace(parent::STRING_CONSTANT, 'strtolower')); } -} \ No newline at end of file +} diff --git a/tests/StringConverter/HyphenConverterTest.php b/tests/StringConverter/HyphenConverterTest.php index ec1b044..f670058 100644 --- a/tests/StringConverter/HyphenConverterTest.php +++ b/tests/StringConverter/HyphenConverterTest.php @@ -2,15 +2,15 @@ namespace SSDTest\StringConverter; -use SSDTest\BaseCase; use SSD\StringConverter\Factory; +use SSDTest\BaseCase; -class HyphenConverterCase extends BaseCase +class HyphenConverterTest extends BaseCase { /** * @test */ - public function converts_hyphen_to_class_name() + public function converts_hyphen_to_class_name(): void { $this->assertSame('PhpEol', Factory::hyphenToClassName(parent::STRING_HYPHEN)); } @@ -18,7 +18,7 @@ public function converts_hyphen_to_class_name() /** * @test */ - public function converts_hyphen_to_camel() + public function converts_hyphen_to_camel(): void { $this->assertSame('phpEol', Factory::hyphenToCamel(parent::STRING_HYPHEN)); } @@ -26,7 +26,7 @@ public function converts_hyphen_to_camel() /** * @test */ - public function converts_hyphen_to_constant() + public function converts_hyphen_to_constant(): void { $this->assertSame('PHP_EOL', Factory::hyphenToConstant(parent::STRING_HYPHEN)); } @@ -34,7 +34,7 @@ public function converts_hyphen_to_constant() /** * @test */ - public function converts_hyphen_to_underscore() + public function converts_hyphen_to_underscore(): void { $this->assertSame('php_eol', Factory::hyphenToUnderscore(parent::STRING_HYPHEN)); } @@ -42,7 +42,7 @@ public function converts_hyphen_to_underscore() /** * @test */ - public function converts_hyphen_to_space() + public function converts_hyphen_to_space(): void { $this->assertSame('php eol', Factory::hyphenToSpace(parent::STRING_HYPHEN)); } @@ -50,8 +50,8 @@ public function converts_hyphen_to_space() /** * @test */ - public function converts_hyphen_to_space_and_upper_case() + public function converts_hyphen_to_space_and_upper_case(): void { $this->assertSame('PHP EOL', Factory::hyphenToSpace(ucfirst(parent::STRING_HYPHEN), 'strtoupper')); } -} \ No newline at end of file +} diff --git a/tests/StringConverter/SpaceConverterTest.php b/tests/StringConverter/SpaceConverterTest.php index 9ef6073..0d085fd 100644 --- a/tests/StringConverter/SpaceConverterTest.php +++ b/tests/StringConverter/SpaceConverterTest.php @@ -2,15 +2,15 @@ namespace SSDTest\StringConverter; -use SSDTest\BaseCase; use SSD\StringConverter\Factory; +use SSDTest\BaseCase; -class SpaceConverterCase extends BaseCase +class SpaceConverterTest extends BaseCase { /** * @test */ - public function converts_space_to_class_name() + public function converts_space_to_class_name(): void { $this->assertSame('PhpEol', Factory::spaceToClassName(parent::STRING_SPACE)); } @@ -18,7 +18,7 @@ public function converts_space_to_class_name() /** * @test */ - public function converts_space_to_camel() + public function converts_space_to_camel(): void { $this->assertSame('phpEol', Factory::spaceToCamel(parent::STRING_SPACE)); } @@ -26,7 +26,7 @@ public function converts_space_to_camel() /** * @test */ - public function converts_space_to_constant() + public function converts_space_to_constant(): void { $this->assertSame('PHP_EOL', Factory::spaceToConstant(parent::STRING_SPACE)); } @@ -34,7 +34,7 @@ public function converts_space_to_constant() /** * @test */ - public function converts_space_to_hyphen() + public function converts_space_to_hyphen(): void { $this->assertSame('php-eol', Factory::spaceToHyphen(parent::STRING_SPACE)); } @@ -42,7 +42,7 @@ public function converts_space_to_hyphen() /** * @test */ - public function converts_space_to_underscore() + public function converts_space_to_underscore(): void { $this->assertSame('php_eol', Factory::spaceToUnderscore(parent::STRING_SPACE)); } @@ -50,8 +50,8 @@ public function converts_space_to_underscore() /** * @test */ - public function converts_space_to_underscore_and_upper_case() + public function converts_space_to_underscore_and_upper_case(): void { $this->assertSame('PHP_EOL', Factory::spaceToUnderscore(parent::STRING_SPACE, 'strtoupper')); } -} \ No newline at end of file +} diff --git a/tests/StringConverter/UnderscoreConverterTest.php b/tests/StringConverter/UnderscoreConverterTest.php index 5504b39..b20d522 100644 --- a/tests/StringConverter/UnderscoreConverterTest.php +++ b/tests/StringConverter/UnderscoreConverterTest.php @@ -2,15 +2,15 @@ namespace SSDTest\StringConverter; -use SSDTest\BaseCase; use SSD\StringConverter\Factory; +use SSDTest\BaseCase; -class UnderscoreConverterCase extends BaseCase +class UnderscoreConverterTest extends BaseCase { /** * @test */ - public function converts_underscore_to_class_name() + public function converts_underscore_to_class_name(): void { $this->assertSame('PhpEol', Factory::underscoreToClassName(parent::STRING_UNDERSCORE)); } @@ -18,7 +18,7 @@ public function converts_underscore_to_class_name() /** * @test */ - public function converts_underscore_to_camel() + public function converts_underscore_to_camel(): void { $this->assertSame('phpEol', Factory::underscoreToCamel(parent::STRING_UNDERSCORE)); } @@ -26,7 +26,7 @@ public function converts_underscore_to_camel() /** * @test */ - public function converts_underscore_to_constant() + public function converts_underscore_to_constant(): void { $this->assertSame('PHP_EOL', Factory::underscoreToConstant(parent::STRING_UNDERSCORE)); } @@ -34,7 +34,7 @@ public function converts_underscore_to_constant() /** * @test */ - public function converts_underscore_to_hyphen() + public function converts_underscore_to_hyphen(): void { $this->assertSame('php-eol', Factory::underscoreToHyphen(parent::STRING_UNDERSCORE)); } @@ -42,7 +42,7 @@ public function converts_underscore_to_hyphen() /** * @test */ - public function converts_underscore_to_space() + public function converts_underscore_to_space(): void { $this->assertSame('php eol', Factory::underscoreToSpace(parent::STRING_UNDERSCORE)); } @@ -50,8 +50,8 @@ public function converts_underscore_to_space() /** * @test */ - public function converts_underscore_to_space_and_upper_case() + public function converts_underscore_to_space_and_upper_case(): void { $this->assertSame('PHP EOL', Factory::underscoreToSpace(parent::STRING_UNDERSCORE, 'strtoupper')); } -} \ No newline at end of file +}