Page MenuHomePhabricator

D659.id2045.diff
No OneTemporary

D659.id2045.diff

diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -15,11 +15,19 @@
}
},
"minimum-stability": "dev",
- "require-dev": {
- "phpunit/phpunit": "10.0.x-dev"
- },
+ "prefer-stable": true,
+ "scripts": {
+ "test": [
+ "./vendor/bin/phpunit tests/",
+ "./vendor/bin/phpstan analyse ./src --level 7"
+ ]
+ },
"require": {
- "spitfire/exception": "dev-master",
- "spitfire/collection": "dev-master"
+ "spitfire/exception": "^0.1.1",
+ "spitfire/collection": "^0.1.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.82",
+ "phpunit/phpunit": "^9.5"
}
}
diff --git a/composer.lock b/composer.lock
--- a/composer.lock
+++ b/composer.lock
@@ -4,11 +4,11 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "30314aaddb26d439d6dbb83a623916ae",
+ "content-hash": "7e8a86db380e8372b6b59b45cd949a5c",
"packages": [
{
"name": "spitfire/collection",
- "version": "dev-master",
+ "version": "0.1.0",
"source": {
"type": "git",
"url": "https://phabricator.magic3w.com/source/spitfire-collection.git",
@@ -17,7 +17,6 @@
"require-dev": {
"phpunit/phpunit": "^9.4"
},
- "default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
@@ -39,14 +38,22 @@
},
{
"name": "spitfire/exception",
- "version": "dev-master",
+ "version": "v0.1.1",
"source": {
"type": "git",
"url": "https://phabricator.magic3w.com/source/spitfire-exception.git",
- "reference": "7b1cd4ef3df39dafe16e5a2fd8ed0c37d2881ddf"
+ "reference": "02b1d64efe48d8a379013cd341e7865c0768779f"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.71",
+ "phpunit/phpunit": "^9.5"
},
- "default-branch": true,
"type": "library",
+ "autoload": {
+ "psr-4": {
+ "spitfire\\exceptions\\": "./src"
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
@@ -58,22 +65,22 @@
}
],
"description": "Exception interfaces for spitfire",
- "time": "2020-12-03T14:13:22+00:00"
+ "time": "2021-02-06T15:12:59+00:00"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.5.x-dev",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "6410c4b8352cb64218641457cef64997e6b784fb"
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/6410c4b8352cb64218641457cef64997e6b784fb",
- "reference": "6410c4b8352cb64218641457cef64997e6b784fb",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"shasum": ""
},
"require": {
@@ -113,7 +120,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.4.x"
+ "source": "https://github.com/doctrine/instantiator/tree/1.4.0"
},
"funding": [
{
@@ -129,11 +136,11 @@
"type": "tidelift"
}
],
- "time": "2020-11-10T19:05:51+00:00"
+ "time": "2020-11-10T18:47:58+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.x-dev",
+ "version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
@@ -156,7 +163,6 @@
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
- "default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
@@ -248,7 +254,7 @@
},
{
"name": "phar-io/manifest",
- "version": "dev-master",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
@@ -267,7 +273,6 @@
"phar-io/version": "^3.0.1",
"php": "^7.2 || ^8.0"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -303,22 +308,22 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
- "source": "https://github.com/phar-io/manifest/tree/2.0.1"
+ "source": "https://github.com/phar-io/manifest/tree/master"
},
"time": "2020-06-27T14:33:11+00:00"
},
{
"name": "phar-io/version",
- "version": "3.0.4",
+ "version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "e4782611070e50613683d2b9a57730e9a3ba5451"
+ "reference": "bae7c545bef187884426f042434e561ab1ddb182"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451",
- "reference": "e4782611070e50613683d2b9a57730e9a3ba5451",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
+ "reference": "bae7c545bef187884426f042434e561ab1ddb182",
"shasum": ""
},
"require": {
@@ -354,22 +359,307 @@
"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.0.4"
+ "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"
},
- "time": "2020-12-13T23:18:30+00:00"
+ "time": "2021-03-17T13:42:18+00:00"
+ },
+ {
+ "name": "phpstan/phpstan",
+ "version": "0.12.82",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3920f0fb0aff39263d3a4cb0bca120a67a1a6a11",
+ "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1|^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
+ },
+ "bin": [
+ "phpstan",
+ "phpstan.phar"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.12-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "source": "https://github.com/phpstan/phpstan/tree/0.12.82"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/phpstan",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-03-19T06:08:17+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "dev-master",
+ "version": "9.2.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "3952570aeea0f38f8523a4bbb647a6d45797220c"
+ "reference": "f6293e1b30a2354e8428e004689671b83871edde"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3952570aeea0f38f8523a4bbb647a6d45797220c",
- "reference": "3952570aeea0f38f8523a4bbb647a6d45797220c",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde",
+ "reference": "f6293e1b30a2354e8428e004689671b83871edde",
"shasum": ""
},
"require": {
@@ -394,7 +684,6 @@
"ext-pcov": "*",
"ext-xdebug": "*"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -426,7 +715,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6"
},
"funding": [
{
@@ -434,20 +723,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:30:12+00:00"
+ "time": "2021-03-28T07:26:59+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "dev-master",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "20954647176fc684ea80b3801d73eab6d3734b58"
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/20954647176fc684ea80b3801d73eab6d3734b58",
- "reference": "20954647176fc684ea80b3801d73eab6d3734b58",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"shasum": ""
},
"require": {
@@ -456,7 +745,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -487,7 +775,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5"
},
"funding": [
{
@@ -495,20 +783,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:31:37+00:00"
+ "time": "2020-09-28T05:57:25+00:00"
},
{
"name": "phpunit/php-invoker",
- "version": "dev-master",
+ "version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "af6fff7777c93ca23726690b75e6b35936619a2a"
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/af6fff7777c93ca23726690b75e6b35936619a2a",
- "reference": "af6fff7777c93ca23726690b75e6b35936619a2a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
@@ -521,7 +809,6 @@
"suggest": {
"ext-pcntl": "*"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -551,7 +838,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
- "source": "https://github.com/sebastianbergmann/php-invoker/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
},
"funding": [
{
@@ -559,20 +846,20 @@
"type": "github"
}
],
- "time": "2020-12-09T08:38:35+00:00"
+ "time": "2020-09-28T05:58:55+00:00"
},
{
"name": "phpunit/php-text-template",
- "version": "dev-master",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "1bf5e9937d86cfe12c90018ccb081dfb0ceee770"
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/1bf5e9937d86cfe12c90018ccb081dfb0ceee770",
- "reference": "1bf5e9937d86cfe12c90018ccb081dfb0ceee770",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"shasum": ""
},
"require": {
@@ -581,7 +868,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -611,7 +897,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
},
"funding": [
{
@@ -619,20 +905,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:32:19+00:00"
+ "time": "2020-10-26T05:33:50+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "dev-master",
+ "version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "fe5620838118e9e4cef2ed462923e1f59016e8f4"
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/fe5620838118e9e4cef2ed462923e1f59016e8f4",
- "reference": "fe5620838118e9e4cef2ed462923e1f59016e8f4",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
@@ -641,7 +927,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -671,7 +956,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
},
"funding": [
{
@@ -679,20 +964,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:31:54+00:00"
+ "time": "2020-10-26T13:16:10+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "dev-master",
+ "version": "9.5.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "e62f799c33fbfe86398ee9d94952041f5e46c951"
+ "reference": "c73c6737305e779771147af66c96ca6a7ed8a741"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e62f799c33fbfe86398ee9d94952041f5e46c951",
- "reference": "e62f799c33fbfe86398ee9d94952041f5e46c951",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741",
+ "reference": "c73c6737305e779771147af66c96ca6a7ed8a741",
"shasum": ""
},
"require": {
@@ -706,14 +991,15 @@
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.1",
"phar-io/version": "^3.0.2",
- "php": ">=7.4",
+ "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": "^2.0",
+ "sebastian/code-unit": "^1.0.6",
"sebastian/comparator": "^4.0.5",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
@@ -725,20 +1011,20 @@
"sebastian/version": "^3.0.2"
},
"require-dev": {
- "ext-pdo": "*"
+ "ext-pdo": "*",
+ "phpspec/prophecy-phpunit": "^2.0.1"
},
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*"
},
- "default-branch": true,
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "10.0-dev"
+ "dev-master": "9.5-dev"
}
},
"autoload": {
@@ -769,7 +1055,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/master"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4"
},
"funding": [
{
@@ -781,20 +1067,20 @@
"type": "github"
}
],
- "time": "2020-12-22T08:26:24+00:00"
+ "time": "2021-03-23T07:16:29+00:00"
},
{
"name": "sebastian/cli-parser",
- "version": "dev-master",
+ "version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "b887289b80dd8394719d40e6e7fcef74203db570"
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/b887289b80dd8394719d40e6e7fcef74203db570",
- "reference": "b887289b80dd8394719d40e6e7fcef74203db570",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"shasum": ""
},
"require": {
@@ -803,7 +1089,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -830,7 +1115,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/master"
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
},
"funding": [
{
@@ -838,33 +1123,32 @@
"type": "github"
}
],
- "time": "2020-12-18T12:32:47+00:00"
+ "time": "2020-09-28T06:08:49+00:00"
},
{
"name": "sebastian/code-unit",
- "version": "dev-master",
+ "version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "d942a9e4711b0e1e9899a3e32d848fd3d0bf3e56"
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d942a9e4711b0e1e9899a3e32d848fd3d0bf3e56",
- "reference": "d942a9e4711b0e1e9899a3e32d848fd3d0bf3e56",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
"shasum": ""
},
"require": {
- "php": ">=7.4"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^10.0"
+ "phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "1.0-dev"
}
},
"autoload": {
@@ -887,7 +1171,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/master"
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
},
"funding": [
{
@@ -895,20 +1179,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:30:21+00:00"
+ "time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "dev-master",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "2e42a717208897d00b868a7086776ac89f676d0f"
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/2e42a717208897d00b868a7086776ac89f676d0f",
- "reference": "2e42a717208897d00b868a7086776ac89f676d0f",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
@@ -917,7 +1201,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -943,7 +1226,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/master"
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
},
"funding": [
{
@@ -951,20 +1234,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:30:29+00:00"
+ "time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
- "version": "dev-master",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "f8a802b2820f3ed7aa72d684cc7342edef07ee90"
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f8a802b2820f3ed7aa72d684cc7342edef07ee90",
- "reference": "f8a802b2820f3ed7aa72d684cc7342edef07ee90",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382",
"shasum": ""
},
"require": {
@@ -975,7 +1258,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1018,7 +1300,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/master"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
},
"funding": [
{
@@ -1026,20 +1308,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:30:37+00:00"
+ "time": "2020-10-26T15:49:45+00:00"
},
{
"name": "sebastian/complexity",
- "version": "dev-master",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "431f6c8278fadf1f978a367fb5b50d3fe79257a4"
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/431f6c8278fadf1f978a367fb5b50d3fe79257a4",
- "reference": "431f6c8278fadf1f978a367fb5b50d3fe79257a4",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"shasum": ""
},
"require": {
@@ -1049,7 +1331,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1076,7 +1357,7 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/master"
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
},
"funding": [
{
@@ -1084,20 +1365,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:32:27+00:00"
+ "time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
- "version": "dev-master",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ee2368af73650a4bb1af6bf9e958344001d7e68f"
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ee2368af73650a4bb1af6bf9e958344001d7e68f",
- "reference": "ee2368af73650a4bb1af6bf9e958344001d7e68f",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"shasum": ""
},
"require": {
@@ -1107,7 +1388,6 @@
"phpunit/phpunit": "^9.3",
"symfony/process": "^4.2 || ^5"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1143,7 +1423,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/master"
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
},
"funding": [
{
@@ -1151,20 +1431,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:30:46+00:00"
+ "time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
- "version": "dev-master",
+ "version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "c6910747e97d6838d06dc72e2ea9f60b24f574b9"
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c6910747e97d6838d06dc72e2ea9f60b24f574b9",
- "reference": "c6910747e97d6838d06dc72e2ea9f60b24f574b9",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"shasum": ""
},
"require": {
@@ -1176,7 +1456,6 @@
"suggest": {
"ext-posix": "*"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1207,7 +1486,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/master"
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
},
"funding": [
{
@@ -1215,20 +1494,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:30:54+00:00"
+ "time": "2020-09-28T05:52:38+00:00"
},
{
"name": "sebastian/exporter",
- "version": "dev-master",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "25bad5473a55028cff0d58a55812ecfd52344abd"
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/25bad5473a55028cff0d58a55812ecfd52344abd",
- "reference": "25bad5473a55028cff0d58a55812ecfd52344abd",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"shasum": ""
},
"require": {
@@ -1239,7 +1518,6 @@
"ext-mbstring": "*",
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1285,7 +1563,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/master"
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
},
"funding": [
{
@@ -1293,20 +1571,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:31:04+00:00"
+ "time": "2020-09-28T05:24:23+00:00"
},
{
"name": "sebastian/global-state",
- "version": "dev-master",
+ "version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "27db5bebcc77aa943d8e30e0346f231eaeb286ce"
+ "reference": "a90ccbddffa067b51f574dea6eb25d5680839455"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/27db5bebcc77aa943d8e30e0346f231eaeb286ce",
- "reference": "27db5bebcc77aa943d8e30e0346f231eaeb286ce",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455",
+ "reference": "a90ccbddffa067b51f574dea6eb25d5680839455",
"shasum": ""
},
"require": {
@@ -1321,7 +1599,6 @@
"suggest": {
"ext-uopz": "*"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1350,7 +1627,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/master"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2"
},
"funding": [
{
@@ -1358,20 +1635,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:31:12+00:00"
+ "time": "2020-10-26T15:55:19+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "dev-master",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "d998f7a3b6abedf9d2ed93c7b3f7ffc6cf0f6acb"
+ "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d998f7a3b6abedf9d2ed93c7b3f7ffc6cf0f6acb",
- "reference": "d998f7a3b6abedf9d2ed93c7b3f7ffc6cf0f6acb",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"shasum": ""
},
"require": {
@@ -1381,7 +1658,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1408,7 +1684,7 @@
"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/master"
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
},
"funding": [
{
@@ -1416,20 +1692,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:32:36+00:00"
+ "time": "2020-11-28T06:42:11+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "dev-master",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "31a6d04d6b49c0b6a1499eaac1a395a766a4176b"
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31a6d04d6b49c0b6a1499eaac1a395a766a4176b",
- "reference": "31a6d04d6b49c0b6a1499eaac1a395a766a4176b",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
@@ -1440,7 +1716,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1466,7 +1741,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/master"
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
},
"funding": [
{
@@ -1474,20 +1749,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:31:20+00:00"
+ "time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "dev-master",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "b111d3533226d210f133d7b7e45783765794067f"
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b111d3533226d210f133d7b7e45783765794067f",
- "reference": "b111d3533226d210f133d7b7e45783765794067f",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
@@ -1496,7 +1771,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1522,7 +1796,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/master"
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
},
"funding": [
{
@@ -1530,20 +1804,20 @@
"type": "github"
}
],
- "time": "2020-12-18T12:31:28+00:00"
+ "time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "dev-master",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "d1e4fef0e0cf6c2becafc1f53169339a6e426fb8"
+ "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/d1e4fef0e0cf6c2becafc1f53169339a6e426fb8",
- "reference": "d1e4fef0e0cf6c2becafc1f53169339a6e426fb8",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
+ "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
"shasum": ""
},
"require": {
@@ -1552,7 +1826,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1586,7 +1859,7 @@
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/master"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
},
"funding": [
{
@@ -1594,11 +1867,11 @@
"type": "github"
}
],
- "time": "2020-12-18T12:32:02+00:00"
+ "time": "2020-10-26T13:17:30+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "dev-master",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
@@ -1616,7 +1889,6 @@
"require-dev": {
"phpunit/phpunit": "^9.0"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1654,16 +1926,16 @@
},
{
"name": "sebastian/type",
- "version": "dev-master",
+ "version": "2.3.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "a2baeeb40f81ad4b7348975332c6825b8f759871"
+ "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/a2baeeb40f81ad4b7348975332c6825b8f759871",
- "reference": "a2baeeb40f81ad4b7348975332c6825b8f759871",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
+ "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"shasum": ""
},
"require": {
@@ -1672,7 +1944,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1699,7 +1970,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/master"
+ "source": "https://github.com/sebastianbergmann/type/tree/2.3.1"
},
"funding": [
{
@@ -1707,11 +1978,11 @@
"type": "github"
}
],
- "time": "2020-12-18T12:32:10+00:00"
+ "time": "2020-10-26T13:18:59+00:00"
},
{
"name": "sebastian/version",
- "version": "dev-master",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
@@ -1726,7 +1997,6 @@
"require": {
"php": ">=7.3"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1763,6 +2033,85 @@
],
"time": "2020-09-28T06:39:44+00:00"
},
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-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.22.1"
+ },
+ "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-01-07T16:49:33+00:00"
+ },
{
"name": "theseer/tokenizer",
"version": "1.2.0",
@@ -1812,16 +2161,70 @@
}
],
"time": "2020-07-12T23:59:07+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"
}
],
"aliases": [],
"minimum-stability": "dev",
- "stability-flags": {
- "spitfire/exception": 20,
- "spitfire/collection": 20,
- "phpunit/phpunit": 20
- },
- "prefer-stable": false,
+ "stability-flags": [],
+ "prefer-stable": true,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,4 @@
+parameters:
+ level: 7
+ paths:
+ - src/
\ No newline at end of file
diff --git a/src/Lexer.php b/src/Lexer.php
--- a/src/Lexer.php
+++ b/src/Lexer.php
@@ -2,12 +2,11 @@
use spitfire\ast\exceptions\LexerException;
use spitfire\ast\lexemes\EndOfFile;
+use spitfire\ast\lexemes\LexemeInterface;
use spitfire\ast\lexemes\WhiteSpace;
use spitfire\ast\scanner\ScannerModuleInterface;
use spitfire\collection\Collection;
-use function collect;
-
/*
* The MIT License
*
@@ -35,6 +34,10 @@
class Lexer
{
+ /**
+ *
+ * @var Collection<ScannerModuleInterface>
+ */
private $modules;
public function __construct() {
@@ -45,7 +48,13 @@
}
}
- public function tokenize($str) {
+ /**
+ *
+ * @param string $str
+ * @return LexemeInterface[]
+ */
+ public function tokenize(string $str) : array
+ {
$buf = new StringBuffer($str);
$ret = [];
diff --git a/src/Scope.php b/src/Scope.php
--- a/src/Scope.php
+++ b/src/Scope.php
@@ -27,18 +27,46 @@
class Scope
{
+ /**
+ *
+ * @var Scope|null
+ */
private $prototype = null;
+
+ /**
+ *
+ * @var array<string,mixed>
+ */
private $vars = [];
- public function __construct($prototype = null) {
+ /**
+ *
+ * @param Scope $prototype
+ */
+ public function __construct(Scope $prototype = null)
+ {
$this->prototype = $prototype;
}
- public function set($var, $to) {
+ /**
+ *
+ * @param string $var
+ * @param mixed $to
+ * @return Scope
+ */
+ public function set(string $var, $to) : Scope
+ {
$this->vars[$var] = $to;
+ return $this;
}
- public function get($var) {
+ /**
+ *
+ * @param string $var
+ * @return mixed|null
+ */
+ public function get(string $var)
+ {
if (array_key_exists($var, $this->vars)) {
return $this->vars[$var];
diff --git a/src/lexemes/Identifier.php b/src/lexemes/Identifier.php
--- a/src/lexemes/Identifier.php
+++ b/src/lexemes/Identifier.php
@@ -39,6 +39,10 @@
class Identifier implements LexemeInterface
{
+ /**
+ *
+ * @var string
+ */
private $name;
/**
@@ -67,7 +71,7 @@
* @return string
*/
public function __toString() {
- return sprintf('val(%s)', strval($this->name));
+ return sprintf('val(%s)', strval($this->name)) . PHP_EOL;
}
}
diff --git a/src/lexemes/Literal.php b/src/lexemes/Literal.php
--- a/src/lexemes/Literal.php
+++ b/src/lexemes/Literal.php
@@ -31,14 +31,22 @@
class Literal implements LexemeInterface
{
+ /**
+ * The body of a literal contains the string of data that it
+ * contains. This string is unescaped.
+ *
+ * @var string
+ */
private $body = null;
- public function __construct($body) {
+ public function __construct(string $body)
+ {
$this->body = $body;
}
- public function getBody(): string {
+ public function getBody(): string
+ {
return $this->body;
}
diff --git a/src/lexemes/ReservedWord.php b/src/lexemes/ReservedWord.php
--- a/src/lexemes/ReservedWord.php
+++ b/src/lexemes/ReservedWord.php
@@ -33,18 +33,27 @@
class ReservedWord implements LexemeInterface, ScannerModuleInterface
{
+ /**
+ * Contains the reserved word the user must type so the system recognizes it
+ * as a reserved word. These reserved words cannot be used as identifiers.
+ *
+ * @var string
+ */
private $literal;
- public function __construct($literal) {
+ public function __construct(string $literal)
+ {
$this->literal = $literal;
}
- public function getBody() : string {
+ public function getBody() : string
+ {
return $this->literal;
}
- public function in(StringBuffer $buffer): ?LexemeInterface {
+ public function in(StringBuffer $buffer): ?LexemeInterface
+ {
if ($buffer->peek(strlen($this->literal)) != $this->literal) {
return null;
diff --git a/src/lexemes/Symbol.php b/src/lexemes/Symbol.php
--- a/src/lexemes/Symbol.php
+++ b/src/lexemes/Symbol.php
@@ -35,10 +35,18 @@
class Symbol implements LexemeInterface, ScannerModuleInterface
{
+ /**
+ * The symbol the system is supposed to look for. This could be for example a
+ * + or a - for arithmetic operations. But it could also be something like a
+ * 'u' if needed
+ *
+ * @var string
+ */
private $literal;
- public function __construct($literal) {
+ public function __construct(string $literal)
+ {
$this->literal = $literal;
}
@@ -58,7 +66,7 @@
}
public function __toString() {
- return sprintf('sym(%s)', strval($this->literal));
+ return sprintf('sym(%s)', strval($this->literal)) . PHP_EOL;
}
}
diff --git a/src/parser/Block.php b/src/parser/Block.php
--- a/src/parser/Block.php
+++ b/src/parser/Block.php
@@ -1,6 +1,8 @@
<?php namespace spitfire\ast\parser;
+use Closure;
use spitfire\ast\lexemes\LexemeInterface;
+use spitfire\ast\Scope;
use spitfire\ast\TokenBuffer;
/*
@@ -29,22 +31,49 @@
class Block
{
+
+ /**
+ *
+ * @var (Block|Either|Multiple|Optional|LexemeInterface|TerminalInterface)[]
+ */
private $matches = [];
+ /**
+ * The operation this block is supposed to do with the data it receives.
+ *
+ * @var Closure
+ */
private $operation;
- public $name = 'undefined';
-
- public function matches() {
+ /**
+ * This function receives a series of parameters that establish how this
+ * block parses data.
+ */
+ public function matches() : Block
+ {
$args = func_get_args();
$this->matches = $args;
+ return $this;
}
- public function matchesArray($a) {
+ /**
+ *
+ * @param (Block|Either|Multiple|Optional|LexemeInterface|TerminalInterface)[] $a
+ * @return Block
+ */
+ public function matchesArray(array $a) : Block
+ {
$this->matches = $a;
+ return $this;
}
- public function test(TokenBuffer$tokens) {
+ /**
+ *
+ * @param TokenBuffer $tokens
+ * @return ParseTree|false
+ */
+ public function test(TokenBuffer $tokens)
+ {
$found = [];
@@ -83,43 +112,65 @@
}
- $r = new ParseTree($this, $found);
- return $r;
+ return new ParseTree($this, $found);
}
- public function children() {
+ /**
+ *
+ * @return (Block|Either|Multiple|Optional|LexemeInterface|TerminalInterface)[]
+ */
+ public function children() : array
+ {
return $this->matches;
}
- public function does($fn) {
+ /**
+ *
+ * @param Closure $fn
+ * @return Block
+ */
+ public function does(Closure $fn) : Block
+ {
$this->operation = $fn;
return $this;
}
- public function operate($leaf, $scope) {
+ /**
+ *
+ * @param ParseTree $leaf
+ * @param Scope $scope
+ * @return mixed
+ */
+ public function operate(ParseTree $leaf, Scope $scope)
+ {
return ($this->operation)($leaf, $scope);
}
- public function __toString() {
- return 'block';
- }
-
- public static function either() {
+ public static function either() : Either
+ {
$args = func_get_args();
return new Either($args);
}
- public static function optional() {
+ public static function optional() : Optional
+ {
$args = func_get_args();
$opt = new Optional();
$opt->matchesArray($args);
return $opt;
}
- public static function multiple() {
+ public static function multiple() : Multiple
+ {
$args = func_get_args();
$opt = new Multiple();
$opt->matchesArray($args);
return $opt;
}
+
+ public function __toString()
+ {
+ usleep(100);
+ return get_class($this) . PHP_EOL;
+ }
}
\ No newline at end of file
diff --git a/src/parser/Either.php b/src/parser/Either.php
--- a/src/parser/Either.php
+++ b/src/parser/Either.php
@@ -44,7 +44,7 @@
* the application has multiple matches for a tokenbuffer, the first match
* will be considered.
*
- * @var \spitfire\core\collection\DefinedCollection < Block >
+ * @var \spitfire\collection\Collection<Block|Multiple|Either|Optional>
*/
private $blocks;
@@ -71,7 +71,7 @@
* that it will be modified if the parse succeeds.
*
* @param \spitfire\ast\TokenBuffer $tokens A tokenbuffer to consume
- * @return boolean
+ * @return ParseTree|ParseTree[]|false
*/
public function test($tokens) {
$blocks = clone($this->blocks);
@@ -102,10 +102,6 @@
return false;
}
- public function children() {
- return $this->blocks;
- }
-
public function __toString() {
return sprintf('either:');
}
diff --git a/src/parser/IdentifierTerminal.php b/src/parser/IdentifierTerminal.php
--- a/src/parser/IdentifierTerminal.php
+++ b/src/parser/IdentifierTerminal.php
@@ -1,6 +1,7 @@
<?php namespace spitfire\ast\parser;
use spitfire\ast\lexemes\Identifier;
+use spitfire\ast\lexemes\LexemeInterface;
/*
* The MIT License
@@ -29,20 +30,18 @@
class IdentifierTerminal implements TerminalInterface
{
- public function get($token) {
+ public function get(LexemeInterface $token) : LexemeInterface
+ {
return $token;
}
- public function test($token) {
+ public function test(LexemeInterface $token) : bool
+ {
return $token instanceof Identifier;
}
- public function children() {
- return [];
- }
-
public function __toString() {
- return 'Identifier';
+ return 'Identifier' . PHP_EOL;
}
}
diff --git a/src/parser/LiteralTerminal.php b/src/parser/LiteralTerminal.php
--- a/src/parser/LiteralTerminal.php
+++ b/src/parser/LiteralTerminal.php
@@ -1,5 +1,6 @@
<?php namespace spitfire\ast\parser;
+use spitfire\ast\lexemes\LexemeInterface;
use spitfire\ast\lexemes\Literal;
/*
@@ -29,20 +30,18 @@
class LiteralTerminal implements TerminalInterface
{
- public function get($token) {
+ public function get(LexemeInterface $token = null) : LexemeInterface
+ {
return $token;
}
- public function test($token) {
+ public function test(LexemeInterface $token = null) : bool
+ {
return $token instanceof Literal;
}
- public function children() {
- return [];
- }
-
public function __toString() {
- return 'Literal';
+ return 'Literal' . PHP_EOL;
}
}
diff --git a/src/parser/Multiple.php b/src/parser/Multiple.php
--- a/src/parser/Multiple.php
+++ b/src/parser/Multiple.php
@@ -44,13 +44,14 @@
* can no longer match.
*
* @param TokenBuffer $tokens
- * @return mixed
+ * @return ParseTree|false|ParseTree[][]
*/
- public function test(TokenBuffer$tokens) {
+ public function test(TokenBuffer$tokens)
+ {
$_ret = [];
while ($res = parent::test($tokens)) {
- $_ret[] = is_array($res)? $res : $res->getLeafs();
+ $_ret[] = $res->getLeafs();
}
return !empty($_ret)? $_ret : false;
diff --git a/src/parser/Optional.php b/src/parser/Optional.php
--- a/src/parser/Optional.php
+++ b/src/parser/Optional.php
@@ -42,8 +42,8 @@
* regular block, an empty result will not lead to the parser failing, but the
* block being skipped and it's result set to null.
*
- * @param type $tokens
- * @return boolean
+ * @param \spitfire\ast\TokenBuffer $tokens
+ * @return ParseTree|ParseTree[]|null
*/
public function test($tokens) {
$res = parent::test($tokens);
diff --git a/src/parser/ParseTree.php b/src/parser/ParseTree.php
--- a/src/parser/ParseTree.php
+++ b/src/parser/ParseTree.php
@@ -1,8 +1,7 @@
<?php namespace spitfire\ast\parser;
use spitfire\ast\Scope;
-use function collect;
-use function console;
+use spitfire\collection\Collection;
/*
* The MIT License
@@ -63,27 +62,49 @@
* Creates a new parse tree.
*
* @param Block $block
- * @param type $nodes
+ * @param mixed[] $nodes
*/
- public function __construct(Block$block, $nodes) {
+ public function __construct(Block $block, $nodes) {
$this->block = $block;
$this->leafs = $nodes;
}
- public function getBlock() {
+ /**
+ *
+ * @return Block
+ */
+ public function getBlock() : Block
+ {
return $this->block;
}
- public function getLeafs() {
+ /**
+ *
+ * @return mixed[]
+ */
+ public function getLeafs() : array
+ {
return $this->leafs;
}
- public function setBlock($block) {
+ /**
+ *
+ * @param Block $block
+ * @return ParseTree
+ */
+ public function setBlock(Block $block) : ParseTree
+ {
$this->block = $block;
return $this;
}
- public function setLeafs($nodes) {
+ /**
+ *
+ * @param mixed[] $nodes
+ * @return ParseTree
+ */
+ public function setLeafs(array $nodes) : ParseTree
+ {
$this->leafs = $nodes;
return $this;
}
@@ -99,16 +120,4 @@
return $this->block->operate($this, $context);
}
- public function stringify($offset = 0) {
- $leafs = (new Collection($this->leafs));
-
- return str_repeat(' ', $offset) . sprintf('branch(%s - %s - %s)%s%s', count($this->leafs), $this->block->name, get_class($this->block), PHP_EOL, $leafs->each(function ($e) use ($offset) {
- return $e instanceof ParseTree? $e->stringify($offset + 4) : str_repeat(' ', $offset + 4) . $e;
- })->join(PHP_EOL));
- }
-
- public function __toString() {
- return $this->stringify();
- }
-
}
diff --git a/src/parser/Parser.php b/src/parser/Parser.php
--- a/src/parser/Parser.php
+++ b/src/parser/Parser.php
@@ -1,6 +1,8 @@
<?php namespace spitfire\ast\parser;
use spitfire\ast\exceptions\LexerException;
+use spitfire\ast\exceptions\ParserException;
+use spitfire\ast\lexemes\LexemeInterface;
use spitfire\ast\TokenBuffer;
/*
@@ -36,16 +38,25 @@
*/
private $root;
- public function __construct($root) {
+ public function __construct(Block $root)
+ {
$this->root = $root;
}
- public function parse($tokens) {
+ /**
+ *
+ * @param LexemeInterface[] $tokens
+ * @return ParseTree
+ */
+ public function parse(array $tokens) : ParseTree
+ {
$buffer = new TokenBuffer($tokens);
$res = $this->root->test($buffer);
if ($buffer->peek(1) !== null) { throw new LexerException('Extraneous data at the end of buffer'); }
+ if ($res === null) { throw new ParserException("Invalid data"); }
+ if ($res === false) { throw new ParserException("Invalid data"); }
return $res;
diff --git a/src/parser/ReservedWordTerminal.php b/src/parser/ReservedWordTerminal.php
--- a/src/parser/ReservedWordTerminal.php
+++ b/src/parser/ReservedWordTerminal.php
@@ -1,5 +1,7 @@
<?php namespace spitfire\ast\parser;
+use spitfire\ast\lexemes\LexemeInterface;
+use spitfire\ast\lexemes\ReservedWord;
use spitfire\ast\lexemes\Symbol;
/*
@@ -29,20 +31,31 @@
class ReservedWordTerminal implements TerminalInterface
{
+ /**
+ *
+ * @var ReservedWord
+ */
private $symbol;
- public function __construct($symbol) {
+ public function __construct(ReservedWord $symbol)
+ {
$this->symbol = $symbol;
}
- public function get($token) {
+ public function get(LexemeInterface $token = null) : LexemeInterface
+ {
return $token;
}
- public function test($token) {
+ public function test(LexemeInterface $token = null) : bool
+ {
return $token instanceof \spitfire\ast\lexemes\ReservedWord && $this->symbol === $token;
}
+ /**
+ *
+ * @return void[]
+ */
public function children() {
return [];
}
diff --git a/src/parser/SymbolTerminal.php b/src/parser/SymbolTerminal.php
--- a/src/parser/SymbolTerminal.php
+++ b/src/parser/SymbolTerminal.php
@@ -1,5 +1,6 @@
<?php namespace spitfire\ast\parser;
+use spitfire\ast\lexemes\LexemeInterface;
use spitfire\ast\lexemes\Symbol;
/*
@@ -29,21 +30,33 @@
class SymbolTerminal implements TerminalInterface
{
+ /**
+ *
+ * @var Symbol
+ */
private $symbol;
- public function __construct($symbol) {
+ public function __construct(Symbol $symbol)
+ {
$this->symbol = $symbol;
}
- public function get($token) {
+ public function get(LexemeInterface $token) : LexemeInterface
+ {
return $token;
}
-
- public function test($token) {
+
+ public function test(LexemeInterface $token) : bool
+ {
return $token instanceof Symbol && $this->symbol === $token;
}
- public function children() {
+ /**
+ *
+ * @return void[]
+ */
+ public function children() : array
+ {
return [];
}
diff --git a/src/parser/TerminalInterface.php b/src/parser/TerminalInterface.php
--- a/src/parser/TerminalInterface.php
+++ b/src/parser/TerminalInterface.php
@@ -1,5 +1,7 @@
<?php namespace spitfire\ast\parser;
+use spitfire\ast\lexemes\LexemeInterface;
+
/*
* The MIT License
*
@@ -31,6 +33,6 @@
interface TerminalInterface
{
- function test($token);
- function get($token);
+ function get(LexemeInterface $token) : LexemeInterface;
+ function test(LexemeInterface $token) : bool;
}
\ No newline at end of file
diff --git a/src/printer/Context.php b/src/printer/Context.php
deleted file mode 100644
--- a/src/printer/Context.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php namespace spitfire\ast\printer;
-
-use spitfire\collection\Collection;
-
-/*
- * The MIT License
- *
- * Copyright 2019 César de la Cal Bretschneider <cesar@magic3w.com>.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/**
- * Provides context so the system does not print recursive statements.
- */
-class Context
-{
-
- private $scanned;
-
- public function __construct() {
- $this->scanned = new Collection();
- }
-
- public function add($e) {
- $this->scanned->push($e);
- }
-
- public function contains($e) {
- return $this->scanned->contains($e);
- }
-
- public function __clone() {
- $this->scanned = clone $this->scanned;
- }
-
-
-}
\ No newline at end of file
diff --git a/src/printer/Printer.php b/src/printer/Printer.php
deleted file mode 100644
--- a/src/printer/Printer.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php namespace spitfire\ast\printer;
-
-/*
- * The MIT License
- *
- * Copyright 2019 César de la Cal Bretschneider <cesar@magic3w.com>.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-class Printer
-{
-
- public function print(\spitfire\ast\parser\Block$block) {
- $context = new Context();
- $this->descend($block, $context);
- }
-
- private function descend($block, Context$context, $level = 0) {
-
- $context = clone $context;
- $context->add($block);
-
- if (is_string($block)) {
- echo sprintf('%s *string*%s%s', str_repeat(' ', $level), $block, PHP_EOL);
- return;
- }
-
- if ($block instanceof \spitfire\ast\lexemes\LexemeInterface) {
- echo sprintf('%s %s%s', str_repeat(' ', $level), $block, PHP_EOL);
- return;
- }
-
- echo str_repeat(' ', $level) . $block . PHP_EOL;
-
- foreach ($block->children() as $e) {
- if ($context->contains($e)) {
- echo sprintf('%s **recursion %s**%s', str_repeat(' ', $level + 1), $block, PHP_EOL);
- }
- else {
- $this->descend($e, $context, $level + 1);
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/scanner/IntegerLiteralScanner.php b/src/scanner/IntegerLiteralScanner.php
--- a/src/scanner/IntegerLiteralScanner.php
+++ b/src/scanner/IntegerLiteralScanner.php
@@ -31,22 +31,14 @@
*/
+/**
+ *
+ * @todo this is called integer literal scanner. But it seems to be looking for numbers,
+ * since it includes the stop as a character
+ */
class IntegerLiteralScanner implements ScannerModuleInterface
{
-
- private $body = null;
-
-
- public function setBody($body): Literal {
- $this->body = $body;
- return $this;
- }
-
- public function getBody(): string {
- return $this->body;
- }
-
public function in(StringBuffer $buffer): ?LexemeInterface {
$next = $buffer->peek();
diff --git a/src/scanner/LiteralScanner.php b/src/scanner/LiteralScanner.php
--- a/src/scanner/LiteralScanner.php
+++ b/src/scanner/LiteralScanner.php
@@ -34,12 +34,26 @@
class LiteralScanner implements ScannerModuleInterface
{
+ /**
+ *
+ * @var string
+ */
private $open;
+ /**
+ *
+ * @var string
+ */
private $close;
- public function __construct($open, $close) {
+ /**
+ *
+ * @param string $open
+ * @param string $close
+ */
+ public function __construct(string $open, string $close)
+ {
$this->open = $open;
$this->close = $close;
}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 14, 9:54 AM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6089
Default Alt Text
D659.id2045.diff (82 KB)

Event Timeline