diff --git a/.gitignore b/.gitignore index 617b658..bbd0aec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,55 +2,6 @@ composer.phar vendor/ -# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file -# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file -# composer.lock -### JetBrains template -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio - -*.iml - ## Directory-based project format: .idea/ -# if you remove the above rule, at least ignore the following: -# User-specific stuff: -# .idea/workspace.xml -# .idea/tasks.xml -# .idea/dictionaries - -# Sensitive or high-churn files: -# .idea/dataSources.ids -# .idea/dataSources.xml -# .idea/sqlDataSources.xml -# .idea/dynamic.xml -# .idea/uiDesigner.xml - -# Gradle: -# .idea/gradle.xml -# .idea/libraries - -# Mongo Explorer plugin: -# .idea/mongoSettings.xml - -## File-based project format: -*.ipr -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties - -# Created by .ignore support plugin (hsz.mobi) diff --git a/composer.json b/composer.json index b20fca9..e3a2f01 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,6 @@ "doctrine/orm": "^2.5" }, "require-dev": { - "phpunit/phpunit": "^4.7" + "phpunit/phpunit": "^5" } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 7803680..0980915 100644 --- a/composer.lock +++ b/composer.lock @@ -4,39 +4,39 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c7aedb4a025e243da1c87dfd496221ac", + "content-hash": "1ba3532f90790dd682f6d55c730ff726", "packages": [ { "name": "doctrine/annotations", - "version": "v1.2.7", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": "^7.1" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", @@ -72,37 +72,41 @@ "docblock", "parser" ], - "time": "2015-08-31 12:32:49" + "time": "2017-12-06T07:11:42+00:00" }, { "name": "doctrine/cache", - "version": "v1.6.0", + "version": "v1.7.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6" + "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/f8af318d14bdb0eff0336795b428b547bd39ccb6", - "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a", + "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a", "shasum": "" }, "require": { - "php": "~5.5|~7.0" + "php": "~7.1" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" + "alcaeus/mongo-php-adapter": "^1.1", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -142,32 +146,33 @@ "cache", "caching" ], - "time": "2015-12-31 16:37:02" + "time": "2017-08-25T07:02:50+00:00" }, { "name": "doctrine/collections", - "version": "v1.3.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" + "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", - "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf", + "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "doctrine/coding-standard": "~0.1@dev", + "phpunit/phpunit": "^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -208,20 +213,20 @@ "collections", "iterator" ], - "time": "2015-04-14 22:21:58" + "time": "2017-07-22T10:37:32+00:00" }, { "name": "doctrine/common", - "version": "v2.6.1", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + "reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "url": "https://api.github.com/repos/doctrine/common/zipball/f68c297ce6455e8fd794aa8ffaf9fa458f6ade66", + "reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66", "shasum": "" }, "require": { @@ -230,15 +235,15 @@ "doctrine/collections": "1.*", "doctrine/inflector": "1.*", "doctrine/lexer": "1.*", - "php": "~5.5|~7.0" + "php": "~7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0" + "phpunit/phpunit": "^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7.x-dev" + "dev-master": "2.8.x-dev" } }, "autoload": { @@ -281,29 +286,33 @@ "persistence", "spl" ], - "time": "2015-12-25 13:18:31" + "time": "2017-08-31T08:43:38+00:00" }, { "name": "doctrine/dbal", - "version": "v2.5.4", + "version": "v2.7.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769" + "reference": "11037b4352c008373561dc6fc836834eed80c3b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/abbdfd1cff43a7b99d027af3be709bc8fc7d4769", - "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/11037b4352c008373561dc6fc836834eed80c3b5", + "reference": "11037b4352c008373561dc6fc836834eed80c3b5", "shasum": "" }, "require": { - "doctrine/common": ">=2.4,<2.7-dev", - "php": ">=5.3.2" + "doctrine/common": "^2.7.1", + "ext-pdo": "*", + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "4.*", - "symfony/console": "2.*" + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0", + "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5", + "symfony/console": "^2.0.5||^3.0", + "symfony/phpunit-bridge": "^3.4.5|^4.0.5" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -314,7 +323,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5.x-dev" + "dev-master": "2.7.x-dev" } }, "autoload": { @@ -352,37 +361,37 @@ "persistence", "queryobject" ], - "time": "2016-01-05 22:11:12" + "time": "2018-04-07T18:44:18+00:00" }, { "name": "doctrine/inflector", - "version": "v1.1.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -419,36 +428,36 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2018-01-09T20:05:19+00:00" }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -473,7 +482,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "doctrine/lexer", @@ -527,42 +536,44 @@ "lexer", "parser" ], - "time": "2014-09-09 13:34:57" + "time": "2014-09-09T13:34:57+00:00" }, { "name": "doctrine/orm", - "version": "v2.5.4", + "version": "v2.6.1", "source": { "type": "git", "url": "https://github.com/doctrine/doctrine2.git", - "reference": "bc4ddbfb0114cb33438cc811c9a740d8aa304aab" + "reference": "87ee409783a4a322b5597ebaae558661404055a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/bc4ddbfb0114cb33438cc811c9a740d8aa304aab", - "reference": "bc4ddbfb0114cb33438cc811c9a740d8aa304aab", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/87ee409783a4a322b5597ebaae558661404055a7", + "reference": "87ee409783a4a322b5597ebaae558661404055a7", "shasum": "" }, "require": { - "doctrine/cache": "~1.4", - "doctrine/collections": "~1.2", - "doctrine/common": ">=2.5-dev,<2.7-dev", - "doctrine/dbal": ">=2.5-dev,<2.6-dev", - "doctrine/instantiator": "~1.0.1", + "doctrine/annotations": "~1.5", + "doctrine/cache": "~1.6", + "doctrine/collections": "^1.4", + "doctrine/common": "^2.7.1", + "doctrine/dbal": "^2.6", + "doctrine/instantiator": "~1.1", "ext-pdo": "*", - "php": ">=5.4", - "symfony/console": "~2.5|~3.0" + "php": "^7.1", + "symfony/console": "~3.0|~4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "symfony/yaml": "~2.3|~3.0" + "doctrine/coding-standard": "^1.0", + "phpunit/phpunit": "^6.5", + "squizlabs/php_codesniffer": "^3.2", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" }, "bin": [ - "bin/doctrine", - "bin/doctrine.php" + "bin/doctrine" ], "type": "library", "extra": { @@ -571,8 +582,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\ORM\\": "lib/" + "psr-4": { + "Doctrine\\ORM\\": "lib/Doctrine/ORM" } }, "notification-url": "https://packagist.org/downloads/", @@ -595,6 +606,10 @@ { "name": "Jonathan Wage", "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], "description": "Object-Relational-Mapper for PHP", @@ -603,40 +618,48 @@ "database", "orm" ], - "time": "2016-01-05 21:34:58" + "time": "2018-02-27T07:30:56+00:00" }, { "name": "symfony/console", - "version": "v3.0.1", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ebcdc507829df915f4ca23067bd59ee4ef61f6c3" + "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ebcdc507829df915f4ca23067bd59ee4ef61f6c3", - "reference": "ebcdc507829df915f4ca23067bd59ee4ef61f6c3", + "url": "https://api.github.com/repos/symfony/console/zipball/aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", + "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -663,20 +686,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-12-22 10:39:06" + "time": "2018-04-03T05:24:00+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.1.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "1289d16209491b584839022f29257ad859b8532d" + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", - "reference": "1289d16209491b584839022f29257ad859b8532d", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", "shasum": "" }, "require": { @@ -688,7 +711,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -722,43 +745,143 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2018-01-30T19:27:44+00:00" } ], "packages-dev": [ { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "name": "myclabs/deep-copy", + "version": "1.7.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "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" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -770,37 +893,88 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.5.0", + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.0.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" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.7.5", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -833,43 +1007,44 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2018-02-19T10:16:54+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -895,20 +1070,20 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -942,7 +1117,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -983,26 +1158,34 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1024,33 +1207,33 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1073,44 +1256,54 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.21", + "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c" + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { + "ext-xdebug": "*", "phpunit/php-invoker": "~1.1" }, "bin": [ @@ -1119,7 +1312,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -1145,30 +1338,33 @@ "testing", "xunit" ], - "time": "2015-12-12 07:45:58" + "time": "2018-02-01T05:50:59+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" @@ -1176,7 +1372,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -1201,26 +1397,71 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2017-06-30T09:13:00+00:00" }, { - "name": "sebastian/comparator", - "version": "1.2.0", + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -1265,27 +1506,27 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1317,32 +1558,32 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", - "version": "1.3.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e7133793a8e5a5714a551a8324337374be209df" + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", - "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1367,33 +1608,34 @@ "environment", "hhvm" ], - "time": "2015-12-02 08:37:27" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", "shasum": "" }, "require": { "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "sebastian/recursion-context": "~2.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1433,7 +1675,7 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -1484,20 +1726,66 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.2", + "name": "sebastian/object-enumerator", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", "shasum": "" }, "require": { @@ -1509,7 +1797,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1537,23 +1825,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "time": "2016-11-19T07:33:16+00:00" }, { - "name": "sebastian/version", - "version": "1.0.6", + "name": "sebastian/resource-operations", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, + "require": { + "php": ">=5.6.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1572,29 +1910,38 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/yaml", - "version": "v3.0.1", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691" + "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3df409958a646dad2bc5046c3fb671ee24a1a691", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691", + "url": "https://api.github.com/repos/symfony/yaml/zipball/8b34ebb5989df61cbd77eff29a02c4db9ac1069c", + "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1621,7 +1968,57 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" + "time": "2018-04-03T05:24:00+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-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" + ], + "time": "2018-01-29T19:49:41+00:00" } ], "aliases": [], diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4b4b1c3..7437969 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,9 +14,14 @@ bootstrap = "vendor/autoload.php" > - + tests/ + + + src + + \ No newline at end of file diff --git a/src/Calc/Formel.php b/src/Calc/Formel.php new file mode 100644 index 0000000..5e7ac9c --- /dev/null +++ b/src/Calc/Formel.php @@ -0,0 +1,115 @@ +engine = $engine; + $this->article = $article; + } + + /** + * @return float + */ + public function calc() + { + $price = 0; + + /** @var Base $option */ + foreach($this->article->getOptions() as $option) { + + /** @var EdgeCollection $collection */ + foreach($option->getEdgesCollectionContainer() as $collection) { + /** @var Edge $edge */ + foreach($collection as $edge) { + if($this->edgeIsValid($collection->getName(), $edge)) { + $formel = $this->parseVar($edge->getFormel()); + if ($formel != "") { + eval('$price += ' . $formel . ';'); + } + } + } + } + } + + return $price; + } + + private function parseVar($formel) + { + preg_match_all('/\$V\w*\$V/', $formel, $founds); + + $variables = $this->engine->getVariables(); + + if (!empty($founds [0])) { + foreach ($founds [0] as $key => $found) { + $foundvalue = str_replace('$V', '', $found); + if (isset($variables [$foundvalue])) { + if ($variables [$foundvalue] == 'null') { + $formel = str_replace($found, 0, $formel); + } else { + if ($foundvalue == 'auflage') { + $formel = str_replace($found, str_replace(',', '.', $variables [$foundvalue]), $formel); + } else { + if ($variables [$foundvalue] == '') { + $formel = str_replace($found, 0, $formel); + } else { + $formel = str_replace($found, $variables [$foundvalue], $formel); + } + } + } + } else { + $formel = str_replace($found, 0, $formel); + } + } + } + + return $formel; + } + + /** + * @param $section + * @param Edge $edge + * @return bool + */ + private function edgeIsValid($section, $edge) + { + if(!isset($this->engine->getVariables()[$section])) { + return false; + } + + + if($edge->isRegion() && + $edge->getFrom() <= $this->engine->getVariables()[$section] && + $edge->getTo() >= $this->engine->getVariables()[$section]) { + return true; + } + + if($edge->isRegion() && + $edge->getFrom() <= $this->engine->getVariables()[$section] && + $edge->getTo() == 0) { + return true; + } + + if(!$edge->isRegion() && in_array($this->engine->getVariables()[$section], $edge->getValues())) { + return true; + } + + return false; + } +} \ No newline at end of file diff --git a/src/Calc/Valid.php b/src/Calc/Valid.php new file mode 100644 index 0000000..b1cda91 --- /dev/null +++ b/src/Calc/Valid.php @@ -0,0 +1,84 @@ +engine = $engine; + $this->article = $article; + } + + /** + * @return float + */ + public function calc() + { + $price = 0; + + /** @var Base $option */ + foreach($this->article->getOptions() as $option) { + + if(count($option->getEdgesCollectionContainer()) > 0) { + $option->setIsValid(false); + } + /** @var EdgeCollection $collection */ + foreach($option->getEdgesCollectionContainer() as $collection) { + /** @var Edge $edge */ + foreach($collection as $edge) { + if($this->edgeIsValid($collection->getName(), $edge)) { + $option->setIsValid(true); + } + } + } + } + + return $price; + } + + + /** + * @param $section + * @param Edge $edge + * @return bool + */ + private function edgeIsValid($section, $edge) + { + if(!isset($this->engine->getVariables()[$section])) { + return false; + } + + + if($edge->isRegion() && + $edge->getFrom() <= $this->engine->getVariables()[$section] && + $edge->getTo() >= $this->engine->getVariables()[$section]) { + return true; + } + + if($edge->isRegion() && + $edge->getFrom() <= $this->engine->getVariables()[$section] && + $edge->getTo() == 0) { + return true; + } + + if(!$edge->isRegion() && in_array($this->engine->getVariables()[$section], $edge->getValues())) { + return true; + } + + return false; + } +} \ No newline at end of file diff --git a/src/Engine.php b/src/Engine.php index f40ee3a..1aff32b 100644 --- a/src/Engine.php +++ b/src/Engine.php @@ -1,9 +1,11 @@ articles->append($parser->parse($article)); } + $this->dirty = true; } /** @@ -95,6 +114,7 @@ class Engine */ public function setPaperContainer($paperContainer) { + $this->dirty = true; $this->paperContainer = $paperContainer; } @@ -111,7 +131,107 @@ class Engine */ public function setPaperRepository($paperRepository) { + $this->dirty = true; $this->paperRepository = $paperRepository; } + /** + * @return mixed + */ + public function getFormulas() + { + return $this->formulas; + } + + /** + * @param mixed $formulas + */ + public function setFormulas($formulas) + { + $this->dirty = true; + $this->formulas = $formulas; + } + + /** + * @return array + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * @param array $parameters + */ + public function setParameters($parameters) + { + $this->dirty = true; + $this->parameters = $parameters; + } + + /** + * @return array + */ + public function getVariables() + { + return $this->variables; + } + + /** + * @param array $variables + */ + public function setVariables($variables) + { + $this->dirty = true; + $this->variables = $variables; + } + + public function calc($name = false) { + + if($name) { + $article = $this->getArticleByName($name); + }else{ + $article = $this->articles[0]; + } + + // Prefill with defaults + /** @var Base $option */ + foreach($article->getOptions() as $option) { + if(!isset($this->variables[$option->getId()]) && $option->getDefault() !== null && !$option instanceof Text) { + $this->variables[$option->getId()] = $option->getDefault(); + } + } + + // Check if Option is valid + $calcValid = new Valid($this, $article); + $calcValid->calc(); + + // CALC Formel + + $calcFormel = new Formel($this, $article); + $this->price += $calcFormel->calc(); + + $this->dirty = false; + return true; + } + + /** + * @return mixed + */ + public function getPrice() + { + if($this->dirty) { + $this->calc(); + } + return round($this->price,2); + } + + /** + * @param mixed $price + */ + public function setPrice($price) + { + $this->price = $price; + } + } \ No newline at end of file diff --git a/src/General/Parser/Edge.php b/src/General/Parser/Edge.php new file mode 100644 index 0000000..d1af096 --- /dev/null +++ b/src/General/Parser/Edge.php @@ -0,0 +1,59 @@ +node = $node; + } + + /** + * @return \PSC\Library\Calc\General\Type\Edge + */ + public function parse() + { + $edge = new \PSC\Library\Calc\General\Type\Edge(); + if(isset($this->node->attributes()->formel)) { + $edge->setFormel((string)$this->node->attributes()->formel); + } + if(isset($this->node->attributes()->calc_value)) { + $edge->setCalcValue((string)$this->node->attributes()->calc_value); + } + if(isset($this->node->attributes()->preis)) { + $edge->setPreis(floatval($this->node->attributes()->preis)); + } + if(isset($this->node->attributes()->pauschale)) { + $edge->setPauschale(floatval($this->node->attributes()->pauschale)); + } + + $value = (string)$this->node; + if(preg_match("/^([0-9a-zA-Z_]+)$/", trim($value), $regs)) { + $edge->setValues([$regs[1]]); + }elseif(preg_match("/^([0-9]+)-([0-9]+)$/", trim($value), $regs)) { + $edge->setRegion(true); + $edge->setFrom(intval($regs[1])); + $edge->setTo(intval($regs[2])); + }elseif(preg_match("/^([0-9]+)-$/", trim($value), $regs)) { + $edge->setRegion(true); + $edge->setFrom(intval($regs[1])); + }elseif(strpos(trim($value), ",") !== false) { + $values = explode(",", trim($value)); + $edge->setValues($values); + } + + return $edge; + } +} + diff --git a/src/General/Parser/EdgeCollection.php b/src/General/Parser/EdgeCollection.php new file mode 100644 index 0000000..93c6905 --- /dev/null +++ b/src/General/Parser/EdgeCollection.php @@ -0,0 +1,39 @@ +node = $node; + } + + /** + * + * @return \PSC\Library\Calc\General\Type\EdgeCollection + */ + public function parse() + { + $collection = new \PSC\Library\Calc\General\Type\EdgeCollection(); + + foreach($this->node->grenze as $row) { + $edgeParser = new Edge($row); + $edge = $edgeParser->parse(); + + $collection->append($edge); + } + + return $collection; + } +} \ No newline at end of file diff --git a/src/General/Parser/EdgeCollectionContainer.php b/src/General/Parser/EdgeCollectionContainer.php new file mode 100644 index 0000000..31597de --- /dev/null +++ b/src/General/Parser/EdgeCollectionContainer.php @@ -0,0 +1,36 @@ +node = $node; + } + + public function parse() + { + $container = new \PSC\Library\Calc\General\Type\EdgeCollectionContainer(); + + foreach($this->node->children() as $key => $row) { + $collectionParser = new EdgeCollection($row); + + $collection = $collectionParser->parse(); + $collection->setName($key); + + $container->append($collection); + } + + return $container; + } +} \ No newline at end of file diff --git a/src/General/Type/Edge.php b/src/General/Type/Edge.php new file mode 100644 index 0000000..f2a6aa3 --- /dev/null +++ b/src/General/Type/Edge.php @@ -0,0 +1,146 @@ +formel; + } + + /** + * @param string $formel + */ + public function setFormel($formel) + { + $this->formel = $formel; + } + + /** + * @return int + */ + public function getPauschale() + { + return $this->pauschale; + } + + /** + * @param int $pauschale + */ + public function setPauschale($pauschale) + { + $this->pauschale = $pauschale; + } + + /** + * @return int + */ + public function getPreis() + { + return $this->preis; + } + + /** + * @param int $preis + */ + public function setPreis($preis) + { + $this->preis = $preis; + } + + /** + * @return string + */ + public function getCalcValue() + { + return $this->calcValue; + } + + /** + * @param string $calcValue + */ + public function setCalcValue($calcValue) + { + $this->calcValue = $calcValue; + } + + /** + * @return int + */ + public function getFrom() + { + return $this->from; + } + + /** + * @param int $from + */ + public function setFrom($from) + { + $this->from = $from; + } + + /** + * @return int + */ + public function getTo() + { + return $this->to; + } + + /** + * @param int $to + */ + public function setTo($to) + { + $this->to = $to; + } + + /** + * @return array + */ + public function getValues() + { + return $this->values; + } + + /** + * @param array $values + */ + public function setValues($values) + { + $this->values = $values; + } + + /** + * @return bool + */ + public function isRegion() + { + return $this->region; + } + + /** + * @param bool $region + */ + public function setRegion($region) + { + $this->region = $region; + } + + +} \ No newline at end of file diff --git a/src/General/Type/EdgeCollection.php b/src/General/Type/EdgeCollection.php new file mode 100644 index 0000000..0272eb6 --- /dev/null +++ b/src/General/Type/EdgeCollection.php @@ -0,0 +1,27 @@ +name; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + +} \ No newline at end of file diff --git a/src/General/Type/EdgeCollectionContainer.php b/src/General/Type/EdgeCollectionContainer.php new file mode 100644 index 0000000..cee6cc9 --- /dev/null +++ b/src/General/Type/EdgeCollectionContainer.php @@ -0,0 +1,19 @@ +valid()) { + if($string == $this->current()->getName()) { + return $this->current(); + } + + $this->next(); + } + + return null; + } +} \ No newline at end of file diff --git a/src/Option/Parser.php b/src/Option/Parser.php index 89f7cd2..4311899 100644 --- a/src/Option/Parser.php +++ b/src/Option/Parser.php @@ -3,6 +3,7 @@ namespace PSC\Library\Calc\Option; use PSC\Library\Calc\Option\Parser\Input; use PSC\Library\Calc\Option\Parser\Select; +use PSC\Library\Calc\Option\Parser\Text; use PSC\Library\Calc\PaperContainer\Container; class Parser @@ -26,6 +27,9 @@ class Parser case 'select': $obj = new Select($node); break; + case 'text': + $obj = new Text($node); + break; } return $obj; diff --git a/src/Option/Parser/Base.php b/src/Option/Parser/Base.php index 385092f..f0db61a 100644 --- a/src/Option/Parser/Base.php +++ b/src/Option/Parser/Base.php @@ -28,6 +28,7 @@ class Base if(isset($this->node['help'])) { $this->element->setHelp((string)$this->node['help']); } + } private function getBoolean($value) diff --git a/src/Option/Parser/Input.php b/src/Option/Parser/Input.php index 2c1a5c2..087b997 100644 --- a/src/Option/Parser/Input.php +++ b/src/Option/Parser/Input.php @@ -1,6 +1,8 @@ node->children()) { + $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + } + return $this->element; } diff --git a/src/Option/Parser/Text.php b/src/Option/Parser/Text.php new file mode 100644 index 0000000..d4aabb0 --- /dev/null +++ b/src/Option/Parser/Text.php @@ -0,0 +1,22 @@ +element = new \PSC\Library\Calc\Option\Type\Text(); + parent::__construct($node); + } + + public function parse() + { + parent::parse(); + + return $this->element; + } + +} \ No newline at end of file diff --git a/src/Option/Type/Base.php b/src/Option/Type/Base.php index 048fcc9..3ee5f14 100644 --- a/src/Option/Type/Base.php +++ b/src/Option/Type/Base.php @@ -1,6 +1,9 @@ value = $value; } + /** + * @return bool + */ + public function isValid() + { + return $this->isValid; + } + + /** + * @param bool $isValid + */ + public function setIsValid($isValid) + { + $this->isValid = $isValid; + } + + /** + * @return EdgeCollectionContainer + */ + public function getEdgesCollectionContainer() + { + return $this->edgesCollectionContainer; + } + + /** + * @param EdgeCollectionContainer $edgesCollectionContainer + */ + public function setEdgesCollectionContainer($edgesCollectionContainer) + { + $this->edgesCollectionContainer = $edgesCollectionContainer; + } + + } \ No newline at end of file diff --git a/src/Option/Type/Text.php b/src/Option/Type/Text.php new file mode 100644 index 0000000..ae3082b --- /dev/null +++ b/src/Option/Type/Text.php @@ -0,0 +1,9 @@ +getArticleByName('Kalender'); - $this->assertEquals(10, $article->getOptions()->count()); + $this->assertEquals(11, $article->getOptions()->count()); } } \ No newline at end of file diff --git a/tests/Article/Complete1Test.php b/tests/Article/Complete1Test.php new file mode 100644 index 0000000..e6f5338 --- /dev/null +++ b/tests/Article/Complete1Test.php @@ -0,0 +1,79 @@ +engine = new Engine(new Container()); + $this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/General/complete1.xml')); + } + + public function tearDown() + { + $this->engine = null; + } + + public function testIfArticleCountIsCorrect() + { + $this->assertEquals(1, $this->engine->getArticles()->Count()); + } + + public function testIfParserGetArticleCorrect() + { + $article = $this->engine->getArticleByName('test1'); + $this->assertEquals('test1', $article->getName()); + + $this->assertEquals(17, count($article->getOptions())); + } + + public function testIfCalcArticleCorrect() + { + $this->engine->setParameters([]); + $this->engine->setFormulas([]); + $this->engine->setVariables([]); + $this->engine->calc('test1'); + $this->assertEquals(0, $this->engine->getPrice()); + + } + + public function testIfCalcReturnsPrice() + { + $this->engine->setParameters([]); + $this->engine->setFormulas([]); + $this->engine->setVariables(['gebwert' => 20000]); + $this->engine->calc('test1'); + $this->assertEquals(18.12, $this->engine->getPrice()); + } + + public function testIfCalcReturnsPriceWithEdge() + { + $this->engine->setParameters([]); + $this->engine->setFormulas([]); + $this->engine->setVariables(['gebyn' => 2, 'gebwert' => 20000]); + $this->engine->calc('test1'); + $this->assertEquals(0, $this->engine->getPrice()); + } + + public function testIfCalcCompletePrice() + { + $this->engine->setParameters([]); + $this->engine->setFormulas([]); + $this->engine->setVariables([ + 'gebwert' => 20000, + 'maschwertjuengerfuenf' => 12000, + 'maschwertaelterfuenf' => 13000, + 'allegereate' => 14000, + 'betriebsunterbrechung' => 15000, + 'umsatzjahrtransport' => 16000, + 'umsatzjahrbh' => 17000]); + $this->engine->calc('test1'); + $this->assertEquals(82.09, $this->engine->getPrice()); + } +} \ No newline at end of file diff --git a/tests/Calc/OptionsRemoveTest.php b/tests/Calc/OptionsRemoveTest.php new file mode 100644 index 0000000..a466dcc --- /dev/null +++ b/tests/Calc/OptionsRemoveTest.php @@ -0,0 +1,61 @@ +engine = new Engine(new Container()); + $this->engine->loadString(file_get_contents(__DIR__ . '/../TestFiles/Calc/option_remove.xml')); + } + + public function tearDown() + { + $this->engine = null; + } + + public function testIfArticleCountIsCorrect() + { + $this->assertEquals(1, $this->engine->getArticles()->Count()); + } + + public function testIfParserGetArticleCorrect() + { + $article = $this->engine->getArticleByName('test1'); + $this->assertEquals('test1', $article->getName()); + + $this->assertEquals(2, count($article->getOptions())); + } + + public function testIfOptionsNotValid() + { + $this->engine->setParameters([]); + $this->engine->setFormulas([]); + $this->engine->setVariables([]); + $this->engine->calc('test1'); + + /** @var Article $article */ + $article = $this->engine->getArticleByName('test1'); + + /** @var Base $option */ + $option = $article->getOptionById('gebwert'); + + $this->assertTrue($option->isValid()); + + $this->engine->setVariables(['gebyn' => 2]); + $this->engine->calc('test1'); + + $option = $article->getOptionById('gebwert'); + + $this->assertFalse($option->isValid()); + } + +} \ No newline at end of file diff --git a/tests/Parse/Edge/ContainerTest.php b/tests/Parse/Edge/ContainerTest.php new file mode 100644 index 0000000..6a75c80 --- /dev/null +++ b/tests/Parse/Edge/ContainerTest.php @@ -0,0 +1,22 @@ +parse(); + + $this->assertCount(2, $container); + + $this->assertCount(4, $container->getCollectionByName('gebyn')); + $this->assertCount(2, $container->getCollectionByName('seiten')); + + } +} \ No newline at end of file diff --git a/tests/Parse/Edge/SimpleTest.php b/tests/Parse/Edge/SimpleTest.php new file mode 100644 index 0000000..5108046 --- /dev/null +++ b/tests/Parse/Edge/SimpleTest.php @@ -0,0 +1,77 @@ +grenze[2]); + + /** @var \PSC\Library\Calc\General\Type\Edge $edge */ + $edge = $edgeParser->parse(); + $this->assertEquals(12, $edge->getPreis()); + $this->assertEquals(10, $edge->getPauschale()); + $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); + $this->assertEquals('$Vauflage$V', $edge->getCalcValue()); + $this->assertFalse($edge->isRegion()); + $this->assertEquals(34, $edge->getValues()[0]); + + } + + public function testIfRegionFrom() + { + $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); + + $edgeParser = new Edge($node->grenze[1]); + + /** @var \PSC\Library\Calc\General\Type\Edge $edge */ + $edge = $edgeParser->parse(); + $this->assertEquals(12, $edge->getPreis()); + $this->assertEquals(10, $edge->getPauschale()); + $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); + $this->assertEquals('$Vauflage$V', $edge->getCalcValue()); + $this->assertTrue($edge->isRegion()); + $this->assertEquals(101, $edge->getFrom()); + + } + + public function testIfRegionFromTo() + { + $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); + + $edgeParser = new Edge($node->grenze[0]); + + /** @var \PSC\Library\Calc\General\Type\Edge $edge */ + $edge = $edgeParser->parse(); + $this->assertEquals(12, $edge->getPreis()); + $this->assertEquals(10, $edge->getPauschale()); + $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); + $this->assertEquals('$Vauflage$V', $edge->getCalcValue()); + $this->assertTrue($edge->isRegion()); + $this->assertEquals(1, $edge->getFrom()); + $this->assertEquals(100, $edge->getTo()); + + } + + public function testIfCommaSeperated() + { + $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); + + $edgeParser = new Edge($node->grenze[3]); + + /** @var \PSC\Library\Calc\General\Type\Edge $edge */ + $edge = $edgeParser->parse(); + $this->assertEquals(12, $edge->getPreis()); + $this->assertEquals(10, $edge->getPauschale()); + $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); + $this->assertEquals('$Vauflage$V', $edge->getCalcValue()); + $this->assertFalse($edge->isRegion()); + $this->assertEquals([12,23], $edge->getValues()); + + } + +} \ No newline at end of file diff --git a/tests/Option/Type/InputTest.php b/tests/Parse/Option/InputTest.php similarity index 90% rename from tests/Option/Type/InputTest.php rename to tests/Parse/Option/InputTest.php index 7286697..2dc9615 100644 --- a/tests/Option/Type/InputTest.php +++ b/tests/Parse/Option/InputTest.php @@ -11,7 +11,7 @@ class InputTest extends \PHPUnit_Framework_TestCase { $parser = new Parser(); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/input.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); /** @var Input $element */ $element = $obj->parse(); @@ -23,7 +23,7 @@ class InputTest extends \PHPUnit_Framework_TestCase { $parser = new Parser(); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/input.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); /** @var Input $element */ $element = $obj->parse(); diff --git a/tests/Option/Type/SelectTest.php b/tests/Parse/Option/SelectTest.php similarity index 88% rename from tests/Option/Type/SelectTest.php rename to tests/Parse/Option/SelectTest.php index 88815b8..7d730d0 100644 --- a/tests/Option/Type/SelectTest.php +++ b/tests/Parse/Option/SelectTest.php @@ -13,7 +13,7 @@ class SelectTest extends \PHPUnit_Framework_TestCase { $parser = new Parser(); /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/select.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); $obj->setPaperContainer(new PaperContainer()); /** @var Select $element */ @@ -26,7 +26,7 @@ class SelectTest extends \PHPUnit_Framework_TestCase { $parser = new Parser(); /** @var Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/select.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); $obj->setPaperContainer(new PaperContainer()); /** @var Select $element */ @@ -42,7 +42,7 @@ class SelectTest extends \PHPUnit_Framework_TestCase public function testIfPaperContainerReturnsCorrectItems() { $paperContainer = new PaperContainer(); - $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/Select/papierContainer.xml'))); + $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/papierContainer.xml'))); $this->assertEquals(2, $paperContainer->getContainer()->count()); @@ -66,11 +66,11 @@ class SelectTest extends \PHPUnit_Framework_TestCase $repository = new PaperRepostory(); $paperContainer = new PaperContainer(); - $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/Select/papierContainer.xml'))); + $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/papierContainer.xml'))); $parser = new Parser(); /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/Select/selectPaperDB.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))); $obj->setPaperContainer($paperContainer); $obj->setPaperRepository($repository); diff --git a/tests/Parse/Option/TextTest.php b/tests/Parse/Option/TextTest.php new file mode 100644 index 0000000..ba48459 --- /dev/null +++ b/tests/Parse/Option/TextTest.php @@ -0,0 +1,37 @@ +getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); + + /** @var Input $element */ + $element = $obj->parse(); + + $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Text', $element); + } + + public function testIfCorrectAttributes() + { + $parser = new Parser(); + /** @var Parser\Input $obj */ + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); + + /** @var Input $element */ + $element = $obj->parse(); + + $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Text', $element); + $this->assertEquals('testtext', $element->getDefault()); + $this->assertEquals('t60', $element->getId()); + $this->assertEquals('', $element->getName()); + } + +} \ No newline at end of file diff --git a/tests/TestFiles/Calc/option_remove.xml b/tests/TestFiles/Calc/option_remove.xml new file mode 100644 index 0000000..ecb725b --- /dev/null +++ b/tests/TestFiles/Calc/option_remove.xml @@ -0,0 +1,23 @@ + + + + + test1 + test2 + + + + + + + + \ No newline at end of file diff --git a/tests/TestFiles/Edges/collections.xml b/tests/TestFiles/Edges/collections.xml new file mode 100644 index 0000000..03fa5c3 --- /dev/null +++ b/tests/TestFiles/Edges/collections.xml @@ -0,0 +1,14 @@ + + + + 1-100 + 101- + 34 + 12,23 + + + 1-100 + 101- + + + diff --git a/tests/TestFiles/Edges/simple.xml b/tests/TestFiles/Edges/simple.xml new file mode 100644 index 0000000..c311565 --- /dev/null +++ b/tests/TestFiles/Edges/simple.xml @@ -0,0 +1,7 @@ + + + 1-100 + 101- + 34 + 12,23 + \ No newline at end of file diff --git a/tests/TestFiles/General/complete1.xml b/tests/TestFiles/General/complete1.xml new file mode 100644 index 0000000..756ca7b --- /dev/null +++ b/tests/TestFiles/General/complete1.xml @@ -0,0 +1,71 @@ + + + + + test1 + test2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/TestFiles/Option/text.xml b/tests/TestFiles/Option/text.xml new file mode 100644 index 0000000..6325c10 --- /dev/null +++ b/tests/TestFiles/Option/text.xml @@ -0,0 +1,2 @@ + +