diff --git a/composer.lock b/composer.lock index fb04731..3a8a25f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6128d778392e0d3fbcf784537944df3a", + "content-hash": "914a4eb72418c2cf0d2321cafd474ac2", "packages": [], "packages-dev": [ { @@ -71,24 +71,23 @@ }, { "name": "composer/semver", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e" + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e", + "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + "phpunit/phpunit": "^4.5 || ^5.0.5" }, "type": "library", "extra": { @@ -129,20 +128,20 @@ "validation", "versioning" ], - "time": "2019-03-19T17:25:45+00:00" + "time": "2020-01-13T12:06:48+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "cbe23383749496fe0f373345208b79568e4bc248" + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248", - "reference": "cbe23383749496fe0f373345208b79568e4bc248", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", "shasum": "" }, "require": { @@ -173,7 +172,7 @@ "Xdebug", "performance" ], - "time": "2019-11-06T16:40:04+00:00" + "time": "2020-03-01T12:26:26+00:00" }, { "name": "doctrine/annotations", @@ -645,16 +644,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.4", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -689,7 +688,7 @@ "object", "object graph" ], - "time": "2019-12-15T19:12:40+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "nette/finder", @@ -756,16 +755,16 @@ }, { "name": "nette/robot-loader", - "version": "v3.2.1", + "version": "v3.2.2", "source": { "type": "git", "url": "https://github.com/nette/robot-loader.git", - "reference": "d2a100e1f5cab390c78bc88709abbc91249c3993" + "reference": "38e8a270567a4ad9fe716b40fcda5a6580afa3c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/robot-loader/zipball/d2a100e1f5cab390c78bc88709abbc91249c3993", - "reference": "d2a100e1f5cab390c78bc88709abbc91249c3993", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/38e8a270567a4ad9fe716b40fcda5a6580afa3c0", + "reference": "38e8a270567a4ad9fe716b40fcda5a6580afa3c0", "shasum": "" }, "require": { @@ -793,8 +792,8 @@ "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" + "GPL-2.0-only", + "GPL-3.0-only" ], "authors": [ { @@ -815,20 +814,20 @@ "nette", "trait" ], - "time": "2019-12-26T22:32:02+00:00" + "time": "2020-02-20T22:17:50+00:00" }, { "name": "nette/utils", - "version": "v3.1.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "d6cd63d77dd9a85c3a2fae707e1255e44c2bc182" + "reference": "2c17d16d8887579ae1c0898ff94a3668997fd3eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/d6cd63d77dd9a85c3a2fae707e1255e44c2bc182", - "reference": "d6cd63d77dd9a85c3a2fae707e1255e44c2bc182", + "url": "https://api.github.com/repos/nette/utils/zipball/2c17d16d8887579ae1c0898ff94a3668997fd3eb", + "reference": "2c17d16d8887579ae1c0898ff94a3668997fd3eb", "shasum": "" }, "require": { @@ -862,8 +861,8 @@ "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" + "GPL-2.0-only", + "GPL-3.0-only" ], "authors": [ { @@ -893,7 +892,7 @@ "utility", "validation" ], - "time": "2020-01-03T18:13:31+00:00" + "time": "2020-02-09T14:10:55+00:00" }, { "name": "ocramius/package-versions", @@ -1363,41 +1362,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1408,33 +1404,36 @@ { "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.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -1458,28 +1457,28 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "v1.10.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.2", @@ -1521,7 +1520,7 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-01-20T15:57:02+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1572,16 +1571,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.4", + "version": "0.12.13", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "100a25ba8561223f6bf5a5ff4204f951c0ec007c" + "reference": "d74fb5ce1ab9f24a7128db90e99dec82440975c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/100a25ba8561223f6bf5a5ff4204f951c0ec007c", - "reference": "100a25ba8561223f6bf5a5ff4204f951c0ec007c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d74fb5ce1ab9f24a7128db90e99dec82440975c3", + "reference": "d74fb5ce1ab9f24a7128db90e99dec82440975c3", "shasum": "" }, "require": { @@ -1607,25 +1606,25 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-06T06:38:17+00:00" + "time": "2020-03-02T13:08:55+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.5", + "version": "0.12.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "fe49777a04d8dafcfb3958e3441d9c982a1e40ae" + "reference": "26394996368b6d033d012547d3197f4e07e23021" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/fe49777a04d8dafcfb3958e3441d9c982a1e40ae", - "reference": "fe49777a04d8dafcfb3958e3441d9c982a1e40ae", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/26394996368b6d033d012547d3197f4e07e23021", + "reference": "26394996368b6d033d012547d3197f4e07e23021", "shasum": "" }, "require": { "php": "~7.1", - "phpstan/phpstan": "^0.12.3" + "phpstan/phpstan": "^0.12.4" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -1663,25 +1662,25 @@ "MIT" ], "description": "PHPUnit extensions and rules for PHPStan", - "time": "2020-01-03T10:04:21+00:00" + "time": "2020-01-10T12:07:21+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "0.12.1", + "version": "0.12.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "08f2e51454153e707c6f4fa2c339a59811e83200" + "reference": "a670a59aff7cf96f75d21b974860ada10e25b2ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/08f2e51454153e707c6f4fa2c339a59811e83200", - "reference": "08f2e51454153e707c6f4fa2c339a59811e83200", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/a670a59aff7cf96f75d21b974860ada10e25b2ee", + "reference": "a670a59aff7cf96f75d21b974860ada10e25b2ee", "shasum": "" }, "require": { "php": "~7.1", - "phpstan/phpstan": "^0.12" + "phpstan/phpstan": "^0.12.6" }, "require-dev": { "consistence/coding-standard": "^3.0.1", @@ -1714,7 +1713,7 @@ "MIT" ], "description": "Extra strict and opinionated rules for PHPStan", - "time": "2020-01-01T17:32:25+00:00" + "time": "2020-01-20T13:08:52+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1970,16 +1969,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.1", + "version": "8.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2" + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7870c78da3c5e4883eaef36ae47853ebb3cb86f2", - "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", "shasum": "" }, "require": { @@ -2049,7 +2048,7 @@ "testing", "xunit" ], - "time": "2019-12-25T14:49:39+00:00" + "time": "2020-01-08T08:49:49+00:00" }, { "name": "psr/cache", @@ -2947,16 +2946,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.3", + "version": "3.5.4", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb" + "reference": "dceec07328401de6211037abbb18bda423677e26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", - "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26", + "reference": "dceec07328401de6211037abbb18bda423677e26", "shasum": "" }, "require": { @@ -2994,20 +2993,20 @@ "phpcs", "standards" ], - "time": "2019-12-04T04:46:47+00:00" + "time": "2020-01-30T22:20:29+00:00" }, { "name": "symfony/cache", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "6af64bab165e588300378a87bcd2df3c7c31c144" + "reference": "28511cbd8c760a19f4b4b70961d2cd957733b3d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/6af64bab165e588300378a87bcd2df3c7c31c144", - "reference": "6af64bab165e588300378a87bcd2df3c7c31c144", + "url": "https://api.github.com/repos/symfony/cache/zipball/28511cbd8c760a19f4b4b70961d2cd957733b3d9", + "reference": "28511cbd8c760a19f4b4b70961d2cd957733b3d9", "shasum": "" }, "require": { @@ -3073,7 +3072,7 @@ "caching", "psr6" ], - "time": "2019-12-16T10:45:21+00:00" + "time": "2020-02-20T16:31:44+00:00" }, { "name": "symfony/cache-contracts", @@ -3135,16 +3134,16 @@ }, { "name": "symfony/config", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "6911d432edd5b50822986604fd5a5be3af856d30" + "reference": "cbfef5ae91ccd3b06621c18d58cd355c68c87ae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/6911d432edd5b50822986604fd5a5be3af856d30", - "reference": "6911d432edd5b50822986604fd5a5be3af856d30", + "url": "https://api.github.com/repos/symfony/config/zipball/cbfef5ae91ccd3b06621c18d58cd355c68c87ae9", + "reference": "cbfef5ae91ccd3b06621c18d58cd355c68c87ae9", "shasum": "" }, "require": { @@ -3195,20 +3194,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2019-12-18T12:00:29+00:00" + "time": "2020-02-04T09:32:40+00:00" }, { "name": "symfony/console", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" + "reference": "4fa15ae7be74e53f6ec8c83ed403b97e23b665e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", + "url": "https://api.github.com/repos/symfony/console/zipball/4fa15ae7be74e53f6ec8c83ed403b97e23b665e9", + "reference": "4fa15ae7be74e53f6ec8c83ed403b97e23b665e9", "shasum": "" }, "require": { @@ -3271,20 +3270,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-17T10:32:23+00:00" + "time": "2020-02-24T13:10:00+00:00" }, { "name": "symfony/debug", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5" + "reference": "a980d87a659648980d89193fd8b7a7ca89d97d21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", - "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", + "url": "https://api.github.com/repos/symfony/debug/zipball/a980d87a659648980d89193fd8b7a7ca89d97d21", + "reference": "a980d87a659648980d89193fd8b7a7ca89d97d21", "shasum": "" }, "require": { @@ -3327,20 +3326,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-12-16T14:46:54+00:00" + "time": "2020-02-23T14:41:43+00:00" }, { "name": "symfony/dependency-injection", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "79b0358207a3571cc3af02a57d0321927921f539" + "reference": "ebb2e882e8c9e2eb990aa61ddcd389848466e342" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/79b0358207a3571cc3af02a57d0321927921f539", - "reference": "79b0358207a3571cc3af02a57d0321927921f539", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ebb2e882e8c9e2eb990aa61ddcd389848466e342", + "reference": "ebb2e882e8c9e2eb990aa61ddcd389848466e342", "shasum": "" }, "require": { @@ -3400,26 +3399,26 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2019-12-19T16:00:02+00:00" + "time": "2020-02-29T09:50:10+00:00" }, { "name": "symfony/error-handler", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1" + "reference": "89aa4b9ac6f1f35171b8621b24f60477312085be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/6d7d7712a6ff5215ec26215672293b154f1db8c1", - "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/89aa4b9ac6f1f35171b8621b24f60477312085be", + "reference": "89aa4b9ac6f1f35171b8621b24f60477312085be", "shasum": "" }, "require": { "php": "^7.1.3", "psr/log": "~1.0", - "symfony/debug": "^4.4", + "symfony/debug": "^4.4.5", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { @@ -3456,20 +3455,20 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", - "time": "2019-12-16T14:46:54+00:00" + "time": "2020-02-26T11:45:31+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f" + "reference": "4ad8e149799d3128621a3a1f70e92b9897a8930d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4ad8e149799d3128621a3a1f70e92b9897a8930d", + "reference": "4ad8e149799d3128621a3a1f70e92b9897a8930d", "shasum": "" }, "require": { @@ -3526,7 +3525,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2020-02-04T09:32:40+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3588,16 +3587,16 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "40c2606131d56eff6f193b6e2ceb92414653b591" + "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/40c2606131d56eff6f193b6e2ceb92414653b591", - "reference": "40c2606131d56eff6f193b6e2ceb92414653b591", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/266c9540b475f26122b61ef8b23dd9198f5d1cfd", + "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd", "shasum": "" }, "require": { @@ -3634,20 +3633,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2019-11-26T23:16:41+00:00" + "time": "2020-01-21T08:20:44+00:00" }, { "name": "symfony/finder", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e" + "reference": "ea69c129aed9fdeca781d4b77eb20b62cf5d5357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e", + "url": "https://api.github.com/repos/symfony/finder/zipball/ea69c129aed9fdeca781d4b77eb20b62cf5d5357", + "reference": "ea69c129aed9fdeca781d4b77eb20b62cf5d5357", "shasum": "" }, "require": { @@ -3683,20 +3682,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-11-17T21:56:56+00:00" + "time": "2020-02-14T07:42:58+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5dd7f6be6e62d86ba6f3154cf40e78936367978b" + "reference": "6f9c2ba72f4295d7ce6cf9f79dbb18036291d335" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5dd7f6be6e62d86ba6f3154cf40e78936367978b", - "reference": "5dd7f6be6e62d86ba6f3154cf40e78936367978b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6f9c2ba72f4295d7ce6cf9f79dbb18036291d335", + "reference": "6f9c2ba72f4295d7ce6cf9f79dbb18036291d335", "shasum": "" }, "require": { @@ -3738,20 +3737,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-12-19T16:01:11+00:00" + "time": "2020-02-14T07:43:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2" + "reference": "8c8734486dada83a6041ab744709bdc1651a8462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fe310d2e95cd4c356836c8ecb0895a46d97fede2", - "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8c8734486dada83a6041ab744709bdc1651a8462", + "reference": "8c8734486dada83a6041ab744709bdc1651a8462", "shasum": "" }, "require": { @@ -3828,20 +3827,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-12-19T16:23:40+00:00" + "time": "2020-02-29T10:31:38+00:00" }, { "name": "symfony/mime", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79" + "reference": "9b3e5b5e58c56bbd76628c952d2b78556d305f3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79", + "url": "https://api.github.com/repos/symfony/mime/zipball/9b3e5b5e58c56bbd76628c952d2b78556d305f3c", + "reference": "9b3e5b5e58c56bbd76628c952d2b78556d305f3c", "shasum": "" }, "require": { @@ -3890,20 +3889,20 @@ "mime", "mime-type" ], - "time": "2019-11-30T14:12:50+00:00" + "time": "2020-02-04T09:41:09+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "2be23e63f33de16b49294ea6581f462932a77e2f" + "reference": "9a02d6662660fe7bfadad63b5f0b0718d4c8b6b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/2be23e63f33de16b49294ea6581f462932a77e2f", - "reference": "2be23e63f33de16b49294ea6581f462932a77e2f", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9a02d6662660fe7bfadad63b5f0b0718d4c8b6b0", + "reference": "9a02d6662660fe7bfadad63b5f0b0718d4c8b6b0", "shasum": "" }, "require": { @@ -3944,20 +3943,20 @@ "configuration", "options" ], - "time": "2019-10-28T21:57:16+00:00" + "time": "2020-01-04T13:00:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -3969,7 +3968,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4002,26 +4001,26 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -4029,7 +4028,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4064,20 +4063,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -4089,7 +4088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4123,20 +4122,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" + "reference": "419c4940024c30ccc033650373a1fe13890d3255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", + "reference": "419c4940024c30ccc033650373a1fe13890d3255", "shasum": "" }, "require": { @@ -4146,7 +4145,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4182,20 +4181,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -4204,7 +4203,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4237,20 +4236,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -4259,7 +4258,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4295,20 +4294,20 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" + "reference": "bf9166bac906c9e69fb7a11d94875e7ced97bcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "url": "https://api.github.com/repos/symfony/process/zipball/bf9166bac906c9e69fb7a11d94875e7ced97bcd7", + "reference": "bf9166bac906c9e69fb7a11d94875e7ced97bcd7", "shasum": "" }, "require": { @@ -4344,7 +4343,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-12-06T10:06:46+00:00" + "time": "2020-02-07T20:06:44+00:00" }, { "name": "symfony/service-contracts", @@ -4406,16 +4405,16 @@ }, { "name": "symfony/stopwatch", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "d410282956706e0b08681a5527447a8e6b6f421e" + "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d410282956706e0b08681a5527447a8e6b6f421e", - "reference": "d410282956706e0b08681a5527447a8e6b6f421e", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5d9add8034135b9a5f7b101d1e42c797e7f053e4", + "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4", "shasum": "" }, "require": { @@ -4452,20 +4451,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d7bc61d5d335fa9b1b91e14bb16861e8ca50f53a" + "reference": "3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d7bc61d5d335fa9b1b91e14bb16861e8ca50f53a", - "reference": "d7bc61d5d335fa9b1b91e14bb16861e8ca50f53a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9", + "reference": "3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9", "shasum": "" }, "require": { @@ -4527,20 +4526,20 @@ "debug", "dump" ], - "time": "2019-12-18T13:50:31+00:00" + "time": "2020-02-26T22:30:10+00:00" }, { "name": "symfony/var-exporter", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "1b9653e68d5b701bf6d9c91bdd3660078c9f4f28" + "reference": "30779a25c736b4290449eaedefe4196c1d060378" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1b9653e68d5b701bf6d9c91bdd3660078c9f4f28", - "reference": "1b9653e68d5b701bf6d9c91bdd3660078c9f4f28", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/30779a25c736b4290449eaedefe4196c1d060378", + "reference": "30779a25c736b4290449eaedefe4196c1d060378", "shasum": "" }, "require": { @@ -4587,20 +4586,20 @@ "instantiate", "serialize" ], - "time": "2019-12-01T08:48:26+00:00" + "time": "2020-02-04T09:47:34+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.2", + "version": "v4.4.5", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c" + "reference": "94d005c176db2080e98825d98e01e8b311a97a88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a08832b974dd5fafe3085a66d41fe4c84bb2628c", - "reference": "a08832b974dd5fafe3085a66d41fe4c84bb2628c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/94d005c176db2080e98825d98e01e8b311a97a88", + "reference": "94d005c176db2080e98825d98e01e8b311a97a88", "shasum": "" }, "require": { @@ -4646,7 +4645,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-12-10T10:33:21+00:00" + "time": "2020-02-03T10:46:43+00:00" }, { "name": "symplify/coding-standard", @@ -4849,16 +4848,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -4893,7 +4892,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" }, { "name": "webmozart/path-util", diff --git a/phpstan.neon b/phpstan.neon index c2abfaf..7af78fa 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,12 +4,18 @@ includes: - vendor/phpstan/phpstan-phpunit/rules.neon parameters: + checkGenericClassInNonGenericObjectType: false + checkMissingIterableValueType: false + ignoreErrors: - '#Property Phpml\\Clustering\\KMeans\\Cluster\:\:\$points \(iterable\\&SplObjectStorage\) does not accept SplObjectStorage#' - '#Phpml\\Dataset\\(.*)Dataset::__construct\(\) does not call parent constructor from Phpml\\Dataset\\ArrayDataset#' - '#Variable property access on .+#' - '#Variable method call on .+#' - + - message: '#ReflectionClass#' + paths: + - src/Classification/Ensemble/AdaBoost.php + - src/Classification/Ensemble/Bagging.php # probably known value - '#Method Phpml\\Classification\\DecisionTree::getBestSplit\(\) should return Phpml\\Classification\\DecisionTree\\DecisionTreeLeaf but returns Phpml\\Classification\\DecisionTree\\DecisionTreeLeaf\|null#' - '#Call to an undefined method Phpml\\Helper\\Optimizer\\Optimizer::getCostValues\(\)#' diff --git a/src/Association/Apriori.php b/src/Association/Apriori.php index 201bfbf..1f73679 100644 --- a/src/Association/Apriori.php +++ b/src/Association/Apriori.php @@ -104,11 +104,11 @@ class Apriori implements Associator */ protected function predictSample(array $sample): array { - $predicts = array_values(array_filter($this->getRules(), function ($rule) use ($sample) { + $predicts = array_values(array_filter($this->getRules(), function ($rule) use ($sample): bool { return $this->equals($rule[self::ARRAY_KEY_ANTECEDENT], $sample); })); - return array_map(function ($rule) { + return array_map(static function ($rule) { return $rule[self::ARRAY_KEY_CONSEQUENT]; }, $predicts); } @@ -177,7 +177,7 @@ class Apriori implements Associator $cardinality = count($sample); $antecedents = $this->powerSet($sample); - return array_filter($antecedents, function ($antecedent) use ($cardinality) { + return array_filter($antecedents, static function ($antecedent) use ($cardinality): bool { return (count($antecedent) != $cardinality) && ($antecedent != []); }); } @@ -199,7 +199,7 @@ class Apriori implements Associator } } - return array_map(function ($entry) { + return array_map(static function ($entry): array { return [$entry]; }, $items); } @@ -213,7 +213,7 @@ class Apriori implements Associator */ private function frequent(array $samples): array { - return array_values(array_filter($samples, function ($entry) { + return array_values(array_filter($samples, function ($entry): bool { return $this->support($entry) >= $this->support; })); } @@ -288,7 +288,7 @@ class Apriori implements Associator */ private function frequency(array $sample): int { - return count(array_filter($this->samples, function ($entry) use ($sample) { + return count(array_filter($this->samples, function ($entry) use ($sample): bool { return $this->subset($entry, $sample); })); } @@ -303,7 +303,7 @@ class Apriori implements Associator */ private function contains(array $system, array $set): bool { - return (bool) array_filter($system, function ($entry) use ($set) { + return (bool) array_filter($system, function ($entry) use ($set): bool { return $this->equals($entry, $set); }); } diff --git a/src/Classification/Linear/Adaline.php b/src/Classification/Linear/Adaline.php index 797cdc9..e5bc9d9 100644 --- a/src/Classification/Linear/Adaline.php +++ b/src/Classification/Linear/Adaline.php @@ -58,7 +58,7 @@ class Adaline extends Perceptron protected function runTraining(array $samples, array $targets): void { // The cost function is the sum of squares - $callback = function ($weights, $sample, $target) { + $callback = function ($weights, $sample, $target): array { $this->weights = $weights; $output = $this->output($sample); diff --git a/src/Classification/Linear/LogisticRegression.php b/src/Classification/Linear/LogisticRegression.php index 889ea98..4014fb0 100644 --- a/src/Classification/Linear/LogisticRegression.php +++ b/src/Classification/Linear/LogisticRegression.php @@ -188,7 +188,7 @@ class LogisticRegression extends Adaline * The gradient of the cost function to be used with gradient descent: * ∇J(x) = -(y - h(x)) = (h(x) - y) */ - return function ($weights, $sample, $y) use ($penalty) { + return function ($weights, $sample, $y) use ($penalty): array { $this->weights = $weights; $hX = $this->output($sample); @@ -220,7 +220,7 @@ class LogisticRegression extends Adaline * The gradient of the cost function: * ∇J(x) = -(h(x) - y) . h(x) . (1 - h(x)) */ - return function ($weights, $sample, $y) use ($penalty) { + return function ($weights, $sample, $y) use ($penalty): array { $this->weights = $weights; $hX = $this->output($sample); diff --git a/src/Classification/Linear/Perceptron.php b/src/Classification/Linear/Perceptron.php index 36cd4d1..44220a6 100644 --- a/src/Classification/Linear/Perceptron.php +++ b/src/Classification/Linear/Perceptron.php @@ -154,7 +154,7 @@ class Perceptron implements Classifier, IncrementalEstimator protected function runTraining(array $samples, array $targets): void { // The cost function is the sum of squares - $callback = function ($weights, $sample, $target) { + $callback = function ($weights, $sample, $target): array { $this->weights = $weights; $prediction = $this->outputClass($sample); diff --git a/src/Clustering/FuzzyCMeans.php b/src/Clustering/FuzzyCMeans.php index abc53f1..ce86f5f 100644 --- a/src/Clustering/FuzzyCMeans.php +++ b/src/Clustering/FuzzyCMeans.php @@ -139,7 +139,7 @@ class FuzzyCMeans implements Clusterer $total += $val; } - $this->membership[] = array_map(function ($val) use ($total) { + $this->membership[] = array_map(static function ($val) use ($total): float { return $val / $total; }, $row); } diff --git a/src/Clustering/KMeans/Space.php b/src/Clustering/KMeans/Space.php index 3346315..e4207cc 100644 --- a/src/Clustering/KMeans/Space.php +++ b/src/Clustering/KMeans/Space.php @@ -88,7 +88,7 @@ class Space extends SplObjectStorage $min = $this->newPoint(array_fill(0, $this->dimension, null)); $max = $this->newPoint(array_fill(0, $this->dimension, null)); - /** @var self $point */ + /** @var Point $point */ foreach ($this as $point) { for ($n = 0; $n < $this->dimension; ++$n) { if ($min[$n] === null || $min[$n] > $point[$n]) { diff --git a/src/Dataset/CsvDataset.php b/src/Dataset/CsvDataset.php index cdd387f..483664d 100644 --- a/src/Dataset/CsvDataset.php +++ b/src/Dataset/CsvDataset.php @@ -35,8 +35,8 @@ class CsvDataset extends ArrayDataset } $samples = $targets = []; - while (($data = fgetcsv($handle, $maxLineLength, $delimiter)) !== false) { - $samples[] = array_slice((array) $data, 0, $features); + while ($data = fgetcsv($handle, $maxLineLength, $delimiter)) { + $samples[] = array_slice($data, 0, $features); $targets[] = $data[$features]; } diff --git a/src/DimensionReduction/KernelPCA.php b/src/DimensionReduction/KernelPCA.php index 41c7340..beeaba4 100644 --- a/src/DimensionReduction/KernelPCA.php +++ b/src/DimensionReduction/KernelPCA.php @@ -179,13 +179,13 @@ class KernelPCA extends PCA // k(x,y)=exp(-γ.|x-y|) where |..| is Euclidean distance $dist = new Euclidean(); - return function ($x, $y) use ($dist) { + return function ($x, $y) use ($dist): float { return exp(-$this->gamma * $dist->sqDistance($x, $y)); }; case self::KERNEL_SIGMOID: // k(x,y)=tanh(γ.xT.y+c0) where c0=1 - return function ($x, $y) { + return function ($x, $y): float { $res = Matrix::dot($x, $y)[0] + 1.0; return tanh((float) $this->gamma * $res); @@ -195,7 +195,7 @@ class KernelPCA extends PCA // k(x,y)=exp(-γ.|x-y|) where |..| is Manhattan distance $dist = new Manhattan(); - return function ($x, $y) use ($dist) { + return function ($x, $y) use ($dist): float { return exp(-$this->gamma * $dist->distance($x, $y)); }; diff --git a/src/FeatureSelection/VarianceThreshold.php b/src/FeatureSelection/VarianceThreshold.php index 3bbc29d..0c3154e 100644 --- a/src/FeatureSelection/VarianceThreshold.php +++ b/src/FeatureSelection/VarianceThreshold.php @@ -37,7 +37,7 @@ final class VarianceThreshold implements Transformer public function fit(array $samples, ?array $targets = null): void { - $this->variances = array_map(function (array $column) { + $this->variances = array_map(static function (array $column): float { return Variance::population($column); }, Matrix::transposeArray($samples)); diff --git a/src/Helper/Optimizer/GD.php b/src/Helper/Optimizer/GD.php index 2832032..40c65c7 100644 --- a/src/Helper/Optimizer/GD.php +++ b/src/Helper/Optimizer/GD.php @@ -38,7 +38,7 @@ class GD extends StochasticGD $this->updateWeightsWithUpdates($updates, $totalPenalty); - $this->costValues[] = array_sum($errors) / $this->sampleCount; + $this->costValues[] = array_sum($errors) / (int) $this->sampleCount; if ($this->earlyStop($theta)) { break; diff --git a/src/Math/Matrix.php b/src/Math/Matrix.php index fb2d7ac..6f07d5d 100644 --- a/src/Math/Matrix.php +++ b/src/Math/Matrix.php @@ -126,7 +126,7 @@ class Matrix public function transpose(): self { if ($this->rows === 1) { - $matrix = array_map(function ($el) { + $matrix = array_map(static function ($el): array { return [$el]; }, $this->matrix[0]); } else { diff --git a/src/Math/Statistic/ANOVA.php b/src/Math/Statistic/ANOVA.php index f89309e..1629181 100644 --- a/src/Math/Statistic/ANOVA.php +++ b/src/Math/Statistic/ANOVA.php @@ -28,7 +28,7 @@ final class ANOVA throw new InvalidArgumentException('The array must have at least 2 elements'); } - $samplesPerClass = array_map(function (array $class): int { + $samplesPerClass = array_map(static function (array $class): int { return count($class); }, $samples); $allSamples = (int) array_sum($samplesPerClass); @@ -41,10 +41,10 @@ final class ANOVA $dfbn = $classes - 1; $dfwn = $allSamples - $classes; - $msb = array_map(function ($s) use ($dfbn) { + $msb = array_map(static function ($s) use ($dfbn) { return $s / $dfbn; }, $ssbn); - $msw = array_map(function ($s) use ($dfwn) { + $msw = array_map(static function ($s) use ($dfwn) { if ($dfwn === 0) { return 1; } @@ -76,7 +76,7 @@ final class ANOVA private static function sumOfFeaturesPerClass(array $samples): array { - return array_map(function (array $class) { + return array_map(static function (array $class): array { $sum = array_fill(0, count($class[0]), 0); foreach ($class as $sample) { foreach ($sample as $index => $feature) { @@ -97,7 +97,7 @@ final class ANOVA } } - return array_map(function ($sum) { + return array_map(static function ($sum) { return $sum ** 2; }, $squares); } diff --git a/src/Math/Statistic/StandardDeviation.php b/src/Math/Statistic/StandardDeviation.php index 50effab..48d9302 100644 --- a/src/Math/Statistic/StandardDeviation.php +++ b/src/Math/Statistic/StandardDeviation.php @@ -50,7 +50,7 @@ class StandardDeviation $mean = Mean::arithmetic($numbers); return array_sum(array_map( - function ($val) use ($mean) { + static function ($val) use ($mean): float { return ($val - $mean) ** 2; }, $numbers diff --git a/src/Metric/ClassificationReport.php b/src/Metric/ClassificationReport.php index 6263a52..0abac76 100644 --- a/src/Metric/ClassificationReport.php +++ b/src/Metric/ClassificationReport.php @@ -148,7 +148,7 @@ class ClassificationReport $precision = $this->computePrecision($truePositive, $falsePositive); $recall = $this->computeRecall($truePositive, $falseNegative); - $f1score = $this->computeF1Score((float) $precision, (float) $recall); + $f1score = $this->computeF1Score($precision, $recall); $this->average = compact('precision', 'recall', 'f1score'); } @@ -186,10 +186,7 @@ class ClassificationReport } } - /** - * @return float|string - */ - private function computePrecision(int $truePositive, int $falsePositive) + private function computePrecision(int $truePositive, int $falsePositive): float { $divider = $truePositive + $falsePositive; if ($divider == 0) { @@ -199,10 +196,7 @@ class ClassificationReport return $truePositive / $divider; } - /** - * @return float|string - */ - private function computeRecall(int $truePositive, int $falseNegative) + private function computeRecall(int $truePositive, int $falseNegative): float { $divider = $truePositive + $falseNegative; if ($divider == 0) { diff --git a/src/NeuralNetwork/Node/Neuron.php b/src/NeuralNetwork/Node/Neuron.php index c537606..6681e66 100644 --- a/src/NeuralNetwork/Node/Neuron.php +++ b/src/NeuralNetwork/Node/Neuron.php @@ -33,7 +33,7 @@ class Neuron implements Node public function __construct(?ActivationFunction $activationFunction = null) { - $this->activationFunction = $activationFunction ?: new Sigmoid(); + $this->activationFunction = $activationFunction ?? new Sigmoid(); } public function addSynapse(Synapse $synapse): void diff --git a/src/NeuralNetwork/Node/Neuron/Synapse.php b/src/NeuralNetwork/Node/Neuron/Synapse.php index 0a6e0f8..d749937 100644 --- a/src/NeuralNetwork/Node/Neuron/Synapse.php +++ b/src/NeuralNetwork/Node/Neuron/Synapse.php @@ -24,7 +24,7 @@ class Synapse public function __construct(Node $node, ?float $weight = null) { $this->node = $node; - $this->weight = $weight ?: $this->generateRandomWeight(); + $this->weight = $weight ?? $this->generateRandomWeight(); } public function getOutput(): float diff --git a/src/Pipeline.php b/src/Pipeline.php index 421abb5..200173b 100644 --- a/src/Pipeline.php +++ b/src/Pipeline.php @@ -61,12 +61,12 @@ class Pipeline implements Estimator, Transformer */ public function predict(array $samples) { + $this->transform($samples); + if ($this->estimator === null) { throw new InvalidOperationException('Pipeline without estimator can\'t use predict method'); } - $this->transform($samples); - return $this->estimator->predict($samples); } diff --git a/src/Regression/DecisionTreeRegressor.php b/src/Regression/DecisionTreeRegressor.php index e066009..afc2805 100644 --- a/src/Regression/DecisionTreeRegressor.php +++ b/src/Regression/DecisionTreeRegressor.php @@ -121,7 +121,7 @@ final class DecisionTreeRegressor extends CART implements Regression protected function splitImpurity(array $groups): float { - $samplesCount = (int) array_sum(array_map(static function (array $group) { + $samplesCount = (int) array_sum(array_map(static function (array $group): int { return count($group[0]); }, $groups)); diff --git a/src/Tree/Node/DecisionNode.php b/src/Tree/Node/DecisionNode.php index f621fed..311e0e7 100644 --- a/src/Tree/Node/DecisionNode.php +++ b/src/Tree/Node/DecisionNode.php @@ -50,7 +50,7 @@ class DecisionNode extends BinaryNode implements PurityNode $this->value = $value; $this->groups = $groups; $this->impurity = $impurity; - $this->samplesCount = (int) array_sum(array_map(function (array $group) { + $this->samplesCount = (int) array_sum(array_map(static function (array $group): int { return count($group[0]); }, $groups)); } diff --git a/tests/DimensionReduction/KernelPCATest.php b/tests/DimensionReduction/KernelPCATest.php index 6e2ec2b..da4e51b 100644 --- a/tests/DimensionReduction/KernelPCATest.php +++ b/tests/DimensionReduction/KernelPCATest.php @@ -40,7 +40,7 @@ class KernelPCATest extends TestCase // during the calculation of eigenValues, we have to compare // absolute value of the values array_map(function ($val1, $val2) use ($epsilon): void { - self::assertEqualsWithDelta(abs($val1), abs($val2), $epsilon); + self::assertEqualsWithDelta(abs($val1[0]), abs($val2[0]), $epsilon); }, $transformed, $reducedData); // Fitted KernelPCA object can also transform an arbitrary sample of the diff --git a/tests/DimensionReduction/PCATest.php b/tests/DimensionReduction/PCATest.php index 5fbbc94..3dbc5a6 100644 --- a/tests/DimensionReduction/PCATest.php +++ b/tests/DimensionReduction/PCATest.php @@ -42,7 +42,7 @@ class PCATest extends TestCase // during the calculation of eigenValues, we have to compare // absolute value of the values array_map(function ($val1, $val2) use ($epsilon): void { - self::assertEqualsWithDelta(abs($val1), abs($val2), $epsilon); + self::assertEqualsWithDelta(abs($val1[0]), abs($val2[0]), $epsilon); }, $transformed, $reducedData); // Test fitted PCA object to transform an arbitrary sample of the @@ -52,7 +52,7 @@ class PCATest extends TestCase $newRow2 = $pca->transform($row); array_map(function ($val1, $val2) use ($epsilon): void { - self::assertEqualsWithDelta(abs($val1), abs($val2), $epsilon); + self::assertEqualsWithDelta(abs($val1[0][0]), abs($val2[0]), $epsilon); }, $newRow, $newRow2); } } diff --git a/tests/Helper/Optimizer/ConjugateGradientTest.php b/tests/Helper/Optimizer/ConjugateGradientTest.php index 86a2991..fc85a60 100644 --- a/tests/Helper/Optimizer/ConjugateGradientTest.php +++ b/tests/Helper/Optimizer/ConjugateGradientTest.php @@ -21,7 +21,7 @@ class ConjugateGradientTest extends TestCase $targets[] = -1 + 2 * $x; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; @@ -47,7 +47,7 @@ class ConjugateGradientTest extends TestCase $targets[] = -1 + 2 * $x; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; @@ -76,7 +76,7 @@ class ConjugateGradientTest extends TestCase $targets[] = -1 + 2 * $x0 - 3 * $x1; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0] + $theta[2] * $sample[1]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; diff --git a/tests/Helper/Optimizer/GDTest.php b/tests/Helper/Optimizer/GDTest.php index 9640988..a6b4277 100644 --- a/tests/Helper/Optimizer/GDTest.php +++ b/tests/Helper/Optimizer/GDTest.php @@ -20,7 +20,7 @@ class GDTest extends TestCase $targets[] = -1 + 2 * $x; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; @@ -47,7 +47,7 @@ class GDTest extends TestCase $targets[] = -1 + 2 * $x0 - 3 * $x1; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0] + $theta[2] * $sample[1]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; diff --git a/tests/Helper/Optimizer/StochasticGDTest.php b/tests/Helper/Optimizer/StochasticGDTest.php index 07927af..4f99f78 100644 --- a/tests/Helper/Optimizer/StochasticGDTest.php +++ b/tests/Helper/Optimizer/StochasticGDTest.php @@ -20,7 +20,7 @@ class StochasticGDTest extends TestCase $targets[] = -1 + 2 * $x; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; @@ -47,7 +47,7 @@ class StochasticGDTest extends TestCase $targets[] = -1 + 2 * $x0 - 3 * $x1; } - $callback = function ($theta, $sample, $target) { + $callback = static function ($theta, $sample, $target): array { $y = $theta[0] + $theta[1] * $sample[0] + $theta[2] * $sample[1]; $cost = (($y - $target) ** 2) / 2; $grad = $y - $target; diff --git a/tests/Preprocessing/NormalizerTest.php b/tests/Preprocessing/NormalizerTest.php index ed6b2c5..0a8f76c 100644 --- a/tests/Preprocessing/NormalizerTest.php +++ b/tests/Preprocessing/NormalizerTest.php @@ -126,7 +126,7 @@ class NormalizerTest extends TestCase foreach ($samples as $sample) { $errors = array_filter( $sample, - function ($element) { + function ($element): bool { return $element < -3 || $element > 3; } );