From 38173949513ce32aba5c5be624a82f4a6a4ab51a Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 24 Apr 2018 21:11:23 -0400 Subject: [PATCH] finished default parser --- composer.json | 14 +- composer.lock | 1651 +++++++++++++---- src/Application/Boundary/PersonMapper.php | 20 + src/Application/PersonFactory.php | 14 + src/Application/PersonRepository.php | 44 + src/Application/UseCases/ImportAbcFile.php | 55 + src/Domain/Atoms/EmailAtom.php | 38 + src/Domain/Atoms/UnsignedIntegerAtom.php | 12 + src/Domain/Boundary/PersonFactory.php | 7 + src/Domain/Boundary/PersonRepository.php | 7 + src/Domain/Core/AttributeTrait.php | 7 + src/Domain/Core/Author.php | 7 + src/Domain/Core/Composer.php | 7 + src/Domain/Core/EntityInterface.php | 15 + src/Domain/Core/IdentityTrait.php | 32 + src/Domain/Core/Person.php | 73 + src/Domain/Core/Setting.php | 313 ++++ src/Domain/Core/Transcriber.php | 7 + src/Domain/Core/Tune.php | 309 +++ src/Domain/Core/TuneCollection.php | 19 + src/Domain/Modules/Interpreter/Builder.php | 204 ++ src/Domain/Modules/Interpreter/Context.php | 116 ++ .../Interpreter/DefaultInterpreter.php | 121 ++ .../Modules/Interpreter/Interpreter.php | 36 + .../Interpreter/InterpreterPipeline.php | 9 + .../Modules/Interpreter/Lexicon/Composer.php | 40 + .../Modules/Interpreter/Lexicon/Index.php | 36 + .../Modules/Interpreter/Lexicon/Lex.php | 7 + .../Interpreter/Lexicon/LineKeyDataTrait.php | 23 + .../Modules/Interpreter/Lexicon/Title.php | 40 + src/Framework/Laravel5/Models/Person.php | 37 + .../Laravel5/Models}/UuidTrait.php | 2 +- .../Laravel5/Models}/ValidatingModel.php | 3 +- .../Laravel5/Models/ValidationTrait.php | 60 + src/Framework/PersonDbMapper.php | 26 + .../AbcParser/Domain/Core/SettingTest.php | 112 ++ .../Modules/Interpreter/ContextTest.php | 70 + .../Interpreter/DefaultInterpreterTest.php | 424 +++++ tests/unit/Application/PersonFactoryTest.php | 36 + 39 files changed, 3725 insertions(+), 328 deletions(-) create mode 100644 src/Application/Boundary/PersonMapper.php create mode 100644 src/Application/PersonFactory.php create mode 100644 src/Application/PersonRepository.php create mode 100644 src/Application/UseCases/ImportAbcFile.php create mode 100644 src/Domain/Atoms/EmailAtom.php create mode 100644 src/Domain/Atoms/UnsignedIntegerAtom.php create mode 100644 src/Domain/Boundary/PersonFactory.php create mode 100644 src/Domain/Boundary/PersonRepository.php create mode 100644 src/Domain/Core/AttributeTrait.php create mode 100644 src/Domain/Core/Author.php create mode 100644 src/Domain/Core/Composer.php create mode 100644 src/Domain/Core/EntityInterface.php create mode 100644 src/Domain/Core/IdentityTrait.php create mode 100644 src/Domain/Core/Person.php create mode 100644 src/Domain/Core/Setting.php create mode 100644 src/Domain/Core/Transcriber.php create mode 100644 src/Domain/Core/Tune.php create mode 100644 src/Domain/Core/TuneCollection.php create mode 100644 src/Domain/Modules/Interpreter/Builder.php create mode 100644 src/Domain/Modules/Interpreter/Context.php create mode 100644 src/Domain/Modules/Interpreter/DefaultInterpreter.php create mode 100644 src/Domain/Modules/Interpreter/Interpreter.php create mode 100644 src/Domain/Modules/Interpreter/InterpreterPipeline.php create mode 100644 src/Domain/Modules/Interpreter/Lexicon/Composer.php create mode 100644 src/Domain/Modules/Interpreter/Lexicon/Index.php create mode 100644 src/Domain/Modules/Interpreter/Lexicon/Lex.php create mode 100644 src/Domain/Modules/Interpreter/Lexicon/LineKeyDataTrait.php create mode 100644 src/Domain/Modules/Interpreter/Lexicon/Title.php create mode 100644 src/Framework/Laravel5/Models/Person.php rename src/{Models/Laravel5 => Framework/Laravel5/Models}/UuidTrait.php (92%) rename src/{Models/Laravel5 => Framework/Laravel5/Models}/ValidatingModel.php (84%) create mode 100644 src/Framework/Laravel5/Models/ValidationTrait.php create mode 100644 src/Framework/PersonDbMapper.php create mode 100644 tests/unit/AbcParser/Domain/Core/SettingTest.php create mode 100644 tests/unit/AbcParser/Domain/Modules/Interpreter/ContextTest.php create mode 100644 tests/unit/AbcParser/Domain/Modules/Interpreter/DefaultInterpreterTest.php create mode 100644 tests/unit/Application/PersonFactoryTest.php diff --git a/composer.json b/composer.json index 9e6b72e..1300794 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,25 @@ "zackkitzmiller/tiny": "^1.2", "webpatser/laravel-uuid": "^2.0", "enzyme/axiom": "^4.2", - "enzyme/freckle": "^0.3.0" + "enzyme/freckle": "^0.3.0", + "squizlabs/php_codesniffer": "^3.1", + "phpmd/phpmd": "^2.6", + "illuminate/database": "^5.5", + "enzyme/collection": "^1.0", + "illuminate/Pipeline": "^5.5", + "league/pipeline": "^0.3.0" }, "autoload": { "psr-4": { "XaiCorp\\AbcParser\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/", + "Tests\\Unit\\": "tests/unit" + } + }, "require-dev": { "mockery/mockery": "^1.0" } diff --git a/composer.lock b/composer.lock index 4897580..f62494f 100644 --- a/composer.lock +++ b/composer.lock @@ -1,24 +1,23 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "7d6809dba18aa5191491dfbec9e760f9", - "content-hash": "36e1db11be4cb4e02b3b1a2d09c869ee", + "content-hash": "e46f731a6416a18f1e837a755b805e75", "packages": [ { "name": "behat/gherkin", - "version": "v4.4.5", + "version": "v4.5.1", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74" + "reference": "74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a", + "reference": "74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a", "shasum": "" }, "require": { @@ -64,65 +63,62 @@ "gherkin", "parser" ], - "time": "2016-10-30 11:50:56" + "time": "2017-08-30T11:04:43+00:00" }, { "name": "codeception/codeception", - "version": "2.3.6", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "c3dd3b5d9e0b1ea6c2fcca52457736dc756716f8" + "reference": "bca3547632556875f1cdd567d6057cc14fe472b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/c3dd3b5d9e0b1ea6c2fcca52457736dc756716f8", - "reference": "c3dd3b5d9e0b1ea6c2fcca52457736dc756716f8", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/bca3547632556875f1cdd567d6057cc14fe472b8", + "reference": "bca3547632556875f1cdd567d6057cc14fe472b8", "shasum": "" }, "require": { - "behat/gherkin": "~4.4.0", + "behat/gherkin": "^4.4.0", + "codeception/phpunit-wrapper": "^6.0.9|^7.0.6", + "codeception/stub": "^1.0", "ext-json": "*", "ext-mbstring": "*", "facebook/webdriver": ">=1.1.3 <2.0", "guzzlehttp/guzzle": ">=4.1.4 <7.0", "guzzlehttp/psr7": "~1.0", "php": ">=5.4.0 <8.0", - "phpunit/php-code-coverage": ">=2.2.4 <6.0", - "phpunit/phpunit": ">4.8.20 <7.0", - "phpunit/phpunit-mock-objects": ">2.3 <5.0", - "sebastian/comparator": ">1.1 <3.0", - "sebastian/diff": ">=1.4 <3.0", - "stecman/symfony-console-completion": "^0.7.0", - "symfony/browser-kit": ">=2.7 <4.0", - "symfony/console": ">=2.7 <4.0", - "symfony/css-selector": ">=2.7 <4.0", - "symfony/dom-crawler": ">=2.7.5 <4.0", - "symfony/event-dispatcher": ">=2.7 <4.0", - "symfony/finder": ">=2.7 <4.0", - "symfony/yaml": ">=2.7 <4.0" + "symfony/browser-kit": ">=2.7 <5.0", + "symfony/console": ">=2.7 <5.0", + "symfony/css-selector": ">=2.7 <5.0", + "symfony/dom-crawler": ">=2.7 <5.0", + "symfony/event-dispatcher": ">=2.7 <5.0", + "symfony/finder": ">=2.7 <5.0", + "symfony/yaml": ">=2.7 <5.0" }, "require-dev": { "codeception/specify": "~0.3", "facebook/graph-sdk": "~5.3", "flow/jsonpath": "~0.2", - "league/factory-muffin": "^3.0", - "league/factory-muffin-faker": "^1.0", "monolog/monolog": "~1.8", "pda/pheanstalk": "~3.0", "php-amqplib/php-amqplib": "~2.4", "predis/predis": "^1.0", "squizlabs/php_codesniffer": "~2.0", - "symfony/process": ">=2.7 <4.0", + "symfony/process": ">=2.7 <5.0", "vlucas/phpdotenv": "^2.4.0" }, "suggest": { + "aws/aws-sdk-php": "For using AWS Auth in REST module and Queue module", + "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests", "codeception/specify": "BDD-style code blocks", "codeception/verify": "BDD-style assertions", "flow/jsonpath": "For using JSONPath in REST module", "league/factory-muffin": "For DataFactory module", "league/factory-muffin-faker": "For Faker support in DataFactory module", "phpseclib/phpseclib": "for SFTP option in FTP Module", + "stecman/symfony-console-completion": "For BASH autocompletion", "symfony/phpunit-bridge": "For phpunit-bridge support" }, "bin": [ @@ -158,36 +154,179 @@ "functional testing", "unit testing" ], - "time": "2017-09-28 23:19:49" + "time": "2018-03-31T22:30:43+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.0.5", + "name": "codeception/phpunit-wrapper", + "version": "7.1.1", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "url": "https://github.com/Codeception/phpunit-wrapper.git", + "reference": "33e8ccf2f7abf5c031eeae9802b821d30ec0f7fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/33e8ccf2f7abf5c031eeae9802b821d30ec0f7fc", + "reference": "33e8ccf2f7abf5c031eeae9802b821d30ec0f7fc", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "phpunit/php-code-coverage": "^6.0", + "phpunit/phpunit": "^7.1", + "sebastian/comparator": "^2.0", + "sebastian/diff": "^3.0" + }, + "require-dev": { + "codeception/specify": "*", + "vlucas/phpdotenv": "^2.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codeception\\PHPUnit\\": "src\\" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Davert", + "email": "davert.php@resend.cc" + } + ], + "description": "PHPUnit classes used by Codeception", + "time": "2018-04-20T10:17:13+00:00" + }, + { + "name": "codeception/stub", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Stub.git", + "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/95fb7a36b81890dd2e5163e7ab31310df6f1bb99", + "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99", + "shasum": "" + }, + "require": { + "phpunit/phpunit-mock-objects": ">2.3 <7.0" + }, + "require-dev": { + "phpunit/phpunit": ">=4.8 <8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codeception\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", + "time": "2018-02-18T13:56:56+00:00" + }, + { + "name": "doctrine/inflector", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2018-01-09T20:05:19+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "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": { @@ -212,7 +351,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "enzyme/axiom", @@ -272,7 +411,58 @@ "interfaces", "php" ], - "time": "2016-04-03 08:03:32" + "time": "2016-04-03T08:03:32+00:00" + }, + { + "name": "enzyme/collection", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/enzyme/collection.git", + "reference": "ea3ab9d5ab1abc1476126905870b0fb3d63c1d06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/enzyme/collection/zipball/ea3ab9d5ab1abc1476126905870b0fb3d63c1d06", + "reference": "ea3ab9d5ab1abc1476126905870b0fb3d63c1d06", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.8", + "satooshi/php-coveralls": "^0.6.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Enzyme\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tristan Strathearn", + "email": "r3oath@gmail.com", + "homepage": "https://github.com/r3oath", + "role": "Senior Web Developer" + } + ], + "description": "An all encompassing array manager.", + "homepage": "https://github.com/enzyme/collection", + "keywords": [ + "array", + "collection", + "enzyme", + "helper", + "management" + ], + "time": "2016-10-11T23:17:43+00:00" }, { "name": "enzyme/freckle", @@ -325,7 +515,7 @@ "path", "retrieval" ], - "time": "2016-04-03 05:46:18" + "time": "2016-04-03T05:46:18+00:00" }, { "name": "enzyme/parrot", @@ -377,34 +567,37 @@ "primitives", "static" ], - "time": "2015-12-14 01:16:37" + "time": "2015-12-14T01:16:37+00:00" }, { "name": "facebook/webdriver", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/facebook/php-webdriver.git", - "reference": "eadb0b7a7c3e6578185197fd40158b08c3164c83" + "reference": "86b5ca2f67173c9d34340845dd690149c886a605" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/eadb0b7a7c3e6578185197fd40158b08c3164c83", - "reference": "eadb0b7a7c3e6578185197fd40158b08c3164c83", + "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/86b5ca2f67173c9d34340845dd690149c886a605", + "reference": "86b5ca2f67173c9d34340845dd690149c886a605", "shasum": "" }, "require": { "ext-curl": "*", "ext-zip": "*", - "php": "^5.5 || ~7.0", - "symfony/process": "^2.8 || ^3.1" + "php": "^5.6 || ~7.0", + "symfony/process": "^2.8 || ^3.1 || ^4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.0", + "guzzle/guzzle": "^3.4.1", + "php-coveralls/php-coveralls": "^1.0.2", "php-mock/php-mock-phpunit": "^1.1", - "phpunit/phpunit": "4.6.* || ~5.0", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "^2.6" + "phpunit/phpunit": "^5.7", + "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0", + "squizlabs/php_codesniffer": "^2.6", + "symfony/var-dumper": "^3.3 || ^4.0" }, "type": "library", "extra": { @@ -429,20 +622,20 @@ "selenium", "webdriver" ], - "time": "2017-04-28 14:54:49" + "time": "2017-11-15T11:08:09+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.3.0", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { @@ -452,7 +645,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { @@ -461,7 +654,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "6.3-dev" } }, "autoload": { @@ -494,7 +687,7 @@ "rest", "web service" ], - "time": "2017-06-22 18:50:49" + "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", @@ -545,7 +738,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20 10:07:11" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -610,7 +803,7 @@ "uri", "url" ], - "time": "2017-03-20 17:10:46" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "icanboogie/inflector", @@ -662,41 +855,339 @@ "singularize", "underscore" ], - "time": "2017-06-30 13:16:14" + "time": "2017-06-30T13:16:14+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.6.1", + "name": "illuminate/container", + "version": "v5.6.17", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "url": "https://github.com/illuminate/container.git", + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/illuminate/container/zipball/4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", "shasum": "" }, "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "illuminate/contracts": "5.6.*", + "php": "^7.1.3", + "psr/container": "~1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } + }, "autoload": { "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Illuminate\\Container\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Container package.", + "homepage": "https://laravel.com", + "time": "2018-01-21T02:13:38+00:00" + }, + { + "name": "illuminate/contracts", + "version": "v5.6.17", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/322ec80498b3bf85bc4025d028e130a9b50242b9", + "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "time": "2018-04-07T17:05:26+00:00" + }, + { + "name": "illuminate/database", + "version": "v5.6.17", + "source": { + "type": "git", + "url": "https://github.com/illuminate/database.git", + "reference": "a949e082dbb520fdcb2798e0a5408669724aa197" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/database/zipball/a949e082dbb520fdcb2798e0a5408669724aa197", + "reference": "a949e082dbb520fdcb2798e0a5408669724aa197", + "shasum": "" + }, + "require": { + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" + }, + "suggest": { + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "illuminate/console": "Required to use the database commands (5.6.*).", + "illuminate/events": "Required to use the observers with Eloquent (5.6.*).", + "illuminate/filesystem": "Required to use the migrations (5.6.*).", + "illuminate/pagination": "Required to paginate the result set (5.6.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Database\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Database package.", + "homepage": "https://laravel.com", + "keywords": [ + "database", + "laravel", + "orm", + "sql" + ], + "time": "2018-04-17T12:36:27+00:00" + }, + { + "name": "illuminate/pipeline", + "version": "v5.6.17", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pipeline.git", + "reference": "0ea9439ed6e4b0bbbc74bf15aab84e4c9a3a9b3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pipeline/zipball/0ea9439ed6e4b0bbbc74bf15aab84e4c9a3a9b3b", + "reference": "0ea9439ed6e4b0bbbc74bf15aab84e4c9a3a9b3b", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Pipeline\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Pipeline package.", + "homepage": "https://laravel.com", + "time": "2017-11-07T20:23:51+00:00" + }, + { + "name": "illuminate/support", + "version": "v5.6.17", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "cc8d6f5cef3a901de6bb7d1b362102a6db001085" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/cc8d6f5cef3a901de6bb7d1b362102a6db001085", + "reference": "cc8d6f5cef3a901de6bb7d1b362102a6db001085", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.1", + "ext-mbstring": "*", + "illuminate/contracts": "5.6.*", + "nesbot/carbon": "^1.24.1", + "php": "^7.1.3" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (5.6.*).", + "symfony/process": "Required to use the composer class (~4.0).", + "symfony/var-dumper": "Required to use the dd function (~4.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "time": "2018-04-17T12:26:47+00:00" + }, + { + "name": "league/pipeline", + "version": "0.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/pipeline.git", + "reference": "27dc18166c30d6429c75d1320f41e8238c59c3d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/pipeline/zipball/27dc18166c30d6429c75d1320f41e8238c59c3d4", + "reference": "27dc18166c30d6429c75d1320f41e8238c59c3d4", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "A plug and play pipeline implementation.", + "keywords": [ + "composition", + "design pattern", + "pattern", + "pipeline", + "sequential" + ], + "time": "2016-10-13T20:53:39+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "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", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -704,7 +1195,95 @@ "object", "object graph" ], - "time": "2017-04-12 18:52:22" + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "nesbot/carbon", + "version": "1.27.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2018-04-23T09:02:57+00:00" + }, + { + "name": "pdepend/pdepend", + "version": "2.5.2", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/9daf26d0368d4a12bed1cacae1a9f3a6f0adf239", + "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4", + "symfony/dependency-injection": "^2.3.0|^3|^4", + "symfony/filesystem": "^2.3.0|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.7", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "time": "2017-12-13T13:21:38+00:00" }, { "name": "phar-io/manifest", @@ -759,7 +1338,7 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05 18:14:27" + "time": "2017-03-05T18:14:27+00:00" }, { "name": "phar-io/version", @@ -806,7 +1385,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05 17:38:23" + "time": "2017-03-05T17:38:23+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -860,33 +1439,39 @@ "reflection", "static analysis" ], - "time": "2017-09-11 18:02:19" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.1.1", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "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\\": [ @@ -905,7 +1490,7 @@ } ], "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-08-30 18:51:59" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -952,32 +1537,98 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14 14:27:02" + "time": "2017-07-14T14:27:02+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.7.2", + "name": "phpmd/phpmd", + "version": "2.6.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6" + "url": "https://github.com/phpmd/phpmd.git", + "reference": "4e9924b2c157a3eb64395460fcf56b31badc8374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/4e9924b2c157a3eb64395460fcf56b31badc8374", + "reference": "4e9924b2c157a3eb64395460fcf56b31badc8374", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "pdepend/pdepend": "^2.5", + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.0" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "project", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "http://phpmd.org/", + "keywords": [ + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "time": "2017-01-20T14:41:10+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "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/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { @@ -1015,45 +1666,44 @@ "spy", "stub" ], - "time": "2017-09-04 11:05:03" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.2.2", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b" + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b", - "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", + "php": "^7.1", "phpunit/php-file-iterator": "^1.4.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^1.4.11 || ^2.0", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.5", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -1068,7 +1718,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1079,20 +1729,20 @@ "testing", "xunit" ], - "time": "2017-08-03 12:40:43" + "time": "2018-04-06T15:39:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -1126,7 +1776,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -1167,32 +1817,32 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1207,7 +1857,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1216,33 +1866,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26 11:10:40" + "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0" + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1265,20 +1915,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-08-20 05:47:52" + "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", - "version": "6.4.2", + "version": "7.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ae6e2e062ff55263c7b04374c190aca45872b26a" + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ae6e2e062ff55263c7b04374c190aca45872b26a", - "reference": "ae6e2e062ff55263c7b04374c190aca45872b26a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", "shasum": "" }, "require": { @@ -1290,15 +1940,15 @@ "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", - "php": "^7.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.2.2", - "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-code-coverage": "^6.0.1", + "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^4.0.3", - "sebastian/comparator": "^2.0.2", - "sebastian/diff": "^2.0", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit-mock-objects": "^6.1.1", + "sebastian/comparator": "^2.1 || ^3.0", + "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", @@ -1306,16 +1956,12 @@ "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -1323,7 +1969,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.4.x-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -1349,33 +1995,30 @@ "testing", "xunit" ], - "time": "2017-10-15 06:16:19" + "time": "2018-04-18T13:41:53+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "4.0.4", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "2f789b59ab89669015ad984afa350c4ec577ade0" + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0", - "reference": "2f789b59ab89669015ad984afa350c4ec577ade0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", - "php": "^7.0", + "php": "^7.1", "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.0" - }, - "conflict": { - "phpunit/phpunit": "<6.0" + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" @@ -1383,7 +2026,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -1398,7 +2041,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1408,7 +2051,56 @@ "mock", "xunit" ], - "time": "2017-08-03 14:08:16" + "time": "2018-04-11T04:50:36+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" }, { "name": "psr/http-message", @@ -1458,7 +2150,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -1505,7 +2197,55 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1550,34 +2290,34 @@ ], "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-04 06:30:41" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "2.0.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a" + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ae068fede81d06e7bb9bb46a367210a3d3e1fe6a", - "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { "php": "^7.0", - "sebastian/diff": "^2.0", - "sebastian/exporter": "^3.0" + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1608,38 +2348,39 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-08-03 07:14:59" + "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1664,9 +2405,12 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03 08:09:46" + "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", @@ -1716,7 +2460,7 @@ "environment", "hhvm" ], - "time": "2017-07-01 08:51:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", @@ -1783,7 +2527,7 @@ "export", "exporter" ], - "time": "2017-04-03 13:19:02" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", @@ -1834,7 +2578,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27 15:39:26" + "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", @@ -1881,7 +2625,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03 12:35:26" + "time": "2017-08-03T12:35:26+00:00" }, { "name": "sebastian/object-reflector", @@ -1926,7 +2670,7 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29 09:07:27" + "time": "2017-03-29T09:07:27+00:00" }, { "name": "sebastian/recursion-context", @@ -1979,7 +2723,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03 06:23:57" + "time": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", @@ -2021,7 +2765,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -2064,74 +2808,80 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { - "name": "stecman/symfony-console-completion", - "version": "0.7.0", + "name": "squizlabs/php_codesniffer", + "version": "3.2.3", "source": { "type": "git", - "url": "https://github.com/stecman/symfony-console-completion.git", - "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/5461d43e53092b3d3b9dbd9d999f2054730f4bbb", - "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4842476c434e375f9d3182ff7b89059583aa8b27", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27", "shasum": "" }, "require": { - "php": ">=5.3.2", - "symfony/console": "~2.3 || ~3.0" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "0.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Stecman\\Component\\Symfony\\Console\\BashCompletion\\": "src/" + "dev-master": "3.x-dev" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Stephen Holdaway", - "email": "stephen@stecman.co.nz" + "name": "Greg Sherwood", + "role": "lead" } ], - "description": "Automatic BASH completion for Symfony Console Component based applications.", - "time": "2016-02-24 05:08:54" + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-02-20T21:35:23+00:00" }, { "name": "symfony/browser-kit", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0" + "reference": "c43bfa0182363b3fd64331b5e64e467349ff4670" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0", - "reference": "8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c43bfa0182363b3fd64331b5e64e467349ff4670", + "reference": "c43bfa0182363b3fd64331b5e64e467349ff4670", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/dom-crawler": "~2.8|~3.0" + "php": "^7.1.3", + "symfony/dom-crawler": "~3.4|~4.0" }, "require-dev": { - "symfony/css-selector": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/css-selector": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" }, "suggest": { "symfony/process": "" @@ -2139,7 +2889,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2166,49 +2916,111 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-07-12 13:03:20" + "time": "2018-03-19T22:35:49+00:00" }, { - "name": "symfony/console", - "version": "v3.3.6", + "name": "symfony/config", + "version": "v4.0.8", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201" + "url": "https://github.com/symfony/config.git", + "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0878233cb5c4391347e5495089c7af11b8e6201", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201", + "url": "https://api.github.com/repos/symfony/config/zipball/7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2018-03-19T22:35:49+00:00" + }, + { + "name": "symfony/console", + "version": "v3.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "d4bb70fa24d540c309d88a9d6e43fb2d339b1fbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/d4bb70fa24d540c309d88a9d6e43fb2d339b1fbf", + "reference": "d4bb70fa24d540c309d88a9d6e43fb2d339b1fbf", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2235,29 +3047,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-07-29 21:27:59" + "time": "2018-04-03T05:22:50+00:00" }, { "name": "symfony/css-selector", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "4d882dced7b995d5274293039370148e291808f2" + "reference": "03f965583147957f1ecbad7ea1c9d6fd5e525ec2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/4d882dced7b995d5274293039370148e291808f2", - "reference": "4d882dced7b995d5274293039370148e291808f2", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/03f965583147957f1ecbad7ea1c9d6fd5e525ec2", + "reference": "03f965583147957f1ecbad7ea1c9d6fd5e525ec2", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2288,36 +3100,36 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-05-01 15:01:29" + "time": "2018-03-19T22:35:49+00:00" }, { "name": "symfony/debug", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" + "reference": "5961d02d48828671f5d8a7805e06579d692f6ede" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", + "url": "https://api.github.com/repos/symfony/debug/zipball/5961d02d48828671f5d8a7805e06579d692f6ede", + "reference": "5961d02d48828671f5d8a7805e06579d692f6ede", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2344,28 +3156,99 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-07-28 15:27:31" + "time": "2018-04-03T05:24:00+00:00" }, { - "name": "symfony/dom-crawler", - "version": "v3.3.6", + "name": "symfony/dependency-injection", + "version": "v4.0.8", "source": { "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "9f1cea656afc5512c6f5e58d61fcea12acee113e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", - "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9f1cea656afc5512c6f5e58d61fcea12acee113e", + "reference": "9f1cea656afc5512c6f5e58d61fcea12acee113e", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/finder": "<3.4", + "symfony/proxy-manager-bridge": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "psr/container-implementation": "1.0" + }, + "require-dev": { + "symfony/config": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "time": "2018-04-02T09:52:41+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "d6c04c7532535b5e0b63db45b543cd60818e0fbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d6c04c7532535b5e0b63db45b543cd60818e0fbc", + "reference": "d6c04c7532535b5e0b63db45b543cd60818e0fbc", + "shasum": "" + }, + "require": { + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/css-selector": "~2.8|~3.0" + "symfony/css-selector": "~3.4|~4.0" }, "suggest": { "symfony/css-selector": "" @@ -2373,7 +3256,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2400,34 +3283,34 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-05-25 23:10:31" + "time": "2018-03-19T22:35:49+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e" + "reference": "63353a71073faf08f62caab4e6889b06a787f07b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/63353a71073faf08f62caab4e6889b06a787f07b", + "reference": "63353a71073faf08f62caab4e6889b06a787f07b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/expression-language": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" }, "suggest": { "symfony/dependency-injection": "", @@ -2436,7 +3319,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2463,29 +3346,78 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-06-09 14:53:08" + "time": "2018-04-06T07:35:43+00:00" }, { - "name": "symfony/finder", - "version": "v3.3.6", + "name": "symfony/filesystem", + "version": "v4.0.8", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + "url": "https://github.com/symfony/filesystem.git", + "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-02-22T10:50:29+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" } }, "autoload": { @@ -2512,20 +3444,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-06-01 21:01:25" + "time": "2018-04-04T05:10:37+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.5.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", "shasum": "" }, "require": { @@ -2537,7 +3469,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -2571,29 +3503,29 @@ "portable", "shim" ], - "time": "2017-06-14 15:44:48" + "time": "2018-01-30T19:27:44+00:00" }, { "name": "symfony/process", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" + "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", + "url": "https://api.github.com/repos/symfony/process/zipball/d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", + "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2620,27 +3552,98 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-07-13 13:05:09" + "time": "2018-04-03T05:24:00+00:00" }, { - "name": "symfony/yaml", - "version": "v3.3.6", + "name": "symfony/translation", + "version": "v4.0.8", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" + "url": "https://github.com/symfony/translation.git", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2018-02-22T10:50:29+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/8b34ebb5989df61cbd77eff29a02c4db9ac1069c", + "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c", + "shasum": "" + }, + "require": { + "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" @@ -2648,7 +3651,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2675,7 +3678,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-07-23 12:43:26" + "time": "2018-04-03T05:24:00+00:00" }, { "name": "theseer/tokenizer", @@ -2715,20 +3718,20 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07 12:08:54" + "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { @@ -2765,7 +3768,7 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2018-01-29T19:49:41+00:00" }, { "name": "webpatser/laravel-uuid", @@ -2819,7 +3822,7 @@ "keywords": [ "UUID RFC4122" ], - "time": "2017-09-10 21:34:32" + "time": "2017-09-10T21:34:32+00:00" }, { "name": "zackkitzmiller/tiny", @@ -2865,7 +3868,7 @@ } ], "description": "A reversible base62 ID obfuscater.", - "time": "2017-02-07 15:14:28" + "time": "2017-02-07T15:14:28+00:00" } ], "packages-dev": [ @@ -2915,7 +3918,7 @@ "keywords": [ "test" ], - "time": "2016-01-20 08:20:44" + "time": "2016-01-20T08:20:44+00:00" }, { "name": "mockery/mockery", @@ -2980,7 +3983,7 @@ "test double", "testing" ], - "time": "2017-10-06 16:20:43" + "time": "2017-10-06T16:20:43+00:00" } ], "aliases": [], diff --git a/src/Application/Boundary/PersonMapper.php b/src/Application/Boundary/PersonMapper.php new file mode 100644 index 0000000..4c5b0ea --- /dev/null +++ b/src/Application/Boundary/PersonMapper.php @@ -0,0 +1,20 @@ +mapper = $personMapper; + } + + /** + * @param Uuid $id + * @return mixed + */ + public function getPerson(Uuid $id) + { + if (!empty($this->store[$id->string])) { + $person = $this->store[$id->string]; + } else { + $personInfo = $this->mapper->fetch($id); + + $person = new Person( + new StringAtom($personInfo->get('name')), + new EmailAtom($personInfo->get('email')) + ); + $this->store[$id->string] = $person; + } + + return $person; + } +} diff --git a/src/Application/UseCases/ImportAbcFile.php b/src/Application/UseCases/ImportAbcFile.php new file mode 100644 index 0000000..799f209 --- /dev/null +++ b/src/Application/UseCases/ImportAbcFile.php @@ -0,0 +1,55 @@ +builderTemplate = $builderTemplate ?: new Builder(); + } + + /** + * @param string $abc + * @return TuneCollection + * @throws \Enzyme\Axiom\Exceptions\AtomException + */ + public function import(string $abc) : TuneCollection + { + $context = new Context(new StringAtom($abc)); + $parser = $this->getBestParser($context); + $result = $parser->execute($context); + + return $result; + } + + /** + * @param Context $context + * @return Interpreter + */ + public function getBestParser(Context $context) : Interpreter + { + $builder = clone $this->builderTemplate; + + switch($context->getVersion()) { + default: + $interpreter = new DefaultInterpreter($builder); + } + + return $interpreter; + } +} diff --git a/src/Domain/Atoms/EmailAtom.php b/src/Domain/Atoms/EmailAtom.php new file mode 100644 index 0000000..d8f82e6 --- /dev/null +++ b/src/Domain/Atoms/EmailAtom.php @@ -0,0 +1,38 @@ +validateEmail($email); + $this->value = $email; + } + + /** + * Get the underlying value associated with this atom. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + private function validateEmail($value) + { + if (!$this->isValid($value)) { + throw new \Exception('Not a valid email'); + } + } + + private function isValid($value) + { + //TODO: + return true; + } +} diff --git a/src/Domain/Atoms/UnsignedIntegerAtom.php b/src/Domain/Atoms/UnsignedIntegerAtom.php new file mode 100644 index 0000000..95f4165 --- /dev/null +++ b/src/Domain/Atoms/UnsignedIntegerAtom.php @@ -0,0 +1,12 @@ +identity; + } + + /** + * @param Uuid|null $identity + * @throws \Exception + */ + private function setIdentity(Uuid $identity = null) + { + $this->identity = is_null($identity) ? Uuid::generate(4) : $identity; + } +} diff --git a/src/Domain/Core/Person.php b/src/Domain/Core/Person.php new file mode 100644 index 0000000..356756e --- /dev/null +++ b/src/Domain/Core/Person.php @@ -0,0 +1,73 @@ +name = $name; + $this->email = $email; + + $this->setIdentity($identity); + } + + /** + * Checks whether this model has the given attribute set. + * + * @param string $attribute + * + * @return boolean + */ + public function has($attribute) + { + return in_array($attribute, [ + 'name', + 'email', + ]); + } + + /** + * Get the value associated with the given attribute. + * + * @param string $attribute + * + * @return mixed + */ + public function get($attribute) + { + if (!$this->has($attribute)) { + throw new \Exception('Cannot access attribute on person'); + } + + return $this->{$attribute}; + } + + /** + * Get all the attributes associated with this model. + * + * @return array + */ + public function getAll() + { + // TODO: Implement getAll() method. + } +} diff --git a/src/Domain/Core/Setting.php b/src/Domain/Core/Setting.php new file mode 100644 index 0000000..66bea4d --- /dev/null +++ b/src/Domain/Core/Setting.php @@ -0,0 +1,313 @@ +transcribers; + } + + /** + * @param Transcriber $transcriber + * @return Setting + */ + public function addTranscriber(Transcriber $transcriber): Setting + { + $this->transcribers[] = $transcriber; + return $this; + } + + /** + * @return array + */ + public function getNotes(): array + { + return $this->notes; + } + + /** + * @param string $note + * @return Setting + */ + public function addNote(string $note): Setting + { + $this->notes[] = $note; + return $this; + } + + /** + * @return array + */ + public function getDiscography(): array + { + return $this->discography; + } + + /** + * @param string $recording + * @return Setting + */ + public function addRecording(string $recording): Setting + { + $this->discography[] = $recording; + return $this; + } + + /** + * @return array + */ + public function getSources(): array + { + return $this->sources; + } + + /** + * @param string $source + * @return Setting + */ + public function addSource(string $source): Setting + { + $this->sources[] = $source; + return $this; + } + + /** + * @return array + */ + public function getWords(): array + { + return $this->words; + } + + /** + * @param string $words + * @return Setting + */ + public function addWords(string $words): Setting + { + $this->words[] = $words; + return $this; + } + + /** + * @return array + */ + public function getBooks(): array + { + return $this->books; + } + + /** + * @param string $book + * @return Setting + */ + public function addBook(string $book): Setting + { + $this->books[] = $book; + return $this; + } + + /** + * @return array + */ + public function getFilenames(): array + { + return $this->filenames; + } + + /** + * @param string $filename + * @return Setting + */ + public function addFilename(string $filename): Setting + { + $this->filenames[] = $filename; + return $this; + } + + /** + * @return string + */ + public function getPart(): string + { + return $this->part; + } + + /** + * @param string $part + * @return Setting + */ + public function setPart(string $part): Setting + { + $this->part = $part; + return $this; + } + + /** + * @return string + */ + public function getTempo(): string + { + return $this->tempo; + } + + /** + * @param string $tempo + * @return Setting + */ + public function setTempo(string $tempo): Setting + { + $this->tempo = $tempo; + return $this; + } + + /** + * @return string + */ + public function getNoteLength(): string + { + return $this->noteLength; + } + + /** + * @param string $noteLength + * @return Setting + */ + public function setNoteLength(string $noteLength): Setting + { + $this->noteLength = $noteLength; + return $this; + } + + /** + * @return string + */ + public function getMeter(): string + { + return $this->meter; + } + + /** + * @param string $meter + * @return Setting + */ + public function setMeter(string $meter): Setting + { + $this->meter = $meter; + return $this; + } + + /** + * @return string + */ + public function getKey(): string + { + return $this->key; + } + + /** + * @param string $key + * @return Setting + */ + public function setKey(string $key): Setting + { + $this->key = $key; + return $this; + } + + /** + * @return string + */ + public function getMusic(): string + { + return implode('\n', $this->music); + } + + /** + * @param string $music + * @return Setting + */ + public function addMusicLine(string $music): Setting + { + $this->music[] = $music; + return $this; + } +} diff --git a/src/Domain/Core/Transcriber.php b/src/Domain/Core/Transcriber.php new file mode 100644 index 0000000..2690feb --- /dev/null +++ b/src/Domain/Core/Transcriber.php @@ -0,0 +1,7 @@ + 'id', +// 'T' => 'Title', +// 'A' => 'Author', +// 'C' => 'Composer', +// 'G' => 'Group,', +// 'H' => 'History', +// 'O' => 'Origin', +// 'R' => 'Rhythm', +// ]; + + public function __construct(array $params, Uuid $identity = null) + { + $this->setIdentity($identity); + foreach ($params as $attribute => $value) { + $this->set($attribute, $value); + } + } + + /** + * @param UnsignedIntegerAtom $index + * @return $this + */ + public function setIndex(UnsignedIntegerAtom $index) : Tune + { + $this->index = $index->getValue(); + + return $this; + } + + /** + * @return Int + */ + public function getIndex() : int + { + return $this->index; + } + + /** + * @return string[] + */ + public function getTitles() : array + { + return $this->titles; + } + + /** + * @param string $title + * @return $this + */ + public function addTitle(string $title) : Tune + { + $this->titles[] = $title; + + return $this; + } + + /** + * @param Author $author + * @return $this + */ + public function addAuthor(Author $author) : Tune + { + $this->authors[] = $author; + + return $this; + } + + /** + * @return Author[] + */ + public function getAuthors() : array //TODO: PersonCollection + { + return $this->authors; + } + + /** + * @param Composer $composer + * @return $this + */ + public function addComposer(Composer $composer) : Tune + { + $this->composers[] = $composer; + + return $this; + } + + /** + * @return Composer[] + */ + public function getComposers() + { + return $this->composers; + } + + /** + * @param string $group + * @return $this + */ + public function addGroup(string $group) : Tune + { + $this->groups[] = $group; + + return $this; + } + + /** + * @return array + */ + public function getGroups() + { + return $this->groups; + } + + /** + * @param string $historyLine + * @return $this + */ + public function addHistoryLine(string $historyLine) + { + $this->history[] = $historyLine; + + return $this; + } + + /** + * @return array + */ + public function getHistory() + { + return $this->history; + } + + /** + * @param string $origin + * @return $this + */ + public function addOrigin(string $origin) + { + $this->origins[] = $origin; + + return $this; + } + + /** + * @return array + */ + public function getOrigins() + { + return $this->origins; + } + + /** + * @param StringAtom $rhythm + * @return $this + */ + public function addRhythm(string $rhythm) + { + $this->rhythms[] = $rhythm; + + return $this; + } + + /** + * @return array + */ + public function getRhythms() + { + return $this->rhythms; + } + + /** + * @param Setting $tuneSetting + * @return $this + */ + public function addSetting(Setting $tuneSetting) + { + $this->tuneSettings[] = $tuneSetting; + + return $this; + } + + /** + * @return Setting[] + */ + public function getSettings() + { + return $this->tuneSettings; + } + + + + /** + * @param $attribute + * @param $value + */ + protected function set($attribute, $value) + { + call_user_func([$this, 'set'.$attribute], [$value]); + } + + /** + * Checks whether this model has the given attribute set. + * + * @param string $attribute + * + * @return boolean + */ + public function has($attribute) + { + return isset($this->{$attribute}); + } + + /** + * Get the value associated with the given attribute. + * + * @param string $attribute + * + * @return mixed + */ + public function get($attribute) + { + // TODO: Implement get() method. + } + + /** + * Get all the attributes associated with this model. + * + * @return array + */ + public function getAll() + { + // TODO: Implement getAll() method. + } + + /** + * @param StringAtom $musicLine + * @return $this + */ + public function appendMusicLine(string $musicLine) + { + $this->music .= $musicLine->getValue() . PHP_EOL; + + return $this; + } +} diff --git a/src/Domain/Core/TuneCollection.php b/src/Domain/Core/TuneCollection.php new file mode 100644 index 0000000..948b1d2 --- /dev/null +++ b/src/Domain/Core/TuneCollection.php @@ -0,0 +1,19 @@ +collection = new TuneCollection(); + $this->tune = new Tune([]); + $this->setting = new Setting(); + + $this->tune->addSetting($this->setting); + } + + public function getTune() + { + return $this->tune; + } + + /** + * @return \XaiCorp\AbcParser\Domain\Core\TuneCollection + */ + public function getCollection() + { + return $this->collection; + } + + /** + * @return $this + */ + public function handleEndOfMusic() + { + if ($this->tune && empty($this->tune->getTitles())) { + return $this; + } + + $this->tune->addSetting($this->setting); + $this->collection[] = $this->tune; + + $this->tune = new Tune([]); + $this->setting = new Setting(); + + return $this; + } + + /** + * @param UnsignedIntegerAtom $index + * @return $this + */ + public function setIndex(UnsignedIntegerAtom $index) + { + $this->tune->setIndex($index); + + return $this; + } + + public function appendMusic(StringAtom $musicLine) + { + $this->setting->addMusicLine($musicLine->getValue()); + + return $this; + } + + public function addTitle(StringAtom $title) + { + $this->tune->addTitle($title->getValue()); + + return $this; + } + + public function setKey(StringAtom $key) + { + $this->setting->setKey($key->getValue()); + + return $this; + } + + public function setMeter(StringAtom $key) + { + $this->setting->setMeter($key->getValue()); + + return $this; + } + + public function addAuthor(StringAtom $name) + { + $author = new Author($name, new EmailAtom('')); + $this->tune->addAuthor($author); + + return $this; + } + + public function addComposer(StringAtom $composerName) + { + $composer = new Composer($composerName, new EmailAtom('')); + $this->tune->addComposer($composer); + + return $this; + } + + public function addTranscriber(StringAtom $transcriberName) + { + $transcriber = new Transcriber($transcriberName, new EmailAtom('')); + $this->setting->addTranscriber($transcriber); + + return $this; + } + + public function addDiscography(StringAtom $recording) + { + $this->setting->addRecording($recording->getValue()); + + return $this; + } + + public function addGroup(StringAtom $groupName) + { + $this->tune->addGroup($groupName->getValue()); + } + + public function setParts(StringAtom $part) + { + $this->setting->setPart($part->getValue()); + } + + public function addSource(StringAtom $source) + { + $this->setting->addSource($source->getValue()); + } + + public function addFilename(StringAtom $filename) + { + $this->setting->addFilename($filename->getValue()); + } + + public function addHistory(StringAtom $history) + { + $this->tune->addHistoryLine($history->getValue()); + } + + public function addRhythm(StringAtom $rhythm) + { + $this->tune->addRhythm($rhythm->getValue()); + } + + public function addBook(StringAtom $param) + { + $this->setting->addBook($param->getValue()); + } + + public function addWords(StringAtom $param) + { + $this->setting->addWords($param->getValue()); + } + + public function addTempo(StringAtom $param) + { + $this->setting->setTempo($param->getValue()); + } + + public function addNoteLength(StringAtom $param) + { + $this->setting->setNoteLength($param->getValue()); + } + + public function addNote(StringAtom $param) + { + $this->setting->addNote($param->getValue()); + } + + public function addOrigin(StringAtom $param) + { + $this->tune->addOrigin($param->getValue()); + } +} diff --git a/src/Domain/Modules/Interpreter/Context.php b/src/Domain/Modules/Interpreter/Context.php new file mode 100644 index 0000000..5b2d64f --- /dev/null +++ b/src/Domain/Modules/Interpreter/Context.php @@ -0,0 +1,116 @@ +abcText = $abc->getValue(); + + parent::__construct(preg_split("/(\r?\n)/", $abc->getValue())); + } + + /** + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * @return $this + */ + public function setStateInFileHeader() + { + $this->state = self::MODE_FILE_HEADER; + + return $this; + } + + /** + * @return $this + */ + public function setStateInTuneHeader() + { + $this->state = self::MODE_TUNE_HEADER; + + return $this; + } + + /** + * @return $this + */ + public function setStateInTuneBody() + { + $this->state = self::MODE_TUNE_BODY; + + return $this; + } + + /** + * @return $this + */ + public function setStateInHistory() + { + $this->state = self::MODE_HISTORY; + + return $this; + } + + /** + * @return $this + */ + public function setStateInBetween() + { + $this->state = self::MODE_NO_DATA; + + return $this; + } + + /** + * @param int $state + * @return bool + */ + public function isState(int $state) : bool + { + return $this->state === $state; + } + + /** + * get abc version of the file + * @return string + */ + public function getVersion() + { + return '2.1'; + } +} diff --git a/src/Domain/Modules/Interpreter/DefaultInterpreter.php b/src/Domain/Modules/Interpreter/DefaultInterpreter.php new file mode 100644 index 0000000..ce68082 --- /dev/null +++ b/src/Domain/Modules/Interpreter/DefaultInterpreter.php @@ -0,0 +1,121 @@ + 'key', + 'L' => 'length', + 'M' => 'meter', + 'P' => 'part', + 'Q' => 'tempo', + 'B' => 'book', + 'N' => 'note', + 'D' => 'disc', + 'S' => 'source', + 'W' => 'words', + 'Z' => 'transcriber', + 'F' => 'filename', + 'H' => 'history', + 'A' => 'author', + 'C' => 'composer', + 'G' => 'group', + 'R' => 'rhythm', + 'T' => 'title', + 'O' => 'origin' + ]; + + protected $lexers = [ + Index::class, + Title::class, + Author::class, + Book::class, + Composer::class, + Transcriber::class, + Discography::class, + Group::class, + Source::class, + Origin::class, + KeySignature::class, + Meter::class, + Parts::class, + Tempo::class, + NoteLength::class, + Notes::class, + History::class, + Filename::class, + Words::class, + Rhythm::class, + MusicLine::class, + EndOfTune::class, + ]; + + /** + * @param \XaiCorp\AbcParser\Domain\Modules\Interpreter\Context $context + * @return $this + */ + public function execute(Context $context) + { + $lexicon = $this->pipeline(); + + do { + $result = (new InterpreterPipeline()) + ->send($context) + ->through($lexicon) + ->via('handle') + ->then(function ($context) { + return $context; + }); + $context->next(); + } while ($context->count() > $context->key()); + +// return $this->builder->getTune(); + return $this; + } + + public function getLastTune() + { + return $this->builder->getTune(); + } + + public function getTunes() + { + return $this->builder->getCollection(); + } + + protected function pipeline() + { + $pipeline = []; + + foreach ($this->lexers as $lexerClass) { + $pipeline[] = new $lexerClass($this->builder); + } + + return $pipeline; + } +} diff --git a/src/Domain/Modules/Interpreter/Interpreter.php b/src/Domain/Modules/Interpreter/Interpreter.php new file mode 100644 index 0000000..a821126 --- /dev/null +++ b/src/Domain/Modules/Interpreter/Interpreter.php @@ -0,0 +1,36 @@ +builder = $builder; + } + + /** + * @param Context $context + * @return Interpreter + */ + abstract public function execute(Context $context); + + /** + * @return TuneCollection + */ + abstract public function getTunes(); +} diff --git a/src/Domain/Modules/Interpreter/InterpreterPipeline.php b/src/Domain/Modules/Interpreter/InterpreterPipeline.php new file mode 100644 index 0000000..edf8402 --- /dev/null +++ b/src/Domain/Modules/Interpreter/InterpreterPipeline.php @@ -0,0 +1,9 @@ +builder = $builder; + } + + /** + * @param Context $context + * @param \Closure $next + * @return mixed + * @throws \Enzyme\Axiom\Exceptions\AtomException + */ + public function handle(Context $context, \Closure $next) + { + $line = $context->current(); + list($key, $data) = $this->getKeyDataFromLine($line); + + if ($key === 'C') { + $this->builder->addComposer(new StringAtom($data)); + } + + return $next($context); + } +} diff --git a/src/Domain/Modules/Interpreter/Lexicon/Index.php b/src/Domain/Modules/Interpreter/Lexicon/Index.php new file mode 100644 index 0000000..cdca636 --- /dev/null +++ b/src/Domain/Modules/Interpreter/Lexicon/Index.php @@ -0,0 +1,36 @@ +builder = $builder; + } + + public function handle(Context $context, \Closure $next) + { + $line = $context->current(); + list($key, $data) = $this->getKeyDataFromLine($line); + + if ($key === 'X') { + $context->setStateInTuneHeader(); + + $this->builder->setIndex(new UnsignedIntegerAtom($data)); + } + + return $next($context); + } +} diff --git a/src/Domain/Modules/Interpreter/Lexicon/Lex.php b/src/Domain/Modules/Interpreter/Lexicon/Lex.php new file mode 100644 index 0000000..a482f61 --- /dev/null +++ b/src/Domain/Modules/Interpreter/Lexicon/Lex.php @@ -0,0 +1,7 @@ +builder = $builder; + } + + /** + * @param Context $context + * @param \Closure $next + * @return mixed + * @throws \Enzyme\Axiom\Exceptions\AtomException + */ + public function handle(Context $context, \Closure $next) + { + $line = $context->current(); + list($key, $data) = $this->getKeyDataFromLine($line); + + if ($key === 'T') { + $this->builder->addTitle(new StringAtom($data)); + } + + return $next($context); + } +} diff --git a/src/Framework/Laravel5/Models/Person.php b/src/Framework/Laravel5/Models/Person.php new file mode 100644 index 0000000..0ac6087 --- /dev/null +++ b/src/Framework/Laravel5/Models/Person.php @@ -0,0 +1,37 @@ + 'required', + 'name' => 'required|string|max:63', + 'email' => 'required|email|max:255' + ]; + + protected $hidden = ['email']; + + //Relationships + + + public function toArray() + { + return $this->name; + } +} diff --git a/src/Models/Laravel5/UuidTrait.php b/src/Framework/Laravel5/Models/UuidTrait.php similarity index 92% rename from src/Models/Laravel5/UuidTrait.php rename to src/Framework/Laravel5/Models/UuidTrait.php index 958f202..0dc43ee 100644 --- a/src/Models/Laravel5/UuidTrait.php +++ b/src/Framework/Laravel5/Models/UuidTrait.php @@ -1,5 +1,5 @@ getAttributes(); + + $validator = Validator::make($data, $this->validationRules); + + if ($validator->fails()) { + if (! $this->messages) { + $this->messages = new MessageBag(); + } + $this->messages = $validator->getMessageBag(); + return false; + } + + return true; + } + + /** + * @return array|MessageBag + */ + public function getMessages() + { + return $this->messages?$this->messages->toArray():[]; + } + + /** + * @return array + */ + public function getValidationRules() + { + return $this->validationRules; + } + + /** + * fetch the validation rules for a model class + * + * @return array + */ + public static function getRules() + { + $class = get_called_class(); + $instance = new $class(); + return $instance->getValidationRules(); + } +} diff --git a/src/Framework/PersonDbMapper.php b/src/Framework/PersonDbMapper.php new file mode 100644 index 0000000..c5c46b6 --- /dev/null +++ b/src/Framework/PersonDbMapper.php @@ -0,0 +1,26 @@ +assertInstanceOf(Setting::class, $setting); + } + + public function testAddTranscriber() + { + $name = new StringAtom('me'); + $email = new EmailAtom('me@example.com'); + $transcriber = new Transcriber($name, $email); + $setting = new Setting(); + $setting->addTranscriber($transcriber); + + $result = $setting->getTranscribers(); + + $this->assertNotEmpty($result); + $this->assertEquals($transcriber, $result[0]); + } + + public function testAddNote() + { + $note = 'a note'; + $setting = new Setting(); + $setting->addNote($note); + + $result = $setting->getNotes(); + + $this->assertNotEmpty($result); + $this->assertEquals($note, $result[0]); + } + + public function testAddRecording() + { + $recording = 'cd recording number'; + $setting = new Setting(); + $setting->addRecording($recording); + + $result = $setting->getDiscography(); + + $this->assertNotEmpty($result); + $this->assertEquals($recording, $result[0]); + } + + public function testAddSource() + { + $source = 'thesession.org'; + $setting = new Setting(); + $setting->addSource($source); + + $result = $setting->getSources(); + + $this->assertNotEmpty($result); + $this->assertEquals($source, $result[0]); + } + + public function testAddWords() + { + $words = 'sing along with me'; + $setting = new Setting(); + $setting->addWords($words); + + $result = $setting->getWords(); + + $this->assertNotEmpty($result); + $this->assertEquals($words, $result[0]); + } + + public function testAddBook() + { + $book = 'sing along with me'; + $setting = new Setting(); + $setting->addBook($book); + + $result = $setting->getBooks(); + + $this->assertNotEmpty($result); + $this->assertEquals($book, $result[0]); + } + + public function testAddFilename() + { + $filename = 'test.abc'; + $setting = new Setting(); + $setting->addFilename($filename); + + $result = $setting->getFilenames(); + + $this->assertNotEmpty($result); + $this->assertEquals($filename, $result[0]); + } +} diff --git a/tests/unit/AbcParser/Domain/Modules/Interpreter/ContextTest.php b/tests/unit/AbcParser/Domain/Modules/Interpreter/ContextTest.php new file mode 100644 index 0000000..59eb459 --- /dev/null +++ b/tests/unit/AbcParser/Domain/Modules/Interpreter/ContextTest.php @@ -0,0 +1,70 @@ +getAbc()); + $context = new Context($abc); + + $this->assertInstanceOf(Context::class, $context); + } + + public function testLoopingThroughLines() + { + $abc = new StringAtom($this->getAbc()); + $context = new Context($abc); + + $this->assertGreaterThan(1, count($context)); + foreach ($context as $key => $line) { + $this->assertInternalType('string', $line); + } + } + + public function testGetStateDefaultsToNoData() + { + $abc = new StringAtom($this->getAbc()); + $context = new Context($abc); + + $result = $context->getState(); + + $this->assertEquals(Context::MODE_NO_DATA, $result); + } + + public function testSetStateInFileHeader() + { + $abc = new StringAtom($this->getAbc()); + $context = new Context($abc); + + $result = $context->setStateInFileHeader()->getState(); + + $this->assertEquals(Context::MODE_FILE_HEADER, $result); + } + + public function testGetVersionReturnsDefault() + { + $expected = Context::ABC_VERSION_DEFAULT; + $abc = new StringAtom($this->getAbc()); + $context = new Context($abc); + + $result = $context->getVersion(); + + $this->assertEquals($expected, $result); + } +} diff --git a/tests/unit/AbcParser/Domain/Modules/Interpreter/DefaultInterpreterTest.php b/tests/unit/AbcParser/Domain/Modules/Interpreter/DefaultInterpreterTest.php new file mode 100644 index 0000000..7493a29 --- /dev/null +++ b/tests/unit/AbcParser/Domain/Modules/Interpreter/DefaultInterpreterTest.php @@ -0,0 +1,424 @@ +interpreter = new DefaultInterpreter($builder); + } + + /** + * @param string $filename + * @return bool|string + */ + private function getAbc($filename = '/abc/valid_abc_1.abc') + { + return file_get_contents(codecept_data_dir($filename)); + } + + /** + * @param string $string + * @return StringAtom + */ + private function createStringAtom($string = '') + { + try { + return new StringAtom($string); + } catch (\Exception $e) { + // + } + } + + private function createAuthor($name, $email = '') + { + return new Author( + $this->createStringAtom($name), + new EmailAtom($email) + ); + } + + private function createComposer($name, $email = '') + { + return new Composer( + $this->createStringAtom($name), + new EmailAtom($email) + ); + } + + public function testCreate() + { + $builder = new Builder(); + $interpreter = new DefaultInterpreter($builder); + + $this->assertInstanceOf(Interpreter::class, $interpreter); + } + + public function testExecuteReturnsInterpreter() + { + $abc = $this->createStringAtom($this->getAbc()); + $context = new Context($abc); + + $result = $this->interpreter->execute($context); + + $this->assertInstanceOf(Interpreter::class, $result); + } + + public function testExecuteParsesTitles() + { + $expectedTitle = ['Abbotts Bromley Horn Dance']; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getTitles(); + + $this->assertEquals($expectedTitle, $result); + } + + public function testExecuteParsesAuthor() + { + $expected = 'trad'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getAuthors()[0]->get('name'); + + $this->assertEquals($expected, $result->getValue()); + } + + public function testExecuteParsesComposer() + { + $expected = [$this->createComposer('trad.')]; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getComposers()[0]->get('name'); + + $this->assertEquals($expected[0]->get('name'), $result); + } + + public function testExecuteParsesTranscriber() + { + $expected = [$this->createComposer('Andy Hornby')]; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getTranscribers()[0]->get('name'); + + $this->assertEquals($expected[0]->get('name'), $result); + } + + public function testExecuteParsesDiscography() + { + $expected = 'None'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getDiscography()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesGroups() + { + $expected = 'lute'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getGroups()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesKey() + { + $expected = 'G'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getKey(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesMusic() + { + $expected = implode('\n', [ + 'e|B2e G2e|B2e E2G|FGA GAB|1AGF G2:|2AGF E2|', + '|e|c2e cde|A2c ABc|FGA GFE|_E=EF B,2g|', + 'e2g efg|c2e cde|dcB AGF|E3E2', + '|:A|BcB e3|BcB f3|BcB AGF|1G2F G2:|2E3-E2|]', + ]); + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getMusic(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesMeter() + { + $expected = '6/8'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getMeter(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesParts() + { + $expected = 'ABC'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getPart(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesSources() + { + $expected = 'http://www.leeds.ac.uk/music/Info/RRTuneBk/gettune/00000dab.html'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getSources()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesHistory() + { + $expected = [ + 'Thousand year old tradition', + 'The Horns live in the church and are removed for the dance once a year', + ]; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getHistory(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesRhythms() + { + $expected = 'Jig'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getRhythms()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesFilename() + { + $expected = 'none.abc'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getFilenames()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesBook() + { + $expected = 'Traditional English tunes'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getBooks()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesWords() + { + $expected = 'None'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getWords()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesTempo() + { + $expected = '1/8=80'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getTempo(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesNoteLength() + { + $expected = '1/8'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getNoteLength(); + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesNotes() + { + $expected = 'Traditional English'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $setting = $tune->getSettings()[0]; + $result = $setting->getNotes()[0]; + + $this->assertEquals($expected, $result); + } + + public function testExecuteParsesOrigin() + { + $expected = 'England'; + $abc = $this->createStringAtom($this->getAbc('/abc/valid_abc_2.abc')); + $context = new Context($abc); + + $tune = $this->interpreter + ->execute($context) + ->getTunes() + ->first(); + $result = $tune->getOrigins()[0]; + + $this->assertEquals($expected, $result); + } + + public function testMultipleTunesInAFile() + { + $abc = $this->createStringAtom($this->getAbc('/abc/jigs.abc')); + + $context = new Context($abc); + + $result = $this->interpreter + ->execute($context) + ->getTunes(); + + $this->assertCount(52, $result); + } +} diff --git a/tests/unit/Application/PersonFactoryTest.php b/tests/unit/Application/PersonFactoryTest.php new file mode 100644 index 0000000..8fa881f --- /dev/null +++ b/tests/unit/Application/PersonFactoryTest.php @@ -0,0 +1,36 @@ +assertInstanceOf(PersonFactory::class, $factory); + } + + public function testCreatePerson() + { + $factory = new PersonFactory(); + $name = new StringAtom('Roger'); + $email = new EmailAtom(''); + + $result = $factory->create($name, $email); + + $this->assertInstanceOf(Person::class, $result); + } +}