diff --git a/.gitignore b/.gitignore index a9af166..6e51cca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -.idea vendor -coverage -composer.phar phpunit.xml +.idea diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..6fc3be8 --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,8 @@ +checks: + php: true +filter: + excluded_paths: + - vendor/ + - tests/ + paths: + - src/* diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1869144 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: php +sudo: false +php: + - "7" +install: + - composer install + - composer dump-autoload -o +script: + - mkdir -p build/logs + - vendor/bin/phpunit --coverage-clover build/logs/clover.xml +after_script: + - php vendor/bin/coveralls -v \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9cf4cbf..fdcc19e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 THE ICONIC +Copyright (c) 2017 THE ICONIC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index adddde1..44ccd73 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,27 @@ -# TheIconic Name Parser +# THE ICONIC Name Parser +## Purpose This is a universal, language-independent name parser. Its purpose is to split a single string containing a full name, possibly including salutation, initials, suffixes etc., into meaningful parts like firstname, lastname, initials, and so on. +It is mostly tailored towards english names but works pretty well +with non-english names as long as they use latin spelling. + +E.g. **Mr Anthony R Von Fange III** is parsed to +- salutation: **Mr.** +- firstname: **Anthony** +- initials: **R** +- lastname: **von Fange** +- suffix: **III** + +## Setup +```$xslt +composer require theiconic/name-parser +``` + ## Usage ``` @@ -23,3 +39,13 @@ echo $name->getNickname(); echo $name->getInitials(); echo $name->getSuffix(); ``` +An empty string is returned for missing parts. + +## Examples + +An wide array of successfully parsed names can be found in the +[parser unit test](https://github.com/theiconic/name-parser/blob/master/tests/ParserTest.php#L12-L12). + +## License + +THE ICONIC Name Parser library for PHP is released under the MIT License. \ No newline at end of file diff --git a/composer.json b/composer.json index e4055fb..67520d7 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "^5.0", + "phpunit/phpunit": "^6.0", "satooshi/php-coveralls": "^1.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 059fb36..c5a31fb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "831af2318fb93f48e3e27f2b13615bdd", - "content-hash": "3ba13bd2f6e530d282cd95176d2ad46a", + "content-hash": "0624b9a7da86202c77d137c995b39af1", "packages": [], "packages-dev": [ { @@ -60,7 +59,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "guzzle/guzzle", @@ -156,43 +155,398 @@ "web service" ], "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18 18:23:50" + "time": "2015-03-18T18:23:50+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "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", + "duplicate", + "object", + "object graph" + ], + "time": "2017-04-12T18:52:22+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27T11:43:31+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-09-30T07:12:33+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-11-25T06:54:22+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2017-03-02T20:05:34+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b", + "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.11 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "ext-xdebug": "^2.5", + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "5.2.x-dev" } }, "autoload": { @@ -218,35 +572,37 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2017-04-21T08:03:57+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.3.4", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -263,7 +619,7 @@ "filesystem", "iterator" ], - "time": "2013-10-10 15:34:57" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -304,29 +660,34 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -348,20 +709,20 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "1.4.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", "shasum": "" }, "require": { @@ -397,45 +758,57 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2017-02-27T10:12:30+00:00" }, { "name": "phpunit/phpunit", - "version": "4.4.5", + "version": "6.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a" + "reference": "824d02024916525a36b2db21847a5ef91db9e4a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2e8580deebb7d1ac92ac878595e6bffe01069c2a", - "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/824d02024916525a36b2db21847a5ef91db9e4a8", + "reference": "824d02024916525a36b2db21847a5ef91db9e4a8", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.2", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.1", - "sebastian/exporter": "~1.1", - "sebastian/global-state": "~1.0", - "sebastian/recursion-context": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.3", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.2", + "phpunit/php-file-iterator": "^1.4", + "phpunit/php-text-template": "^1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^4.0", + "sebastian/comparator": "^2.0", + "sebastian/diff": "^1.2", + "sebastian/environment": "^3.0.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^1.1 || ^2.0", + "sebastian/object-enumerator": "^3.0.2", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -443,7 +816,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4.x-dev" + "dev-master": "6.1.x-dev" } }, "autoload": { @@ -469,30 +842,33 @@ "testing", "xunit" ], - "time": "2015-01-27 16:06:15" + "time": "2017-04-29T10:40:17+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "eabce450df194817a7d7e27e19013569a903a2bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/eabce450df194817a7d7e27e19013569a903a2bf", + "reference": "eabce450df194817a7d7e27e19013569a903a2bf", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^3.0" + }, + "conflict": { + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-soap": "*" @@ -500,7 +876,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -525,26 +901,34 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2017-03-03T06:30:20+00:00" }, { "name": "psr/log", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -558,12 +942,13 @@ } ], "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], - "time": "2012-12-21 11:40:51" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "satooshi/php-coveralls", @@ -597,58 +982,103 @@ "bin/coveralls" ], "type": "library", - "autoload": { - "psr-4": { - "Satooshi\\": "src/Satooshi/" + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2016-01-20T17:35:46+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2016-01-20 17:35:46" + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "20f84f468cb67efee293246e6a09619b891f55f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0", + "reference": "20f84f468cb67efee293246e6a09619b891f55f0", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.0", + "sebastian/diff": "^1.2", + "sebastian/exporter": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -685,7 +1115,7 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2017-03-03T06:26:08+00:00" }, { "name": "sebastian/diff", @@ -737,32 +1167,32 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "11e7710b7724d42c62249b0e9d3030240398949d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/11e7710b7724d42c62249b0e9d3030240398949d", + "reference": "11e7710b7724d42c62249b0e9d3030240398949d", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -787,34 +1217,34 @@ "environment", "hhvm" ], - "time": "2016-08-18 05:49:44" + "time": "2017-04-21T14:40:32+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -854,27 +1284,27 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -882,7 +1312,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -905,32 +1335,124 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8", + "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-03-12T15:17:29+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" }, { "name": "sebastian/recursion-context", - "version": "1.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -958,23 +1480,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -993,33 +1565,36 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/config", - "version": "v3.1.4", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "431d28df9c7bb6e77f8f6289d8670b044fabb9e8" + "reference": "e5533fcc0b3dd377626153b2852707878f363728" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/431d28df9c7bb6e77f8f6289d8670b044fabb9e8", - "reference": "431d28df9c7bb6e77f8f6289d8670b044fabb9e8", + "url": "https://api.github.com/repos/symfony/config/zipball/e5533fcc0b3dd377626153b2852707878f363728", + "reference": "e5533fcc0b3dd377626153b2852707878f363728", "shasum": "" }, "require": { "php": ">=5.5.9", "symfony/filesystem": "~2.8|~3.0" }, + "require-dev": { + "symfony/yaml": "~3.0" + }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1046,40 +1621,43 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-08-27 18:50:07" + "time": "2017-04-12T14:13:17+00:00" }, { "name": "symfony/console", - "version": "v3.1.4", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563" + "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8ea494c34f0f772c3954b5fbe00bffc5a435e563", - "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563", + "url": "https://api.github.com/repos/symfony/console/zipball/a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38", + "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38", "shasum": "" }, "require": { "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { "psr/log": "~1.0", "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", "symfony/process": "~2.8|~3.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/filesystem": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1106,20 +1684,77 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-08-19 06:48:39" + "time": "2017-04-26T01:39:17+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/fd6eeee656a5a7b384d56f1072243fe1c0e81686", + "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "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" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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 Debug Component", + "homepage": "https://symfony.com", + "time": "2017-04-19T20:17:50+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.11", + "version": "v2.8.20", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8" + "reference": "7fc8e2b4118ff316550596357325dfd92a51f531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7fc8e2b4118ff316550596357325dfd92a51f531", + "reference": "7fc8e2b4118ff316550596357325dfd92a51f531", "shasum": "" }, "require": { @@ -1127,7 +1762,7 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/config": "^2.0.5|~3.0.0", "symfony/dependency-injection": "~2.6|~3.0.0", "symfony/expression-language": "~2.6|~3.0.0", "symfony/stopwatch": "~2.3|~3.0.0" @@ -1166,20 +1801,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-07-28 16:56:28" + "time": "2017-04-26T16:56:54+00:00" }, { "name": "symfony/filesystem", - "version": "v3.1.4", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "bb29adceb552d202b6416ede373529338136e84f" + "reference": "040651db13cf061827a460cc10f6e36a445c45b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb29adceb552d202b6416ede373529338136e84f", - "reference": "bb29adceb552d202b6416ede373529338136e84f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/040651db13cf061827a460cc10f6e36a445c45b4", + "reference": "040651db13cf061827a460cc10f6e36a445c45b4", "shasum": "" }, "require": { @@ -1188,7 +1823,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1215,20 +1850,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-07-20 05:44:26" + "time": "2017-04-12T14:13:17+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", "shasum": "" }, "require": { @@ -1240,7 +1875,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1274,20 +1909,20 @@ "portable", "shim" ], - "time": "2016-05-18 14:26:46" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.1.4", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1" + "reference": "5a0105afb670dbd38f521105c444de1b8e10cfe3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1", - "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a0105afb670dbd38f521105c444de1b8e10cfe3", + "reference": "5a0105afb670dbd38f521105c444de1b8e10cfe3", "shasum": "" }, "require": { @@ -1296,7 +1931,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1323,29 +1958,35 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2017-04-12T14:13:17+00:00" }, { "name": "symfony/yaml", - "version": "v2.8.11", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" + "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/acec26fcf7f3031e094e910b94b002fa53d4e4d6", + "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1372,7 +2013,97 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-09-02 01:57:56" + "time": "2017-05-01T14:55:58+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-11-23T20:04:58+00:00" } ], "aliases": [], diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4f8d9ca..0874a48 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,14 +3,20 @@ - - - ./tests - - + + src + + tests + + ./vendor + + + ./tests + + diff --git a/src/Mapper/FirstnameMapper.php b/src/Mapper/FirstnameMapper.php index 96ad7a8..947cbc4 100644 --- a/src/Mapper/FirstnameMapper.php +++ b/src/Mapper/FirstnameMapper.php @@ -16,7 +16,8 @@ class FirstnameMapper extends AbstractMapper * @param array $parts the parts * @return array the mapped parts */ - public function map(array $parts) { + public function map(array $parts) + { if (count($parts) < 2) { return [$this->handleSinglePart($parts[0])]; } diff --git a/src/Mapper/InitialMapper.php b/src/Mapper/InitialMapper.php index 7738d51..724bc89 100644 --- a/src/Mapper/InitialMapper.php +++ b/src/Mapper/InitialMapper.php @@ -16,7 +16,8 @@ class InitialMapper extends AbstractMapper * @param array $parts the name parts * @return array the mapped parts */ - function map(array $parts) { + public function map(array $parts) + { foreach ($parts as $k => $part) { if ($part instanceof AbstractPart) { continue; diff --git a/src/Mapper/LastnameMapper.php b/src/Mapper/LastnameMapper.php index d43a6e5..1352aed 100644 --- a/src/Mapper/LastnameMapper.php +++ b/src/Mapper/LastnameMapper.php @@ -21,7 +21,8 @@ class LastnameMapper extends AbstractMapper * @param array $parts the name parts * @return array the mapped parts */ - public function map(array $parts) { + public function map(array $parts) + { if (!$this->options['match_single'] && count($parts) < 2) { return $parts; } @@ -42,12 +43,12 @@ public function map(array $parts) { } if (Lastname::isPrefix($part)) { - if (isset($parts[$k-1]) && $parts[$k-1] instanceof Lastname ) { + if (isset($parts[$k-1]) && $parts[$k-1] instanceof Lastname) { if ($this->hasUnmappedPartsBefore(array_reverse($parts), count($parts) - $k - 1)) { $parts[$k] = new Lastname($part); } } - } else if (!isset($parts[$k-1]) || !($parts[$k-1] instanceof Lastname)) { + } elseif (!isset($parts[$k-1]) || !($parts[$k-1] instanceof Lastname)) { $parts[$k] = new Lastname($part); } else { break; diff --git a/src/Mapper/MiddlenameMapper.php b/src/Mapper/MiddlenameMapper.php index ae95e59..eb17397 100644 --- a/src/Mapper/MiddlenameMapper.php +++ b/src/Mapper/MiddlenameMapper.php @@ -15,7 +15,8 @@ class MiddlenameMapper extends AbstractMapper * @param array $parts the name parts * @return array the mapped parts */ - public function map(array $parts) { + public function map(array $parts) + { if (count($parts) < 3) { return $parts; } diff --git a/src/Mapper/NicknameMapper.php b/src/Mapper/NicknameMapper.php index 4919923..b4d4abc 100644 --- a/src/Mapper/NicknameMapper.php +++ b/src/Mapper/NicknameMapper.php @@ -13,7 +13,8 @@ class NicknameMapper extends AbstractMapper * @param array $parts the name parts * @return array the mapped parts */ - function map(array $parts) { + public function map(array $parts) + { $isEncapsulated = false; foreach ($parts as $k => $part) { diff --git a/src/Mapper/SalutationMapper.php b/src/Mapper/SalutationMapper.php index 6545706..0523495 100644 --- a/src/Mapper/SalutationMapper.php +++ b/src/Mapper/SalutationMapper.php @@ -13,7 +13,8 @@ class SalutationMapper extends AbstractMapper * @param array $parts the name parts * @return array the mapped parts */ - function map(array $parts) { + public function map(array $parts) + { foreach ($parts as $k => $part) { if ($part instanceof AbstractPart) { break; diff --git a/src/Mapper/SuffixMapper.php b/src/Mapper/SuffixMapper.php index 9a68a34..8878af7 100644 --- a/src/Mapper/SuffixMapper.php +++ b/src/Mapper/SuffixMapper.php @@ -20,7 +20,8 @@ class SuffixMapper extends AbstractMapper * @param array $parts the name parts * @return array the mapped parts */ - function map(array $parts) { + public function map(array $parts) + { if ($this->options['match_single'] && count($parts) == 1 && Suffix::isSuffix($parts[0])) { $parts[0] = new Suffix($parts[0]); return $parts; diff --git a/src/Name.php b/src/Name.php index a11892f..8c0482b 100644 --- a/src/Name.php +++ b/src/Name.php @@ -52,7 +52,15 @@ public function getParts() public function getAll() { $results = []; - $keys = ['salutation', 'firstname', 'middlename', 'lastname', 'nickname', 'initials', 'suffix']; + $keys = [ + 'salutation', + 'firstname', + 'middlename', + 'lastname', + 'nickname', + 'initials', + 'suffix' + ]; foreach ($keys as $key) { $method = sprintf('get%s', ucfirst($key)); diff --git a/src/Parser.php b/src/Parser.php index a2faad6..a6aa86f 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -139,7 +139,7 @@ protected function normalize($name) * * @return string */ - protected function getWhitespace() + public function getWhitespace() { return $this->whitespace; } @@ -148,9 +148,12 @@ protected function getWhitespace() * set the string of characters that are supposed to be treated as whitespace * * @param $whitespace + * @return Parser */ - protected function setWhitespace($whitespace) + public function setWhitespace($whitespace): Parser { $this->whitespace = $whitespace; + + return $this; } } diff --git a/src/Part/AbstractPart.php b/src/Part/AbstractPart.php index 42b224b..6138100 100644 --- a/src/Part/AbstractPart.php +++ b/src/Part/AbstractPart.php @@ -4,7 +4,6 @@ abstract class AbstractPart { - /** * @var string the wrapped value */ @@ -84,5 +83,4 @@ protected function camelcaseReplace($matches) { return ucfirst(strtolower($matches[0])); } - } diff --git a/src/Part/Lastname.php b/src/Part/Lastname.php index 3fb0b0e..297c395 100644 --- a/src/Part/Lastname.php +++ b/src/Part/Lastname.php @@ -7,7 +7,7 @@ class Lastname extends AbstractPart /** * @var array possible lastname prefixes */ - static protected $prefixes = [ + protected static $prefixes = [ 'vere' => 'vere', 'von' => 'von', 'van' => 'van', @@ -31,7 +31,7 @@ class Lastname extends AbstractPart * @param string $word the word to check * @return bool */ - static public function isPrefix($word) + public static function isPrefix($word) { return (array_key_exists(self::getKey($word), static::$prefixes)); } @@ -42,7 +42,7 @@ static public function isPrefix($word) * @param string $word the word * @return string the key */ - static protected function getKey($word) + protected static function getKey($word) { return strtolower(str_replace('.', '', $word)); } diff --git a/src/Part/Salutation.php b/src/Part/Salutation.php index 289b07b..80f76e1 100644 --- a/src/Part/Salutation.php +++ b/src/Part/Salutation.php @@ -7,7 +7,7 @@ class Salutation extends AbstractPart /** * @var array possible salutations */ - static protected $salutations = [ + protected static $salutations = [ 'mr' => 'Mr.', 'master' => 'Mr.', 'mister' => 'Mr.', @@ -25,7 +25,7 @@ class Salutation extends AbstractPart * @param string $word the word to check * @return bool */ - static public function isSalutation($word) + public static function isSalutation($word) { return (array_key_exists(self::getKey($word), static::$salutations)); } @@ -36,7 +36,7 @@ static public function isSalutation($word) * @param string $word the word * @return string the key */ - static protected function getKey($word) + protected static function getKey($word) { return strtolower(str_replace('.', '', $word)); } diff --git a/src/Part/Suffix.php b/src/Part/Suffix.php index 4194a16..3fbd482 100644 --- a/src/Part/Suffix.php +++ b/src/Part/Suffix.php @@ -7,7 +7,7 @@ class Suffix extends AbstractPart /** * @var array possible suffixes */ - static protected $suffixes = [ + protected static $suffixes = [ 'i' => 'I', 'ii' => 'II', 'iii' => 'III', @@ -38,7 +38,7 @@ class Suffix extends AbstractPart * @param string $word the word to check * @return bool */ - static public function isSuffix($word) + public static function isSuffix($word) { return (array_key_exists(self::getKey($word), static::$suffixes)); } @@ -49,7 +49,7 @@ static public function isSuffix($word) * @param string $word the word * @return string the key */ - static protected function getKey($word) + protected static function getKey($word) { return strtolower(str_replace('.', '', $word)); } diff --git a/tests/Mapper/AbstractMapperTest.php b/tests/Mapper/AbstractMapperTest.php index 580f043..c5e368d 100644 --- a/tests/Mapper/AbstractMapperTest.php +++ b/tests/Mapper/AbstractMapperTest.php @@ -2,9 +2,9 @@ namespace TheIconic\NameParser\Mapper; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -abstract class AbstractMapperTest extends PHPUnit_Framework_TestCase +abstract class AbstractMapperTest extends TestCase { /** * @dataProvider provider @@ -19,4 +19,4 @@ public function testMap($input, $expectation) $this->assertEquals($expectation, $mapper->map($input)); } -} \ No newline at end of file +} diff --git a/tests/Mapper/FirstnameMapperTest.php b/tests/Mapper/FirstnameMapperTest.php index db8ba7e..9c2fc55 100644 --- a/tests/Mapper/FirstnameMapperTest.php +++ b/tests/Mapper/FirstnameMapperTest.php @@ -50,4 +50,4 @@ public function provider() ], ]; } -} \ No newline at end of file +} diff --git a/tests/Mapper/InitialMapperTest.php b/tests/Mapper/InitialMapperTest.php index 61fea15..ebfe7d2 100644 --- a/tests/Mapper/InitialMapperTest.php +++ b/tests/Mapper/InitialMapperTest.php @@ -52,4 +52,4 @@ public function provider() ], ]; } -} \ No newline at end of file +} diff --git a/tests/Mapper/LastnameMapperTest.php b/tests/Mapper/LastnameMapperTest.php index 8f06c1f..072545b 100644 --- a/tests/Mapper/LastnameMapperTest.php +++ b/tests/Mapper/LastnameMapperTest.php @@ -76,4 +76,4 @@ public function provider() ], ]; } -} \ No newline at end of file +} diff --git a/tests/Mapper/MiddlenameMapperTest.php b/tests/Mapper/MiddlenameMapperTest.php index 0756a88..9d3ab62 100644 --- a/tests/Mapper/MiddlenameMapperTest.php +++ b/tests/Mapper/MiddlenameMapperTest.php @@ -43,4 +43,4 @@ public function provider() ], ]; } -} \ No newline at end of file +} diff --git a/tests/Mapper/NicknameMapperTest.php b/tests/Mapper/NicknameMapperTest.php index 4611c9c..9c18dae 100644 --- a/tests/Mapper/NicknameMapperTest.php +++ b/tests/Mapper/NicknameMapperTest.php @@ -47,4 +47,4 @@ public function provider() ], ]; } -} \ No newline at end of file +} diff --git a/tests/Mapper/SalutationMapperTest.php b/tests/Mapper/SalutationMapperTest.php index 2be3477..54bcbc4 100644 --- a/tests/Mapper/SalutationMapperTest.php +++ b/tests/Mapper/SalutationMapperTest.php @@ -50,4 +50,4 @@ public function provider() ], ]; } -} \ No newline at end of file +} diff --git a/tests/Mapper/SuffixMapperTest.php b/tests/Mapper/SuffixMapperTest.php index 7c54990..167a129 100644 --- a/tests/Mapper/SuffixMapperTest.php +++ b/tests/Mapper/SuffixMapperTest.php @@ -64,6 +64,18 @@ public function provider() 'Norrington', ], ], + [ + 'input' => [ + 'Senior', + new Firstname('James'), + new Lastname('Norrington'), + ], + 'expectation' => [ + 'Senior', + new Firstname('James'), + new Lastname('Norrington'), + ], + ], ]; } -} \ No newline at end of file +} diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 0c5be65..aa676ef 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -2,9 +2,9 @@ namespace TheIconic\NameParser; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -class ParserTest extends PHPUnit_Framework_TestCase +class ParserTest extends TestCase { /** * @return array @@ -357,7 +357,7 @@ public function provider() /** * @return array */ - public function disfunctionalastnameProvider() + public function dysfunctionalFirstnameProvider() { return [ // fails. both initials should be capitalized @@ -382,8 +382,18 @@ public function testParse($input, $expectation) $parser = new Parser(); $name = $parser->parse($input); - $this->assertInstanceOf('\\TheIconic\\NameParser\\Name', $name); + $this->assertInstanceOf(Name::class, $name); $this->assertEquals($expectation, $name->getAll()); } + public function testSetGetWhitespace() + { + $parser = new Parser(); + $parser->setWhitespace('abc'); + $this->assertSame('abc', $parser->getWhitespace()); + $parser->setWhitespace(' '); + $this->assertSame(' ', $parser->getWhitespace()); + $parser->setWhitespace(' _'); + $this->assertSame(' _', $parser->getWhitespace()); + } } diff --git a/tests/Part/AbstractPartTest.php b/tests/Part/AbstractPartTest.php new file mode 100644 index 0000000..83623c5 --- /dev/null +++ b/tests/Part/AbstractPartTest.php @@ -0,0 +1,29 @@ +getMockForAbstractClass(AbstractPart::class, ['abc']); + $this->assertEquals('abc', $part->normalize()); + } + + /** + * make sure we unwrap any parts during setValue() calls + */ + public function testSetValueUnwraps() + { + $part = $this->getMockForAbstractClass(AbstractPart::class, ['abc']); + $this->assertEquals('abc', $part->getValue()); + + $part = $this->getMockForAbstractClass(AbstractPart::class, [$part]); + $this->assertEquals('abc', $part->getValue()); + } +}