diff --git a/api/app/Http/Controllers/NewsController.php b/api/app/Http/Controllers/NewsController.php index 11e8ce8..35378e6 100644 --- a/api/app/Http/Controllers/NewsController.php +++ b/api/app/Http/Controllers/NewsController.php @@ -324,6 +324,8 @@ QUERY; protected function popularInCategory(Request $request, $category, $secondarycategory = -1) { $count = (int)$request->get('aantal', 5); + $page = (int)$request->get('pagina', 1); + $start = ($page - 1) * $count; $recent = app('db')->select(<<= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL :interval DAY) AND (`news`.`category` = :category OR `news`.`category` = :secondarycategory) AND `content`.`target` = 1 AND `news`.`active` = 1 AND `content`.`active` = 1 GROUP BY news.id ORDER BY visitors DESC - LIMIT 0, :count + LIMIT :start, :count QUERY , [ 'type' => $category == self::$NEWS_CATEGORY ? 'nieuws' @@ -345,6 +347,7 @@ QUERY : 30 ) ), 'category' => $category, 'secondarycategory' => $secondarycategory, + 'start' => $start, 'count' => $count ]); diff --git a/api/app/Http/Controllers/PodcastController.php b/api/app/Http/Controllers/PodcastController.php index 6c5e3ad..3b7cfc6 100644 --- a/api/app/Http/Controllers/PodcastController.php +++ b/api/app/Http/Controllers/PodcastController.php @@ -232,7 +232,7 @@ QUERY; $files = []; $size = 0; while($duration--) { - $file = '/var/audio/uitzending/' . $currentHour->format('Ymd_Hi') . '.MP3'; + $file = '/var/audio/uitzending/' . $currentHour->format('Ymd_Hi') . '.mp3'; if(!file_exists($file)) { return abort(404); } diff --git a/api/app/Http/Controllers/ProgramController.php b/api/app/Http/Controllers/ProgramController.php index c3f8aaa..9a5ae2a 100644 --- a/api/app/Http/Controllers/ProgramController.php +++ b/api/app/Http/Controllers/ProgramController.php @@ -259,17 +259,21 @@ QUERY; $enableCameraQuery = app('db')->select("SELECT camera FROM `programs_schedule_webcam` WHERE `active` = 1"); if(count($enableCameraQuery) && ($enableCamera = $enableCameraQuery[0]->camera)) { - $isStreamDisabled = 1; + $isStreamDisabled = 0; $output = []; exec("ffprobe -v quiet -show_streams '$stream'", $output, $isStreamDisabled); if(!$isStreamDisabled) { - return true; + return $enableCamera; } } return false; } + public function studiocam() { + return response()->json(['onair' => 'Scene1']); + } + /** * Huidige programma of nummer */ diff --git a/api/composer.json b/api/composer.json index a823d9d..db72d97 100644 --- a/api/composer.json +++ b/api/composer.json @@ -17,7 +17,7 @@ "autoload": { "psr-4": { "App\\": "app/", - "Model\\": "../common/classes/" + "Model\\": "/srv/api/common/classes/" }, "files": [ "app/helpers.php" @@ -35,5 +35,10 @@ ] }, "minimum-stability": "dev", - "prefer-stable": true + "prefer-stable": true, + "config": { + "allow-plugins": { + "kylekatarnls/update-helper": true + } + } } diff --git a/api/composer.lock b/api/composer.lock index 5afeb48..074e23e 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -1,41 +1,45 @@ { "_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": "eba4e146bd89208400f94601a10417bd", "content-hash": "dae21f528b20ab489bc46bfb364b803e", "packages": [ { "name": "doctrine/inflector", - "version": "v1.1.0", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", + "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "4.*" + "doctrine/coding-standard": "^8.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector", + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -43,6 +47,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -51,10 +59,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -64,33 +68,58 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2015-11-06 14:35:42" + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/1.4.4" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2021-04-16T17:34:40+00:00" }, { "name": "illuminate/auth", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/auth.git", - "reference": "d8e8648b7a351084791fbfdb6315a50d66e393d0" + "reference": "f11e142d4e60ed84272f988dddeb73f87c132db6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/auth/zipball/d8e8648b7a351084791fbfdb6315a50d66e393d0", - "reference": "d8e8648b7a351084791fbfdb6315a50d66e393d0", + "url": "https://api.github.com/repos/illuminate/auth/zipball/f11e142d4e60ed84272f988dddeb73f87c132db6", + "reference": "f11e142d4e60ed84272f988dddeb73f87c132db6", "shasum": "" }, "require": { "illuminate/contracts": "5.4.*", "illuminate/http": "5.4.*", + "illuminate/queue": "5.4.*", "illuminate/support": "5.4.*", "nesbot/carbon": "~1.20", "php": ">=5.6.4" @@ -123,20 +152,24 @@ ], "description": "The Illuminate Auth package.", "homepage": "https://laravel.com", - "time": "2017-04-16 13:31:21" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-23T20:25:41+00:00" }, { "name": "illuminate/broadcasting", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/broadcasting.git", - "reference": "6a250693e3b598c40512ff6b0a9d87d55d073443" + "reference": "dbc7a85ce36a61c57b9312965ec023378388c9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/6a250693e3b598c40512ff6b0a9d87d55d073443", - "reference": "6a250693e3b598c40512ff6b0a9d87d55d073443", + "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/dbc7a85ce36a61c57b9312965ec023378388c9ab", + "reference": "dbc7a85ce36a61c57b9312965ec023378388c9ab", "shasum": "" }, "require": { @@ -172,11 +205,15 @@ ], "description": "The Illuminate Broadcasting package.", "homepage": "https://laravel.com", - "time": "2017-03-15 17:10:29" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-07-24T13:37:02+00:00" }, { "name": "illuminate/bus", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", @@ -217,20 +254,24 @@ ], "description": "The Illuminate Bus package.", "homepage": "https://laravel.com", - "time": "2017-01-17 14:21:32" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-01-17T14:21:32+00:00" }, { "name": "illuminate/cache", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/cache.git", - "reference": "a0a4cb345e40b18e99c0cd49e260dbddb66dec5f" + "reference": "281adfd3fc7067ee1e23320e1abe0fa090c5fc22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/a0a4cb345e40b18e99c0cd49e260dbddb66dec5f", - "reference": "a0a4cb345e40b18e99c0cd49e260dbddb66dec5f", + "url": "https://api.github.com/repos/illuminate/cache/zipball/281adfd3fc7067ee1e23320e1abe0fa090c5fc22", + "reference": "281adfd3fc7067ee1e23320e1abe0fa090c5fc22", "shasum": "" }, "require": { @@ -267,11 +308,15 @@ ], "description": "The Illuminate Cache package.", "homepage": "https://laravel.com", - "time": "2017-02-27 20:54:32" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-22T15:53:21+00:00" }, { "name": "illuminate/config", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", @@ -311,20 +356,24 @@ ], "description": "The Illuminate Config package.", "homepage": "https://laravel.com", - "time": "2017-02-04 20:27:32" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-02-04T20:27:32+00:00" }, { "name": "illuminate/console", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "8ea19d470cdc0d6ab88269b1841dfd234cf308b8" + "reference": "4f0413ffd240d2004c3e9e4cd8f63df249939a15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/8ea19d470cdc0d6ab88269b1841dfd234cf308b8", - "reference": "8ea19d470cdc0d6ab88269b1841dfd234cf308b8", + "url": "https://api.github.com/repos/illuminate/console/zipball/4f0413ffd240d2004c3e9e4cd8f63df249939a15", + "reference": "4f0413ffd240d2004c3e9e4cd8f63df249939a15", "shasum": "" }, "require": { @@ -362,20 +411,24 @@ ], "description": "The Illuminate Console package.", "homepage": "https://laravel.com", - "time": "2017-03-23 15:59:01" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-24T22:31:32+00:00" }, { "name": "illuminate/container", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "50aa19491d478edd907d1f67e0928944e8b2dcb5" + "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/50aa19491d478edd907d1f67e0928944e8b2dcb5", - "reference": "50aa19491d478edd907d1f67e0928944e8b2dcb5", + "url": "https://api.github.com/repos/illuminate/container/zipball/c5b8a02a34a52c307f16922334c355c5eef725a6", + "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6", "shasum": "" }, "require": { @@ -405,20 +458,24 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2017-04-16 13:32:45" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-05-24T14:15:53+00:00" }, { "name": "illuminate/contracts", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "ab2825726bee46a67c8cc66789852189dbef74a9" + "reference": "67f642e018f3e95fb0b2ebffc206c3200391b1ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/ab2825726bee46a67c8cc66789852189dbef74a9", - "reference": "ab2825726bee46a67c8cc66789852189dbef74a9", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/67f642e018f3e95fb0b2ebffc206c3200391b1ab", + "reference": "67f642e018f3e95fb0b2ebffc206c3200391b1ab", "shasum": "" }, "require": { @@ -447,20 +504,24 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2017-03-29 13:17:47" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-26T23:56:53+00:00" }, { "name": "illuminate/database", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "890564c6b84bcb2b45d41d3da072fabf422c07f5" + "reference": "405aa061a5bc8588cbf3a78fba383541a568e3fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/890564c6b84bcb2b45d41d3da072fabf422c07f5", - "reference": "890564c6b84bcb2b45d41d3da072fabf422c07f5", + "url": "https://api.github.com/repos/illuminate/database/zipball/405aa061a5bc8588cbf3a78fba383541a568e3fe", + "reference": "405aa061a5bc8588cbf3a78fba383541a568e3fe", "shasum": "" }, "require": { @@ -507,20 +568,24 @@ "orm", "sql" ], - "time": "2017-04-11 22:53:18" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-24T12:07:53+00:00" }, { "name": "illuminate/encryption", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/encryption.git", - "reference": "beacee0662bf20ff60e5a319529300f29b840b94" + "reference": "7020853ed0276a23bf88697140a6b28c15aae20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/encryption/zipball/beacee0662bf20ff60e5a319529300f29b840b94", - "reference": "beacee0662bf20ff60e5a319529300f29b840b94", + "url": "https://api.github.com/repos/illuminate/encryption/zipball/7020853ed0276a23bf88697140a6b28c15aae20d", + "reference": "7020853ed0276a23bf88697140a6b28c15aae20d", "shasum": "" }, "require": { @@ -554,20 +619,24 @@ ], "description": "The Illuminate Encryption package.", "homepage": "https://laravel.com", - "time": "2016-12-30 22:45:27" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-02T13:07:11+00:00" }, { "name": "illuminate/events", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "5a50ce08fa9efaf9213a720ee7c5c2c73aa071bf" + "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/5a50ce08fa9efaf9213a720ee7c5c2c73aa071bf", - "reference": "5a50ce08fa9efaf9213a720ee7c5c2c73aa071bf", + "url": "https://api.github.com/repos/illuminate/events/zipball/ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6", "shasum": "" }, "require": { @@ -599,20 +668,24 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2017-04-09 00:57:11" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-05-02T12:57:00+00:00" }, { "name": "illuminate/filesystem", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "7f656e3421b94d759627e891567380b50586f045" + "reference": "b800a1423d06869ee5c2768eee123917f12b693e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/7f656e3421b94d759627e891567380b50586f045", - "reference": "7f656e3421b94d759627e891567380b50586f045", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/b800a1423d06869ee5c2768eee123917f12b693e", + "reference": "b800a1423d06869ee5c2768eee123917f12b693e", "shasum": "" }, "require": { @@ -649,11 +722,15 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2017-04-07 19:38:05" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-02T21:58:00+00:00" }, { "name": "illuminate/hashing", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/hashing.git", @@ -693,20 +770,24 @@ ], "description": "The Illuminate Hashing package.", "homepage": "https://laravel.com", - "time": "2017-03-08 23:05:14" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-03-08T23:05:14+00:00" }, { "name": "illuminate/http", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/http.git", - "reference": "2c66bd7791505899afa86bb4d467e3ea8b7dab8c" + "reference": "48b951df8c9f90ed42681c012bd336a16d54adf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/2c66bd7791505899afa86bb4d467e3ea8b7dab8c", - "reference": "2c66bd7791505899afa86bb4d467e3ea8b7dab8c", + "url": "https://api.github.com/repos/illuminate/http/zipball/48b951df8c9f90ed42681c012bd336a16d54adf5", + "reference": "48b951df8c9f90ed42681c012bd336a16d54adf5", "shasum": "" }, "require": { @@ -739,20 +820,24 @@ ], "description": "The Illuminate Http package.", "homepage": "https://laravel.com", - "time": "2017-03-15 14:15:59" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-25T01:40:01+00:00" }, { "name": "illuminate/pagination", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/pagination.git", - "reference": "cabab5b5a9c124efb9013d5ca28ab8d479f8dfac" + "reference": "ae1540acf02c8b642666d6901c18d2deb5606b47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/cabab5b5a9c124efb9013d5ca28ab8d479f8dfac", - "reference": "cabab5b5a9c124efb9013d5ca28ab8d479f8dfac", + "url": "https://api.github.com/repos/illuminate/pagination/zipball/ae1540acf02c8b642666d6901c18d2deb5606b47", + "reference": "ae1540acf02c8b642666d6901c18d2deb5606b47", "shasum": "" }, "require": { @@ -783,11 +868,15 @@ ], "description": "The Illuminate Pagination package.", "homepage": "https://laravel.com", - "time": "2017-03-28 13:05:02" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-07-24T13:37:02+00:00" }, { "name": "illuminate/pipeline", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -827,26 +916,31 @@ ], "description": "The Illuminate Pipeline package.", "homepage": "https://laravel.com", - "time": "2017-01-17 14:21:32" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-01-17T14:21:32+00:00" }, { "name": "illuminate/queue", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/queue.git", - "reference": "f73b851bf92c049c854f3db0d8f92f8aa730b526" + "reference": "874144ac76df651572fc884951f80f3afd9d7057" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/queue/zipball/f73b851bf92c049c854f3db0d8f92f8aa730b526", - "reference": "f73b851bf92c049c854f3db0d8f92f8aa730b526", + "url": "https://api.github.com/repos/illuminate/queue/zipball/874144ac76df651572fc884951f80f3afd9d7057", + "reference": "874144ac76df651572fc884951f80f3afd9d7057", "shasum": "" }, "require": { "illuminate/console": "5.4.*", "illuminate/container": "5.4.*", "illuminate/contracts": "5.4.*", + "illuminate/database": "5.4.*", "illuminate/filesystem": "5.4.*", "illuminate/support": "5.4.*", "nesbot/carbon": "~1.20", @@ -882,11 +976,15 @@ ], "description": "The Illuminate Queue package.", "homepage": "https://laravel.com", - "time": "2017-04-12 19:11:35" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-28T21:32:02+00:00" }, { "name": "illuminate/session", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/session.git", @@ -933,24 +1031,28 @@ ], "description": "The Illuminate Session package.", "homepage": "https://laravel.com", - "time": "2017-03-30 14:26:45" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-03-30T14:26:45+00:00" }, { "name": "illuminate/support", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "b8cb37e15331c59da51c8ee5838038baa22d7955" + "reference": "feab1d1495fd6d38970bd6c83586ba2ace8f299a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/b8cb37e15331c59da51c8ee5838038baa22d7955", - "reference": "b8cb37e15331c59da51c8ee5838038baa22d7955", + "url": "https://api.github.com/repos/illuminate/support/zipball/feab1d1495fd6d38970bd6c83586ba2ace8f299a", + "reference": "feab1d1495fd6d38970bd6c83586ba2ace8f299a", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "ext-mbstring": "*", "illuminate/contracts": "5.4.*", "paragonie/random_compat": "~1.4|~2.0", @@ -971,12 +1073,12 @@ } }, "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - }, "files": [ "helpers.php" - ] + ], + "psr-4": { + "Illuminate\\Support\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -990,20 +1092,24 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2017-04-09 14:34:57" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-15T13:25:41+00:00" }, { "name": "illuminate/translation", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/translation.git", - "reference": "9c81480d66e6f4a225e319ca1d36b95a422890d5" + "reference": "b671ddf78cbee60b0b357ad5745eceda2df26082" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/9c81480d66e6f4a225e319ca1d36b95a422890d5", - "reference": "9c81480d66e6f4a225e319ca1d36b95a422890d5", + "url": "https://api.github.com/repos/illuminate/translation/zipball/b671ddf78cbee60b0b357ad5745eceda2df26082", + "reference": "b671ddf78cbee60b0b357ad5745eceda2df26082", "shasum": "" }, "require": { @@ -1035,20 +1141,24 @@ ], "description": "The Illuminate Translation package.", "homepage": "https://laravel.com", - "time": "2017-04-07 13:49:47" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-06-11T21:19:31+00:00" }, { "name": "illuminate/validation", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/validation.git", - "reference": "935aac1451069c23db9ff928b0051d91bf298d64" + "reference": "c9b7beedfb94e50becfbce1aa354e0851c519809" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/935aac1451069c23db9ff928b0051d91bf298d64", - "reference": "935aac1451069c23db9ff928b0051d91bf298d64", + "url": "https://api.github.com/repos/illuminate/validation/zipball/c9b7beedfb94e50becfbce1aa354e0851c519809", + "reference": "c9b7beedfb94e50becfbce1aa354e0851c519809", "shasum": "" }, "require": { @@ -1085,20 +1195,24 @@ ], "description": "The Illuminate Validation package.", "homepage": "https://laravel.com", - "time": "2017-04-05 14:24:42" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-26T19:43:17+00:00" }, { "name": "illuminate/view", - "version": "v5.4.19", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "f56446ee98479b9891d78b388bb015e45ff58bc7" + "reference": "785f41f8f01653dc830c5c89eb0f25c311af7615" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/f56446ee98479b9891d78b388bb015e45ff58bc7", - "reference": "f56446ee98479b9891d78b388bb015e45ff58bc7", + "url": "https://api.github.com/repos/illuminate/view/zipball/785f41f8f01653dc830c5c89eb0f25c311af7615", + "reference": "785f41f8f01653dc830c5c89eb0f25c311af7615", "shasum": "" }, "require": { @@ -1133,20 +1247,87 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2017-04-09 14:27:27" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2017-08-05T12:41:58+00:00" }, { - "name": "laravel/lumen-framework", - "version": "v5.4.6", + "name": "kylekatarnls/update-helper", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/laravel/lumen-framework.git", - "reference": "5997a38fe261ed88cac215cb191f45cf35f70a02" + "url": "https://github.com/kylekatarnls/update-helper.git", + "reference": "429be50660ed8a196e0798e5939760f168ec8ce9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/5997a38fe261ed88cac215cb191f45cf35f70a02", - "reference": "5997a38fe261ed88cac215cb191f45cf35f70a02", + "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/429be50660ed8a196e0798e5939760f168ec8ce9", + "reference": "429be50660ed8a196e0798e5939760f168ec8ce9", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0.0", + "php": ">=5.3.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "composer/composer": "2.0.x-dev || ^2.0.0-dev", + "phpunit/phpunit": ">=4.8.35 <6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "UpdateHelper\\ComposerPlugin" + }, + "autoload": { + "psr-0": { + "UpdateHelper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Update helper", + "support": { + "issues": "https://github.com/kylekatarnls/update-helper/issues", + "source": "https://github.com/kylekatarnls/update-helper/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2020-04-07T20:44:10+00:00" + }, + { + "name": "laravel/lumen-framework", + "version": "v5.4.7", + "source": { + "type": "git", + "url": "https://github.com/laravel/lumen-framework.git", + "reference": "7a5c02ce40d45a364fd5c686ff0838bc0b6d0515" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/7a5c02ce40d45a364fd5c686ff0838bc0b6d0515", + "reference": "7a5c02ce40d45a364fd5c686ff0838bc0b6d0515", "shasum": "" }, "require": { @@ -1193,12 +1374,12 @@ } }, "autoload": { - "psr-4": { - "Laravel\\Lumen\\": "src/" - }, "files": [ "src/helpers.php" - ] + ], + "psr-4": { + "Laravel\\Lumen\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1211,26 +1392,30 @@ } ], "description": "The Laravel Lumen Framework.", - "homepage": "http://laravel.com", + "homepage": "https://lumen.laravel.com", "keywords": [ "framework", "laravel", "lumen" ], - "time": "2017-04-03 21:20:22" + "support": { + "issues": "https://github.com/laravel/lumen-framework/issues", + "source": "https://github.com/laravel/lumen-framework" + }, + "time": "2017-08-25T13:22:55+00:00" }, { "name": "monolog/monolog", - "version": "1.22.1", + "version": "1.27.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0" + "reference": "904713c5929655dc9b97288b69cfeedad610c9a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0", - "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/904713c5929655dc9b97288b69cfeedad610c9a1", + "reference": "904713c5929655dc9b97288b69cfeedad610c9a1", "shasum": "" }, "require": { @@ -1244,14 +1429,13 @@ "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", + "phpstan/phpstan": "^0.12.59", "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", "ruflin/elastica": ">=0.90 <3.0", "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "~5.3" + "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -1267,11 +1451,6 @@ "sentry/sentry": "Allow sending log messages to a Sentry server" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { "Monolog\\": "src/Monolog" @@ -1295,20 +1474,34 @@ "logging", "psr-3" ], - "time": "2017-03-13 07:08:03" + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/1.27.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2022-06-09T08:53:42+00:00" }, { "name": "mtdowling/cron-expression", - "version": "v1.2.0", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad" + "reference": "9be552eebcc1ceec9776378f7dcc085246cacca6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9504fa9ea681b586028adaaa0877db4aecf32bad", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9be552eebcc1ceec9776378f7dcc085246cacca6", + "reference": "9be552eebcc1ceec9776378f7dcc085246cacca6", "shasum": "" }, "require": { @@ -1339,39 +1532,52 @@ "cron", "schedule" ], - "time": "2017-01-23 04:29:33" + "support": { + "issues": "https://github.com/mtdowling/cron-expression/issues", + "source": "https://github.com/mtdowling/cron-expression/tree/v1.2.3" + }, + "abandoned": "dragonmantank/cron-expression", + "time": "2019-12-28T04:23:06+00:00" }, { "name": "nesbot/carbon", - "version": "1.22.1", + "version": "1.39.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" + "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4be0c005164249208ce1b5ca633cd57bdd42ff33", + "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33", "shasum": "" }, "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0" + "kylekatarnls/update-helper": "^1.1", + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { + "composer/composer": "^1.2", "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" + "phpunit/phpunit": "^4.8.35 || ^5.7" }, + "bin": [ + "bin/upgrade-carbon" + ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.23-dev" + "update-helper": "Carbon\\Upgrade", + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] } }, "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1392,33 +1598,40 @@ "datetime", "time" ], - "time": "2017-01-16 07:55:07" + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "time": "2019-10-14T05:51:36+00:00" }, { "name": "nikic/fast-route", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/nikic/FastRoute.git", - "reference": "b5f95749071c82a8e0f58586987627054400cdf6" + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/b5f95749071c82a8e0f58586987627054400cdf6", - "reference": "b5f95749071c82a8e0f58586987627054400cdf6", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", "shasum": "" }, "require": { "php": ">=5.4.0" }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + }, "type": "library", "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "FastRoute\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1435,27 +1648,31 @@ "router", "routing" ], - "time": "2017-01-19 11:35:12" + "support": { + "issues": "https://github.com/nikic/FastRoute/issues", + "source": "https://github.com/nikic/FastRoute/tree/master" + }, + "time": "2018-02-13T20:26:39+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.10", + "version": "v2.0.21", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", "shasum": "" }, "require": { "php": ">=5.2.0" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "*" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." @@ -1480,23 +1697,29 @@ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ "csprng", + "polyfill", "pseudorandom", "random" ], - "time": "2017-03-13 16:27:32" + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2022-02-16T17:07:03+00:00" }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -1505,7 +1728,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -1520,7 +1743,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -1530,50 +1753,52 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" }, { "name": "symfony/console", - "version": "v3.3.0", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c80e63f3f5e3a331bfc25e6e9332b10422eb9b05" + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c80e63f3f5e3a331bfc25e6e9332b10422eb9b05", - "reference": "c80e63f3f5e3a331bfc25e6e9332b10422eb9b05", + "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "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" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "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" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -1598,38 +1823,50 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-05-28 14:08:56" + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/debug", - "version": "v3.3.0", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "ef5f19a7a68075a0bd05969a329ead3b0776fb7a" + "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/ef5f19a7a68075a0bd05969a329ead3b0776fb7a", - "reference": "ef5f19a7a68075a0bd05969a329ead3b0776fb7a", + "url": "https://api.github.com/repos/symfony/debug/zipball/ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", + "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "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/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" @@ -1654,45 +1891,67 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-05-27 16:02:27" + "support": { + "source": "https://github.com/symfony/debug/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "abandoned": "symfony/error-handler", + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.3.0", + "version": "v4.4.44", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a9f8b02b0ef07302eca92cd4bba73200b7980e9c" + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a9f8b02b0ef07302eca92cd4bba73200b7980e9c", - "reference": "a9f8b02b0ef07302eca92cd4bba73200b7980e9c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1e866e9e5c1b22168e0ce5f0b467f19bba61266a", + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=7.1.3", + "symfony/event-dispatcher-contracts": "^1.1", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" }, "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" + "psr/log": "^1|^2|^3", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/dependency-injection": "", "symfony/http-kernel": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -1715,33 +1974,124 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", - "time": "2017-05-04 12:23:07" + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.44" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-07-20T09:59:04+00:00" }, { - "name": "symfony/finder", - "version": "v3.3.0", + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.13", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "30cb2a2c09627823a7243638dd456de4e2748fed" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/30cb2a2c09627823a7243638dd456de4e2748fed", - "reference": "30cb2a2c09627823a7243638dd456de4e2748fed", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/1d5cd762abaa6b2a4169d3e77610193a7157129e", + "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-main": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:41:36+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -1766,35 +2116,48 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-05-25 23:10:31" + "support": { + "source": "https://github.com/symfony/finder/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-11-16T17:02:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.3.0", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "a3272c06d538bd48261e7d83308e7f84992d4ec8" + "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a3272c06d538bd48261e7d83308e7f84992d4ec8", - "reference": "a3272c06d538bd48261e7d83308e7f84992d4ec8", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b9885fcce6fe494201da4f70a9309770e9d13dc8", + "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.1" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php70": "~1.6" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0" + "symfony/expression-language": "~2.8|~3.0|~4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" @@ -1819,55 +2182,77 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-05-25 13:39:26" + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.3.0", + "version": "v3.4.49", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed" + "reference": "5aa72405f5bd5583c36ed6e756acb17d3f98ac40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", - "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5aa72405f5bd5583c36ed6e756acb17d3f98ac40", + "reference": "5aa72405f5bd5583c36ed6e756acb17d3f98ac40", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0", - "symfony/debug": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/http-foundation": "~3.3" + "symfony/debug": "^3.3.3|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php56": "~1.8" }, "conflict": { "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.3", - "symfony/var-dumper": "<3.3" + "symfony/dependency-injection": "<3.4.10|<4.0.10,>=4", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "~2.8|~3.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", "symfony/class-loader": "~2.8|~3.0", - "symfony/config": "~2.8|~3.0", - "symfony/console": "~2.8|~3.0", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/dom-crawler": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/finder": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0", - "symfony/routing": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0", - "symfony/templating": "~2.8|~3.0", - "symfony/translation": "~2.8|~3.0", - "symfony/var-dumper": "~3.3" + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "^3.4.10|^4.0.10", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" }, "suggest": { "symfony/browser-kit": "", - "symfony/class-loader": "", "symfony/config": "", "symfony/console": "", "symfony/dependency-injection": "", @@ -1875,11 +2260,6 @@ "symfony/var-dumper": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\HttpKernel\\": "" @@ -1904,24 +2284,126 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-05-29 21:02:12" + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v3.4.49" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-19T12:06:59+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, "suggest": { "ext-mbstring": "For best performance" @@ -1929,16 +2411,20 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1963,31 +2449,262 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/process", - "version": "v3.3.0", + "name": "symfony/polyfill-php56", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf" + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", - "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675", + "reference": "54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php56/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/b8648cf1d5af12a44a51d07ef9bf980921f15fca", + "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -2012,45 +2729,73 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-05-22 12:32:03" + "support": { + "source": "https://github.com/symfony/process/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/translation", - "version": "v3.3.0", + "version": "v4.3.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543" + "reference": "46e462be71935ae15eab531e4d491d801857f24c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/dc3b2a0c6cfff60327ba1c043a82092735397543", - "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543", + "url": "https://api.github.com/repos/symfony/translation/zipball/46e462be71935ae15eab531e4d491d801857f24c", + "reference": "46e462be71935ae15eab531e4d491d801857f24c", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^1.1.6" }, "conflict": { - "symfony/config": "<2.8", - "symfony/yaml": "<3.3" + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "symfony/translation-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~3.3" + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/service-contracts": "^1.1.2", + "symfony/var-dumper": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { - "psr/log": "To use logging capability in translator", + "psr/log-implementation": "To use logging capability in translator", "symfony/config": "", "symfony/yaml": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -2077,32 +2822,120 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-05-22 07:42:36" + "support": { + "source": "https://github.com/symfony/translation/tree/4.3" + }, + "time": "2020-01-04T12:24:57+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v2.4.0", + "name": "symfony/translation-contracts", + "version": "v1.1.13", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "7462e5c4cb8b9cd152f992e8f10963b5641921f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/7462e5c4cb8b9cd152f992e8f10963b5641921f6", + "reference": "7462e5c4cb8b9cd152f992e8f10963b5641921f6", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=7.1.3" }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "suggest": { + "symfony/translation-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-main": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v1.1.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-27T13:16:42+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.6.9", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141", + "reference": "2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141", + "shasum": "" + }, + "require": { + "php": "^5.3.9 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.17" + }, + "require-dev": { + "ext-filter": "*", + "ext-pcre": "*", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator.", + "ext-pcre": "Required to use most of the library." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" } }, "autoload": { @@ -2112,13 +2945,18 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause-Attribution" + "BSD-3-Clause" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Vance Lucas", "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" + "homepage": "https://github.com/vlucas" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -2127,40 +2965,52 @@ "env", "environment" ], - "time": "2016-09-01 10:05:43" + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v2.6.9" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2021-12-12T22:59:22+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1 || ^8.0" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -2174,42 +3024,62 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.6.0", + "version": "v1.9.2", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", - "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", "shasum": "" }, "require": { - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { "ext-intl": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^2.9.2" }, "type": "library", "extra": { - "branch-alias": [] + "branch-alias": { + "dev-master": "1.9-dev" + } }, "autoload": { "psr-4": { @@ -2231,7 +3101,12 @@ "faker", "fixtures" ], - "time": "2016-04-29 12:21:54" + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + }, + "abandoned": true, + "time": "2020-12-11T09:56:16+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -2261,11 +3136,11 @@ }, "type": "library", "autoload": { - "classmap": [ - "hamcrest" - ], "files": [ "hamcrest/Hamcrest.php" + ], + "classmap": [ + "hamcrest" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2276,20 +3151,24 @@ "keywords": [ "test" ], - "time": "2015-05-11 14:41:42" + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/master" + }, + "time": "2015-05-11T14:41:42+00:00" }, { "name": "mockery/mockery", - "version": "0.9.9", + "version": "0.9.11", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856" + "reference": "be9bf28d8e57d67883cba9fcadfcff8caab667f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/6fdb61243844dc924071d3404bb23994ea0b6856", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856", + "url": "https://api.github.com/repos/mockery/mockery/zipball/be9bf28d8e57d67883cba9fcadfcff8caab667f8", + "reference": "be9bf28d8e57d67883cba9fcadfcff8caab667f8", "shasum": "" }, "require": { @@ -2341,31 +3220,43 @@ "test double", "testing" ], - "time": "2017-02-28 12:52:32" + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/0.9" + }, + "time": "2019-02-12T16:07:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.6.1", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { "DeepCopy\\": "src/DeepCopy/" } @@ -2375,7 +3266,6 @@ "MIT" ], "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -2383,39 +3273,44 @@ "object", "object graph" ], - "time": "2017-04-12 18:52:22" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2437,86 +3332,105 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "^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-30 07:12:33" - }, - { - "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" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2529,42 +3443,47 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" + }, + "time": "2022-10-14T12:47:21+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.7.0", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "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" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -2592,7 +3511,11 @@ "spy", "stub" ], - "time": "2017-03-02 20:05:34" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + }, + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2655,20 +3578,25 @@ "testing", "xunit" ], - "time": "2017-04-02 07:44:40" + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/4.0" + }, + "time": "2017-04-02T07:44:40+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": { @@ -2702,7 +3630,12 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + }, + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -2743,7 +3676,11 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -2792,33 +3729,37 @@ "keywords": [ "timer" ], - "time": "2017-02-26 11:10:40" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.11", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2841,20 +3782,25 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27 10:12:30" + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "abandoned": true, + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.20", + "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b" + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b", - "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { @@ -2878,8 +3824,8 @@ "sebastian/global-state": "^1.1", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2" @@ -2923,20 +3869,24 @@ "testing", "xunit" ], - "time": "2017-05-22 07:42:55" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/5.7.27" + }, + "time": "2018-02-01T05:50:59+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.4.3", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { @@ -2982,27 +3932,33 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", + "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/3.4" + }, + "abandoned": true, + "time": "2017-06-30T09:13:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -3027,7 +3983,17 @@ ], "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" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", @@ -3091,7 +4057,11 @@ "compare", "equality" ], - "time": "2017-01-29 09:50:25" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" + }, + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", @@ -3143,7 +4113,11 @@ "keywords": [ "diff" ], - "time": "2017-05-22 07:24:03" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/1.4" + }, + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", @@ -3193,7 +4167,11 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/master" + }, + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -3260,7 +4238,11 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -3311,7 +4293,11 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" + }, + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -3357,7 +4343,11 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18 15:18:39" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master" + }, + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/recursion-context", @@ -3410,7 +4400,11 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -3452,7 +4446,11 @@ ], "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" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" + }, + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -3495,37 +4493,40 @@ ], "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" + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/yaml", - "version": "v3.3.0", + "version": "v4.4.45", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "885db865f6b2b918404a1fae28f9ac640f71f994" + "reference": "aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/885db865f6b2b918404a1fae28f9ac640f71f994", - "reference": "885db865f6b2b918404a1fae28f9ac640f71f994", + "url": "https://api.github.com/repos/symfony/yaml/zipball/aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d", + "reference": "aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" @@ -3548,35 +4549,56 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", - "time": "2017-05-28 10:56:20" + "support": { + "source": "https://github.com/symfony/yaml/tree/v4.4.45" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-08-02T15:47:23+00:00" }, { "name": "webmozart/assert", - "version": "1.2.0", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^8.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -3600,7 +4622,11 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], @@ -3611,5 +4637,6 @@ "platform": { "php": ">=5.6.4" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.3.0" } diff --git a/api/public/api.json b/api/public/api.json index 12f0979..e83a37e 100644 --- a/api/public/api.json +++ b/api/public/api.json @@ -28,7 +28,7 @@ tags: # description: 'Find out more about our store' # url: 'http://swagger.io' schemes: -- 'http' +- 'https' paths: '/nieuws/overzicht': get: diff --git a/api/public/docs b/api/public/docs deleted file mode 120000 index 8b10d18..0000000 --- a/api/public/docs +++ /dev/null @@ -1 +0,0 @@ -../swagger-ui/dist \ No newline at end of file diff --git a/api/public/docs/favicon-16x16.png b/api/public/docs/favicon-16x16.png new file mode 100644 index 0000000..0f7e13b Binary files /dev/null and b/api/public/docs/favicon-16x16.png differ diff --git a/api/public/docs/favicon-32x32.png b/api/public/docs/favicon-32x32.png new file mode 100644 index 0000000..b0a3352 Binary files /dev/null and b/api/public/docs/favicon-32x32.png differ diff --git a/api/public/docs/index.html b/api/public/docs/index.html new file mode 100644 index 0000000..2650967 --- /dev/null +++ b/api/public/docs/index.html @@ -0,0 +1,93 @@ + + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + diff --git a/api/public/docs/oauth2-redirect.html b/api/public/docs/oauth2-redirect.html new file mode 100644 index 0000000..4de4053 --- /dev/null +++ b/api/public/docs/oauth2-redirect.html @@ -0,0 +1,53 @@ + + + + + + diff --git a/api/public/docs/swagger-ui-bundle.js b/api/public/docs/swagger-ui-bundle.js new file mode 100644 index 0000000..634e539 --- /dev/null +++ b/api/public/docs/swagger-ui-bundle.js @@ -0,0 +1,108 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){n(1),e.exports=n(297)},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(2),n(293),n(294),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(3),n(52),n(53),n(54),n(55),n(57),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(70),n(72),n(74),n(76),n(79),n(80),n(81),n(85),n(87),n(89),n(92),n(93),n(94),n(95),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(105),n(106),n(107),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(131),n(132),n(136),n(137),n(138),n(139),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(159),n(160),n(166),n(167),n(169),n(170),n(171),n(175),n(176),n(177),n(178),n(179),n(181),n(182),n(183),n(184),n(187),n(189),n(190),n(191),n(193),n(195),n(197),n(198),n(199),n(201),n(202),n(203),n(204),n(211),n(214),n(215),n(217),n(218),n(221),n(222),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(244),n(245),n(246),n(247),n(248),n(249),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(260),n(261),n(263),n(264),n(265),n(266),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(291),n(292),e.exports=n(9)},[1378,4,5,6,8,18,22,7,23,24,19,25,26,27,29,42,45,12,32,16,17,46,49,51,11,30,50,44,43,28,10],function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},[1379,7],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(4),i=n(9),o=n(10),a=n(18),s=n(20),u="prototype",c=function(e,t,n){var l,p,f,h,d=e&c.F,m=e&c.G,y=e&c.S,v=e&c.P,g=e&c.B,_=m?r:y?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),x=b[u]||(b[u]={});m&&(n=t);for(l in n)p=!d&&_&&void 0!==_[l],f=(p?_:n)[l],h=g&&p?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,_&&a(_,l,f,e&c.U),b[l]!=f&&o(b,l,h),v&&x[l]!=f&&(x[l]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},[1380,11,17,6],[1381,12,14,16,6],[1382,13],function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},[1383,6,7,15],[1384,13,4],[1385,13],function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(4),i=n(10),o=n(5),a=n(19)("src"),s="toString",u=Function[s],c=(""+u).split(s);n(9).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},[1386,21],function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},[1387,19,13,5,11,7],[1388,4],[1389,11,5,25],[1390,23,19,4],[1391,25],[1392,4,9,28,26,11],function(e,t){e.exports=!1},[1393,30,32],[1394,31,41],[1395,5,32,36,40],[1396,33,35],[1397,34],function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},[1398,32,37,39],[1399,38],function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},[1400,38],[1401,23,19],function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},[1402,30,43,44],function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},[1403,34],[1404,12,47,41,40,15,48],[1405,11,12,30,6],[1406,4],[1407,32,50],[1408,31,41],[1409,44,17,32,16,5,14,6],[1410,8,46],[1411,8,6,11],function(e,t,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperties:n(47)})},function(e,t,n){var r=n(32),i=n(51).f;n(56)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},[1412,8,9,7],function(e,t,n){var r=n(58),i=n(59);n(56)("getPrototypeOf",function(){return function(e){return i(r(e))}})},[1413,35],[1414,5,58,40],[1415,58,30,56],function(e,t,n){n(56)("getOwnPropertyNames",function(){return n(49).f})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13);n(56)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},[1416,8,69],[1417,30,43,44,58,33,7],function(e,t,n){var r=n(8);r(r.S,"Object",{is:n(71)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(8);r(r.S,"Object",{setPrototypeOf:n(73).set})},function(e,t,n){var r=n(13),i=n(12),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(20)(Function.call,n(51).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(75),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},[1418,34,25],function(e,t,n){var r=n(8);r(r.P,"Function",{bind:n(77)})},function(e,t,n){"use strict";var r=n(21),i=n(13),o=n(78),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(8),i=n(35),o=n(7),a=n(84),s="["+a+"]",u="​…",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),p=function(e,t,n){var i={},s=o(function(){return!!a[e]()||u[e]()!=u}),c=i[e]=s?t(f):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};e.exports=p},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(8),i=n(86);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(4).parseFloat,i=n(83).trim;e.exports=1/r(n(84)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(34),a=n(88),s=n(16),u=n(7),c=n(50).f,l=n(51).f,p=n(11).f,f=n(83).trim,h="Number",d=r[h],m=d,y=d.prototype,v=o(n(46)(y))==h,g="trim"in String.prototype,_=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),c=0,l=u.length;ci)return NaN;return parseInt(u,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(v?u(function(){y.valueOf.call(n)}):o(n)!=h)?a(new m(_(t)),n,d):_(t)};for(var b,x=n(6)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)i(m,b=x[w])&&!i(d,b)&&p(d,b,l(m,b));d.prototype=y,y.constructor=d,n(18)(r,h,d)}},function(e,t,n){var r=n(13),i=n(73).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(8),i=n(38),o=n(90),a=n(91),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=u(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},y=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,u=o(this,l),c=i(e),v="",g=p;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(t=y(u*m(2,69,1))-69,n=t<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=t-1;r>=23;)h(1<<23),r-=23;h(1<0?(s=g.length,g=v+(s<=c?"0."+a.call(p,c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c))):g=v+g,g}})},function(e,t,n){var r=n(34);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(38),i=n(35);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(8),i=n(7),o=n(90),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(8),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{isInteger:n(96)})},function(e,t,n){var r=n(13),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(8);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(8),i=n(96),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(8);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(8);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(8),i=n(86);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(8),i=n(82);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(8),i=n(104),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(8),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(8),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(8),i=n(108);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(8);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(8),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(8),i=n(112);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(8),i=n(108),o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),l=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return ru||n!=n?o*(1/0):o*n)}})},function(e,t,n){var r=n(8),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,n){var r=n(8),i=Math.imul;r(r.S+r.F*n(7)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log1p:n(104)})},function(e,t,n){var r=n(8);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(8);r(r.S,"Math",{sign:n(108)})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(8);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(8),i=n(39),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(8),i=n(32),o=n(37);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),c=String(e);return s?s.call(t,c,u):t.slice(u-c.length,u)===c}})},function(e,t,n){var r=n(134),i=n(35);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(13),i=n(34),o=n(25)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(25)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var r=n(8),i=n(133),o="includes";r(r.P+r.F*n(135)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(8);r(r.P,"String",{repeat:n(91)})},function(e,t,n){"use strict";var r=n(8),i=n(37),o=n(133),a="startsWith",s=""[a];r(r.P+r.F*n(135)(a),"String",{startsWith:function(e){var t=o(this,e,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(140)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(8),i=n(7),o=n(35),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(140)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(140)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(140)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(140)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(140)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(140)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(140)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(140)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(140)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(140)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(140)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(140)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(8);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(8),i=n(7),o=Date.prototype.getTime,a=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&n(18)(r,o,function(){var e=s.call(this);return e===e?a.call(this):i})},function(e,t,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(158))},function(e,t,n){"use strict";var r=n(12),i=n(16),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},function(e,t,n){var r=n(8);r(r.S,"Array",{isArray:n(45)})},[1423,20,8,58,161,162,37,163,164,165],[1424,12],[1425,129,25],[1426,11,17],[1427,75,25,129,9],[1428,25],function(e,t,n){"use strict";var r=n(8),i=n(163);r(r.S+r.F*n(7)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=[].join;r(r.P+r.F*(n(33)!=Object||!n(168)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(7);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(8),i=n(48),o=n(34),a=n(39),s=n(37),u=[].slice;r(r.P+r.F*n(7)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=a(e,n),c=a(t,n),l=s(c-i),p=Array(l),f=0;f=0:p>f;f+=h)f in l&&(s=t(s,l[f],f,c));return s}},function(e,t,n){"use strict";var r=n(8),i=n(180);r(r.P+r.F*!n(168)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(168)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=n(38),a=n(37),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(168)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(8);r(r.P,"Array",{copyWithin:n(185)}),n(186)("copyWithin")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:i(c,a))-u,a-s),p=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=p,u+=p;return n}},function(e,t,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(8);r(r.P,"Array",{fill:n(188)}),n(186)("fill")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(8),i=n(172)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){"use strict";var r=n(8),i=n(172)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){n(192)("Array")},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(6),a=n(25)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},[1432,186,194,129,32,128],function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(4),i=n(88),o=n(11).f,a=n(50).f,s=n(134),u=n(196),c=r.RegExp,l=c,p=c.prototype,f=/a/g,h=/a/g,d=new c(f)!==f;if(n(6)&&(!d||n(7)(function(){return h[n(25)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,r=s(e),o=void 0===t;return!n&&r&&e.constructor===c&&o?e:i(d?new l(r&&!o?e.source:e,t):l((r=e instanceof c)?e.source:e,r&&o?u.call(e):t),n?this:p,c)};for(var m=(function(e){e in c||o(c,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})}),y=a(l),v=0;y.length>v;)m(y[v++]);p.constructor=c,c.prototype=p,n(18)(r,"RegExp",c)}n(192)("RegExp")},function(e,t,n){"use strict";var r=n(12);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(198);var r=n(12),i=n(196),o=n(6),a="toString",s=/./[a],u=function(e){n(18)(RegExp.prototype,a,e,!0)};n(7)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(e,t,n){n(6)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(196)})},function(e,t,n){n(200)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(10),i=n(18),o=n(7),a=n(35),s=n(25);e.exports=function(e,t,n){var u=s(e),c=n(a,u,""[e]),l=c[0],p=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){n(200)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t,n){n(200)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(200)("split",2,function(e,t,r){"use strict";var i=n(134),o=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,s,p,f,h,d=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,v=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,m+"g");for(l||(r=new RegExp("^"+g.source+"$(?!\\s)",m));(s=g.exec(n))&&(p=s.index+s[0][u],!(p>y&&(d.push(n.slice(y,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(h=1;h1&&s.index=v)));)g[c]===s.index&&g[c]++;return y===n[u]?!f&&g.test("")||d.push(""):d.push(n.slice(y)),d[u]>v?d.slice(0,v):d}}else"0"[s](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},[1433,28,4,20,75,8,13,21,205,206,207,208,209,25,210,24,192,9,165],function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},[1434,20,161,162,12,37,164],[1435,12,21,25],[1436,20,78,48,15,4,34],[1437,4,208,34],function(e,t,n){var r=n(18);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(11).f,i=n(46),o=n(210),a=n(20),s=n(205),u=n(35),c=n(206),l=n(128),p=n(194),f=n(192),h=n(6),d=n(22).fastKey,m=h?"_s":"size",y=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var p=e(function(e,r){s(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&c(r,n,e[l],e)});return o(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,n=y(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){s(this,p,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),h&&r(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,n){var r,i,o=y(e,t);return o?o.v=n:(e._l=o={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o), +r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:y,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(4),i=n(8),o=n(18),a=n(210),s=n(22),u=n(206),c=n(205),l=n(13),p=n(7),f=n(165),h=n(24),d=n(88);e.exports=function(e,t,n,m,y,v){var g=r[e],_=g,b=y?"set":"add",x=_&&_.prototype,w={},k=function(e){var t=x[e];o(x,e,"delete"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof _&&(v||x.forEach&&!p(function(){(new _).entries().next()}))){var S=new _,E=S[b](v?{}:-0,1)!=S,C=p(function(){S.has(1)}),A=f(function(e){new _(e)}),T=!v&&p(function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)});A||(_=t(function(t,n){c(t,_,e);var r=d(new g,t,_);return void 0!=n&&u(n,y,r[b],r),r}),_.prototype=x,x.constructor=_),(C||T)&&(k("delete"),k("has"),y&&k("get")),(T||E)&&k(b),v&&x.clear&&delete x.clear}else _=m.getConstructor(t,e,y,b),a(_.prototype,n),s.NEED=!0;return h(_,e),w[e]=_,i(i.G+i.W+i.F*(_!=g),w),v||m.setStrong(_,e,y),_}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},[1438,172,18,22,69,216,13,213],[1439,210,22,12,13,205,206,172,5],function(e,t,n){"use strict";var r=n(216);n(213)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(8),i=n(219),o=n(220),a=n(12),s=n(39),u=n(37),c=n(13),l=n(4).ArrayBuffer,p=n(207),f=o.ArrayBuffer,h=o.DataView,d=i.ABV&&l.isView,m=f.prototype.slice,y=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,v,{isView:function(e){return d&&d(e)||c(e)&&y in e}}),r(r.P+r.U+r.F*n(7)(function(){return!new f(2).slice(1,void 0).byteLength}),v,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(p(this,f))(u(i-r)),c=new h(this),l=new h(o),d=0;r>1,l=23===t?O(2,-24)-O(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=T(e),e!=e||e===C?(i=e!=e?1:0,r=u):(r=D(M(e)/P),e*(o=O(2,-r))<1&&(r--,o*=2),e+=r+c>=1?l/o:l*O(2,1-c),e*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*O(2,t),r+=c):(i=e*O(2,c-1)*O(2,t),r=0));t>=8;a[p++]=255&i,i/=256,t-=8);for(r=r<0;a[p++]=255&r,r/=256,s-=8);return a[--p]|=128*f,a},z=function(e,t,n){var r,i=8*n-t-1,o=(1<>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-C:C;r+=O(2,t),l-=a}return(c?-1:1)*r*O(2,l-t)},q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},U=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},V=function(e){return L(e,52,8)},H=function(e){return L(e,23,4)},J=function(e,t,n){d(e[_],t,{get:function(){return this[n]}})},G=function(e,t,n,r){var i=+n,o=p(i);if(i!=o||o<0||o+t>e[F])throw E(x);var a=e[N]._b,s=o+e[B],u=a.slice(s,s+t);return r?u:u.reverse()},X=function(e,t,n,r,i,o){var a=+n,s=p(a);if(a!=s||s<0||s+t>e[F])throw E(x);for(var u=e[N]._b,c=s+e[B],l=r(+i),f=0;fee;)($=Q[ee++])in w||s(w,$,A[$]);o||(Z.constructor=w)}var te=new k(new w(2)),ne=k[_].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(k[_],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else w=function(e){var t=Y(this,e);this._b=m.call(Array(t),0),this[F]=t},k=function(e,t,n){l(this,k,g),l(e,w,g);var r=e[F],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw E(b);this[N]=e,this[B]=i,this[F]=n},i&&(J(w,j,"_l"),J(k,I,"_b"),J(k,j,"_l"),J(k,R,"_o")),u(k[_],{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return q(G(this,4,e,arguments[1]))},getUint32:function(e){return q(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return z(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return z(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,U,t)},setUint8:function(e,t){X(this,1,e,U,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments[2])},setUint16:function(e,t){X(this,2,e,W,t,arguments[2])},setInt32:function(e,t){X(this,4,e,K,t,arguments[2])},setUint32:function(e,t){X(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,H,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,V,t,arguments[2])}});y(w,v),y(k,g),s(k[_],a.VIEW,!0),t[v]=w,t[g]=k},function(e,t,n){var r=n(8);r(r.G+r.W+r.F*!n(219).ABV,{DataView:n(220).DataView})},function(e,t,n){n(223)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(6)){var r=n(28),i=n(4),o=n(7),a=n(8),s=n(219),u=n(220),c=n(20),l=n(205),p=n(17),f=n(10),h=n(210),d=n(38),m=n(37),y=n(39),v=n(16),g=n(5),_=n(71),b=n(75),x=n(13),w=n(58),k=n(162),S=n(46),E=n(59),C=n(50).f,A=n(164),T=n(19),O=n(25),D=n(172),M=n(36),P=n(207),I=n(193),j=n(129),R=n(165),N=n(192),F=n(188),B=n(185),L=n(11),z=n(51),q=L.f,U=z.f,W=i.RangeError,K=i.TypeError,V=i.Uint8Array,H="ArrayBuffer",J="Shared"+H,G="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],$=u.ArrayBuffer,Z=u.DataView,Q=D(0),ee=D(2),te=D(3),ne=D(4),re=D(5),ie=D(6),oe=M(!0),ae=M(!1),se=I.values,ue=I.keys,ce=I.entries,le=Y.lastIndexOf,pe=Y.reduce,fe=Y.reduceRight,he=Y.join,de=Y.sort,me=Y.slice,ye=Y.toString,ve=Y.toLocaleString,ge=O("iterator"),_e=O("toStringTag"),be=T("typed_constructor"),xe=T("def_constructor"),we=s.CONSTR,ke=s.TYPED,Se=s.VIEW,Ee="Wrong length!",Ce=D(1,function(e,t){return Pe(P(e,e[xe]),t)}),Ae=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Te=!!V&&!!V[X].set&&o(function(){new V(1).set({})}),Oe=function(e,t){if(void 0===e)throw K(Ee);var n=+e,r=m(e);if(t&&!_(n,r))throw W(Ee);return r},De=function(e,t){var n=d(e);if(n<0||n%t)throw W("Wrong offset!");return n},Me=function(e){if(x(e)&&ke in e)return e;throw K(e+" is not a typed array!")},Pe=function(e,t){if(!(x(e)&&be in e))throw K("It is not a typed array constructor!");return new e(t)},Ie=function(e,t){return je(P(e,e[xe]),t)},je=function(e,t){for(var n=0,r=t.length,i=Pe(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},Ne=function(e){var t,n,r,i,o,a,s=w(e),u=arguments.length,l=u>1?arguments[1]:void 0,p=void 0!==l,f=A(s);if(void 0!=f&&!k(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(p&&u>2&&(l=c(l,arguments[2],2)),t=0,n=m(s.length),i=Pe(this,n);n>t;t++)i[t]=p?l(s[t],t):s[t];return i},Fe=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!V&&o(function(){ve.call(new V(1))}),Le=function(){return ve.apply(Be?me.call(Me(this)):Me(this),arguments)},ze={copyWithin:function(e,t){return B.call(Me(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Me(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Me(this),arguments)},filter:function(e){return Ie(this,ee(Me(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Me(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Me(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Me(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Me(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Me(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return he.apply(Me(this),arguments)},lastIndexOf:function(e){return le.apply(Me(this),arguments)},map:function(e){return Ce(Me(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Me(this),arguments)},reduceRight:function(e){return fe.apply(Me(this),arguments)},reverse:function(){for(var e,t=this,n=Me(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return de.call(Me(this),e)},subarray:function(e,t){var n=Me(this),r=n.length,i=y(e,r);return new(P(n,n[xe]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:y(t,r))-i))}},qe=function(e,t){return Ie(this,me.call(Me(this),e,t))},Ue=function(e){Me(this);var t=De(arguments[1],1),n=this.length,r=w(e),i=m(r.length),o=0;if(i+t>n)throw W(Ee);for(;o255?255:255&r),i.v[d](n*t+i.o,r,Ae)},O=function(e,t){q(e,t,{get:function(){return A(this,t)},set:function(e){return T(this,t,e)},enumerable:!0})};_?(y=n(function(e,n,r,i){l(e,y,c,"_d");var o,a,s,u,p=0,h=0;if(x(n)){if(!(n instanceof $||(u=b(n))==H||u==J))return ke in n?je(y,n):Ne.call(y,n);o=n,h=De(r,t);var d=n.byteLength;if(void 0===i){if(d%t)throw W(Ee);if(a=d-h,a<0)throw W(Ee)}else if(a=m(i)*t,a+h>d)throw W(Ee);s=a/t}else s=Oe(n,!0),a=s*t,o=new $(a);for(f(e,"_d",{b:o,o:h,l:a,e:s,v:new Z(o)});p=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){function r(e,t){var n,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[t]:(n=i.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=o(e))?r(s,t,l):void 0}var i=n(51),o=n(59),a=n(5),s=n(8),u=n(13),c=n(12);s(s.S,"Reflect",{get:r})},function(e,t,n){var r=n(51),i=n(8),o=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(8),i=n(59),o=n(12);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(8),i=n(12),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{ownKeys:n(243)})},function(e,t,n){var r=n(50),i=n(43),o=n(12),a=n(4).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(8),i=n(12),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){function r(e,t,n){var u,f,h=arguments.length<4?e:arguments[3],d=o.f(l(e),t);if(!d){if(p(f=a(e)))return r(f,t,n,h);d=c(0)}return s(d,"value")?!(d.writable===!1||!p(h))&&(u=o.f(h,t)||c(0),u.value=n,i.f(h,t,u),!0):void 0!==d.set&&(d.set.call(h,n),!0)}var i=n(11),o=n(51),a=n(59),s=n(5),u=n(8),c=n(17),l=n(12),p=n(13);u(u.S,"Reflect",{set:r})},function(e,t,n){var r=n(8),i=n(73);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)("includes")},function(e,t,n){"use strict";var r=n(8),i=n(127)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(37),i=n(91),o=n(35);e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,c=void 0===n?" ":String(n),l=r(t);if(l<=u||""==c)return s;var p=l-u,f=i.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+s:s+f}},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(83)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(83)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(8),i=n(35),o=n(37),a=n(134),s=n(196),u=RegExp.prototype,c=function(e,t){this._r=e,this._s=t};n(130)(c,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new c(r,t)}})},[1440,27],[1441,27],function(e,t,n){var r=n(8),i=n(243),o=n(32),a=n(51),s=n(163);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=a.f,u=i(n),c={},l=0;u.length>l;)s(c,t=u[l++],r(n,t));return c}})},function(e,t,n){var r=n(8),i=n(259)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(30),i=n(32),o=n(44).f;e.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),u=s.length,c=0,l=[];u>c;)o.call(a,n=s[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(8),i=n(259)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(28)||!n(7)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(4)[e]})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.get;while(n=a(n))}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.set;while(n=a(n))}})},function(e,t,n){var r=n(8);r(r.P+r.R,"Map",{toJSON:n(267)("Map")})},function(e,t,n){var r=n(75),i=n(268);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(206);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(8);r(r.P+r.R,"Set",{toJSON:n(267)("Set")})},function(e,t,n){var r=n(8);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(8),i=n(34);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>16,u=i>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>16)+((o*u>>>0)+(c&n)>>16)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>>16,u=i>>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>>16)+((o*u>>>0)+(c&n)>>>16)}})},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,i(n),o(r))}})},function(e,t,n){var r=n(211),i=n(8),o=n(23)("metadata"),a=o.store||(o.store=new(n(215))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},u=function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},l=function(e,t,n,r){s(n,r,!0).set(e,t)},p=function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},h=function(e){i(i.S,"Reflect",e)};e.exports={store:a,map:s,has:u,get:c,set:l,keys:p,key:f,exp:h}},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.get,u=r.key,c=function(e,t,n){var r=a(e,t,n);if(r)return s(e,t,n);var i=o(t);return null!==i?c(e,i,n):void 0};r.exp({getMetadata:function(e,t){return c(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(214),i=n(268),o=n(277),a=n(12),s=n(59),u=o.keys,c=o.key,l=function(e,t){var n=u(e,t),o=s(e);if(null===o)return n;var a=l(o,t);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(e){return l(a(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.key,u=function(e,t,n){var r=a(e,t,n);if(r)return!0;var i=o(t);return null!==i&&u(e,i,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(21),a=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?i:o)(n),a(r))}}})},function(e,t,n){var r=n(8),i=n(209)(),o=n(4).process,a="process"==n(34)(o);r(r.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(8),i=n(4),o=n(9),a=n(209)(),s=n(25)("observable"),u=n(21),c=n(12),l=n(205),p=n(210),f=n(10),h=n(206),d=h.RETURN,m=function(e){return null==e?void 0:u(e)},y=function(e){var t=e._c;t&&(e._c=void 0,t())},v=function(e){return void 0===e._o},g=function(e){v(e)||(e._o=void 0,y(e))},_=function(e,t){c(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}v(this)&&y(this)};_.prototype=p({},{unsubscribe:function(){g(this)}});var b=function(e){this._s=e};b.prototype=p({},{next:function(e){var t=this._s;if(!v(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(e){try{g(t)}finally{throw e}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{y(t)}finally{throw e}}return y(t),e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(e){try{y(t)}finally{throw e}}return y(t),e}}});var x=function(e){l(this,x,"Observable","_f")._f=u(e)};p(x.prototype,{subscribe:function(e){return new _(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})})}}),p(x,{from:function(e){var t="function"==typeof this?this:x,n=m(c(e)[s]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(h(e,!1,function(e){if(t.next(e),n)return d})===d)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);ea;)(n[a]=arguments[a++])===s&&(u=!0);return function(){var r,o=this,a=arguments.length,c=0,l=0;if(!u&&!a)return i(e,n,o);if(r=n.slice(),u)for(;t>c;c++)r[c]===s&&(r[c]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(4)},function(e,t,n){var r=n(8),i=n(208);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(193),i=n(18),o=n(4),a=n(10),s=n(129),u=n(25),c=u("iterator"),l=u("toStringTag"),p=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d,m=f[h],y=o[m],v=y&&y.prototype;if(v){v[c]||a(v,c,p),v[l]||a(v,l,m),s[m]=p;for(d in r)v[d]||i(v,d,r[d],!0)}}},function(e,t){(function(t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(r||[]);return a._invoke=c(e,n,s),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function n(t,i,o,a){var s=r(e[t],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&g.call(c,"__await")?Promise.resolve(c.__await).then(function(e){n("next",e,o,a)},function(e){n("throw",e,o,a)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function i(e,t){function r(){return new Promise(function(r,i){n(e,t,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n));var o;this._invoke=i}function c(e,t,n){var i=E;return function(o,a){if(i===A)throw new Error("Generator is already running");if(i===T){if("throw"===o)throw a;return m()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===E)throw i=T,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=A;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?T:C,c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=T,n.method="throw",n.arg=c.arg)}}}function l(e,t){var n=e.iterator[t.method];if(n===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,l(e,t),"throw"===t.method))return O;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return O}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,O;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,O):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=y),O}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}())},function(e,t,n){n(295),e.exports=n(9).RegExp.escape},function(e,t,n){var r=n(8),i=n(296)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=n(298),s=i(a),u=n(303),c=i(u),l=n(334),p=i(l),f=n(559),h=i(f),d=n(1376),m=r(d),y=n(335),v=["url","spec","validatorUrl","onComplete","onFailure","authorizations","docExpansion","apisSorter","operationsSorter","supportedSubmitMethods","dom_id","defaultModelRendering","oauth2RedirectUrl","showRequestHeaders","custom","modelPropertyMacro","parameterMacro"],g={PACKAGE_VERSION:"3.0.13",GIT_COMMIT:"g5952bb6",GIT_DIRTY:!0},_=g.GIT_DIRTY,b=g.GIT_COMMIT,x=g.PACKAGE_VERSION;e.exports=function(e){p.default.versions=p.default.versions||{},p.default.versions.swaggerUi=x+"/"+(b||"unknown")+(_?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},custom:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},n=(0,s.default)({},t,e),r=(0,s.default)({},n.store,{system:{configs:n.configs},plugins:n.presets,state:{layout:{layout:n.layout},spec:{spec:"",url:n.url}}}),i=function(){return{fn:n.fn,components:n.components,state:n.state}},a=new c.default(r);a.register([n.plugins,i]);var u=a.getSystem(),l=(0,y.parseSeach)();u.initOAuth=u.authActions.configureAuth;var f=function(e){if("object"!==("undefined"==typeof n?"undefined":o(n)))return u;var t=u.specSelectors.getLocalConfig?u.specSelectors.getLocalConfig():{},r=(0,s.default)({},t,n,e||{},l);return a.setConfigs((0,y.filterConfigs)(r,v)),null!==e&&(!l.url&&"object"===o(r.spec)&&Object.keys(r.spec).length?(u.specActions.updateUrl(""),u.specActions.updateLoadingStatus("success"),u.specActions.updateSpec(JSON.stringify(r.spec))):u.specActions.download&&r.url&&(u.specActions.updateUrl(r.url),u.specActions.download(r.url))),r.dom_id?u.render(r.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),u},h=l.config||n.configUrl;if(!h||!u.specActions.getConfigByUrl||u.specActions.getConfigByUrl&&!u.specActions.getConfigByUrl(h,f))return f()},e.exports.presets={apis:h.default},e.exports.plugins=m},function(e,t,n){(function(t){/*! + * @description Recursive object extending + * @author Viacheslav Lotsmanov + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Viacheslav Lotsmanov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +"use strict";function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function i(e){var t=[];return e.forEach(function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}var o=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach(function(s){"object"!=typeof s||Array.isArray(s)||Object.keys(s).forEach(function(u){return t=a[u],e=s[u],e===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=i(e)):n(e)?void(a[u]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[u]=o({},e)):void(a[u]=o(t,e))})}),a}}).call(t,n(299).Buffer)},function(e,t,n){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:x(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):x(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var p=!0,f=0;fi&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,p;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(p=(31&o)<<6|63&u,p>127&&(a=p));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(p=(15&o)<<12|(63&u)<<6|63&c,p>2047&&(p<55296||p>57343)&&(a=p));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(p=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,p>65535&&p<1114112&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return D(r)}function D(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function U(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return $.toByteArray(U(e))}function X(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var $=n(300),Z=n(301),Q=n(302);t.Buffer=a,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return c(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,u=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;N(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,a,s,u=e.length;a=n(e),s=new l(3*u/4-a),i=a>0?u-4:u;var p=0;for(t=0,r=0;t>16&255,s[p++]=o>>8&255,s[p++]=255&o;return 2===a?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[p++]=255&o):1===a&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[p++]=o>>8&255,s[p++]=255&o),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var r,i=[],a=t;al?l:c+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=p.length;f>1,l=-7,p=n?i-1:0,f=n?-1:1,h=e[t+p];for(p+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){var r=[(0,E.systemThunkMiddleware)(n)],i=S.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||d.compose;return(0,d.createStore)(e,t,i(d.applyMiddleware.apply(void 0,r)))}function s(e,t){return(0,E.isObject)(e)&&!(0,E.isArray)(e)?e:(0,E.isFunc)(e)?s(e(t),t):(0,E.isArray)(e)?e.map(function(e){return s(e,t)}).reduce(u,{}):{}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,E.isObject)(e))return{};if(!(0,E.isObject)(t))return e;var n=e.statePlugins;if((0,E.isObject)(n))for(var r in n){var i=n[r];if((0,E.isObject)(i)&&(0,E.isObject)(i.wrapActions)){var o=i.wrapActions;for(var a in o){var s=o[a];Array.isArray(s)||(s=[s],o[a]=s),t&&t.statePlugins&&t.statePlugins[r]&&t.statePlugins[r].wrapActions&&t.statePlugins[r].wrapActions[a]&&(t.statePlugins[r].wrapActions[a]=o[a].concat(t.statePlugins[r].wrapActions[a]))}}}return(0,g.default)(e,t)}function c(e){var t=(0,E.objMap)(e,function(e){return e.reducers});return l(t)}function l(e){var t=Object.keys(e).reduce(function(t,n){return t[n]=p(e[n]),t},{});return Object.keys(t).length?(0,_.combineReducers)(t):C}function p(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new m.Map,n=arguments[1];if(!e)return t;var r=e[n.type];return r?r(t,n):t}}function f(e,t,n){var r=a(e,t,n);return r}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),(0,g.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=f(C,(0,m.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return h(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=s(e,this.getSystem());u(this.system,n),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,n=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(n,this.getSystem),this.getStateThunks(n),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:y.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(c(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,E.objReduce)(this.system.statePlugins,function(n,r){var o=n[e];if(o)return i({},r+t,o)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,E.objMap)(e,function(e){return(0,E.objReduce)(e,function(e,t){if((0,E.isFn)(e))return i({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,n=this.getBoundActions(e);return(0,E.objMap)(n,function(e,n){var r=t.system.statePlugins[n.slice(0,-7)].wrapActions;return r?(0,E.objMap)(e,function(e,n){var i=r[n];return i?(Array.isArray(i)||(i=[i]),i.reduce(function(e,n){var r=function(){return n(e,t.getSystem()).apply(void 0,arguments)};if(!(0,E.isFn)(r))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return r},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,n){return t[n]=e.get(n),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,n){return t[n]=function(){return e().get(n)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,E.objMap)(this.getSelectors(),function(n,r){var i=[r.slice(0,-9)],o=function(){return e().getIn(i)};return(0,E.objMap)(n,function(e){return function(){for(var n=arguments.length,r=Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?d(e)+t:t}function y(){return!0}function v(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function g(e,t){return b(e,t,0)}function _(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function x(e){this.next=e}function w(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function k(){return{value:void 0,done:!0}}function S(e){return!!A(e)}function E(e){return e&&"function"==typeof e.next}function C(e){var t=A(e);return t&&t.call(e)}function A(e){var t=e&&(kn&&e[kn]||e[Sn]);if("function"==typeof t)return t}function T(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?B():o(e)?e.toSeq():q(e)}function D(e){return null===e||void 0===e?B().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():L(e)}function M(e){return null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function P(e){return(null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function I(e){this._array=e,this.size=e.length}function j(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function R(e){this._iterable=e,this.size=e.length||e.size}function N(e){this._iterator=e,this._iteratorCache=[]}function F(e){return!(!e||!e[Cn])}function B(){return An||(An=new I([]))}function L(e){var t=Array.isArray(e)?new I(e).fromEntrySeq():E(e)?new N(e).fromEntrySeq():S(e)?new R(e).fromEntrySeq():"object"==typeof e?new j(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function q(e){var t=U(e)||"object"==typeof e&&new j(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return T(e)?new I(e):E(e)?new N(e):S(e)?new R(e):void 0}function W(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function K(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new x(function(){var e=i[n?o-a:a];return a++>o?k():w(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function V(e,t){return t?H(t,e,"",{"":e}):J(e)}function H(e,t,n,r){return Array.isArray(t)?e.call(r,n,M(t).map(function(n,r){return H(e,n,r,t)})):G(t)?e.call(r,n,D(t).map(function(n,r){return H(e,n,r,t)})):t}function J(e){return Array.isArray(e)?M(e).map(J).toList():G(e)?D(e).map(J).toMap():e}function G(e){return e&&(e.constructor===Object||void 0===e.constructor)}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!X(t,e.get(r,vn)):!X(e.get(r,vn),t))return p=!1,!1});return p&&e.size===f}function $(e,t){if(!(this instanceof $))return new $(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Tn)return Tn;Tn=this}}function Z(e,t){if(!e)throw new Error(t)}function Q(e,t,n){if(!(this instanceof Q))return new Q(e,t,n);if(Z(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>Fn?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=zn[e];return void 0===t&&(t=se(e),Ln===Bn&&(Ln=0,zn={}),Ln++,zn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Z(e!==1/0,"Cannot perform this action with an infinite size.")}function pe(e){return null===e||void 0===e?we():fe(e)&&!c(e)?e:we().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[qn])}function he(e,t){this.ownerID=e,this.entries=t}function de(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function _e(e,t){return w(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function xe(e,t,n,r){var i=Object.create(Un);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function we(){return Wn||(Wn=xe(0))}function ke(e,t,n){var r,i;if(e._root){var o=l(gn),a=l(_n);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===vn?-1:1:0)}else{if(n===vn)return e;i=1,r=new he(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?xe(i,r):we()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===vn?e:(p(s),p(a),new ve(t,r,[i,o]))}function Ee(e){return e.constructor===ve||e.constructor===ye}function Ce(e,t,n,r,i){if(e.keyHash===r)return new ye(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&yn,s=(0===n?r:r>>>n)&yn,u=a===s?[Ce(e,t,n+dn,r,i)]:(o=new ve(t,r,i),a>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function De(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Ne(e,t,n,r){var i=r?e:h(e);return i[t]=n,i}function Fe(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,c=a-n;return c>mn&&(c=mn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>mn&&(l=mn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-dn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Xe(e,t).set(0,n):Xe(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(_n);return t>=$e(e._capacity)?r=He(r,e.__ownerID,0,t,n,o):i=He(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):We(e._origin,e._capacity,e._level,i,r):e}function He(e,t,n,r,i,o){var a=r>>>n&yn,s=e&&a0){var c=e&&e.array[a],l=He(c,t,n-dn,r,i,o);return l===c?e:(u=Je(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(p(o),u=Je(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Je(e,t){return t&&e&&t===e.ownerID?e:new qe(e?e.array.slice():[],t)}function Ge(e,t){if(t>=$e(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&yn],r-=dn;return n}}function Xe(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new f,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new qe(c&&c.array.length?[void 0,c]:[],r),u+=dn,l+=1<=1<p?new qe([],r):d;if(d&&h>p&&adn;v-=dn){var g=p>>>v&yn;y=y.array[g]=Je(y.array[g],r)}y.array[p>>>dn&yn]=d}if(s=h)a-=h,s-=h,u=dn,c=null,m=m&&m.removeBefore(r,0,a);else if(a>i||h>>u&yn;if(_!==h>>>u&yn)break;_&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&ha&&(a=c.size),o(u)||(c=c.map(function(e){return V(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),Ie(e,t,i)}function $e(e){return e>>dn<=mn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ot,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===wn){var r=e.__iterator(t,n);return new x(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===xn?bn:xn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,vn);return o===vn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return r(t.call(n,e,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(wn,i);return new x(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return w(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ot,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function lt(e,t,n,r){var i=Tt(e);return r&&(i.has=function(r){var i=e.get(r,vn);return i!==vn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,vn);return o!==vn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){if(t.call(n,e,o,u))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(wn,o),s=0;return new x(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return w(i,r?c:s++,l,o)}})},i}function pt(e,t,n){var r=pe().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ft(e,t,n){var r=a(e),i=(c(e)?Ze():pe()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=At(e);return i.map(function(t){return St(e,o(t))})}function ht(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),v(t,n,i))return e;var o=g(t,i),a=_(n,i);if(o!==o||a!==a)return ht(e.toSeq().cacheResult(),t,n,r);var s,u=a-o;u===u&&(s=u<0?0:u);var c=Tt(e);return c.size=0===s?s:e.size&&s||void 0,!r&&F(e)&&s>=0&&(c.get=function(t,n){return t=m(this,t),t>=0&&ts)return k();var e=i.next();return r||t===xn?e:t===bn?w(t,u-1,void 0,e):w(t,u-1,e.value[1],e)})},c}function dt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(wn,i),s=!0;return new x(function(){if(!s)return k();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===wn?e:w(r,u,c,e):(s=!1,k())})},r}function mt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(wn,o),u=!0,c=0;return new x(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===xn?e:i===bn?w(i,c++,void 0,e):w(i,c++,e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return i===wn?e:w(i,o,l,e)})},i}function yt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?L(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new I(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function vt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||c0}function kt(e,n,r){var i=Tt(e);return i.size=new I(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(xn,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),C(i?e.reverse():e)}),a=0,s=!1;return new x(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?k():w(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return F(e)?t:e.constructor(t)}function Et(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ct(e){return le(e.size),d(e)}function At(e){return a(e)?n:s(e)?r:i}function Tt(e){return Object.create((a(e)?D:s(e)?M:P).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Dt(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=c(e),n=a(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0});return an(i,r)}function an(e,t){return t=Mn(t,3432918353),t=Mn(t<<15|t>>>-15,461845907),t=Mn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Mn(t^t>>>16,2246822507),t=Mn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=c,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",pn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",hn="delete",dn=5,mn=1<r?k():w(e,i,n[t?r-i++:i++])})},e(j,D),j.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},j.prototype.has=function(e){return this._object.hasOwnProperty(e)},j.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(e(n[a],a,this)===!1)return o+1}return o},j.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new x(function(){var a=r[t?i-o:o];return o++>i?k():w(e,a,n[a])})},j.prototype[fn]=!0,e(R,M),R.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=C(n),i=0;if(E(r))for(var o;!(o=r.next()).done&&e(o.value,i++,this)!==!1;);return i},R.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=C(n);if(!E(r))return new x(k);var i=0;return new x(function(){var t=r.next();return t.done?t:w(e,i++,t.value)})},e(N,M),N.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return w(e,i,r[i++])})};var An;e($,M),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(e,t){return this.has(e)?this._value:t},$.prototype.includes=function(e){return X(this._value,e)},$.prototype.slice=function(e,t){var n=this.size;return v(e,t,n)?this:new $(this._value,_(t,n)-g(e,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(e){return X(this._value,e)?0:-1},$.prototype.lastIndexOf=function(e){return X(this._value,e)?this.size:-1},$.prototype.__iterate=function(e,t){ +for(var n=0;n=0&&t=0&&nn?k():w(e,o++,a)})},Q.prototype.equals=function(e){return e instanceof Q?this._start===e._start&&this._end===e._end&&this._step===e._step:Y(this,e)};var On;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var Dn,Mn="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Pn=Object.isExtensible,In=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),jn="function"==typeof WeakMap;jn&&(Dn=new WeakMap);var Rn=0,Nn="__immutablehash__";"function"==typeof Symbol&&(Nn=Symbol(Nn));var Fn=16,Bn=255,Ln=0,zn={};e(pe,te),pe.of=function(){var e=un.call(arguments,0);return we().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},pe.prototype.toString=function(){return this.__toString("Map {","}")},pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},pe.prototype.set=function(e,t){return ke(this,e,t)},pe.prototype.setIn=function(e,t){return this.updateIn(e,vn,function(){return t})},pe.prototype.remove=function(e){return ke(this,e,vn)},pe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return vn})},pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=je(this,Mt(e),t,n);return r===vn?void 0:r},pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):we()},pe.prototype.merge=function(){return De(this,void 0,arguments)},pe.prototype.mergeWith=function(e){var t=un.call(arguments,1);return De(this,e,t)},pe.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,we(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},pe.prototype.mergeDeep=function(){return De(this,Me,arguments)},pe.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return De(this,Pe(e),t)},pe.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,we(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},pe.prototype.sort=function(e){return Ze(bt(this,e))},pe.prototype.sortBy=function(e,t){return Ze(bt(this,t,e))},pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new f)},pe.prototype.asImmutable=function(){return this.__ensureOwner()},pe.prototype.wasAltered=function(){return this.__altered},pe.prototype.__iterator=function(e,t){return new ge(this,e,t)},pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},pe.isMap=fe;var qn="@@__IMMUTABLE_MAP__@@",Un=pe.prototype;Un[qn]=!0,Un[hn]=Un.remove,Un.removeIn=Un.deleteIn,he.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Kn)return Ae(e,u,r,i);var d=e&&e===this.ownerID,m=d?u:h(u);return f?s?c===l-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),d?(this.entries=m,this):new he(e,m)}},de.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&yn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Re(o&i-1)].get(e+dn,t,n,r)},de.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,u=1<=Vn)return Oe(e,f,c,s,d);if(l&&!d&&2===f.length&&Ee(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&Ee(d))return d;var m=e&&e===this.ownerID,y=l?d?c:c^u:c|u,v=l?d?Ne(f,p,d,m):Be(f,p,m):Fe(f,p,d,m);return m?(this.bitmap=y,this.nodes=v,this):new de(e,y,v)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&yn,o=this.nodes[i];return o?o.get(e+dn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,u=i===vn,c=this.nodes,l=c[s];if(u&&!l)return this;var p=Se(l,e,t+dn,n,r,i,o,a);if(p===l)return this;var f=this.count;if(l){if(!p&&(f--,f=0&&e>>t&yn;if(r>=this.array.length)return new qe([],e);var i,o=0===r;if(t>0){var a=this.array[r];if(i=a&&a.removeBefore(e,t-dn,n),i===a&&o)return this}if(o&&!i)return this;var s=Je(this,e);if(!o)for(var u=0;u>>t&yn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if(i=o&&o.removeAfter(e,t-dn,n),i===o&&r===this.array.length-1)return this}var a=Je(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Xn,Yn={};e(Ze,pe),Ze.of=function(){return this(arguments)},Ze.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ze.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ze.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Ze.prototype.set=function(e,t){return nt(this,e,t)},Ze.prototype.remove=function(e){return nt(this,e,vn)},Ze.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ze.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Ze.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ze.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ze.isOrderedMap=Qe,Ze.prototype[fn]=!0,Ze.prototype[hn]=Ze.prototype.remove;var $n;e(rt,D),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ct(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(xn,t),r=t?Ct(this):0;return new x(function(){var i=n.next();return i.done?i:w(e,t?--r:r++,i.value,i)})},rt.prototype[fn]=!0,e(it,M),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t),r=0;return new x(function(){var t=n.next();return t.done?t:w(e,r++,t.value,t)})},e(ot,P),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t);return new x(function(){var t=n.next();return t.done?t:w(e,t.value,t.value,t)})},e(at,D),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Et(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t);return new x(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Et(r);var i=o(r);return w(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Ot,e(Pt,te),Pt.prototype.toString=function(){return this.__toString(jt(this)+" {","}")},Pt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Pt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Pt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=It(this,we()))},Pt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+jt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:It(this,r)},Pt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:It(this,t)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()},Pt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Pt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?It(this,t,e):(this.__ownerID=e,this._map=t,this)};var Zn=Pt.prototype;Zn[hn]=Zn.remove,Zn.deleteIn=Zn.removeIn=Un.removeIn,Zn.merge=Un.merge,Zn.mergeWith=Un.mergeWith,Zn.mergeIn=Un.mergeIn,Zn.mergeDeep=Un.mergeDeep,Zn.mergeDeepWith=Un.mergeDeepWith,Zn.mergeDeepIn=Un.mergeDeepIn,Zn.setIn=Un.setIn,Zn.update=Un.update,Zn.updateIn=Un.updateIn,Zn.withMutations=Un.withMutations,Zn.asMutable=Un.asMutable,Zn.asImmutable=Un.asImmutable,e(Ft,re),Ft.of=function(){return this(arguments)},Ft.fromKeys=function(e){return this(n(e).keySeq())},Ft.prototype.toString=function(){return this.__toString("Set {","}")},Ft.prototype.has=function(e){return this._map.has(e)},Ft.prototype.add=function(e){return Lt(this,this._map.set(e,!0))},Ft.prototype.remove=function(e){return Lt(this,this._map.remove(e))},Ft.prototype.clear=function(){return Lt(this,this._map.clear())},Ft.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gt(e,t)},Ht.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gt(t,n)},Ht.prototype.pop=function(){return this.slice(1)},Ht.prototype.unshift=function(){return this.push.apply(this,arguments)},Ht.prototype.unshiftAll=function(e){return this.pushAll(e)},Ht.prototype.shift=function(){return this.pop.apply(this,arguments)},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xt()},Ht.prototype.slice=function(e,t){if(v(e,t,this.size))return this;var n=g(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Gt(i,o)},Ht.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ht.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Ht.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new x(function(){if(r){var t=r.value;return r=r.next,w(e,n++,t)}return k()})},Ht.isStack=Jt;var ir="@@__IMMUTABLE_STACK__@@",or=Ht.prototype;or[ir]=!0,or.withMutations=Un.withMutations,or.asMutable=Un.asMutable,or.asImmutable=Un.asImmutable,or.wasAltered=Un.wasAltered;var ar;t.Iterator=x,Yt(t,{toArray:function(){le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return pe(this.toKeyedSeq())},toObject:function(){le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Ze(this.toKeyedSeq())},toOrderedSet:function(){return Ut(a(this)?this.valueSeq():this)},toSet:function(){return Ft(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ht(a(this)?this.valueSeq():this)},toList:function(){return Le(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=un.call(arguments,0);return St(this,yt(this,e))},includes:function(e){return this.some(function(t){return X(t,e)})},entries:function(){return this.__iterator(wn)},every:function(e,t){le(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return St(this,lt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,ut(this,e,t))},reduce:function(e,t,n){le(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ct(this,!0))},slice:function(e,t){return St(this,ht(this,e,t,!0))},some:function(e,t){return!this.every(Qt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(xn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return d(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return pt(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new I(e._cache);var t=e.toSeq().map(Zt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Qt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(y)},flatMap:function(e,t){return St(this,gt(this,e,t))},flatten:function(e){return St(this,vt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return X(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Mt(e);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,vn):vn,r===vn)return t}return r},groupBy:function(e,t){return ft(this,e,t)},has:function(e){return this.get(e,vn)!==vn},hasIn:function(e){return this.getIn(e,vn)!==vn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return X(t,e)})},keySeq:function(){return this.toSeq().map($t).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return xt(this,e)},maxBy:function(e,t){return xt(this,t,e)},min:function(e){return xt(this,e?en(e):rn)},minBy:function(e,t){return xt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Qt(e),t)},sortBy:function(e,t){return St(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,dt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Qt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=t.prototype;sr[cn]=!0,sr[En]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return St(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[En]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=g(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(h(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,vt(this,e,!1))},get:function(e,t){return e=m(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e0?"Unexpected "+(1===a.length?"property":"properties")+' "'+a.join('", "')+'" found in '+i+'. Expected to find one of the known reducer property names instead: "'+r.join('", "')+'". Unexpected properties will be ignored.':null},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(void 0===e)throw new Error('Reducer "'+t+'" returned undefined when handling "'+n.type+'" action. To ignore an action, you must explicitly return the previous state.');return null},e.exports=t.default},function(e,t){"use strict";function n(e,t){var r;return r=Array.isArray(e)?[]:{},t.push(e),Object.keys(e).forEach(function(i){var o=e[i];if("function"!=typeof o)return o&&"object"==typeof o?t.indexOf(e[i])===-1?void(r[i]=n(e[i],t.slice(0))):void(r[i]="[Circular]"):void(r[i]=o)}),r}e.exports=function(e){if("object"==typeof e){var t=n(e,[]);return"string"==typeof e.name&&(t.name=e.name),"string"==typeof e.message&&(t.message=e.message),"string"==typeof e.stack&&(t.stack=e.stack),t}return"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return{type:p,payload:{action:t,error:(0,l.default)(e)}}}function o(e){return{type:f,payload:e}}function a(e){return{type:h,payload:e}}function s(e){return{type:d,payload:e}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:m,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=i,t.newThrownErrBatch=o,t.newSpecErr=a, +t.newAuthErr=s,t.clear=u;var c=n(332),l=r(c),p=t.NEW_THROWN_ERR="err_new_thrown_err",f=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",h=t.NEW_SPEC_ERR="err_new_spec_err",d=t.NEW_AUTH_ERR="err_new_auth_err",m=t.CLEAR="err_clear"},function(e,t){"use strict";function n(){var e={location:{},history:{},open:function(){},close:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s in window&&(e[s]=window[s])}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}catch(e){console.error(e)}return e}e.exports=n()},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return l(e)?U(e)?e.toObject():e:{}}function o(e){return e?e.toArray?e.toArray():u(e):[]}function a(e){return U(e)?e:l(e)?Array.isArray(e)?A.default.Seq(e).map(a).toList():A.default.Seq(e).map(a).toOrderedMap():e}function s(e,t){var n={};return Object.keys(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(r){return n[r]=e[r].bind(null,t)}),n}function u(e){return Array.isArray(e)?e:[e]}function c(e){return"function"==typeof e}function l(e){return!!e&&"object"===("undefined"==typeof e?"undefined":E(e))}function p(e){return"function"==typeof e}function f(e){return Array.isArray(e)}function h(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=t(e[r],r),n},{})}function d(e,t){return Object.keys(e).reduce(function(n,r){var i=t(e[r],r);return i&&"object"===("undefined"==typeof i?"undefined":E(i))&&Object.assign(n,i),n},{})}function m(e){return function(t){t.dispatch,t.getState;return function(t){return function(n){return"function"==typeof n?n(e()):t(n)}}}}function y(e){var t=e.keySeq();return t.contains(q)?q:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function v(e,t){if(!A.default.Iterable.isIterable(e))return A.default.List();var n=e.getIn(Array.isArray(t)?t:[t]);return A.default.List.isList(n)?n:A.default.List()}function g(e){var t,n,r,i,o,a,s,u,c,l,p,f;for(l=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(l,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),r="",u=e.split("\n"),i=0,a="other",p={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,o,s,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},s=function(){var e;e=[];for(n in u)c=u[n],c&&e.push(n);return e}()[0],s=void 0===s?"other":s,t=a+"->"+s,a=s,o="",i+=p[t],o=function(){var e,t,n,r;for(n=[],r=e=0,t=i;0<=t?et;r=0<=t?++e:--e)n.push(" ");return n}().join(""),"opening->closing"===t?r=r.substr(0,r.length-1)+e+"\n":r+=o+e+"\n"},o=0,s=u.length;ot)return e.textContent;var o=function(e){for(var t,o,a,s,u,c=e.textContent,l=0,p=c[0],f=1,h=e.innerHTML="",d=0;o=t,t=d<7&&"\\"==t?1:f;){if(f=p,p=c[++l],s=h.length>1,!f||d>8&&"\n"==f||[/\S/[i](f),1,1,!/[$\w]/[i](f),("/"==t||"\n"==t)&&s,'"'==t&&s,"'"==t&&s,c[l-4]+o+t=="-->",o+t=="*/"][d])for(h&&(e[r](u=n.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][d?d<3?2:d>6?4:d>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[i](h):0]),u[r](n.createTextNode(h))),a=d&&d<7?d:a,h="",d=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[i](f),/[\])]/[i](f),/[$\w]/[i](f),"/"==f&&a<2&&"<"!=t,'"'==f,"'"==f,f+p+c[l+1]+c[l+2]=="':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return(0,z.memoizedCreateXMLExample)(e,n)}return JSON.stringify((0,z.memoizedSampleFromSchema)(e,n),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var n=t.substr(1).split("&");for(var r in n)r=n[r].split("="),e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e},t.btoa=function(t){var n=void 0;return n=t instanceof e?t:new e(t.toString(),"utf-8"),n.toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}}},t.buildFormData=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},t.filterConfigs=function(e,t){var n=void 0,r={};for(n in e)t.indexOf(n)!==-1&&(r[n]=e[n]);return r}}).call(t,n(299).Buffer)},function(e,t,n){"use strict";var r=n(337);e.exports=function(e,t,n,i){var o=n?n.call(i,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var a=r(e),s=r(t),u=a.length;if(u!==s.length)return!1;i=i||null;for(var c=Object.prototype.hasOwnProperty.bind(t),l=0;l-1&&e%1==0&&e-1&&e%1==0&&e<=v}function s(e){for(var t=c(e),n=t.length,r=n&&e.length,i=!!r&&a(r)&&(f(e)||p(e)),s=-1,u=[];++s0;++r-1&&e%1==0&&e<=c}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return!!e&&"object"==typeof e}var c=9007199254740991,l="[object Arguments]",p="[object Function]",f="[object GeneratorFunction]",h=Object.prototype,d=h.hasOwnProperty,m=h.toString,y=h.propertyIsEnumerable;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return s(n)?n:void 0}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}function o(e){return a(e)&&d.call(e)==c}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null!=e&&(o(e)?m.test(f.call(e)):n(e)&&l.test(e))}var u="[object Array]",c="[object Function]",l=/^\[object .+?Constructor\]$/,p=Object.prototype,f=Function.prototype.toString,h=p.hasOwnProperty,d=p.toString,m=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),v=9007199254740991,g=y||function(e){return n(e)&&i(e.length)&&d.call(e)==u};e.exports=g},function(e,t,n){var r=n(342),i=n(356),o=i(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=o},function(e,t,n){function r(e){return o(i(e).toLowerCase())}var i=n(343),o=n(348);e.exports=r},function(e,t,n){function r(e){return null==e?"":i(e)}var i=n(344);e.exports=r},function(e,t,n){function r(e){if("string"==typeof e)return e;if(a(e))return o(e,r)+"";if(s(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=n(308),o=n(345),a=n(346),s=n(347),u=1/0,c=i?i.prototype:void 0,l=c?c.toString:void 0;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n=r?e:i(e,t,n)}var i=n(351);e.exports=r},function(e,t){function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++rf))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,y=!0,v=n&u?new i:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){(function(e){var r=n(310),i="object"==typeof t&&t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a&&r.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(t,n(318)(e))},[1472,435,436],function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},[1473,314],[1474,373,431],function(e,t,n){var r=n(439),i=n(391),o=n(440),a=n(441),s=n(442),u=n(307),c=n(377),l="[object Map]",p="[object Object]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",m="[object DataView]",y=c(r),v=c(i),g=c(o),_=c(a),b=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=m||i&&x(new i)!=l||o&&x(o.resolve())!=f||a&&x(new a)!=h||s&&x(new s)!=d)&&(x=function(e){var t=u(e),n=t==p?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return m;case v:return l;case g:return f;case _:return h;case b:return d}return t}),e.exports=x},[1475,371,309],[1476,371,309],[1477,371,309],[1478,371,309],function(e,t,n){function r(e){for(var t=o(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,i(a)]}return t}var i=n(444),o=n(421);e.exports=r},function(e,t,n){function r(e){return e===e&&!i(e)}var i=n(374);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t,n){function r(e,t){return s(e)&&u(t)?c(l(e),t):function(n){var r=o(n,e);return void 0===r&&r===t?a(n,e):i(t,r,p|f)}}var i=n(409),o=n(447),a=n(454),s=n(450),u=n(444),c=n(445),l=n(453),p=1,f=2;e.exports=r},[1479,448],function(e,t,n){function r(e,t){t=i(t,e);for(var n=0,r=t.length;null!=e&&n1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.objectify)(t),i=r.type,a=r.example,s=r.properties,u=r.additionalProperties,c=r.items,l=n.includeReadOnly;if(void 0!==a)return a;if(!i)if(s)i="object";else{if(!c)return;i="array"}if("object"===i){var f=(0,o.objectify)(s),h={};for(var d in f)f[d].readOnly&&!l||(h[d]=e(f[d],{includeReadOnly:l}));if(u===!0)h.additionalProp1={};else if(u)for(var m=(0,o.objectify)(u),y=e(m,{includeReadOnly:l}),v=1;v<4;v++)h["additionalProp"+v]=y;return h}return"array"===i?[e(c,{includeReadOnly:l})]:t.enum?t.default?t.default:(0,o.normalizeArray)(t.enum)[0]:p(t)},h=(t.inferSchema=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},t.sampleXmlFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.objectify)(t),i=r.type,a=r.properties,s=r.additionalProperties,u=r.items,c=r.example,l=n.includeReadOnly,f=r.default,h={},d={},m=t.xml,y=m.name,v=m.prefix,g=m.namespace,_=r.enum,b=void 0,x=void 0;if(!i)if(a||s)i="object";else{if(!u)return;i="array"}if(y=y||"notagname",b=(v?v+":":"")+y,g){var w=v?"xmlns:"+v:"xmlns";d[w]=g}if("array"===i&&u){if(u.xml=u.xml||m||{},u.xml.name=u.xml.name||m.name,m.wrapped)return h[b]=[],Array.isArray(c)?c.forEach(function(t){u.example=t,h[b].push(e(u,n))}):Array.isArray(f)?f.forEach(function(t){u.default=t,h[b].push(e(u,n))}):h[b]=[e(u,n)],d&&h[b].push({_attr:d}),h;var k=[];return Array.isArray(c)?(c.forEach(function(t){u.example=t,k.push(e(u,n))}),k):Array.isArray(f)?(f.forEach(function(t){u.default=t,k.push(e(u,n))}),k):e(u,n)}if("object"===i){var S=(0,o.objectify)(a);h[b]=[],c=c||{};for(var E in S)if(!S[E].readOnly||l)if(S[E].xml=S[E].xml||{},S[E].xml.attribute){var C=Array.isArray(S[E].enum)&&S[E].enum[0],A=S[E].example,T=S[E].default;d[S[E].xml.name||E]=void 0!==A&&A||void 0!==c[E]&&c[E]||void 0!==T&&T||C||p(S[E])}else{S[E].xml.name=S[E].xml.name||E,S[E].example=void 0!==S[E].example?S[E].example:c[E];var O=e(S[E]);Array.isArray(O)?h[b]=h[b].concat(O):h[b].push(O)}return s===!0?h[b].push({additionalProp:"Anything can be here"}):s&&h[b].push({additionalProp:p(s)}),d&&h[b].push({_attr:d}),h}return x=void 0!==c?c:void 0!==f?f:Array.isArray(_)?_[0]:p(t),h[b]=d?[{_attr:d},x]:x,h});t.memoizedCreateXMLExample=(0,c.default)(i),t.memoizedSampleFromSchema=(0,c.default)(f)},function(e,t,n){(function(t){function r(e,n){function r(e){y?t.nextTick(e):e()}function i(e,t){if(void 0!==t&&(h+=t),e&&!d&&(f=f||new l,d=!0),e&&d){var n=h;r(function(){f.emit("data",n)}),h=""}}function o(e,t){s(i,a(e,m,m?1:0),t)}function u(){if(f){var e=h;r(function(){f.emit("data",e),f.emit("end"),f.readable=!1,f.emit("close")})}}function c(e){var t=e.encoding||"UTF-8",n={version:"1.0",encoding:t};e.standalone&&(n.standalone=e.standalone),o({"?xml":{_attr:n}}),h=h.replace("/>","?>")}"object"!=typeof n&&(n={indent:n});var f=n.stream?new l:null,h="",d=!1,m=n.indent?n.indent===!0?p:n.indent:"",y=!0;return r(function(){y=!1}),n.declaration&&c(n.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=u),o(t,r)}):o(e,u),f?(f.readable=!0,f):h}function i(){var e=Array.prototype.slice.call(arguments),t={_elem:a(e)};return t.push=function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,n=this._elem.indent;s(this.append,a(e,n,this._elem.icount+(n?1:0)),function(){t.append(!0)})},t.close=function(e){void 0!==e&&this.push(e),this.end&&this.end()},t}function o(e,t){return new Array(t||0).join(e||"")}function a(e,t,n){function r(e){var t=Object.keys(e);t.forEach(function(t){d.push(u(t,e[t]))})}n=n||0;var i,s=o(t,n),l=e,p=!1;if("object"==typeof e){var f=Object.keys(e);if(i=f[0],l=e[i],l&&l._elem)return l._elem.name=i,l._elem.icount=n,l._elem.indent=t,l._elem.indents=s,l._elem.interrupt=l,l._elem}var h,d=[],m=[];switch(typeof l){case"object":if(null===l)break;l._attr&&r(l._attr),l._cdata&&m.push(("/g,"]]]]>")+"]]>"),l.forEach&&(h=!1,m.push(""),l.forEach(function(e){if("object"==typeof e){var i=Object.keys(e)[0];"_attr"==i?r(e._attr):m.push(a(e,t,n+1))}else m.pop(),h=!0,m.push(c(e))}),h||m.push(""));break;default:m.push(c(l))}return{name:i,interrupt:p,attributes:d,content:m,icount:n,indents:s,indent:t}}function s(e,t,n){function r(){for(;t.content.length;){var r=t.content.shift();if(void 0!==r){if(i(r))return;s(e,r)}}e(!1,(o>1?t.indents:"")+(t.name?"":"")+(t.indent&&!n?"\n":"")),n&&n()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=r,t.interrupt=!1,e(!0),!0)}if("object"!=typeof t)return e(!1,t);var o=t.interrupt?1:t.content.length;return e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(o?t.name?">":"":t.name?"/>":"")+(t.indent&&o>1?"\n":"")),o?void(i(t)||r()):e(!1,t.indent?"\n":"")}function u(e,t){return e+'="'+c(t)+'"'}var c=n(471),l=n(472).Stream,p=" ";e.exports=r,e.exports.element=e.exports.Element=i}).call(t,n(470))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&h&&(m=!1,h.length?d=h.concat(d):y=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(h=d,d=[];++y1)for(var n=1;n'])/g,function(e,t){return r[t]}):e}var r={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=n},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(473).EventEmitter,o=n(474);o(r,i),r.Readable=n(475),r.Writable=n(492),r.Duplex=n(493),r.Transform=n(494),r.PassThrough=n(495),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){t=e.exports=n(476),t.Stream=t,t.Readable=t,t.Writable=n(484),t.Duplex=n(483),t.Transform=n(490),t.PassThrough=n(491)},function(e,t,n){(function(t){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?D(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function i(e,t){T=T||n(483),e=e||{},this.objectMode=!!e.objectMode,t instanceof T&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new L,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(B||(B=n(488).StringDecoder),this.decoder=new B(e.encoding),this.encoding=e.encoding)}function o(e){return T=T||n(483),this instanceof o?(this._readableState=new i(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void P.call(this)):new o(e)}function a(e,t,n,r,i){var o=l(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var c;!t.decoder||i||r||(n=t.decoder.write(n),c=!t.objectMode&&0===n.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),d(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=q?e=q:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e,t){var n=null;return I.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(F("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(h,e):h(e))}function h(e){F("emit readable"),e.emit("readable"),b(e)}function d(e,t){t.readingMore||(t.readingMore=!0,O(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=w(e,t.buffer,t.decoder),n}function w(e,t,n){var r;return eo.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),e-=a,0===e){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}function S(e,t){var n=j.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),e-=a,0===e){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return F("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):f(this),null;if(e=c(e,t),0===e&&t.ended)return 0===t.length&&E(this),null;var r=t.needReadable;F("need readable",r),(0===t.length||t.length-e0?x(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,n){function i(e){F("onunpipe"),e===f&&a()}function o(){F("onend"),e.end()}function a(){F("cleanup"),e.removeListener("close",c),e.removeListener("finish",l),e.removeListener("drain",v),e.removeListener("error",u),e.removeListener("unpipe",i),f.removeListener("end",o),f.removeListener("end",a),f.removeListener("data",s),g=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function s(t){F("ondata"),_=!1;var n=e.write(t);!1!==n||_||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&A(h.pipes,e)!==-1)&&!g&&(F("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,_=!0),f.pause())}function u(t){F("onerror",t),p(),e.removeListener("error",u),0===M(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",l),p()}function l(){F("onfinish"),e.removeListener("close",c),p()}function p(){F("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,F("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,m=d?o:a;h.endEmitted?O(m):f.once("end",m),e.on("unpipe",i);var v=y(f);e.on("drain",v);var g=!1,_=!1;return f.on("data",s),r(e,"error",u),e.once("close",c),e.once("finish",l),e.emit("pipe",f),h.flowing||(F("pipe resume"),f.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;ia)throw new RangeError("size is too large");var r=n,o=t;void 0===o&&(r=void 0,o=0);var s=new i(e);if("string"==typeof o)for(var u=new i(o,r),c=u.length,l=-1;++la)throw new RangeError("size is too large");return new i(e)},t.from=function(t,n,r){if("function"==typeof i.from&&(!e.Uint8Array||Uint8Array.from!==i.from))return i.from(t,n,r);if("number"==typeof t)throw new TypeError('"value" argument must not be a number');if("string"==typeof t)return new i(t,n);if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer){var o=n;if(1===arguments.length)return new i(t);"undefined"==typeof o&&(o=0);var a=r;if("undefined"==typeof a&&(a=t.byteLength-o),o>=t.byteLength)throw new RangeError("'offset' is out of bounds");if(a>t.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(t.slice(o,o+a))}if(i.isBuffer(t)){var s=new i(t.length);return t.copy(s,0,0,t.length),s}if(t){if(Array.isArray(t)||"undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return new i(t);if("Buffer"===t.type&&Array.isArray(t.data))return new i(t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},t.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new o(e)}}).call(t,function(){return this}())},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function c(e){return void 0===e}function l(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function f(e){return"[object Date]"===y(e)}function h(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function y(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=o,t.isNumber=a,t.isString=s,t.isSymbol=u,t.isUndefined=c,t.isRegExp=l,t.isObject=p,t.isDate=f,t.isError=h,t.isFunction=d,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(t,n(299).Buffer)},function(e,t){},function(e,t,n){"use strict";function r(){this.head=null,this.tail=null,this.length=0}var i=(n(299).Buffer,n(479));e.exports=r,r.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},function(e,t,n){"use strict";function r(e){return this instanceof r?(c.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(e){e.end()}var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var s=n(477),u=n(480);u.inherits=n(474);var c=n(476),l=n(484);u.inherits(r,c);for(var p=a(l.prototype),f=0;f-1?r:E;s.WritableState=a;var A=n(480);A.inherits=n(474);var T={deprecate:n(487)},O=n(478),D=n(299).Buffer,M=n(479);A.inherits(s,O),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{ +get:T.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!P.call(this,e)||e&&e._writableState instanceof a}})):P=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,n){var r=this._writableState,o=!1,a=D.isBuffer(e);return"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?u(this,n):(a||c(this,r,e,n))&&(r.pendingcb++,o=p(this,r,a,e,t,n)),o},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||w(this,r,n)}}).call(t,n(470),n(485).setImmediate)},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(486),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function c(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function f(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var g=n(489).Buffer,_=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n1&&(a.normalizer=n(542)(t)):t===!1?a.normalizer=n(543)():1===t?a.normalizer=n(545)():a.normalizer=n(546)(t))),a.async&&n(547),a.promise&&n(550),a.dispose&&n(552),a.maxAge&&n(553),a.max&&n(556),a.refCounter&&n(558),o(e,a)}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(499);e.exports=function(e,t,n){var i;return isNaN(e)?(i=t,i>=0?n&&i?i-1:i:1):e!==!1&&r(e)}},function(e,t,n){"use strict";var r=n(500),i=Math.max;e.exports=function(e){return i(0,r(e))}},function(e,t,n){"use strict";var r=n(501),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?r(e)*o(i(e)):e)}},function(e,t,n){"use strict";e.exports=n(502)()?Math.sign:n(503)},function(e,t){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&e(-20)===-1)}},function(e,t){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";var r=n(505),i=n(506),o=n(509),a=n(510),s=n(498),u=Object.prototype.hasOwnProperty;e.exports=function e(t){var n,c,l;if(r(t),n=Object(arguments[1]),n.async&&n.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return u.call(t,"__memoized__")&&!n.force?t:(c=s(n.length,t.length,n.async&&o.async),l=a(t,c,n),i(o,function(e,t){n[t]&&e(n[t],l,n)}),e.__profiler__&&e.__profiler__(l),l.updateEnv(),l.memoized)}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";e.exports=n(507)("forEach")},function(e,t,n){"use strict";var r=n(505),i=n(508),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,c){var l,p=arguments[2],f=arguments[3];return n=Object(i(n)),r(c),l=s(n),f&&l.sort("function"==typeof f?o.call(f,n):void 0),"function"!=typeof e&&(e=l[e]),a.call(e,l,function(e,r){return u.call(n,e)?a.call(c,p,n[e],e,n,r):t})}}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t){"use strict"},function(e,t,n){"use strict";var r=n(511),i=n(518),o=n(520),a=n(525).methods,s=n(526),u=n(540),c=Function.prototype.apply,l=Function.prototype.call,p=Object.create,f=Object.prototype.hasOwnProperty,h=Object.defineProperties,d=a.on,m=a.emit;e.exports=function(e,t,n){var a,y,v,g,_,b,x,w,k,S,E,C,A,T=p(null);return y=t!==!1?t:isNaN(e.length)?1:e.length,n.normalizer&&(w=u(n.normalizer),v=w.get,g=w.set,_=w.delete,b=w.clear),null!=n.resolvers&&(A=s(n.resolvers)),C=v?i(function(t){var n,i,o=arguments;if(A&&(o=A(o)),n=v(o),null!==n&&f.call(T,n))return k&&a.emit("get",n,o,this),T[n];if(i=1===o.length?l.call(e,this,o[0]):c.call(e,this,o),null===n){if(n=v(o),null!==n)throw r("Circular invocation","CIRCULAR_INVOCATION");n=g(o)}else if(f.call(T,n))throw r("Circular invocation","CIRCULAR_INVOCATION");return T[n]=i,S&&a.emit("set",n,null,i),i},y):0===t?function(){var t;if(f.call(T,"data"))return k&&a.emit("get","data",arguments,this),T.data;if(t=arguments.length?c.call(e,this,arguments):l.call(e,this),f.call(T,"data"))throw r("Circular invocation","CIRCULAR_INVOCATION");return T.data=t,S&&a.emit("set","data",null,t),t}:function(t){var n,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(T,i))return k&&a.emit("get",i,o,this),T[i];if(n=1===o.length?l.call(e,this,o[0]):c.call(e,this,o),f.call(T,i))throw r("Circular invocation","CIRCULAR_INVOCATION");return T[i]=n,S&&a.emit("set",i,null,n),n},a={original:e,memoized:C,get:function(e){return A&&(e=A(e)),v?v(e):String(e[0])},has:function(e){return f.call(T,e)},delete:function(e){var t;f.call(T,e)&&(_&&_(e),t=T[e],delete T[e],E&&a.emit("delete",e,t))},clear:function(){var e=T;b&&b(),T=p(null),a.emit("clear",e)},on:function(e,t){return"get"===e?k=!0:"set"===e?S=!0:"delete"===e&&(E=!0),d.call(this,e,t)},emit:m,updateEnv:function(){e=a.original}},x=v?i(function(e){var t,n=arguments;A&&(n=A(n)),t=v(n),null!==t&&a.delete(t)},y):0===t?function(){return a.delete("data")}:function(e){return A&&(e=A(arguments)[0]),a.delete(e)},h(C,{__memoized__:o(!0),delete:o(x),clear:o(a.clear)}),a}},function(e,t,n){"use strict";var r=n(512),i=Error.captureStackTrace;t=e.exports=function(e){var n=new Error(e),o=arguments[1],a=arguments[2];return null==a&&o&&"object"==typeof o&&(a=o,o=null),null!=a&&r(n,a),null!=o&&(n.code=String(o)),i&&i(n,t),n}},function(e,t,n){"use strict";e.exports=n(513)()?Object.assign:n(514)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(515),i=n(508),o=Math.max;e.exports=function(e,t){var n,a,s,u=o(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a-1}},function(e,t,n){"use strict";var r,i,o,a,s,u,c,l=n(520),p=n(505),f=Function.prototype.apply,h=Function.prototype.call,d=Object.create,m=Object.defineProperty,y=Object.defineProperties,v=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return p(t),v.call(this,"__ee__")?n=this.__ee__:(n=g.value=d(null),m(this,"__ee__",g),g.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},i=function(e,t){var n,i;return p(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var n,r,i,o;if(p(t),!v.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(o=0;i=r[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},a=function(e){var t,n,r,i,o;if(v.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),t=1;t=55296&&v<=56319&&(x+=e[++n])),x=w?p.call(w,k,x,d):x,t?(f.value=x,h(m,d,f)):m[d]=x,++d;y=d}if(void 0===y)for(y=a(e.length),t&&(m=new t(y)),n=0;n=0?u(c):r(this.length)-u(s(c)),t=c;ti)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t){"use strict";e.exports=2147483647},function(e,t,n){"use strict";var r=n(499),i=n(557),o=n(509);o.max=function(e,t,n){var a,s,u;e=r(e),e&&(s=i(e),a=n.async&&o.async||n.promise&&o.promise?"async":"",t.on("set"+a,u=function(e){e=s.hit(e),void 0!==e&&t.delete(e)}),t.on("get"+a,u),t.on("delete"+a,s.delete),t.on("clear"+a,s.clear))}},function(e,t,n){"use strict";var r=n(499),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=0,a=1,s=i(null),u=i(null),c=0;return e=r(e),{hit:function(r){var i=u[r],l=++c;if(s[l]=r,u[r]=l,!i){if(++n,n<=e)return;return r=s[a],t(r),r}if(delete s[i],a===i)for(;!o.call(s,++a);)continue},delete:t=function(e){var t=u[e];if(t&&(delete s[t],delete u[e],--n,a===t)){if(!n)return c=0,void(a=1);for(;!o.call(s,++a);)continue}},clear:function(){n=0,a=1,s=i(null),u=i(null),c=0}}}},function(e,t,n){"use strict";var r=n(520),i=n(509),o=Object.create,a=Object.defineProperties;i.refCounter=function(e,t,n){var s,u;s=o(null),u=n.async&&i.async||n.promise&&i.promise?"async":"",t.on("set"+u,function(e,t){s[e]=t||1}),t.on("get"+u,function(e){++s[e]}),t.on("delete"+u,function(e){delete s[e]}),t.on("clear"+u,function(){s={}}),a(t.memoized,{deleteRef:r(function(){var e=t.get(arguments);return null===e?null:s[e]?!--s[e]&&(t.delete(e),!0):null}),getRefCount:r(function(){var e=t.get(arguments);return null===e?0:s[e]?s[e]:0})})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return[a.default]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(560),a=r(o)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e={components:{App:D.default,authorizationPopup:P.default,authorizeBtn:j.default,authorizeOperationBtn:N.default,auths:B.default,authError:z.default,oauth2:H.default,apiKeyAuth:U.default,basicAuth:K.default,clear:G.default,liveResponse:Y.default,info:Ce.default,onlineValidatorBadge:Z.default,operations:ee.default,operation:ne.default,highlightCode:ie.default,responses:ae.default,response:ue.default,responseBody:le.default,parameters:fe.default,parameterRow:de.default,execute:ye.default,headers:ge.default,errors:be.default,contentType:we.default,overview:Se.default,footer:Te.default,ParamBody:De.default,curl:Pe.default,schemes:je.default,modelExample:Ne.default,model:Be.default,models:ze.default,TryItOutButton:Ue.default,Markdown:Ke.default,BaseLayout:He.default}},t={components:Ge},n={components:Ye};return[S.default,y.default,f.default,l.default,a.default,u.default,d.default,e,t,b.default,n,w.default,g.default,C.default,T.default]};var o=n(561),a=i(o),s=n(576),u=i(s),c=n(580),l=i(c),p=n(619),f=i(p),h=n(848),d=i(h),m=n(849),y=i(m),v=n(850),g=i(v),_=n(882),b=i(_),x=n(1155),w=i(x),k=n(1160),S=i(k),E=n(1162),C=i(E),A=n(1211),T=i(A),O=n(1212),D=i(O),M=n(1213),P=i(M),I=n(1214),j=i(I),R=n(1215),N=i(R),F=n(1217),B=i(F),L=n(1218),z=i(L),q=n(1219),U=i(q),W=n(1220),K=i(W),V=n(1221),H=i(V),J=n(1223),G=i(J),X=n(1224),Y=i(X),$=n(1225),Z=i($),Q=n(1226),ee=i(Q),te=n(1227),ne=i(te),re=n(1231),ie=i(re),oe=n(1232),ae=i(oe),se=n(1233),ue=i(se),ce=n(1234),le=i(ce),pe=n(1236),fe=i(pe),he=n(1237),de=i(he),me=n(1238),ye=i(me),ve=n(1239),ge=i(ve),_e=n(1240),be=i(_e),xe=n(1265),we=i(xe),ke=n(1266),Se=i(ke),Ee=n(1268),Ce=i(Ee),Ae=n(1269),Te=i(Ae),Oe=n(1270),De=i(Oe),Me=n(1271),Pe=i(Me),Ie=n(1273),je=i(Ie),Re=n(1274),Ne=i(Re),Fe=n(1275),Be=i(Fe),Le=n(1276),ze=i(Le),qe=n(1277),Ue=i(qe),We=n(1278),Ke=i(We),Ve=n(1374),He=i(Ve),Je=n(1267),Ge=r(Je),Xe=n(1375),Ye=r(Xe)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{statePlugins:{err:{reducers:(0,a.default)(e),actions:u,selectors:l}}}};var o=n(562),a=i(o),s=n(333),u=r(s),c=n(574),l=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return t={},i(t,o.NEW_THROWN_ERR,function(t,n){var r=n.payload,i=Object.assign(f,r,{type:"thrown"});return t.update("errors",function(e){return(e||(0,u.List)()).push((0,u.fromJS)(i))}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.NEW_THROWN_ERR_BATCH,function(t,n){var r=n.payload;return r=r.map(function(e){return(0,u.fromJS)(Object.assign(f,e,{type:"thrown"}))}),t.update("errors",function(e){return(e||(0,u.List)()).concat((0,u.fromJS)(r))}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.NEW_SPEC_ERR,function(t,n){var r=n.payload,i=(0,u.fromJS)(r);return i=i.set("type","spec"),t.update("errors",function(e){return(e||(0,u.List)()).push((0,u.fromJS)(i)).sortBy(function(e){return e.get("line")})}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.NEW_AUTH_ERR,function(t,n){var r=n.payload,i=(0,u.fromJS)(Object.assign({},r));return i=i.set("type","auth"),t.update("errors",function(e){return(e||(0,u.List)()).push((0,u.fromJS)(i))}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.CLEAR,function(e,t){var n=t.payload;if(n){var r=c.default.fromJS((0,s.default)((e.get("errors")||(0,u.List)()).toJS(),n));return e.merge({errors:r})}}),t};var o=n(333),a=n(563),s=r(a),u=n(325),c=r(u),l=n(567),p=r(l),f={line:0,level:"error",message:"Unknown error"}},function(e,t,n){function r(e,t){var n=s(e)?i:o;return n(e,u(a(t,3)))}var i=n(564),o=n(565),a=n(400),s=n(346),u=n(566);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1||c.push({name:o(e).replace(".js","").replace("./",""),transform:u(e).transform}))})},function(e,t,n){function r(e,t,n){var r=u(e)?i:s,c=arguments.length<3;return r(e,a(t,4),n,c,o)}var i=n(357),o=n(462),a=n(400),s=n(569),u=n(346);e.exports=r},function(e,t){function n(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}e.exports=n},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./not-of-type.js":571,"./parameter-oneof.js":572,"./strip-instance.js":573};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=570},function(e,t){"use strict";function n(e){return e.map(function(e){var t="is not of a type(s)",n=e.get("message").indexOf(t);if(n>-1){var i=e.get("message").slice(n+t.length).split(",");return e.set("message",e.get("message").slice(0,n)+r(i))}return e})}function r(e){return e.reduce(function(e,t,n,r){return n===r.length-1&&r.length>1?e+"or "+t:r[n+1]&&r.length>2?e+t+", ":r[n+1]?e+t+" ":e+t},"should be a")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){t.jsSpec;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=i;var o=n(447);r(o),n(325)},function(e,t){"use strict";function n(e){return e.map(function(e){return e.set("message",r(e.get("message"),"instance."))})}function r(e,t){return e.replace(new RegExp(t,"g"),"")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastError=t.allErrors=void 0;var r=n(325),i=n(575),o=function(e){return e},a=t.allErrors=(0,i.createSelector)(o,function(e){return e.get("errors",(0,r.List)())});t.lastError=(0,i.createSelector)(a,function(e){return e.last()})},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),i=1;i2?r-2:0),o=2;o1&&void 0!==arguments[1])||arguments[1];return e=(0,a.normalizeArray)(e),{type:c,payload:{thing:e,shown:t}}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=(0,a.normalizeArray)(e),{type:u,payload:{thing:e,mode:t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW=t.UPDATE_MODE=t.UPDATE_LAYOUT=void 0,t.updateLayout=r,t.show=i,t.changeMode=o;var a=n(335),s=t.UPDATE_LAYOUT="layout_update_layout",u=t.UPDATE_MODE="layout_update_mode",c=t.SHOW="layout_show"},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:"";return t=(0,o.normalizeArray)(t),e.getIn(["modes"].concat(r(t)),n)},t.showSummary=(0,i.createSelector)(a,function(e){return!s(e,"editor")})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:f,reducers:a.default,actions:u,selectors:l}}}};var o=n(581),a=i(o),s=n(582),u=r(s),c=n(617),l=r(c),p=n(618),f=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return e instanceof Error?{type:E,error:!0,payload:e}:"string"==typeof e?{type:E,payload:e.replace(/\t/g," ")||""}:{type:E,payload:""}}function a(e){return{type:F,payload:e}}function s(e){return{type:C,payload:e}}function u(e){if(!e||"object"!==("undefined"==typeof e?"undefined":g(e)))throw new Error("updateJson must only accept a simple JSON object");return{type:A,payload:e}}function c(e,t,n,r){return{type:T,payload:{path:e,value:n,paramName:t,isXml:r}}}function l(e){return{type:O,payload:{pathMethod:e}}}function p(e){return{type:R,payload:{pathMethod:e}}}function f(e,t){return{type:N,payload:{path:e,value:t,key:"consumes_value"}}}function h(e,t){return{type:N,payload:{path:e,value:t,key:"produces_value"}}}function d(e,t){return{type:I,payload:{path:e,method:t}}}function m(e,t){return{type:j,payload:{path:e,method:t}}}function y(e,t,n){return{type:B,payload:{scheme:e,path:t,method:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.executeRequest=t.logRequest=t.setRequest=t.setResponse=t.formatIntoYaml=t.resolveSpec=t.parseToJson=t.SET_SCHEME=t.UPDATE_RESOLVED=t.UPDATE_OPERATION_VALUE=t.ClEAR_VALIDATE_PARAMS=t.CLEAR_REQUEST=t.CLEAR_RESPONSE=t.LOG_REQUEST=t.SET_REQUEST=t.SET_RESPONSE=t.VALIDATE_PARAMS=t.UPDATE_PARAM=t.UPDATE_JSON=t.UPDATE_URL=t.UPDATE_SPEC=void 0;var v=Object.assign||function(e){for(var t=1;t0){var i=n.map(function(e){return console.error(e),e.line=e.fullPath?d(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});o.newThrownErrBatch(i)}return r.updateResolved(t)})}},t.formatIntoYaml=function(){return function(e){var t=e.specActions,n=e.specSelectors,r=n.specStr,i=t.updateSpec;try{var o=b.default.safeDump(b.default.safeLoad(r()),{indent:2});i(o)}catch(e){i(e)}}},t.setResponse=function(e,t,n){return{payload:{path:e,method:t,res:n},type:D}},t.setRequest=function(e,t,n){return{payload:{path:e,method:t,req:n},type:M}},t.logRequest=function(e){return{payload:e,type:P}},t.executeRequest=function(e){return function(t){var n=t.fn,r=t.specActions,i=t.specSelectors,o=e.pathName,a=e.method,s=e.operation,u=s.toJS();e.contextUrl=(0,w.default)(i.url()).toString(),u&&u.operationId?e.operationId=u.operationId:u&&o&&a&&(e.operationId=n.opId(u,o,a));var c=Object.assign({},e);return c=n.buildRequest(c),r.setRequest(e.pathName,e.method,c),n.execute(e).then(function(t){return r.setResponse(e.pathName,e.method,t)}).catch(function(t){return r.setResponse(e.pathName,e.method,{error:!0,err:(0,S.default)(t)})})}},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i(e,["path","method"]);return function(e){var i=e.fn.fetch,o=e.specSelectors,a=e.specActions,s=o.spec().toJS(),u=o.operationScheme(t,n),c=o.contentTypeValues([t,n]).toJS(),l=c.requestContentType,p=c.responseContentType,f=/xml/i.test(l),h=o.parameterValues([t,n],f).toJS();return a.executeRequest(v({fetch:i,spec:s,pathName:t,method:n,parameters:h,requestContentType:l,scheme:u,responseContentType:p},r))}});t.execute=L},function(e,t,n){"use strict";var r=n(584);e.exports=r},function(e,t,n){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var i=n(585),o=n(613);e.exports.Type=n(591),e.exports.Schema=n(590),e.exports.FAILSAFE_SCHEMA=n(594),e.exports.JSON_SCHEMA=n(593),e.exports.CORE_SCHEMA=n(592),e.exports.DEFAULT_SAFE_SCHEMA=n(589),e.exports.DEFAULT_FULL_SCHEMA=n(608),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(587),e.exports.MINIMAL_SCHEMA=n(594),e.exports.SAFE_SCHEMA=n(589),e.exports.DEFAULT_SCHEMA=n(608),e.exports.scan=r("scan"),e.exports.parse=r("parse"),e.exports.compose=r("compose"),e.exports.addConstructor=r("addConstructor")},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new q(t,new U(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,h(e,t))}function y(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=z.repeat("\n",t-1))}function k(e,t,n){var s,u,c,l,p,f,h,d,m,v=e.kind,g=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&x(e)||n&&a(m))break;if(r(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}p&&(y(e,c,l,!1),w(e,e.line-f),c=l=e.position,p=!1),i(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return y(e,c,l,!1),!!e.result||(e.kind=v,e.result=g,!1)}function S(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(y(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=e.position,e.position++,o=e.position}else r(n)?(y(e,i,o,!0),w(e,b(e,!1,t)),i=o=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function E(e,t){var n,i,o,a,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return y(e,n,e.position,!0),e.position++,!0;if(92===l){if(y(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),r(l))b(e,!1,t);else if(l<256&&ie[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=s(l))>=0?a=(a<<4)+c:d(e,"expected hexadecimal character");e.result+=p(a),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(l)?(y(e,n,i,!0),w(e,b(e,!1,t)),n=i=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function C(e,t){var n,r,i,a,s,u,c,l,p,f,h,m=!0,y=e.tag,v=e.anchor,_={};if(h=e.input.charCodeAt(e.position),91===h)a=93,c=!1,r=[];else{if(123!==h)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),h=e.input.charCodeAt(++e.position);0!==h;){if(b(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=y,e.anchor=v,e.kind=c?"mapping":"sequence",e.result=r,!0;m||d(e,"missed comma between flow collection entries"),p=l=f=null,s=u=!1,63===h&&(i=e.input.charCodeAt(e.position+1),o(i)&&(s=u=!0,e.position++,b(e,!0,t))),n=e.line,I(e,t,H,!1,!0),p=e.tag,l=e.result,b(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),b(e,!0,t),I(e,t,H,!1,!0),f=e.result),c?g(e,r,_,p,l,f):s?r.push(g(e,null,_,p,l,f)):r.push(l),b(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function A(e,t){var n,o,a,s,u=Y,l=!1,p=!1,f=t,h=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)Y===u?u=43===s?Z:$:d(e,"repeat of a chomping mode identifier");else{if(!((a=c(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?d(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(_(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentf&&(f=e.lineIndent),r(s))h++;else{if(e.lineIndentt)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(I(e,t,X,!0,a)&&(_?y=e.result:v=e.result),_||(g(e,f,h,m,y,v,s,u),m=y=v=null),b(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function j(e){var t,n,a,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(b(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&_(e),V.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&d(e,"directives end mark is expected"),I(e,e.lineIndent-1,X,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&x(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1))===-1;)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(r,a),i.repeat(" ",e)+n+s+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e.exports=r},function(e,t,n){"use strict";var r=n(590);e.exports=new r({include:[n(592)],implicit:[n(602),n(603)],explicit:[n(604),n(605),n(606),n(607)]})},function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return i.indexOf(t)===-1})}function i(){function e(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}var t,n,r={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,n=arguments.length;t=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=n(586),u=n(591),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o,defaultStyle:"lowercase"})},function(e,t,n){"use strict";function r(e){return null!==e&&(null!==s.exec(e)||null!==u.exec(e))}function i(e){var t,n,r,i,o,a,c,l,p,f,h=0,d=null;if(t=s.exec(e),null===t&&(t=u.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],a=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(l=+t[10],p=+(t[11]||0),d=6e4*(60*l+p),"-"===t[9]&&(d=-d)),f=new Date(Date.UTC(n,r,i,o,a,c,h)),d&&f.setTime(f.getTime()-d),f}function o(e){return e.toISOString()}var a=n(591),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o})},function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=n(591);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},function(e,t,n){function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,o=c;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=c,a=0,u=[];for(t=0;t>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),s?s.from?s.from(u):new s(u):u}function o(e){var t,n,r="",i=0,o=e.length,a=c;for(t=0;t>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+e[t];return n=o%3,0===n?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}function a(e){return s&&s.isBuffer(e)}var s;try{s=n(299).Buffer}catch(e){}var u=n(591),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,u=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=n(591);e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){function r(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(e){return!1}}function i(e){var t,n="("+e+")",r=s.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{s=n(612)}catch(e){"undefined"!=typeof window&&(s=window.esprima)}var u=n(591);e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},u="function"==typeof n?i:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&(r=new o.CommentHandler,r.attach=l,t.comment=!0,u=i)}var p;p=t&&"boolean"==typeof t.jsx&&t.jsx?new s.JSXParser(e,t,u):new a.Parser(e,t,u);var f=p.parseProgram();return c&&(f.comments=r.comments),p.config.tokens&&(f.tokens=p.tokens),p.config.tolerant&&(f.errors=p.errorHandler.errors),f}function i(e,t,n){var r,i=new u.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r}var o=n(1),a=n(3),s=n(11),u=n(15);t.parse=r,t.tokenize=i;var c=n(2);t.Syntax=c.Syntax,t.version="3.1.3"},function(e,t,n){"use strict";var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e,t){var n=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];i.start>=t.end.offset&&n.unshift(i.comment)}return this.trailing.length=0,n}var o=this.stack[this.stack.length-1];if(o&&o.node.trailingComments){var a=o.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(n=o.node.trailingComments,delete o.node.trailingComments)}return n},e.prototype.findLeadingComments=function(e,t){for(var n,r=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;n=this.stack.pop().node}if(n){for(var o=n.leadingComments?n.leadingComments.length:0,a=o-1;a>=0;--a){var s=n.leadingComments[a];s.range[1]<=t.start.offset&&(r.unshift(s),n.leadingComments.splice(a,1))}return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,r}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];i.start<=t.start.offset&&(r.unshift(i.comment),this.leading.splice(a,1))}return r},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(6),a=n(7),s=n(8),u=n(2),c=n(10),l="ArrowParameterPlaceHolder",p=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r,o=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(o,new c.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value="true"===n.value,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value=null,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(t=this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.RegexLiteral(n.value,r,n.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(o,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(o,new c.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new c.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new c.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,n},e.prototype.parsePropertyMethodFunction=function(){var e=!1,t=this.createNode(),n=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=n,this.finalize(t,new c.FunctionExpression(null,r.params,i,e))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);n=this.finalize(e,new c.Literal(t.value,r));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:n=this.finalize(e,new c.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return n},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n,r,o=this.createNode(),s=this.lookahead,u=!1,l=!1,p=!1;s.type===a.Token.Identifier?(this.nextToken(),n=this.finalize(o,new c.Identifier(s.value))):this.match("*")?this.nextToken():(u=this.match("["),n=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(s.type===a.Token.Identifier&&"get"===s.value&&f)t="get",u=this.match("["),n=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(s.type===a.Token.Identifier&&"set"===s.value&&f)t="set",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(s.type===a.Token.Punctuator&&"*"===s.value&&f)t="init",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),l=!0;else if(n||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(n,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=this.parsePropertyMethodFunction(),l=!0;else if(s.type===a.Token.Identifier){var h=this.finalize(o,new c.Identifier(s.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(o,new c.AssignmentPattern(h,d))}else p=!0,r=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(o,new c.Property(t,n,u,r,l,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new c.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new c.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[]};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e]};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var o=0;o")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:l,params:[e]}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var o=0;o0){this.nextToken(),n.prec=r,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),s=[o,n,a];;){if(r=this.binaryPrecedence(this.lookahead),r<=0)break;for(;s.length>2&&r<=s[s.length-2].prec;){a=s.pop();var u=s.pop().value;o=s.pop(),i.pop();var l=this.startNode(i[i.length-1]);s.push(this.finalize(l,new c.BinaryExpression(u,o,a)))}n=this.nextToken(),n.prec=r,s.push(n),i.push(this.lookahead),s.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=s.length-1;for(t=s[p],i.pop();p>1;){var l=this.startNode(i.pop());t=this.finalize(l,new c.BinaryExpression(s[p-1].value,s[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new c.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=this.reinterpretAsCoverFormalsList(e);if(r){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var o=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var s=this.startNode(t);this.expect("=>");var p=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),f=p.type!==u.Syntax.BlockStatement;this.context.strict&&r.firstRestricted&&this.throwUnexpectedToken(r.firstRestricted,r.message),this.context.strict&&r.stricted&&this.tolerateUnexpectedToken(r.stricted,r.message),e=this.finalize(s,new c.ArrowFunctionExpression(r.params,p,f)),this.context.strict=o,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new c.AssignmentExpression(n.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);this.startMarker.index",t.TokenName[n.Identifier]="Identifier",t.TokenName[n.Keyword]="Keyword",t.TokenName[n.NullLiteral]="Null",t.TokenName[n.NumericLiteral]="Numeric",t.TokenName[n.Punctuator]="Punctuator",t.TokenName[n.StringLiteral]="String",t.TokenName[n.RegularExpression]="RegularExpression",t.TokenName[n.Template]="Template"},function(e,t,n){"use strict";function r(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var o=n(4),a=n(5),s=n(9),u=n(7),c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,n,r;for(this.trackComment&&(t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,s.Character.isLineTerminator(i)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:r};t.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:r};t.push(o)}return t},e.prototype.skipMultiLineComment=function(){var e,t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(s.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0, +slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(s.Character.isWhiteSpace(n))++this.index;else if(s.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343){var r=t;t=1024*(r-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i1114111||"}"!==e)&&this.throwUnexpectedToken(),s.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!s.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=s.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&s.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),s.Character.isIdentifierPart(e));)n=s.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&s.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===n.length?u.Token.Identifier:this.isKeyword(n)?u.Token.Keyword:"null"===n?u.Token.NullLiteral:"true"===n||"false"===n?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&s.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),s.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(s.Character.isIdentifierStart(t)||s.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(s.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(s.Character.isIdentifierStart(this.source.charCodeAt(this.index))||s.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var o=parseInt(t||r,16);return o>1114111&&i.throwUnexpectedToken(a.Messages.InvalidRegExp),o<=65535?String.fromCharCode(o):n}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];o.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],s.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(s.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}r||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);var i=t.substr(1,t.length-2);return{value:i,literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var n=this.source[this.index];if(!s.Character.isIdentifierPart(n.charCodeAt(0)))break;if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var r=this.index;if(n=this.scanHexEscape("u"))for(t+=n,e+="\\u";r=55296&&e<57343&&s.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";var r=n(2),i=function(){function e(e){this.type=r.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var o=function(){function e(e){this.type=r.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=o;var a=function(){function e(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n}return e}();t.ArrowFunctionExpression=a;var s=function(){function e(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}return e}();t.AssignmentExpression=s;var u=function(){function e(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var c=function(){function e(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}return e}();t.BinaryExpression=c;var l=function(){function e(e){this.type=r.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=l;var p=function(){function e(e){this.type=r.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=p;var f=function(){function e(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=f;var h=function(){function e(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=h;var d=function(){function e(e){this.type=r.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassDeclaration=m;var y=function(){function e(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassExpression=y;var v=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=v;var g=function(){function e(e,t,n){this.type=r.Syntax.ConditionalExpression, +this.test=e,this.consequent=t,this.alternate=n}return e}();t.ConditionalExpression=g;var _=function(){function e(e){this.type=r.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=_;var b=function(){function e(){this.type=r.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=b;var x=function(){function e(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=x;var w=function(){function e(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=w;var k=function(){function e(){this.type=r.Syntax.EmptyStatement}return e}();t.EmptyStatement=k;var S=function(){function e(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=S;var E=function(){function e(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=E;var C=function(){function e(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}return e}();t.ExportNamedDeclaration=C;var A=function(){function e(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=A;var T=function(){function e(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=T;var O=function(){function e(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}return e}();t.ForInStatement=O;var D=function(){function e(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}return e}();t.ForOfStatement=D;var M=function(){function e(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i}return e}();t.ForStatement=M;var P=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=P;var I=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=I;var j=function(){function e(e){this.type=r.Syntax.Identifier,this.name=e}return e}();t.Identifier=j;var R=function(){function e(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}return e}();t.IfStatement=R;var N=function(){function e(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=N;var F=function(){function e(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=F;var B=function(){function e(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=B;var L=function(){function e(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=L;var z=function(){function e(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=z;var q=function(){function e(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=q;var U=function(){function e(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=U;var W=function(){function e(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o}return e}();t.MethodDefinition=W;var K=function(){function e(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=K;var V=function(){function e(e){this.type=r.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=V;var H=function(){function e(e){this.type=r.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=H;var J=function(){function e(e,t){this.type=r.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=J;var G=function(){function e(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a}return e}();t.Property=G;var X=function(){function e(e,t,n){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex=n}return e}();t.RegexLiteral=X;var Y=function(){function e(e){this.type=r.Syntax.RestElement,this.argument=e}return e}();t.RestElement=Y;var $=function(){function e(e){this.type=r.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=r.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=r.Syntax.Super}return e}();t.Super=te;var ne=function(){function e(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=ne;var re=function(){function e(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=re;var ie=function(){function e(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var oe=function(){function e(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=oe;var ae=function(){function e(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var se=function(){function e(){this.type=r.Syntax.ThisExpression}return e}();t.ThisExpression=se;var ue=function(){function e(e){this.type=r.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var ce=function(){function e(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}return e}();t.TryStatement=ce;var le=function(){function e(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=le;var pe=function(){function e(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}return e}();t.UpdateExpression=pe;var fe=function(){function e(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=fe;var he=function(){function e(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=he;var de=function(){function e(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ye=function(){function e(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ye},function(e,t,n){"use strict";function r(e){var t;switch(e.type){case l.JSXSyntax.JSXIdentifier:var n=e;t=n.name;break;case l.JSXSyntax.JSXNamespacedName:var i=e;t=r(i.namespace)+":"+r(i.name);break;case l.JSXSyntax.JSXMemberExpression:var o=e;t=r(o.object)+"."+r(o.property)}return t}var i,o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(9),s=n(7),u=n(3),c=n(12),l=n(13),p=n(10),f=n(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),s.TokenName[i.Identifier]="JSXIdentifier",s.TokenName[i.Text]="JSXText";var h=function(e){function t(t,n,r){e.call(this,t,n,r)}return o(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,o=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(o="x"===s,n=o||a.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!o);break;default:n=n&&!(i&&!a.Character.isDecimalDigit(s.charCodeAt(0))),n=n&&!(o&&!a.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||o||!c.XHTMLEntities[u]||(t=c.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:s.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var n=this.scanner.index,r=this.scanner.source[this.scanner.index++],o="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===r)break;o+="&"===u?this.scanXHTMLEntity(r):u}return{type:s.Token.StringLiteral,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(46===e){var c=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===c&&46===l?"...":".",n=this.scanner.index;return this.scanner.index+=t.length,{type:s.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(96===e)return{type:s.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var n=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var p=this.scanner.source.slice(n,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,a.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var r={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,n=this.scanner.lineStart;this.scanner.scanComments();var r=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=n,r},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===s.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===s.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new f.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new f.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new f.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new f.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==s.Token.StringLiteral&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new f.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new f.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new f.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new f.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new f.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new f.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new f.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new f.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;var a=this.finalize(e.node,new f.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new f.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=h},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";var r=n(13),i=function(){function e(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var o=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}return e}();t.JSXElement=o;var a=function(){function e(){this.type=r.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var s=function(){function e(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=s;var u=function(){function e(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var c=function(){function e(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=c;var l=function(){function e(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=l;var p=function(){function e(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=p;var f=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}return e}();t.JSXOpeningElement=f;var h=function(){function e(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=h;var d=function(){function e(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,n){"use strict";var r=n(8),i=n(6),o=n(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===o.Token.Punctuator||e.type===o.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[d+1],d=o);else if(!l(a))return le;m=m&&p(a)}u=u||h&&o-d-1>r&&" "!==e[d+1]}return s||u?" "===e[0]&&n>9?le:u?ce:ue:m&&!i(e)?ae:se}function d(e,t,n,r){e.dump=function(){function i(t){return u(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&oe.indexOf(t)!==-1)return"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=r||e.flowLevel>-1&&n>=e.flowLevel;switch(h(t,c,e.indent,s,i)){case ae:return t;case se:return"'"+t.replace(/'/g,"''")+"'";case ue:return"|"+m(t,e.indent)+y(a(t,o));case ce:return">"+m(t,e.indent)+y(a(v(t,s),o));case le:return'"'+_(t,s)+'"';default:throw new M("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",r="\n"===e[e.length-1],i=r&&("\n"===e[e.length-2]||"\n"===e),o=i?"+":r?"":"-";return n+o+"\n"}function y(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function v(e,t){for(var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,i.lastIndex=n,g(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];r=i.exec(e);){var s=r[1],u=r[2];n=" "===u[0],o+=s+(a||n||""===u?"":"\n")+g(u,t),a=n}return o}function g(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,u="";n=i.exec(e);)s=n.index,s-o>t&&(r=a>o?a:s,u+="\n"+e.slice(o,r),o=r+1),a=s;return u+="\n",u+=e.length-o>t&&a>o?e.slice(o,a)+"\n"+e.slice(a+1):e.slice(o),u.slice(1)}function _(e){for(var t,n,r="",o=0;o1024&&(s+="? "),s+=e.dump+": ",E(e,t,a,!1,!1)&&(s+=e.dump,u+=s));e.tag=c,e.dump="{"+u+"}"}function k(e,t,n,r){var i,o,a,u,c,l,p="",f=e.tag,h=Object.keys(n);if(e.sortKeys===!0)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new M("sortKeys must be a boolean or a function");for(i=0,o=h.length;i1024,c&&(l+=e.dump&&F===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=s(e,t)),E(e,t+1,u,!0,c)&&(l+=e.dump&&F===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function S(e,t,n){var r,i,o,a,s,u;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function E(e,t,n,r,i,o){e.tag=null,e.dump=n,S(e,n,!1)||S(e,n,!0);var a=j.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s,u,c="[object Object]"===a||"[object Array]"===a;if(c&&(s=e.duplicates.indexOf(n),u=s!==-1),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(c&&u&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)r&&0!==Object.keys(e.dump).length?(k(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)r&&0!==e.dump.length?(x(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(b(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new M("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&d(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function C(e,t){var n,r,i=[],o=[];for(A(e,i,o),n=0,r=o.length;n1&&void 0!==arguments[1]?arguments[1]:"";if(h.List.isList(e))return e.some(function(e){return h.Map.isMap(e)&&e.get("in")===t})}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(h.List.isList(e))return e.some(function(e){return h.Map.isMap(e)&&e.get("type")===t})}function u(e,t){var n=_(e).getIn(["paths"].concat(r(t)),(0,h.fromJS)({})),i=n.get("parameters")||new h.List,o=s(i,"file")?"multipart/form-data":a(i,"formData")?"application/x-www-form-urlencoded":n.get("consumes_value");return(0,h.fromJS)({requestContentType:o,responseContentType:n.get("produces_value")})}function c(e,t){return _(e).getIn(["paths"].concat(r(t),["consumes"]),(0,h.fromJS)({}))}function l(e){return h.Map.isMap(e)?e:new h.Map}Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.allowTryItOutFor=t.requestFor=t.responseFor=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=t.schemes=t.host=t.basePath=t.definitions=t.findDefinition=t.securityDefinitions=t.security=t.produces=t.consumes=t.operations=t.paths=t.semver=t.version=t.externalDocs=t.info=t.spec=t.specResolved=t.specJson=t.specSource=t.specStr=t.url=t.lastError=void 0,t.getParameter=i,t.parameterValues=o,t.parametersIncludeIn=a,t.parametersIncludeType=s,t.contentTypeValues=u,t.operationConsumes=c;var p=n(575),f=n(335),h=n(325),d="default",m=["get","put","post","delete","options","head","patch"],y=function(e){return e||(0,h.Map)()},v=(t.lastError=(0,p.createSelector)(y,function(e){return e.get("lastError")}),t.url=(0,p.createSelector)(y,function(e){return e.get("url")}),t.specStr=(0,p.createSelector)(y,function(e){return e.get("spec")||""}),t.specSource=(0,p.createSelector)(y,function(e){return e.get("specSource")||"not-editor"}),t.specJson=(0,p.createSelector)(y,function(e){return e.get("json",(0,h.Map)())})),g=t.specResolved=(0,p.createSelector)(y,function(e){return e.get("resolved",(0,h.Map)())}),_=t.spec=function(e){var t=g(e);return t.count()<1&&(t=v(e)),t},b=t.info=(0,p.createSelector)(_,function(e){return l(e&&e.get("info"))}),x=(t.externalDocs=(0,p.createSelector)(_,function(e){return l(e&&e.get("externalDocs"))}),t.version=(0,p.createSelector)(b,function(e){return e&&e.get("version")})),w=(t.semver=(0,p.createSelector)(x,function(e){return/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e).slice(1)}),t.paths=(0,p.createSelector)(_,function(e){return e.get("paths")})),k=t.operations=(0,p.createSelector)(w,function(e){if(!e||e.size<1)return(0,h.List)();var t=(0,h.List)();return e&&e.forEach?(e.forEach(function(e,n){return e&&e.forEach?void e.forEach(function(e,r){m.indexOf(r)!==-1&&(t=t.push((0,h.fromJS)({path:n,method:r,operation:e,id:r+"-"+n})))}):{}}),t):(0,h.List)()}),S=t.consumes=(0,p.createSelector)(_,function(e){return(0,h.Set)(e.get("consumes"))}),E=t.produces=(0,p.createSelector)(_,function(e){return(0,h.Set)(e.get("produces"))}),C=(t.security=(0,p.createSelector)(_,function(e){return e.get("security",(0,h.List)())}),t.securityDefinitions=(0,p.createSelector)(_,function(e){return e.get("securityDefinitions")}),t.findDefinition=function(e,t){return g(e).getIn(["definitions",t],null)},t.definitions=(0,p.createSelector)(_,function(e){return e.get("definitions")||(0,h.Map)()}),t.basePath=(0,p.createSelector)(_,function(e){return e.get("basePath")}),t.host=(0,p.createSelector)(_,function(e){return e.get("host")}),t.schemes=(0,p.createSelector)(_,function(e){return e.get("schemes",(0,h.Map)())}),t.operationsWithRootInherited=(0,p.createSelector)(k,S,E,function(e,t,n){return e.map(function(e){return e.update("operation",function(e){if(e){if(!h.Map.isMap(e))return;return e.withMutations(function(e){return e.get("consumes")||e.update("consumes",function(e){return(0,h.Set)(e).merge(t)}),e.get("produces")||e.update("produces",function(e){return(0,h.Set)(e).merge(n)}),e})}return(0,h.Map)()})})})),A=t.tags=(0,p.createSelector)(_,function(e){return e.get("tags",(0,h.List)())}),T=t.tagDetails=function(e,t){var n=A(e)||(0,h.List)();return n.filter(h.Map.isMap).find(function(e){return e.get("name")===t},(0,h.Map)())},O=t.operationsWithTags=(0,p.createSelector)(C,function(e){return e.reduce(function(e,t){var n=(0,h.Set)(t.getIn(["operation","tags"]));return n.count()<1?e.update(d,(0,h.List)(),function(e){return e.push(t)}):n.reduce(function(e,n){return e.update(n,(0,h.List)(),function(e){return e.push(t)})},e)},(0,h.Map)())}),D=(t.taggedOperations=function(e){return function(t){var n=t.getConfigs,r=n(),i=r.operationsSorter;return O(e).map(function(t,n){var r="function"==typeof i?i:f.sorters.operationsSorter[i],o=r?t.sort(r):t;return(0,h.Map)({tagDetails:T(e,n),operations:o})})}},t.responses=(0,p.createSelector)(y,function(e){return e.get("responses",(0,h.Map)())})),M=t.requests=(0,p.createSelector)(y,function(e){return e.get("requests",(0,h.Map)())}),P=(t.responseFor=function(e,t,n){return D(e).getIn([t,n],null)},t.requestFor=function(e,t,n){return M(e).getIn([t,n],null)},t.allowTryItOutFor=function(){return!0},t.hasHost=(0,p.createSelector)(_,function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]}),t.operationScheme=function(e,t,n){var r=e.get("url"),i=r.match(/^([a-z][a-z0-9+\-.]*):/),o=Array.isArray(i)?i[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""});t.canExecuteScheme=function(e,t,n){return["http","https"].indexOf(P(e,t,n))>-1},t.validateBeforeExecute=function(e,t){var n=_(e).getIn(["paths"].concat(r(t),["parameters"]),(0,h.fromJS)([])),i=!0;return n.forEach(function(e){var t=e.get("errors");t&&t.count()&&(i=!1)}),i}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.updateSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.parseToJson.apply(n,arguments)}},t.updateJsonSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.resolveSpec.apply(n,arguments)}},t.executeRequest=function(e,t){var n=t.specActions;return function(t){return n.logRequest(t),e(t)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getComponents,n=e.getStore,r=e.getSystem,i=o.getComponent,s=o.render,u=o.makeMappedContainer,c=(0,a.memoize)(i.bind(null,r,n,t)),l=(0,a.memoize)(u.bind(null,r,n,c,t));return{rootInjects:{getComponent:c,makeMappedContainer:l,render:s.bind(null,r,n,i,t)}}};var i=n(620),o=r(i),a=n(335)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getComponent=t.render=t.makeMappedContainer=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t1){for(var y=Array(m),v=0;v1){for(var _=Array(g),b=0;b8&&x<=11),S=32,E=String.fromCharCode(S),C={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},A=!1,T=null,O={eventTypes:C,extractEvents:function(e,t,n,r){return[c(e,t,n,r),f(e,t,n,r)]}};e.exports=O},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return v(e,r)}function i(e,t,n){var i=r(e,n,t);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(e._targetInst,i,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?d.getParentInstance(t):null;d.traverseTwoPhase(n,i,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=v(e,r);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function c(e){y(e,o)}function l(e){y(e,a)}function p(e,t,n,r){d.traverseEnterLeave(n,r,s,e,t)}function f(e){y(e,u)}var h=n(661),d=n(663),m=n(665),y=n(666),v=(n(630),h.getListener),g={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=g},function(e,t,n){"use strict";function r(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function i(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(t));default:return!1}}var o=n(654),a=n(662),s=n(663),u=n(664),c=n(665),l=n(666),p=(n(627),{}),f=null,h=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return h(e,!0)},m=function(e){return h(e,!1)},y=function(e){return"."+e._rootNodeID},v={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?o("94",t,typeof n):void 0;var r=y(e),i=p[t]||(p[t]={});i[r]=n;var s=a.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=p[t];if(i(t,e._currentElement.type,e._currentElement.props))return null;var r=y(e);return n&&n[r]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=p[t];if(r){var i=y(e);delete r[i]}},deleteAllListeners:function(e){var t=y(e);for(var n in p)if(p.hasOwnProperty(n)&&p[n][t]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete p[n][t]}},extractEvents:function(e,t,n,r){for(var i,o=a.plugins,s=0;s-1?void 0:a("96",e),!c.plugins[n]){t.extractEvents?void 0:a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a("98",o,e)}}}function i(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){c.registrationNameModules[e]?a("100",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(654),s=(n(627),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]?a("102",n):void 0,u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames; +for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=c},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function i(e){return"topMouseMove"===e||"topTouchMove"===e}function o(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=v.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(i,n,e):m.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},[1484,654],function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(667),o=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={data:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var i=n(623),o=n(669),a=n(631),s=(n(630),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n8));var j=!1;x.canUseDOM&&(j=C("input")&&(!document.documentMode||document.documentMode>11));var R={get:function(){return P.get.call(this)},set:function(e){M=""+e,P.set.call(this,e)}},N={eventTypes:T,extractEvents:function(e,t,n,i){var o,a,s=t?w.getNodeFromInstance(t):window;if(r(s)?I?o=u:a=c:A(s)?j?o=h:(o=m,a=d):y(s)&&(o=v),o){var l=o(e,t);if(l){var p=S.getPooled(T.change,l,n,i);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,s,t),"topBlur"===e&&g(t,s)}};e.exports=N},function(e,t,n){"use strict";function r(){A.ReactReconcileTransaction&&x?void 0:l("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=f.getPooled(),this.reconcileTransaction=A.ReactReconcileTransaction.getPooled(!0)}function o(e,t,n,i,o,a){return r(),x.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==v.length?l("124",t,v.length):void 0,v.sort(a),g++;for(var n=0;n]/,u=n(698),c=u(function(e,t){if(e.namespaceURI!==o.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e};e.exports=n},function(e,t,n){"use strict";var r=n(667),i=n(700),o=n(697),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void o(e,i(t))})),e.exports=a},function(e,t){"use strict";function n(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,s=0;for(a=n.index;a]/;e.exports=r},function(e,t,n){"use strict";var r=n(654),i=n(695),o=n(667),a=n(702),s=n(631),u=(n(627),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(o.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else i.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function i(e,t){var n=c;c?void 0:u(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var l=o[0];l--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var o=n(667),a=n(703),s=n(704),u=n(627),c=o.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var i=n(667),o=n(627),a=i.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],c=[1,"","
"],l=[3,"","
"],p=[1,'',""],f={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];h.forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";var r=n(694),i=n(653),o={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=o},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(e,t){t&&(G[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&U in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",r(e)):void 0)}function o(e,t,n,r){if(!(r instanceof I)){var i=e._hostContainerInfo,o=i._node&&i._node.nodeType===K,s=o?i._node:i._ownerDocument;B(t,s),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;k.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;T.postMountWrapper(e)}function u(){var e=this;M.postMountWrapper(e)}function c(){var e=this;O.postMountWrapper(e)}function l(){var e=this;e._rootNodeID?void 0:m("63");var t=F(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[E.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in V)V.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(n,V[n],t));break;case"source":e._wrapperState.listeners=[E.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent("topError","error",t),E.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent("topReset","reset",t),E.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[E.trapBubbledEvent("topInvalid","invalid",t)]}}function p(){D.postUpdateWrapper(this)}function f(e){$.call(Y,e)||(X.test(e)?void 0:m("65",e),Y[e]=!0)}function h(e,t){return e.indexOf("-")>=0||null!=t.is}function d(e){var t=e.type;f(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(654),y=n(623),v=n(707),g=n(709),_=n(695),b=n(696),x=n(655),w=n(717),k=n(661),S=n(662),E=n(719),C=n(656),A=n(653),T=n(722),O=n(725),D=n(726),M=n(727),P=(n(681),n(728)),I=n(746),j=(n(631),n(700)),R=(n(627),n(684),n(735),n(749),n(630),C),N=k.deleteListener,F=A.getNodeFromInstance,B=E.listenTo,L=S.registrationNameModules,z={string:!0,number:!0},q="style",U="__html",W={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},K=11,V={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},H={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},J={listing:!0,pre:!0,textarea:!0},G=y({menuitem:!0},H),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Y={},$={}.hasOwnProperty,Z=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(l,this);break;case"input":T.mountWrapper(this,o,t),o=T.getHostProps(this,o),e.getReactMountReady().enqueue(l,this);break;case"option":O.mountWrapper(this,o,t),o=O.getHostProps(this,o);break;case"select":D.mountWrapper(this,o,t),o=D.getHostProps(this,o),e.getReactMountReady().enqueue(l,this);break;case"textarea":M.mountWrapper(this,o,t),o=M.getHostProps(this,o),e.getReactMountReady().enqueue(l,this)}i(this,o);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===b.svg&&"foreignobject"===p)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var f;if(e.useCreateElement){var h,d=n._ownerDocument;if(a===b.html)if("script"===this._tag){var m=d.createElement("div"),y=this._currentElement.type;m.innerHTML="<"+y+">",h=m.removeChild(m.firstChild)}else h=o.is?d.createElement(this._currentElement.type,o.is):d.createElement(this._currentElement.type);else h=d.createElementNS(a,this._currentElement.type);A.precacheNode(this,h),this._flags|=R.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(h),this._updateDOMProperties(null,o,e);var g=_(h);this._createInitialChildren(e,o,r,g),f=g}else{var x=this._createOpenTagMarkupAndPutListeners(e,o),k=this._createContentMarkup(e,o,r);f=!k&&H[this._tag]?x+"/>":x+">"+k+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"select":o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"button":o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return f},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(L.hasOwnProperty(r))i&&o(this,r,i,e);else{r===q&&(i&&(i=this._previousStyleCopy=y({},t.style)),i=g.createMarkupForStyles(i,this));var a=null;null!=this._tag&&h(this._tag,t)?W.hasOwnProperty(r)||(a=w.createMarkupForCustomAttribute(r,i)):a=w.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=z[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=j(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return J[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&_.queueHTML(r,i.__html);else{var o=z[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)""!==o&&_.queueText(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(654),s=(n(629),n(730)),u=(n(681),n(675)),c=(n(627),n(630),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var i=o(e,"replaceState");i&&(i._pendingStateQueue=[t],i._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),i._pendingCallbacks?i._pendingCallbacks.push(n):i._pendingCallbacks=[n]),r(i))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,i(e)):void 0}});e.exports=c},function(e,t,n){"use strict";var r=(n(623),n(631)),i=(n(630),r);e.exports=i},function(e,t,n){"use strict";var r=n(623),i=n(695),o=n(653),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,c=u.createComment(s);return o.precacheNode(this,c),i(c)}return e.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return o.getNodeFromInstance(this)},unmountComponent:function(){o.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var i=0,o=t;o;o=o._hostParent)i++;for(;n-i>0;)e=e._hostParent,n--;for(;i-n>0;)t=t._hostParent,i--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function i(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function o(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var i;for(i=r.length;i-- >0;)t(r[i],"captured",n);for(i=0;i0;)n(u[c],"captured",o)}var u=n(654);n(627);e.exports={isAncestor:i,getLowestCommonAncestor:r,getParentInstance:o,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";var r=n(654),i=n(623),o=n(694),a=n(695),s=n(653),u=n(700),c=(n(627),n(749),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(c.prototype,{mountComponent:function(e,t,n,r){var i=n._idCounter++,o=" react-text: "+i+" ",c=" /react-text ";if(this._domID=i,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,p=l.createComment(o),f=l.createComment(c),h=a(l.createDocumentFragment());return a.queueChild(h,a(p)),this._stringText&&a.queueChild(h,a(l.createTextNode(this._stringText))),a.queueChild(h,a(f)),s.precacheNode(this,p),this._closingComment=f,h}var d=u(this._stringText);return e.renderToStaticMarkup?d:""+d+""; +},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();o.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(623),o=n(675),a=n(682),s=n(631),u={initialize:s,close:function(){f.isBatchingUpdates=!1}},c={initialize:s,close:o.flushBatchedUpdates.bind(o)},l=[c,u];i(r.prototype,a,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=f.isBatchingUpdates;return f.isBatchingUpdates=!0,a?e(t,n,r,i,o):p.perform(e,null,t,n,r,i,o)}};e.exports=f},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){var t=h(e.nativeEvent),n=p.getClosestInstanceFromNode(t),i=n;do e.ancestors.push(i),i=i&&r(i);while(i);for(var o=0;ot.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,i=Math.min(t.start,r),o=void 0===t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=c(e,i),u=c(e,o);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(667),c=n(761),l=n(670),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?i:o,setOffsets:p?a:s};e.exports=f},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,o<=t&&a>=t)return{node:i,offset:t-o};o=a}i=n(r(i))}}e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(763);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(764);e.exports=r},function(e,t){"use strict";function n(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(e){if(e=e||("undefined"!=typeof document?document:void 0),"undefined"==typeof e)return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=n},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){i.Properties[e]=0,r[e]&&(i.DOMAttributeNames[e]=r[e])}),e.exports=i},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(e,t){if(g||null==m||m!==l())return null;var n=r(m);if(!v||!f(v,n)){v=n;var i=c.getPooled(d.select,y,e,t);return i.type="select",i.target=m,o.accumulateTwoPhaseDispatches(i),i}return null}var o=n(660),a=n(667),s=n(653),u=n(759),c=n(672),l=n(765),p=n(685),f=n(735),h=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,y=null,v=null,g=!1,_=!1,b={eventTypes:d,extractEvents:function(e,t,n,r){if(!_)return null;var o=t?s.getNodeFromInstance(t):window;switch(e){case"topFocus":(p(o)||"true"===o.contentEditable)&&(m=o,y=t,v=null);break;case"topBlur":m=null,y=null,v=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,i(n,r);case"topSelectionChange":if(h)break;case"topKeyDown":case"topKeyUp":return i(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(_=!0)}};e.exports=b},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}function i(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var o=n(654),a=n(755),s=n(660),u=n(653),c=n(769),l=n(770),p=n(672),f=n(771),h=n(772),d=n(688),m=n(775),y=n(776),v=n(777),g=n(689),_=n(778),b=n(631),x=n(773),w=(n(627),{}),k={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};w[e]=i,k[r]=i});var S={},E={eventTypes:w,extractEvents:function(e,t,n,r){var i=k[e];if(!i)return null;var a;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=p;break;case"topKeyPress":if(0===x(n))return null;case"topKeyDown":case"topKeyUp":a=h;break;case"topBlur":case"topFocus":a=f;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=y;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=c;break;case"topTransitionEnd":a=v;break;case"topScroll":a=g;break;case"topWheel":a=_;break;case"topCopy":case"topCut":case"topPaste":a=l}a?void 0:o("86",e);var u=a.getPooled(i,t,n,r);return s.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if("onClick"===t&&!i(e._tag)){var o=r(e),s=u.getNodeFromInstance(e);S[o]||(S[o]=a.listen(s,"click",b))}},willDeleteListener:function(e,t){if("onClick"===t&&!i(e._tag)){var n=r(e);S[n].remove(),delete S[n]}}};e.exports=E},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(689),o={relatedTarget:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(689),o=n(773),a=n(774),s=n(691),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};i.augmentClass(r,u),e.exports=r},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(773),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(688),o={dataTransfer:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(689),o=n(691),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};i.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(688),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=y.createElement(B,{child:t});if(e){var u=w.get(e);a=u._processChildContext(u._context)}else a=A;var l=f(n);if(l){var p=l._currentElement,d=p.props.child;if(D(d,t)){var m=l._renderedComponent.getPublicInstance(),v=r&&function(){r.call(m)};return L._updateRootComponent(l,s,a,n,v),m}L.unmountComponentAtNode(n)}var g=i(n),_=g&&!!o(g),b=c(n),x=_&&!l&&!b,k=L._renderNewRootComponent(s,n,x,a)._renderedComponent.getPublicInstance();return r&&r.call(k),k},render:function(e,t,n){return L._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)?void 0:h("40");var t=f(e);if(!t){c(e),1===e.nodeType&&e.hasAttribute(P);return!1}return delete N[t._instance.rootID],C.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,o,a){if(l(t)?void 0:h("41"),o){var s=i(t);if(k.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(k.CHECKSUM_ATTR_NAME);s.removeAttribute(k.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(k.CHECKSUM_ATTR_NAME,u);var p=e,f=r(p,c),m=" (client) "+p.substring(f-20,f+20)+"\n (server) "+c.substring(f-20,f+20);t.nodeType===j?h("42",m):void 0}if(t.nodeType===j?h("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);d.insertTreeBefore(t,e,null)}else O(t,e),g.precacheNode(n,t.firstChild)}};e.exports=L},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===i?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var i=(n(749),9);e.exports=r},function(e,t){"use strict";var n={useCreateElement:!0,useFiber:!1};e.exports=n},function(e,t,n){"use strict";var r=n(783),i=/\/?>/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return o.test(e)?e:e.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,i=0,o=e.length,a=o&-4;i3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(e),f=e||S,d=void 0;d="function"==typeof t?t:t?(0,v.default)(t):E;var y=n||C,g=r.pure,_=void 0===g||g,b=r.withRef,w=void 0!==b&&b,O=_&&y!==C,D=T++;return function(e){function t(e,t,n){var r=y(e,t,n);return r}var n="Connect("+s(e)+")",r=function(r){function s(e,t){i(this,s);var a=o(this,r.call(this,e,t));a.version=D,a.store=e.store||t.store,(0,k.default)(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+n+'".'));var u=a.store.getState();return a.state={storeState:u},a.clearCache(),a}return a(s,r),s.prototype.shouldComponentUpdate=function(){return!_||this.haveOwnPropsChanged||this.hasStoreStateChanged},s.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return r},s.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},s.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},s.prototype.configureFinalMapDispatch=function(e,t){var n=d(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},s.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,m.default)(e,this.stateProps))&&(this.stateProps=e, +!0)},s.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,m.default)(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},s.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&O&&(0,m.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},s.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},s.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},s.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},s.prototype.componentDidMount=function(){this.trySubscribe()},s.prototype.componentWillReceiveProps=function(e){_&&(0,m.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},s.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},s.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},s.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!_||t!==e){if(_&&!this.doStatePropsDependOnOwnProps){var n=u(this.updateStatePropsIfNeeded,this);if(!n)return;n===A&&(this.statePropsPrecalculationError=A.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},s.prototype.getWrappedInstance=function(){return(0,k.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},s.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,i=this.statePropsPrecalculationError,o=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,i)throw i;var a=!0,s=!0;_&&o&&(a=n||t&&this.doStatePropsDependOnOwnProps,s=t&&this.doDispatchPropsDependOnOwnProps);var u=!1,c=!1;r?u=!0:a&&(u=this.updateStatePropsIfNeeded()),s&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(u||c||t)&&this.updateMergedPropsIfNeeded(),!f&&o?o:(w?this.renderedElement=(0,p.createElement)(e,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},s}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:h.default},r.propTypes={store:h.default},(0,x.default)(r,e)}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t1),t}),s(e,c(e),n),u&&(n=i(n,l|p|f));for(var h=t.length;h--;)o(n,t[h]);return n});e.exports=h},function(e,t,n){function r(e,t,n,A,T,O){var D,I=t&k,j=t&S,N=t&E;if(n&&(D=T?n(e,A,T,O):n(e)),void 0!==D)return D;if(!x(e))return e;var F=_(e);if(F){if(D=y(e),!I)return l(e,D)}else{var B=m(e),L=B==M||B==P;if(b(e))return c(e,I);if(B==R||B==C||L&&!T){if(D=j||L?{}:g(e),!I)return j?f(e,u(D,e)):p(e,s(D,e))}else{if(!Z[B])return T?e:{};D=v(e,B,r,I)}}O||(O=new i);var z=O.get(e);if(z)return z;O.set(e,D);var q=N?j?d:h:j?keysIn:w,U=F?void 0:q(e);return o(U||e,function(i,o){U&&(o=i,i=e[o]),a(D,o,r(i,t,n,o,e,O))}),D}var i=n(403),o=n(801),a=n(802),s=n(805),u=n(807),c=n(811),l=n(812),p=n(813),f=n(816),h=n(819),d=n(821),m=n(438),y=n(822),v=n(823),g=n(833),_=n(346),b=n(426),x=n(374),w=n(421),k=1,S=2,E=4,C="[object Arguments]",A="[object Array]",T="[object Boolean]",O="[object Date]",D="[object Error]",M="[object Function]",P="[object GeneratorFunction]",I="[object Map]",j="[object Number]",R="[object Object]",N="[object RegExp]",F="[object Set]",B="[object String]",L="[object Symbol]",z="[object WeakMap]",q="[object ArrayBuffer]",U="[object DataView]",W="[object Float32Array]",K="[object Float64Array]",V="[object Int8Array]",H="[object Int16Array]",J="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",Y="[object Uint16Array]",$="[object Uint32Array]",Z={};Z[C]=Z[A]=Z[q]=Z[U]=Z[T]=Z[O]=Z[W]=Z[K]=Z[V]=Z[H]=Z[J]=Z[I]=Z[j]=Z[R]=Z[N]=Z[F]=Z[B]=Z[L]=Z[G]=Z[X]=Z[Y]=Z[$]=!0,Z[D]=Z[M]=Z[z]=!1,e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=800,i=16,o=Date.now;e.exports=n},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:o}};var i=n(468),o=r(i)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o=a&&(t=console)[e].apply(t,r)}var n=e.configs,r={debug:0,info:1,log:2,warn:3,error:4},i=function(e){return r[e]||-1},o=n.logLevel,a=i(o);return t.warn=t.bind(null,"warn"),t.error=t.bind(null,"error"),t.info=t.bind(null,"info"),t.debug=t.bind(null,"debug"),{rootInjects:{log:t}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{AST:a},components:{JumpToPath:u.default}}};var o=n(851),a=i(o),s=n(881),u=r(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function n(e,t,i){if(!e)return i&&i.start_mark?i.start_mark.line:0;if(t.length&&e.tag===v)for(r=0;r=t.column:t.line===e.start_mark.line?t.column>=e.start_mark.column:t.line===e.end_mark.line?t.column<=e.end_mark.column:e.start_mark.linet.line}var o=0;if(!e||[v,g].indexOf(e.tag)===-1)return i;if(e.tag===v)for(o=0;o0&&(a=this.buffer[u-1],e.call(r,a)<0);)if(u--,this.pointer-u>n/2-1){o=" ... ",u+=5;break}for(c="",i=this.pointer;in/2-1){c=" ... ",i-=5;break}return""+new Array(t).join(" ")+o+this.buffer.slice(u,i)+c+"\n"+new Array(t+this.pointer-u+o.length).join(" ")+"^"},t.prototype.toString=function(){var e,t;return e=this.get_snippet(),t=" on line "+(this.line+1)+", column "+(this.column+1),e?t:t+":\n"+e},t}(),this.YAMLError=function(e){function n(e){this.message=e,n.__super__.constructor.call(this),this.stack=this.toString()+"\n"+(new Error).stack.split("\n").slice(1).join("\n")}return t(n,e),n.prototype.toString=function(){return this.message},n}(Error),this.MarkedYAMLError=function(e){function n(e,t,r,i,o){this.context=e,this.context_mark=t,this.problem=r,this.problem_mark=i,this.note=o,n.__super__.constructor.call(this)}return t(n,e),n.prototype.toString=function(){var e;return e=[],null!=this.context&&e.push(this.context),null==this.context_mark||null!=this.problem&&null!=this.problem_mark&&this.context_mark.line===this.problem_mark.line&&this.context_mark.column===this.problem_mark.column||e.push(this.context_mark.toString()),null!=this.problem&&e.push(this.problem),null!=this.problem_mark&&e.push(this.problem_mark.toString()),null!=this.note&&e.push(this.note),e.join("\n")},n}(this.YAMLError)}).call(this)},function(e,t){(function(){var e,t=function(e,t){function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},n={}.hasOwnProperty;e=0,this.Node=function(){function t(t,n,r,i){this.tag=t,this.value=n,this.start_mark=r,this.end_mark=i,this.unique_id="node_"+e++}return t}(),this.ScalarNode=function(e){function n(e,t,r,i,o){this.tag=e,this.value=t,this.start_mark=r,this.end_mark=i,this.style=o,n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="scalar",n}(this.Node),this.CollectionNode=function(e){function n(e,t,r,i,o){this.tag=e,this.value=t,this.start_mark=r,this.end_mark=i,this.flow_style=o,n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(this.Node),this.SequenceNode=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="sequence",n}(this.CollectionNode),this.MappingNode=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="mapping",n}(this.CollectionNode)}).call(this)},function(e,t,n){(function(e){(function(){var r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].indexOf||function(e){for(var t=0,n=this.length;t=0)throw new t.ConstructorError(null,null,"found unconstructable recursive node",e.start_mark);if(this.constructing_nodes.push(e.unique_id),n=null,s=null,e.tag in this.yaml_constructors)n=this.yaml_constructors[e.tag];else{for(a in this.yaml_multi_constructors)if(e.tag.indexOf(0===a)){s=e.tag.slice(a.length),n=this.yaml_multi_constructors[a];break}null==n&&(null in this.yaml_multi_constructors?(s=e.tag,n=this.yaml_multi_constructors[null]):null in this.yaml_constructors?n=this.yaml_constructors[null]:e instanceof i.ScalarNode?n=this.construct_scalar:e instanceof i.SequenceNode?n=this.construct_sequence:e instanceof i.MappingNode&&(n=this.construct_mapping))}return r=n.call(this,null!=s?s:e,e),this.constructed_objects[e.unique_id]=r,this.constructing_nodes.pop(),r},e.prototype.construct_scalar=function(e){if(!(e instanceof i.ScalarNode))throw new t.ConstructorError(null,null,"expected a scalar node but found "+e.id,e.start_mark);return e.value},e.prototype.construct_sequence=function(e){var n,r,o,a,s;if(!(e instanceof i.SequenceNode))throw new t.ConstructorError(null,null,"expected a sequence node but found "+e.id,e.start_mark);for(a=e.value,s=[],r=0,o=a.length;r=0&&(l=l.slice(1)),"0"===l)return 0;if(0===l.indexOf("0b"))return c*parseInt(l.slice(2),2);if(0===l.indexOf("0x"))return c*parseInt(l.slice(2),16);if(0===l.indexOf("0o"))return c*parseInt(l.slice(2),8);if("0"===l[0])return c*parseInt(l,8);if(u.call(l,":")>=0){for(r=function(){var e,t,n,r;for(n=l.split(/:/g),r=[],e=0,t=n.length;e=0&&(l=l.slice(1)),".inf"===l)return Infinity*c;if(".nan"===l)return NaN;if(u.call(l,":")>=0){for(r=function(){var e,t,n,r;for(n=l.split(/:/g),r=[],e=0,t=n.length;e=n?e:e.length+1===n?""+t+e:""+new Array(n-e.length+1).join(t)+e},this.to_hex=function(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e.toString(16)}}).call(this)}).call(t,function(){return this}())},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=c(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(C(n)){var y=n.name?": "+n.name:"";return e.stylize("[Function"+y+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return l(n)}var v="",g=!1,b=["{","}"];if(d(n)&&(g=!0,b=["[","]"]),C(n)){var x=n.name?": "+n.name:"";v=" [Function"+x+"]"}if(w(n)&&(v=" "+RegExp.prototype.toString.call(n)),S(n)&&(v=" "+Date.prototype.toUTCString.call(n)),E(n)&&(v=" "+l(n)),0===a.length&&(!g||0==n.length))return b[0]+v+b[1];if(r<0)return w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var k;return k=g?p(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,g)}),e.seen.pop(),h(k,v,b)}function c(e,t){if(x(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return null==e}function g(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===T(e)}function E(e){return k(e)&&("[object Error]"===T(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function T(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}function D(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n2*this.indent?t.width:80,this.best_line_break="\r"===(n=t.line_break)||"\n"===n||"\r\n"===n?t.line_break:"\n",this.tag_prefixes=null,this.prepared_anchor=null,this.prepared_tag=null,this.analysis=null,this.style=null}var r,a,c;return r="\0 \t\r\n…\u2028\u2029",a={"!":"!","tag:yaml.org,2002:":"!!"},c={"\0":"0","":"a","\b":"b","\t":"t","\n":"n","\v":"v","\f":"f","\r":"r","":"e",'"':'"',"\\":"\\","…":"N"," ":"_","\u2028":"L","\u2029":"P"},n.prototype.dispose=function(){return this.states=[],this.state=null},n.prototype.emit=function(e){var t;for(this.events.push(e),t=[];!this.need_more_events();)this.event=this.events.shift(),this.state(),t.push(this.event=null);return t},n.prototype.need_more_events=function(){var e;return 0===this.events.length||(e=this.events[0],e instanceof i.DocumentStartEvent?this.need_events(1):e instanceof i.SequenceStartEvent?this.need_events(2):e instanceof i.MappingStartEvent&&this.need_events(3))},n.prototype.need_events=function(e){var t,n,r,o,a;for(o=0,a=this.events.slice(1),n=0,r=a.length;nthis.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_sequence_item=function(){return this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("]",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_mapping=function(){return this.write_indicator("{",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_mapping_key},n.prototype.expect_first_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("}",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("}",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_flow_mapping_value=function(){return(this.canonical||this.column>this.best_width)&&this.write_indent(),this.write_indicator(":",!0),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_sequence=function(){var e;return e=this.mapping_context&&!this.indentation,this.increase_indent({indentless:e}),this.state=this.expect_first_block_sequence_item},n.prototype.expect_first_block_sequence_item=function(){return this.expect_block_sequence_item(!0)},n.prototype.expect_block_sequence_item=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.write_indicator("-",!0,{indentation:!0}),this.states.push(this.expect_block_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_block_mapping=function(){return this.increase_indent(),this.state=this.expect_first_block_mapping_key},n.prototype.expect_first_block_mapping_key=function(){return this.expect_block_mapping_key(!0)},n.prototype.expect_block_mapping_key=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.check_simple_key()?(this.states.push(this.expect_block_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_block_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_mapping_value=function(){return this.write_indent(),this.write_indicator(":",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.check_empty_document=function(){var e;return this.event instanceof i.DocumentStartEvent&&0!==this.events.length&&(e=this.events[0],e instanceof i.ScalarEvent&&null==e.anchor&&null==e.tag&&e.implicit&&""===e.value)},n.prototype.check_empty_sequence=function(){return this.event instanceof i.SequenceStartEvent&&this.events[0]instanceof i.SequenceEndEvent},n.prototype.check_empty_mapping=function(){return this.event instanceof i.MappingStartEvent&&this.events[0]instanceof i.MappingEndEvent},n.prototype.check_simple_key=function(){var e;return e=0,this.event instanceof i.NodeEvent&&null!=this.event.anchor&&(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),e+=this.prepared_anchor.length),null!=this.event.tag&&(this.event instanceof i.ScalarEvent||this.event instanceof i.CollectionStartEvent)&&(null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(this.event.tag)),e+=this.prepared_tag.length),this.event instanceof i.ScalarEvent&&(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),e+=this.analysis.scalar.length),e<128&&(this.event instanceof i.AliasEvent||this.event instanceof i.ScalarEvent&&!this.analysis.empty&&!this.analysis.multiline||this.check_empty_sequence()||this.check_empty_mapping())},n.prototype.process_anchor=function(e){return null==this.event.anchor?void(this.prepared_anchor=null):(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),this.prepared_anchor&&this.write_indicator(""+e+this.prepared_anchor,!0),this.prepared_anchor=null)},n.prototype.process_tag=function(){var e;if(e=this.event.tag,this.event instanceof i.ScalarEvent){if(null==this.style&&(this.style=this.choose_scalar_style()),(!this.canonical||null==e)&&(""===this.style&&this.event.implicit[0]||""!==this.style&&this.event.implicit[1]))return void(this.prepared_tag=null);this.event.implicit[0]&&null==e&&(e="!",this.prepared_tag=null)}else if((!this.canonical||null==e)&&this.event.implicit)return void(this.prepared_tag=null);return null==e&&this.error("tag is not specified"),null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(e)),this.write_indicator(this.prepared_tag,!0),this.prepared_tag=null},n.prototype.process_scalar=function(){var e;switch(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),null==this.style&&(this.style=this.choose_scalar_style()),e=!this.simple_key_context,this.style){case'"':this.write_double_quoted(this.analysis.scalar,e);break;case"'":this.write_single_quoted(this.analysis.scalar,e);break;case">":this.write_folded(this.analysis.scalar);break;case"|":this.write_literal(this.analysis.scalar);break;default:this.write_plain(this.analysis.scalar,e)}return this.analysis=null,this.style=null},n.prototype.choose_scalar_style=function(){var e;return null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),'"'===this.event.style||this.canonical?'"':this.event.style||!this.event.implicit[0]||this.simple_key_context&&(this.analysis.empty||this.analysis.multiline)||!(this.flow_level&&this.analysis.allow_flow_plain||!this.flow_level&&this.analysis.allow_block_plain)?this.event.style&&(e=this.event.style,u.call("|>",e)>=0)&&!this.flow_level&&!this.simple_key_context&&this.analysis.allow_block?this.event.style:this.event.style&&"'"!==this.event.style||!this.analysis.allow_single_quoted||this.simple_key_context&&this.analysis.multiline?'"':"'":""},n.prototype.prepare_version=function(e){var t,n,r;return t=e[0],n=e[1],r=t+"."+n,1===t?r:this.error("unsupported YAML version",r)},n.prototype.prepare_tag_handle=function(e){var t,n,r,i;for(e||this.error("tag handle must not be empty"),"!"===e[0]&&"!"===e.slice(-1)||this.error("tag handle must start and end with '!':",e),i=e.slice(1,-1),n=0,r=i.length;n=0||this.error("invalid character '"+t+"' in the tag handle:",e);return e},n.prototype.prepare_tag_prefix=function(e){var t,n,r,i;for(e||this.error("tag prefix must not be empty"),n=[],i=0,r=+("!"===e[0]);r=0?r++:(i=0||"!"===t&&"!"!==i?r++:(f"},n.prototype.prepare_anchor=function(e){var t,n,r;for(e||this.error("anchor must not be empty"),n=0,r=e.length;n=0||this.error("invalid character '"+t+"' in the anchor:",e);return e},n.prototype.analyze_scalar=function(t){var n,i,o,a,s,c,l,p,f,h,d,m,y,v,g,_,b,x,w,k,S,E,C,A,T,O;for(t||new e(t,!0,!1,!1,!0,!0,!0,!1),c=!1,f=!1,_=!1,C=!1,O=!1,v=!1,y=!1,T=!1,A=!1,l=!1,E=!1,0!==t.indexOf("---")&&0!==t.indexOf("...")||(c=!0,f=!0),b=!0,h=1===t.length||(k=t[1],u.call("\0 \t\r\n…\u2028\u2029",k)>=0),w=!1,x=!1,m=0,m=d=0,g=t.length;d'\"%@`",p)>=0||"-"===p&&h?(f=!0,c=!0):u.call("?:",p)>=0&&(f=!0,h&&(c=!0)):u.call(",?[]{}",p)>=0?f=!0:":"===p?(f=!0,h&&(c=!0)):"#"===p&&b&&(f=!0,c=!0),u.call("\n…\u2028\u2029",p)>=0&&(_=!0),"\n"===p||" "<=p&&p<="~"||("\ufeff"!==p&&("…"===p||" "<=p&&p<="퟿"||""<=p&&p<="�")?(O=!0,this.allow_unicode||(C=!0)):C=!0)," "===p?(0===m&&(v=!0),m===t.length-1&&(T=!0),x&&(l=!0),x=!1,w=!0):u.call("\n…\u2028\u2029",p)>=0?(0===m&&(y=!0),m===t.length-1&&(A=!0),w&&(E=!0),x=!0,w=!1):(x=!1,w=!1),b=u.call(r,p)>=0,h=m+2>=t.length||(S=t[m+2],u.call(r,S)>=0);return a=!0,i=!0,s=!0,o=!0,n=!0,(v||y||T||A)&&(a=i=!1),T&&(n=!1),l&&(a=i=s=!1),(E||C)&&(a=i=s=n=!1),_&&(a=i=!1),f&&(a=!1),c&&(i=!1),new e(t,!1,_,a,i,s,o,n)},n.prototype.write_stream_start=function(){if(this.encoding&&0===this.encoding.indexOf("utf-16"))return this.stream.write("\ufeff",this.encoding)},n.prototype.write_stream_end=function(){return this.flush_stream()},n.prototype.write_indicator=function(e,t,n){var r;return null==n&&(n={}),r=this.whitespace||!t?e:" "+e,this.whitespace=!!n.whitespace,this.indentation&&(this.indentation=!!n.indentation),this.column+=r.length,this.open_ended=!1,this.stream.write(r,this.encoding)},n.prototype.write_indent=function(){var e,t,n;if(t=null!=(n=this.indent)?n:0,(!this.indentation||this.column>t||this.column===t&&!this.whitespace)&&this.write_line_break(),this.columnthis.best_width&&t&&0!==f&&a!==e.length?this.write_indent():(o=e.slice(f,a),this.column+=o.length,this.stream.write(o,this.encoding)),f=a);else if(r){if(null==i||u.call("\n…\u2028\u2029",i)<0){for("\n"===e[f]&&this.write_line_break(),l=e.slice(f,a),s=0,c=l.length;s=0||"'"===i)&&f=0),a++}return this.write_indicator("'",!1)},n.prototype.write_double_quoted=function(e,t){var n,r,i,a;for(null==t&&(t=!0),this.write_indicator('"',!0),a=i=0;i<=e.length;)n=e[i],(null==n||u.call('"\\…\u2028\u2029\ufeff',n)>=0||!(" "<=n&&n<="~"||this.allow_unicode&&(" "<=n&&n<="퟿"||""<=n&&n<="�")))&&(a=i)&&this.column+(i-a)>this.best_width&&(r=e.slice(a,i)+"\\",a"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),c=!0,n=!0,h=!1,d=o=0,f=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(c||null==r||" "===r||"\n"!==e[d]||this.write_line_break(),c=" "===r,p=e.slice(d,o),s=0,l=p.length;sthis.best_width?this.write_indent():(i=e.slice(d,o), +this.column+=i.length,this.stream.write(i,this.encoding)),d=o):(null==r||u.call(" \n…\u2028\u2029",r)>=0)&&(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding),null==r&&this.write_line_break(),d=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0,h=" "===r),f.push(o++)}return f},n.prototype.write_literal=function(e){var t,n,r,i,o,a,s,c,l,p,f;for(a=this.determine_block_hints(e),this.write_indicator("|"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),n=!0,f=o=0,p=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(l=e.slice(f,o),s=0,c=l.length;s=0)&&(i=e.slice(f,o),this.stream.write(i,this.encoding),null==r&&this.write_line_break(),f=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0),p.push(o++)}return p},n.prototype.write_plain=function(e,t){var n,r,i,o,a,s,c,l,p,f,h;if(null==t&&(t=!0),e){for(this.root_context&&(this.open_ended=!0),this.whitespace||(o=" ",this.column+=o.length,this.stream.write(o,this.encoding)),this.whitespace=!1,this.indentation=!1,f=!1,r=!1,h=a=0,p=[];a<=e.length;){if(i=e[a],f)" "!==i&&(h+1===a&&this.column>this.best_width&&t?(this.write_indent(),this.whitespace=!1,this.indentation=!1):(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding)),h=a);else if(r){if(u.call("\n…\u2028\u2029",i)<0){for("\n"===e[h]&&this.write_line_break(),l=e.slice(h,a),s=0,c=l.length;s=0)&&(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding),h=a);null!=i&&(f=" "===i,r=u.call("\n…\u2028\u2029",i)>=0),p.push(a++)}return p}},n.prototype.determine_block_hints=function(e){var t,n,r,i,o;return n="",t=e[0],r=e.length-2,o=e[r++],i=e[r++],u.call(" \n…\u2028\u2029",t)>=0&&(n+=this.best_indent),u.call("\n…\u2028\u2029",i)<0?n+="-":(1===e.length||u.call("\n…\u2028\u2029",o)>=0)&&(n+="+"),n},n.prototype.flush_stream=function(){var e;return"function"==typeof(e=this.stream).flush?e.flush():void 0},n.prototype.error=function(e,n){var r,i;throw n&&(n=null!=(r=null!=n&&null!=(i=n.constructor)?i.name:void 0)?r:o.inspect(n)),new t.EmitterError(""+e+(n?" "+n:""))},n}(),e=function(){function e(e,t,n,r,i,o,a,s){this.scalar=e,this.empty=t,this.multiline=n,this.allow_flow_plain=r,this.allow_block_plain=i,this.allow_single_quoted=o,this.allow_double_quoted=a,this.allow_block=s}return e}()}).call(this)},function(e,t,n){(function(){var e,t,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;t=n(854),r=n(856),i=n(858),e=n(855).YAMLError,this.SerializerError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Serializer=function(){function e(e){var t;t=null!=e?e:{},this.encoding=t.encoding,this.explicit_start=t.explicit_start,this.explicit_end=t.explicit_end,this.version=t.version,this.tags=t.tags,this.serialized_nodes={},this.anchors={},this.last_anchor_id=0,this.closed=null}return e.prototype.open=function(){if(null===this.closed)return this.emit(new t.StreamStartEvent(this.encoding)),this.closed=!1;throw this.closed?new SerializerError("serializer is closed"):new SerializerError("serializer is already open")},e.prototype.close=function(){if(null===this.closed)throw new SerializerError("serializer is not opened");if(!this.closed)return this.emit(new t.StreamEndEvent),this.closed=!0},e.prototype.serialize=function(e){if(null===this.closed)throw new SerializerError("serializer is not opened");if(this.closed)throw new SerializerError("serializer is closed");return null!=e&&(this.emit(new t.DocumentStartEvent(void 0,void 0,this.explicit_start,this.version,this.tags)),this.anchor_node(e),this.serialize_node(e),this.emit(new t.DocumentEndEvent(void 0,void 0,this.explicit_end))),this.serialized_nodes={},this.anchors={},this.last_anchor_id=0},e.prototype.anchor_node=function(e){var t,n,i,o,a,s,u,c,l,p,f,h,d,m;if(e.unique_id in this.anchors)return null!=(t=this.anchors)[c=e.unique_id]?t[c]:t[c]=this.generate_anchor(e);if(this.anchors[e.unique_id]=null,e instanceof r.SequenceNode){for(l=e.value,h=[],n=0,s=l.length;nn?p.push([l,s]):i[s]=this.yaml_path_resolvers[l][s]);else for(d=this.yaml_path_resolvers,a=0,c=d.length;a=0)return c[e];if(a.call(c,null)>=0)return c[null]}return e===t.ScalarNode?i:e===t.SequenceNode?o:e===t.MappingNode?n:void 0},e}(),this.Resolver=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return i(t,e),t}(this.BaseResolver),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:bool",/^(?:yes|Yes|YES|true|True|TRUE|on|On|ON|no|No|NO|false|False|FALSE|off|Off|OFF)$/,"yYnNtTfFoO"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:float",/^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)?|\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*|[-+]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/,"-+0123456789."),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:int",/^(?:[-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?0o[0-7_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$/,"-+0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:merge",/^(?:<<)$/,"<"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:null",/^(?:~|null|Null|NULL|)$/,["~","n","N",""]),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:timestamp",/^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?(?:[Tt]|[\x20\t]+)[0-9][0-9]?:[0-9][0-9]:[0-9][0-9](?:\.[0-9]*)?(?:[\x20\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$/,"0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:value",/^(?:=)$/,"="),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:yaml",/^(?:!|&|\*)$/,"!&*")}).call(this)},function(e,t,n){(function(){var e,t,r,i,o,a,s,u=[].slice;s=n(858),i=n(868),a=n(869),r=n(871),e=n(853),o=n(866),t=n(857),this.make_loader=function(n,c,l,p,f,h){var d,m;return null==n&&(n=i.Reader),null==c&&(c=a.Scanner),null==l&&(l=r.Parser),null==p&&(p=e.Composer),null==f&&(f=o.Resolver),null==h&&(h=t.Constructor),m=[n,c,l,p,f,h],d=function(){function e(e){var n,r,i;for(m[0].call(this,e),i=m.slice(1),n=0,r=i.length;n=0||"\r"===t&&"\n"!==this.string[this.index]?(this.line++,this.column=0):this.column++,n.push(e--);return n},n.prototype.get_mark=function(){return new e(this.line,this.column,this.string,this.index)},n.prototype.check_printable=function(){var e,n,i;if(n=r.exec(this.string))throw e=n[0],i=this.string.length-this.index+n.index,new t.ReaderError(i,e,"special characters are not allowed")},n}()}).call(this)},function(e,t,n){(function(){var e,r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].slice,c=[].indexOf||function(e){for(var t=0,n=this.length;t"===e&&0===this.flow_level)return this.fetch_folded();if("'"===e)return this.fetch_single();if('"'===e)return this.fetch_double();if(this.check_plain())return this.fetch_plain();throw new t.ScannerError("while scanning for the next token",null,"found character "+e+" that cannot start any token",this.get_mark())},e.prototype.next_possible_simple_key=function(){var e,t,n,r;n=null,r=this.possible_simple_keys;for(t in r)s.call(r,t)&&(e=r[t],(null===n||e.token_numbere;)t=this.get_mark(),this.indent=this.indents.pop(),n.push(this.tokens.push(new i.BlockEndToken(t,t)));return n}},e.prototype.add_indent=function(e){return e>this.indent&&(this.indents.push(this.indent),this.indent=e,!0)},e.prototype.fetch_stream_start=function(){var e;return e=this.get_mark(),this.tokens.push(new i.StreamStartToken(e,e,this.encoding))},e.prototype.fetch_stream_end=function(){var e;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_possible_simple_key=!1,this.possible_simple_keys={},e=this.get_mark(),this.tokens.push(new i.StreamEndToken(e,e)),this.done=!0},e.prototype.fetch_directive=function(){return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_directive())},e.prototype.fetch_document_start=function(){return this.fetch_document_indicator(i.DocumentStartToken)},e.prototype.fetch_document_end=function(){return this.fetch_document_indicator(i.DocumentEndToken)},e.prototype.fetch_document_indicator=function(e){var t;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,t=this.get_mark(),this.forward(3),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_sequence_start=function(){return this.fetch_flow_collection_start(i.FlowSequenceStartToken)},e.prototype.fetch_flow_mapping_start=function(){return this.fetch_flow_collection_start(i.FlowMappingStartToken)},e.prototype.fetch_flow_collection_start=function(e){var t;return this.save_possible_simple_key(),this.flow_level++,this.allow_simple_key=!0,t=this.get_mark(),this.forward(),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_sequence_end=function(){return this.fetch_flow_collection_end(i.FlowSequenceEndToken)},e.prototype.fetch_flow_mapping_end=function(){return this.fetch_flow_collection_end(i.FlowMappingEndToken)},e.prototype.fetch_flow_collection_end=function(e){var t;return this.remove_possible_simple_key(),this.flow_level--,this.allow_simple_key=!1,t=this.get_mark(),this.forward(),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_entry=function(){var e;return this.allow_simple_key=!0,this.remove_possible_simple_key(),e=this.get_mark(),this.forward(),this.tokens.push(new i.FlowEntryToken(e,this.get_mark()))},e.prototype.fetch_block_entry=function(){var e,n;if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"sequence entries are not allowed here",this.get_mark());this.add_indent(this.column)&&(e=this.get_mark(),this.tokens.push(new i.BlockSequenceStartToken(e,e)))}return this.allow_simple_key=!0,this.remove_possible_simple_key(),n=this.get_mark(),this.forward(),this.tokens.push(new i.BlockEntryToken(n,this.get_mark()))},e.prototype.fetch_key=function(){var e,n;if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"mapping keys are not allowed here",this.get_mark());this.add_indent(this.column)&&(e=this.get_mark(),this.tokens.push(new i.BlockMappingStartToken(e,e)))}return this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key(),n=this.get_mark(),this.forward(),this.tokens.push(new i.KeyToken(n,this.get_mark()))},e.prototype.fetch_value=function(){var e,n,r;if(e=this.possible_simple_keys[this.flow_level])delete this.possible_simple_keys[this.flow_level],this.tokens.splice(e.token_number-this.tokens_taken,0,new i.KeyToken(e.mark,e.mark)),0===this.flow_level&&this.add_indent(e.column)&&this.tokens.splice(e.token_number-this.tokens_taken,0,new i.BlockMappingStartToken(e.mark,e.mark)),this.allow_simple_key=!1;else{if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"mapping values are not allowed here",this.get_mark());this.add_indent(this.column)&&(n=this.get_mark(),this.tokens.push(new i.BlockMappingStartToken(n,n)))}this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key()}return r=this.get_mark(),this.forward(),this.tokens.push(new i.ValueToken(r,this.get_mark()))},e.prototype.fetch_alias=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(i.AliasToken))},e.prototype.fetch_anchor=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(i.AnchorToken))},e.prototype.fetch_tag=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_tag())},e.prototype.fetch_literal=function(){return this.fetch_block_scalar("|")},e.prototype.fetch_folded=function(){return this.fetch_block_scalar(">")},e.prototype.fetch_block_scalar=function(e){return this.allow_simple_key=!0,this.remove_possible_simple_key(),this.tokens.push(this.scan_block_scalar(e))},e.prototype.fetch_single=function(){return this.fetch_flow_scalar("'")},e.prototype.fetch_double=function(){return this.fetch_flow_scalar('"')},e.prototype.fetch_flow_scalar=function(e){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_flow_scalar(e))},e.prototype.fetch_plain=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_plain())},e.prototype.check_directive=function(){return 0===this.column},e.prototype.check_document_start=function(){var e;return 0===this.column&&"---"===this.prefix(3)&&(e=this.peek(3),c.call(n+l+"\0",e)>=0)},e.prototype.check_document_end=function(){var e;return 0===this.column&&"..."===this.prefix(3)&&(e=this.peek(3),c.call(n+l+"\0",e)>=0)},e.prototype.check_block_entry=function(){var e;return e=this.peek(1),c.call(n+l+"\0",e)>=0},e.prototype.check_key=function(){var e;return 0!==this.flow_level||(e=this.peek(1),c.call(n+l+"\0",e)>=0)},e.prototype.check_value=function(){var e;return 0!==this.flow_level||(e=this.peek(1),c.call(n+l+"\0",e)>=0)},e.prototype.check_plain=function(){var e,t;return e=this.peek(),c.call(n+l+"\0-?:,[]{}#&*!|>'\"%@`",e)<0||(t=this.peek(1),c.call(n+l+"\0",t)<0&&("-"===e||0===this.flow_level&&c.call("?:",e)>=0))},e.prototype.scan_to_next_token=function(){var e,t,r;for(0===this.index&&"\ufeff"===this.peek()&&this.forward(),e=!1,r=[];!e;){for(;" "===this.peek();)this.forward();if("#"===this.peek())for(;t=this.peek(),c.call(n+"\0",t)<0;)this.forward();this.scan_line_break()?0===this.flow_level?r.push(this.allow_simple_key=!0):r.push(void 0):r.push(e=!0)}return r},e.prototype.scan_directive=function(){var e,t,r,o,a;if(o=this.get_mark(),this.forward(),t=this.scan_directive_name(o),a=null,"YAML"===t)a=this.scan_yaml_directive_value(o),e=this.get_mark();else if("TAG"===t)a=this.scan_tag_directive_value(o),e=this.get_mark();else for(e=this.get_mark();r=this.peek(),c.call(n+"\0",r)<0;)this.forward();return this.scan_directive_ignored_line(o),new i.DirectiveToken(t,a,o,e)},e.prototype.scan_directive_name=function(e){var r,i,o;for(i=0,r=this.peek(i);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)i++,r=this.peek(i);if(0===i)throw new t.ScannerError("while scanning a directive",e,"expected alphanumeric or numeric character but found "+r,this.get_mark());if(o=this.prefix(i),this.forward(i),r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected alphanumeric or numeric character but found "+r,this.get_mark());return o},e.prototype.scan_yaml_directive_value=function(e){for(var r,i,o;" "===this.peek();)this.forward();if(r=this.scan_yaml_directive_number(e),"."!==this.peek())throw new t.ScannerError("while scanning a directive",e,"expected a digit or '.' but found "+this.peek(),this.get_mark());if(this.forward(),i=this.scan_yaml_directive_number(e),o=this.peek(),c.call(n+"\0 ",o)<0)throw new t.ScannerError("while scanning a directive",e,"expected a digit or ' ' but found "+this.peek(),this.get_mark());return[r,i]},e.prototype.scan_yaml_directive_number=function(e){var n,r,i,o;if(n=this.peek(),!("0"<=n&&n<="9"))throw new t.ScannerError("while scanning a directive",e,"expected a digit but found "+n,this.get_mark());for(r=0;"0"<=(i=this.peek(r))&&i<="9";)r++;return o=parseInt(this.prefix(r)),this.forward(r),o},e.prototype.scan_tag_directive_value=function(e){for(var t,n;" "===this.peek();)this.forward();for(t=this.scan_tag_directive_handle(e);" "===this.peek();)this.forward();return n=this.scan_tag_directive_prefix(e),[t,n]},e.prototype.scan_tag_directive_handle=function(e){var n,r;if(r=this.scan_tag_handle("directive",e),n=this.peek()," "!==n)throw new t.ScannerError("while scanning a directive",e,"expected ' ' but found "+n,this.get_mark());return r},e.prototype.scan_tag_directive_prefix=function(e){var r,i;if(i=this.scan_tag_uri("directive",e),r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected ' ' but found "+r,this.get_mark());return i},e.prototype.scan_directive_ignored_line=function(e){for(var r,i;" "===this.peek();)this.forward();if("#"===this.peek())for(;i=this.peek(),c.call(n+"\0",i)<0;)this.forward();if(r=this.peek(),c.call(n+"\0",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected a comment or a line break but found "+r,this.get_mark());return this.scan_line_break()},e.prototype.scan_anchor=function(e){var r,i,o,a,s,u;for(s=this.get_mark(),i=this.peek(),a="*"===i?"alias":"anchor",this.forward(),o=0,r=this.peek(o);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)o++,r=this.peek(o);if(0===o)throw new t.ScannerError("while scanning an "+a,s,"expected alphabetic or numeric character but found '"+r+"'",this.get_mark());if(u=this.prefix(o),this.forward(o),r=this.peek(),c.call(n+l+"\0?:,]}%@`",r)<0)throw new t.ScannerError("while scanning an "+a,s,"expected alphabetic or numeric character but found '"+r+"'",this.get_mark()); +return new e(u,s,this.get_mark())},e.prototype.scan_tag=function(){var e,r,o,a,s,u;if(a=this.get_mark(),e=this.peek(1),"<"===e){if(r=null,this.forward(2),s=this.scan_tag_uri("tag",a),">"!==this.peek())throw new t.ScannerError("while parsing a tag",a,"expected '>' but found "+this.peek(),this.get_mark());this.forward()}else if(c.call(n+l+"\0",e)>=0)r=null,s="!",this.forward();else{for(o=1,u=!1;c.call(n+"\0 ",e)<0;){if("!"===e){u=!0;break}o++,e=this.peek(o)}u?r=this.scan_tag_handle("tag",a):(r="!",this.forward()),s=this.scan_tag_uri("tag",a)}if(e=this.peek(),c.call(n+"\0 ",e)<0)throw new t.ScannerError("while scanning a tag",a,"expected ' ' but found "+e,this.get_mark());return new i.TagToken([r,s],a,this.get_mark())},e.prototype.scan_block_scalar=function(e){var t,r,a,s,u,l,p,f,h,d,m,y,v,g,_,b,x,w,k,S;for(u=">"===e,a=[],S=this.get_mark(),this.forward(),v=this.scan_block_scalar_indicators(S),r=v[0],l=v[1],this.scan_block_scalar_ignored_line(S),y=this.indent+1,y<1&&(y=1),null==l?(g=this.scan_block_scalar_indentation(),t=g[0],m=g[1],s=g[2],p=Math.max(y,m)):(p=y+l-1,_=this.scan_block_scalar_breaks(p),t=_[0],s=_[1]),d="";this.column===p&&"\0"!==this.peek();){for(a=a.concat(t),b=this.peek(),f=c.call(" \t",b)<0,h=0;x=this.peek(h),c.call(n+"\0",x)<0;)h++;if(a.push(this.prefix(h)),this.forward(h),d=this.scan_line_break(),w=this.scan_block_scalar_breaks(p),t=w[0],s=w[1],this.column!==p||"\0"===this.peek())break;u&&"\n"===d&&f&&(k=this.peek(),c.call(" \t",k)<0)?o.is_empty(t)&&a.push(" "):a.push(d)}return r!==!1&&a.push(d),r===!0&&(a=a.concat(t)),new i.ScalarToken(a.join(""),!1,S,s,e)},e.prototype.scan_block_scalar_indicators=function(e){var r,i,o;if(i=null,o=null,r=this.peek(),c.call("+-",r)>=0){if(i="+"===r,this.forward(),r=this.peek(),c.call(a,r)>=0){if(o=parseInt(r),0===o)throw new t.ScannerError("while scanning a block scalar",e,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward()}}else if(c.call(a,r)>=0){if(o=parseInt(r),0===o)throw new t.ScannerError("while scanning a block scalar",e,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward(),r=this.peek(),c.call("+-",r)>=0&&(i="+"===r,this.forward())}if(r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a block scalar",e,"expected chomping or indentation indicators, but found "+r,this.get_mark());return[i,o]},e.prototype.scan_block_scalar_ignored_line=function(e){for(var r,i;" "===this.peek();)this.forward();if("#"===this.peek())for(;i=this.peek(),c.call(n+"\0",i)<0;)this.forward();if(r=this.peek(),c.call(n+"\0",r)<0)throw new t.ScannerError("while scanning a block scalar",e,"expected a comment or a line break but found "+r,this.get_mark());return this.scan_line_break()},e.prototype.scan_block_scalar_indentation=function(){var e,t,r,i;for(e=[],r=0,t=this.get_mark();i=this.peek(),c.call(n+" ",i)>=0;)" "!==this.peek()?(e.push(this.scan_line_break()),t=this.get_mark()):(this.forward(),this.column>r&&(r=this.column));return[e,r,t]},e.prototype.scan_block_scalar_breaks=function(e){var t,r,i;for(t=[],r=this.get_mark();this.column=0;)for(t.push(this.scan_line_break()),r=this.get_mark();this.column=0)o.push(i),this.forward();else{if(!e||"\\"!==i)return o;if(this.forward(),i=this.peek(),i in f)o.push(f[i]),this.forward();else if(i in p){for(d=p[i],this.forward(),h=u=0,y=d;0<=y?uy;h=0<=y?++u:--u)if(v=this.peek(h),c.call(a+"ABCDEFabcdef",v)<0)throw new t.ScannerError("while scanning a double-quoted scalar",r,"expected escape sequence of "+d+" hexadecimal numbers, but found "+this.peek(h),this.get_mark());s=parseInt(this.prefix(d),16),o.push(String.fromCharCode(s)),this.forward(d)}else{if(!(c.call(n,i)>=0))throw new t.ScannerError("while scanning a double-quoted scalar",r,"found unknown escape character "+i,this.get_mark());this.scan_line_break(),o=o.concat(this.scan_flow_scalar_breaks(e,r))}}else o.push("'"),this.forward(2)}},e.prototype.scan_flow_scalar_spaces=function(e,r){var i,o,a,s,u,p,f;for(a=[],s=0;p=this.peek(s),c.call(l,p)>=0;)s++;if(f=this.prefix(s),this.forward(s),o=this.peek(),"\0"===o)throw new t.ScannerError("while scanning a quoted scalar",r,"found unexpected end of stream",this.get_mark());return c.call(n,o)>=0?(u=this.scan_line_break(),i=this.scan_flow_scalar_breaks(e,r),"\n"!==u?a.push(u):0===i.length&&a.push(" "),a=a.concat(i)):a.push(f),a},e.prototype.scan_flow_scalar_breaks=function(e,r){var i,o,a,s,u;for(i=[];;){if(o=this.prefix(3),"---"===o||"..."===o&&(a=this.peek(3),c.call(n+l+"\0",a)>=0))throw new t.ScannerError("while scanning a quoted scalar",r,"found unexpected document separator",this.get_mark());for(;s=this.peek(),c.call(l,s)>=0;)this.forward();if(u=this.peek(),!(c.call(n,u)>=0))return i;i.push(this.scan_line_break())}},e.prototype.scan_plain=function(){var e,r,o,a,s,u,p,f,h;for(r=[],h=o=this.get_mark(),a=this.indent+1,f=[];;){if(s=0,"#"===this.peek())break;for(;;){if(e=this.peek(s),c.call(n+l+"\0",e)>=0||0===this.flow_level&&":"===e&&(u=this.peek(s+1),c.call(n+l+"\0",u)>=0)||0!==this.flow_level&&c.call(",:?[]{}",e)>=0)break;s++}if(0!==this.flow_level&&":"===e&&(p=this.peek(s+1),c.call(n+l+"\0,[]{}",p)<0))throw this.forward(s),new t.ScannerError("while scanning a plain scalar",h,"found unexpected ':'",this.get_mark(),"Please check http://pyyaml.org/wiki/YAMLColonInFlowContext");if(0===s)break;if(this.allow_simple_key=!1,r=r.concat(f),r.push(this.prefix(s)),this.forward(s),o=this.get_mark(),f=this.scan_plain_spaces(a,h),null==f||0===f.length||"#"===this.peek()||0===this.flow_level&&this.column=0;)a++;if(m=this.prefix(a),this.forward(a),i=this.peek(),c.call(n,i)>=0){if(s=this.scan_line_break(),this.allow_simple_key=!0,u=this.prefix(3),"---"===u||"..."===u&&(f=this.peek(3),c.call(n+l+"\0",f)>=0))return;for(r=[];d=this.peek(),c.call(n+" ",d)>=0;)if(" "===this.peek())this.forward();else if(r.push(this.scan_line_break()),u=this.prefix(3),"---"===u||"..."===u&&(h=this.peek(3),c.call(n+l+"\0",h)>=0))return;"\n"!==s?o.push(s):0===r.length&&o.push(" "),o=o.concat(r)}else m&&o.push(m);return o},e.prototype.scan_tag_handle=function(e,n){var r,i,o;if(r=this.peek(),"!"!==r)throw new t.ScannerError("while scanning a "+e,n,"expected '!' but found "+r,this.get_mark());if(i=1,r=this.peek(i)," "!==r){for(;"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)i++,r=this.peek(i);if("!"!==r)throw this.forward(i),new t.ScannerError("while scanning a "+e,n,"expected '!' but found "+r,this.get_mark());i++}return o=this.prefix(i),this.forward(i),o},e.prototype.scan_tag_uri=function(e,n){var r,i,o;for(i=[],o=0,r=this.peek(o);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-;/?:@&=+$,_.!~*'()[]%",r)>=0;)"%"===r?(i.push(this.prefix(o)),this.forward(o),o=0,i.push(this.scan_uri_escapes(e,n))):o++,r=this.peek(o);if(0!==o&&(i.push(this.prefix(o)),this.forward(o),o=0),0===i.length)throw new t.ScannerError("while parsing a "+e,n,"expected URI but found "+r,this.get_mark());return i.join("")},e.prototype.scan_uri_escapes=function(e,n){var r,i,o,a;for(r=[],a=this.get_mark();"%"===this.peek();){for(this.forward(),o=i=0;i<=2;o=++i)throw new t.ScannerError("while scanning a "+e,n,"expected URI escape sequence of 2 hexadecimal numbers but found "+this.peek(o),this.get_mark());r.push(String.fromCharCode(parseInt(this.prefix(2),16))),this.forward(2)}return r.join("")},e.prototype.scan_line_break=function(){var e;return e=this.peek(),c.call("\r\n…",e)>=0?("\r\n"===this.prefix(2)?this.forward(2):this.forward(),"\n"):c.call("\u2028\u2029",e)>=0?(this.forward(),e):""},e}()}).call(this)},function(e,t){(function(){var e=function(e,n){function r(){this.constructor=e}for(var i in n)t.call(n,i)&&(e[i]=n[i]);return r.prototype=n.prototype,e.prototype=new r,e.__super__=n.prototype,e},t={}.hasOwnProperty;this.Token=function(){function e(e,t){this.start_mark=e,this.end_mark=t}return e}(),this.DirectiveToken=function(t){function n(e,t,n,r){this.name=e,this.value=t,this.start_mark=n,this.end_mark=r}return e(n,t),n.prototype.id="",n}(this.Token),this.DocumentStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.DocumentEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.StreamStartToken=function(t){function n(e,t,n){this.start_mark=e,this.end_mark=t,this.encoding=n}return e(n,t),n.prototype.id="",n}(this.Token),this.StreamEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockSequenceStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockMappingStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.FlowSequenceStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="[",n}(this.Token),this.FlowMappingStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="{",n}(this.Token),this.FlowSequenceEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="]",n}(this.Token),this.FlowMappingEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="}",n}(this.Token),this.KeyToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="?",n}(this.Token),this.ValueToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id=":",n}(this.Token),this.BlockEntryToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="-",n}(this.Token),this.FlowEntryToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id=",",n}(this.Token),this.AliasToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.AnchorToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.TagToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.ScalarToken=function(t){function n(e,t,n,r,i){this.value=e,this.plain=t,this.start_mark=n,this.end_mark=r,this.style=i}return e(n,t),n.prototype.id="",n}(this.Token)}).call(this)},function(e,t,n){(function(){var e,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty,s=[].slice;r=n(854),e=n(855).MarkedYAMLError,i=n(870),this.ParserError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Parser=function(){function e(){this.current_event=null,this.yaml_version=null,this.tag_handles={},this.states=[],this.marks=[],this.state="parse_stream_start"}var n;return n={"!":"!","!!":"tag:yaml.org,2002:"},e.prototype.dispose=function(){return this.states=[],this.state=null},e.prototype.check_event=function(){var e,t,n,r;if(t=1<=arguments.length?s.call(arguments,0):[],null===this.current_event&&null!=this.state&&(this.current_event=this[this.state]()),null!==this.current_event){if(0===t.length)return!0;for(n=0,r=t.length;n', but found "+this.peek_token().id,this.peek_token().start_mark);u=this.get_token(),e=u.end_mark,n=new r.DocumentStartEvent(a,e,!0,c,s),this.states.push("parse_document_end"),this.state="parse_document_content"}return n},e.prototype.parse_document_end=function(){var e,t,n,o,a;return a=this.peek_token(),o=e=a.start_mark,n=!1,this.check_token(i.DocumentEndToken)&&(a=this.get_token(),e=a.end_mark,n=!0),t=new r.DocumentEndEvent(o,e,n),this.state="parse_document_start",t},e.prototype.parse_document_content=function(){var e;return this.check_token(i.DirectiveToken,i.DocumentStartToken,i.DocumentEndToken,i.StreamEndToken)?(e=this.process_empty_scalar(this.peek_token().start_mark),this.state=this.states.pop(),e):this.parse_block_node()},e.prototype.process_directives=function(){var e,r,o,s,u,c,l,p,f,h;for(this.yaml_version=null,this.tag_handles={};this.check_token(i.DirectiveToken);)if(f=this.get_token(),"YAML"===f.name){if(null!==this.yaml_version)throw new t.ParserError(null,null,"found duplicate YAML directive",f.start_mark);if(u=f.value,r=u[0],o=u[1],1!==r)throw new t.ParserError(null,null,"found incompatible YAML document (version 1.* is required)",f.start_mark);this.yaml_version=f.value}else if("TAG"===f.name){if(c=f.value,e=c[0],s=c[1],e in this.tag_handles)throw new t.ParserError(null,null,"duplicate tag handle "+e,f.start_mark);this.tag_handles[e]=s}p=null,l=this.tag_handles;for(e in l)a.call(l,e)&&(s=l[e],null==p&&(p={}),p[e]=s);h=[this.yaml_version,p];for(e in n)a.call(n,e)&&(s=n[e],s in this.tag_handles||(this.tag_handles[e]=s));return h},e.prototype.parse_block_node=function(){return this.parse_node(!0)},e.prototype.parse_flow_node=function(){return this.parse_node()},e.prototype.parse_block_node_or_indentless_sequence=function(){return this.parse_node(!0,!0)},e.prototype.parse_node=function(e,n){var o,a,s,u,c,l,p,f,h,d,m;if(null==e&&(e=!1),null==n&&(n=!1),this.check_token(i.AliasToken))m=this.get_token(),s=new r.AliasEvent(m.value,m.start_mark,m.end_mark),this.state=this.states.pop();else{if(o=null,h=null,p=a=d=null,this.check_token(i.AnchorToken)?(m=this.get_token(),p=m.start_mark,a=m.end_mark,o=m.value,this.check_token(i.TagToken)&&(m=this.get_token(),d=m.start_mark,a=m.end_mark,h=m.value)):this.check_token(i.TagToken)&&(m=this.get_token(),p=d=m.start_mark,a=m.end_mark,h=m.value,this.check_token(i.AnchorToken)&&(m=this.get_token(),a=m.end_mark,o=m.value)),null!==h)if(u=h[0],f=h[1],null!==u){if(!(u in this.tag_handles))throw new t.ParserError("while parsing a node",p,"found undefined tag handle "+u,d);h=this.tag_handles[u]+f}else h=f;if(null===p&&(p=a=this.peek_token().start_mark),s=null,c=null===h||"!"===h,n&&this.check_token(i.BlockEntryToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a),this.state="parse_indentless_sequence_entry";else if(this.check_token(i.ScalarToken))m=this.get_token(),a=m.end_mark,c=m.plain&&null===h||"!"===h?[!0,!1]:null===h?[!1,!0]:[!1,!1],s=new r.ScalarEvent(o,h,c,m.value,p,a,m.style),this.state=this.states.pop();else if(this.check_token(i.FlowSequenceStartToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a,!0),this.state="parse_flow_sequence_first_entry";else if(this.check_token(i.FlowMappingStartToken))a=this.peek_token().end_mark,s=new r.MappingStartEvent(o,h,c,p,a,!0),this.state="parse_flow_mapping_first_key";else if(e&&this.check_token(i.BlockSequenceStartToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a,!1),this.state="parse_block_sequence_first_entry";else if(e&&this.check_token(i.BlockMappingStartToken))a=this.peek_token().end_mark,s=new r.MappingStartEvent(o,h,c,p,a,!1),this.state="parse_block_mapping_first_key";else{if(null===o&&null===h)throw l=e?"block":"flow",m=this.peek_token(),new t.ParserError("while parsing a "+l+" node",p,"expected the node content, but found "+m.id,m.start_mark);s=new r.ScalarEvent(o,h,[c,!1],"",p,a),this.state=this.states.pop()}}return s},e.prototype.parse_block_sequence_first_entry=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_block_sequence_entry()},e.prototype.parse_block_sequence_entry=function(){var e,n;if(this.check_token(i.BlockEntryToken))return n=this.get_token(),this.check_token(i.BlockEntryToken,i.BlockEndToken)?(this.state="parse_block_sequence_entry",this.process_empty_scalar(n.end_mark)):(this.states.push("parse_block_sequence_entry"),this.parse_block_node());if(!this.check_token(i.BlockEndToken))throw n=this.peek_token(),new t.ParserError("while parsing a block collection",this.marks.slice(-1)[0],"expected , but found "+n.id,n.start_mark);return n=this.get_token(),e=new r.SequenceEndEvent(n.start_mark,n.end_mark),this.state=this.states.pop(),this.marks.pop(),e},e.prototype.parse_indentless_sequence_entry=function(){var e,t;return this.check_token(i.BlockEntryToken)?(t=this.get_token(),this.check_token(i.BlockEntryToken,i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_indentless_sequence_entry",this.process_empty_scalar(t.end_mark)):(this.states.push("parse_indentless_sequence_entry"),this.parse_block_node())):(t=this.peek_token(),e=new r.SequenceEndEvent(t.start_mark,t.start_mark),this.state=this.states.pop(),e)},e.prototype.parse_block_mapping_first_key=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_block_mapping_key()},e.prototype.parse_block_mapping_key=function(){var e,n;if(this.check_token(i.KeyToken))return n=this.get_token(),this.check_token(i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_block_mapping_value",this.process_empty_scalar(n.end_mark)):(this.states.push("parse_block_mapping_value"),this.parse_block_node_or_indentless_sequence());if(!this.check_token(i.BlockEndToken))throw n=this.peek_token(),new t.ParserError("while parsing a block mapping",this.marks.slice(-1)[0],"expected , but found "+n.id,n.start_mark);return n=this.get_token(),e=new r.MappingEndEvent(n.start_mark,n.end_mark),this.state=this.states.pop(),this.marks.pop(),e},e.prototype.parse_block_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_block_mapping_key",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_block_mapping_key"),this.parse_block_node_or_indentless_sequence())):(this.state="parse_block_mapping_key",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_sequence_first_entry=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_flow_sequence_entry(!0)},e.prototype.parse_flow_sequence_entry=function(e){var n,o;if(null==e&&(e=!1),!this.check_token(i.FlowSequenceEndToken)){if(!e){if(!this.check_token(i.FlowEntryToken))throw o=this.peek_token(),new t.ParserError("while parsing a flow sequence",this.marks.slice(-1)[0],"expected ',' or ']', but got "+o.id,o.start_mark);this.get_token()}if(this.check_token(i.KeyToken))return o=this.peek_token(),n=new r.MappingStartEvent(null,null,!0,o.start_mark,o.end_mark,!0),this.state="parse_flow_sequence_entry_mapping_key",n;if(!this.check_token(i.FlowSequenceEndToken))return this.states.push("parse_flow_sequence_entry"),this.parse_flow_node()}return o=this.get_token(),n=new r.SequenceEndEvent(o.start_mark,o.end_mark),this.state=this.states.pop(),this.marks.pop(),n},e.prototype.parse_flow_sequence_entry_mapping_key=function(){var e;return e=this.get_token(),this.check_token(i.ValueToken,i.FlowEntryToken,i.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_value",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_value"),this.parse_flow_node())},e.prototype.parse_flow_sequence_entry_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.FlowEntryToken,i.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_end",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_end"),this.parse_flow_node())):(this.state="parse_flow_sequence_entry_mapping_end",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_sequence_entry_mapping_end=function(){var e;return this.state="parse_flow_sequence_entry",e=this.peek_token(),new r.MappingEndEvent(e.start_mark,e.start_mark)},e.prototype.parse_flow_mapping_first_key=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_flow_mapping_key(!0)},e.prototype.parse_flow_mapping_key=function(e){var n,o;if(null==e&&(e=!1),!this.check_token(i.FlowMappingEndToken)){if(!e){if(!this.check_token(i.FlowEntryToken))throw o=this.peek_token(),new t.ParserError("while parsing a flow mapping",this.marks.slice(-1)[0],"expected ',' or '}', but got "+o.id,o.start_mark);this.get_token()}if(this.check_token(i.KeyToken))return o=this.get_token(),this.check_token(i.ValueToken,i.FlowEntryToken,i.FlowMappingEndToken)?(this.state="parse_flow_mapping_value",this.process_empty_scalar(o.end_mark)):(this.states.push("parse_flow_mapping_value"),this.parse_flow_node());if(!this.check_token(i.FlowMappingEndToken))return this.states.push("parse_flow_mapping_empty_value"),this.parse_flow_node()}return o=this.get_token(),n=new r.MappingEndEvent(o.start_mark,o.end_mark),this.state=this.states.pop(),this.marks.pop(),n},e.prototype.parse_flow_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.FlowEntryToken,i.FlowMappingEndToken)?(this.state="parse_flow_mapping_key",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_mapping_key"),this.parse_flow_node())):(this.state="parse_flow_mapping_key",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_mapping_empty_value=function(){return this.state="parse_flow_mapping_key",this.process_empty_scalar(this.peek_token().start_mark)},e.prototype.process_empty_scalar=function(e){return new r.ScalarEvent(null,null,[!0,!1],"",e,e)},e}()}).call(this)},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./composer":853,"./composer.js":853,"./constructor":857,"./constructor.js":857,"./dumper":862,"./dumper.js":862,"./emitter":863,"./emitter.js":863,"./errors":855,"./errors.js":855,"./events":854,"./events.js":854,"./loader":867,"./loader.js":867,"./nodes":856,"./nodes.js":856,"./parser":871,"./parser.js":871,"./reader":868,"./reader.js":868,"./representer":865,"./representer.js":865,"./resolver":866,"./resolver.js":866,"./scanner":869,"./scanner.js":869,"./serializer":864,"./serializer.js":864,"./tokens":870,"./tokens.js":870,"./util":858,"./util.js":858,"./yaml":852,"./yaml.js":852};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=872},function(e,t){},function(e,t,n){var r=n(875),i=n(876),o=r(i);e.exports=o},function(e,t,n){function r(e){return function(t,n,r){var s=Object(t);if(!o(t)){var u=i(n,3);t=a(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,r);return c>-1?s[u?t[c]:c]:void 0}}var i=n(400),o=n(437),a=n(421);e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var u=null==n?0:a(n);return u<0&&(u=s(r+u,0)),i(e,o(t,3),u)}var i=n(877),o=n(400),a=n(878),s=Math.max;e.exports=r},function(e,t){function n(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o2&&void 0!==arguments[2]?arguments[2]:"";return(e.operationId||"").replace(/\s/g,"").length?b(e.operationId):o(t,n)}function o(e,t){return""+_(t)+b(e)}function a(e,t){return _(t)+"-"+e}function s(e,t){return e&&e.paths?u(e,function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==(void 0===o?"undefined":(0,y.default)(o)))return!1;var s=o.operationId;return[i(o,n,r),a(n,r),s].some(function(e){return e&&e===t})}):null}function u(e,t){return c(e,t,!0)||null}function c(e,t,n){if(!e||"object"!==(void 0===e?"undefined":(0,y.default)(e))||!e.paths||"object"!==(0,y.default)(e.paths))return null;var r=e.paths;for(var i in r)for(var o in r[i])if("PARAMETERS"!==o.toUpperCase()){var a=r[i][o];if(a&&"object"===(void 0===a?"undefined":(0,y.default)(a))){var s={spec:e,pathName:i,method:o.toUpperCase(),operation:a},u=t(s);if(n&&u)return s}}}function l(e){var t=e.spec,n=t.paths,r={};if(!n)return e;for(var o in n){var a=n[o];if((0,g.default)(a)){var s=a.parameters;for(var u in a)!function(e){var n=a[e];if(!(0,g.default)(n))return"continue";var u=i(n,o,e);if(u&&(r[u]?r[u].push(n):r[u]=[n],(0,d.default)(r).forEach(function(e){r[e].length>1?r[e].forEach(function(t,n){t.operationId=""+e+(n+1)}):void 0!==n.operationId&&(n.__originalOperationId=n.operationId,n.operationId=e)})),"parameters"!==e){var c=[],l={};for(var p in t)"produces"!==p&&"consumes"!==p&&"security"!==p||(l[p]=t[p],c.push(l));if(s&&(l.parameters=s,c.push(l)),c.length){var h=!0,m=!1,y=void 0;try{for(var v,_=(0,f.default)(c);!(h=(v=_.next()).done);h=!0){var b=v.value;for(var x in b)if(n[x]){if("parameters"===x){var w=!0,k=!1,S=void 0;try{for(var E,C=(0,f.default)(b[x]);!(w=(E=C.next()).done);w=!0)!function(){var e=E.value;n[x].some(function(t){return t.name===e.name})||n[x].push(e)}()}catch(e){k=!0,S=e}finally{try{!w&&C.return&&C.return()}finally{if(k)throw S}}}}else n[x]=b[x]}}catch(e){m=!0,y=e}finally{try{!h&&_.return&&_.return()}finally{if(m)throw y}}}}}(u)}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=n(10),f=r(p),h=n(0),d=r(h),m=n(5),y=r(m);t.opId=i,t.idFromPathMethod=o,t.legacyIdFromPathMethod=a,t.getOperationRaw=s,t.findOperation=u,t.eachOperation=c,t.normalizeSwagger=l;var v=n(40),g=r(v),_=function(e){return String.prototype.toLowerCase.call(e)},b=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){if(n=n||{},t=(0,q.default)({},t,{path:t.path&&o(t.path)}),"merge"===t.op){var r=s(t.path);W.default.apply(e,[r]),(0,q.default)(r.value,t.value)}else if("mergeDeep"===t.op){var i=s(t.path);W.default.apply(e,[i]),(0,J.default)(i.value,t.value)}else if(W.default.apply(e,[t]),n.allowMetaPatches&&t.meta&&M(t)&&(Array.isArray(t.value)||S(t.value))){var a=s(t.path);W.default.apply(e,[a]),(0,q.default)(a.value,t.meta)}return e}function o(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function a(e,t){return{op:"add",path:e,value:t}}function s(e){return{op:"_get",path:e}}function u(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function c(e,t){return{op:"remove",path:e}}function l(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function p(e,t){return{type:"mutation", +op:"mergeDeep",path:e,value:t}}function f(e,t){return{type:"context",path:e,value:t}}function h(e,t){try{return m(e,v,t)}catch(e){return e}}function d(e,t){try{return m(e,y,t)}catch(e){return e}}function m(e,t,n){return k(w(e.filter(M).map(function(e){return t(e.value,n,e.path)})||[]))}function y(e,t,n){return n=n||[],Array.isArray(e)?e.map(function(e,r){return y(e,t,n.concat(r))}):S(e)?(0,L.default)(e).map(function(r){return y(e[r],t,n.concat(r))}):t(e,n[n.length-1],n)}function v(e,t,n){n=n||[];var r=[];if(n.length>0){var i=t(e,n[n.length-1],n);i&&(r=r.concat(i))}if(Array.isArray(e)){var o=e.map(function(e,r){return v(e,t,n.concat(r))});o&&(r=r.concat(o))}else if(S(e)){var a=(0,L.default)(e).map(function(r){return v(e[r],t,n.concat(r))});a&&(r=r.concat(a))}return r=w(r)}function g(e,t){if(!Array.isArray(t))return!1;for(var n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,b.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},T.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),fetch(t.url,t).then(function(n){var r=T.serializeRes(n,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!n.ok){var i=new Error(n.statusText);return i.statusCode=i.status=n.status,r.then(function(e){throw i.response=e,i},function(e){throw i.responseError=e,i})}return r})}function o(e){return/json/.test(e)||/xml/.test(e)||/yaml/.test(e)||/text/.test(e)}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.loadSpec,i=void 0!==r&&r,a={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:s(e.headers)},u=i||o(a.headers["content-type"]);return(u?e.text:e.blob||e.buffer).call(e).then(function(e){if(a.text=e,a.data=e,u)try{var t=S.default.safeLoad(e);a.body=t,a.obj=t}catch(e){a.parseError=e}return a})}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,n){void 0!==t[n]?(t[n]=Array.isArray(t[n])?t[n]:[t[n]],t[n].push(e)):t[n]=e}),t):t}function u(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,b.default)(e))&&"function"==typeof e.pipe}function c(e,t){var n=e.value,r=e.collectionFormat,i=e.allowEmptyValue,o={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===n&&i)return"";if(u(n))return n;var a=encodeURIComponent;return t&&(a=(0,A.default)(n)?function(e){return e}:function(e){return(0,g.default)(e)}),n&&!Array.isArray(n)?a(n):Array.isArray(n)&&!r?n.map(a).join(","):"multi"===r?n.map(a):n.map(a).join(o[r])}function l(e){var t=(0,y.default)(e).reduce(function(t,n){var r=e[n],i=encodeURIComponent(n),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}(r)&&!Array.isArray(r);return t[i]=c(o?r:{value:r}),t},{});return w.default.stringify(t,{encode:!1,indices:!1})||""}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?"":t,i=e.query,o=e.form;if(o){var a=(0,y.default)(o).some(function(e){return u(o[e].value)}),s=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(s)){var p=n(35);e.body=new p,(0,y.default)(o).forEach(function(t){e.body.append(t,c(o[t],!0))})}else e.body=l(o);delete e.form}if(i){var f=r.split("?"),h=(0,d.default)(f,2),m=h[0],v=h[1],g="";if(v){var _=w.default.parse(v);(0,y.default)(i).forEach(function(e){return delete _[e]}),g=w.default.stringify(_,{encode:!0})}var b=function(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof i))return new i(n);(0,c.default)(this,n);var r=this.resolve().then(function(){return t.disableInterfaces||(0,c.default)(t,i.makeApisTagOperation(t)),t});return r.client=this,r}var o=n(4),a=r(o),s=n(37),u=(r(s),n(8)),c=r(u),l=n(6),p=r(l),f=n(19),h=r(f),d=n(9),m=r(d),y=n(18),v=n(17),g=n(2);i.http=p.default,i.makeHttp=l.makeHttp.bind(null,i.http),i.resolve=h.default,i.execute=v.execute,i.serializeRes=l.serializeRes,i.serializeHeaders=l.serializeHeaders,i.clearCache=f.clearCache,i.parameterBuilders=v.PARAMETER_BUILDERS,i.makeApisTagOperation=y.makeApisTagOperation,i.buildRequest=v.buildRequest,i.helpers={opId:g.opId},e.exports=i,i.prototype={http:p.default,execute:function(e){return this.applyDefaults(),i.execute((0,a.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return i.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},i.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&t.startsWith("http")){var n=m.default.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.http,n=e.fetch,r=e.spec,i=e.operationId,o=e.pathName,a=e.method,s=e.parameters,u=e.securities,c=(0,b.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||n||I.default,o&&a&&!i&&(i=(0,j.legacyIdFromPathMethod)(o,a));var l=N.buildRequest((0,g.default)({spec:r,operationId:i,parameters:s,securities:u},c));return l.body&&((0,E.default)(l.body)||(0,A.default)(l.body))&&(l.body=(0,y.default)(l.body)),t(l)}function o(e){var t=e.spec,n=e.operationId,r=e.parameters,i=e.securities,o=e.requestContentType,a=e.responseContentType,s=e.parameterBuilders,u=e.scheme,c=e.requestInterceptor,l=e.responseInterceptor,h=e.contextUrl;s=s||F;var d={url:p({spec:t,scheme:u,contextUrl:h}),credentials:"same-origin",headers:{}};if(c&&(d.requestInterceptor=c),l&&(d.responseInterceptor=l),!n)return d;var m=(0,j.getOperationRaw)(t,n),y=m.operation,v=void 0===y?{}:y,g=m.method,_=m.pathName;return d.url+=_,d.method=(""+g).toUpperCase(),r=r||{},a&&(d.headers.accept=a),R(v.parameters).concat(R(t.paths[_].parameters)).forEach(function(e){var n=s[e.in],i=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(i=r),i=e&&e.name&&r[e.name],void 0!==e.default&&void 0===i&&(i=e.default),void 0===i&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");n&&n({req:d,parameter:e,value:i,operation:v,spec:t})}),d=f({request:d,securities:i,operation:v,spec:t}),(d.body||d.form)&&(o?d.headers["content-type"]=o:Array.isArray(v.consumes)?d.headers["content-type"]=v.consumes[0]:Array.isArray(t.consumes)?d.headers["content-type"]=t.consumes[0]:v.parameters.filter(function(e){return"file"===e.type}).length?d.headers["content-type"]="multipart/form-data":v.parameters.filter(function(e){return"formData"===e.in}).length&&(d.headers["content-type"]="application/x-www-form-urlencoded")),(0,P.mergeInQueryOrForm)(d),d}function a(e){var t=e.req,n=e.value;t.body=n}function s(e){var t=e.req,n=e.value,r=e.parameter;t.form=t.form||{},(n||r.allowEmptyValue)&&(t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}function u(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)}function c(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.replace("{"+r.name+"}",encodeURIComponent(n))}function l(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue){var i=r.name;t.query[i]=t.query[i]||{},t.query[i].allowEmptyValue=!0}}function p(e){var t=e.spec,n=e.scheme,r=e.contextUrl,i=void 0===r?"":r,o=M.default.parse(i),a=Array.isArray(t.schemes)?t.schemes[0]:null,s=n||a||B(o.protocol)||"http",u=t.host||o.host||"",c=t.basePath||"";if(s&&u){var l=s+"://"+(u+c);return"/"===l[l.length-1]?l.slice(0,-1):l}return""}function f(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,i=e.operation,o=void 0===i?{}:i,a=e.spec,s=(0,w.default)({},t),u=r.authorized,c=void 0===u?{}:u,l=r.specSecurity,p=void 0===l?{}:l,f=o.security||p,h=c&&!!(0,d.default)(c).length,m=a.securityDefinitions;return s.headers=s.headers||{},s.query=s.query||{},(0,d.default)(r).length&&h&&f&&(!Array.isArray(o.security)||o.security.length)?(f.forEach(function(e,t){for(var n in e){var r=c[n];if(r){var i=r.token,o=r.value||r,a=m[n],u=a.type,l=i&&i.access_token,p=i&&i.token_type;if(r)if("apiKey"===u){var f="query"===a.in?"query":"headers";s[f]=s[f]||{},s[f][a.name]=o}else"basic"===u?o.header?s.headers.authorization=o.header:(o.base64=(0,O.default)(o.username+":"+o.password),s.headers.authorization="Basic "+o.base64):"oauth2"===u&&(s.headers.authorization=(p||"Bearer")+" "+l)}}}),s):t}Object.defineProperty(t,"__esModule",{value:!0}),t.PARAMETER_BUILDERS=t.self=void 0;var h=n(0),d=r(h),m=n(7),y=r(m),v=n(4),g=r(v),_=n(29),b=r(_);t.execute=i,t.buildRequest=o,t.bodyBuilder=a,t.formDataBuilder=s,t.headerBuilder=u,t.pathBuilder=c,t.queryBuilder=l,t.baseUrl=p,t.applySecurities=f;var x=n(8),w=r(x),k=n(38),S=(r(k),n(41)),E=r(S),C=n(39),A=r(C),T=n(32),O=r(T),D=n(9),M=r(D),P=n(6),I=r(P),j=n(2),R=function(e){return Array.isArray(e)?e:[]},N=t.self={buildRequest:o},F=t.PARAMETER_BUILDERS={body:a,header:u,query:l,path:c,formData:s},B=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,i=t.operationId;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,c.default)({spec:e.spec},(0,p.default)(e,"requestInterceptor","responseInterceptor"),{pathName:n,method:r,parameters:t,operationId:i},o))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=m.makeExecute(e),n=m.mapTagOperations({spec:e.spec,cb:t}),r={};for(var i in n){r[i]={operations:{}};for(var o in n[i])r[i].operations[o]={execute:n[i][o]}}return{apis:r}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=m.makeExecute(e);return{apis:m.mapTagOperations({spec:e.spec,cb:t})}}function s(e){var t=e.spec,n=e.cb,r=void 0===n?h:n,i=e.defaultTag,o=void 0===i?"default":i,a={},s={};return(0,f.eachOperation)(t,function(e){var n=e.pathName,i=e.method,u=e.operation;(u.tags?d(u.tags):[o]).forEach(function(e){if("string"==typeof e){var o=s[e]=s[e]||{},c=(0,f.opId)(u,n,i),l=r({spec:t,pathName:n,method:i,operation:u,operationId:c});if(a[c])a[c]=a[c]+1,o[""+c+a[c]]=l;else if(void 0!==o[c]){var p=a[c]||1;a[c]=p+1,o[""+c+a[c]]=l;var h=o[c];delete o[c],o[""+c+p]=h}else o[c]=l}})}),s}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var u=n(4),c=r(u);t.makeExecute=i,t.makeApisTagOperationsOperationExecute=o,t.makeApisTagOperation=a,t.mapTagOperations=s;var l=n(43),p=r(l),f=n(2),h=function(){return null},d=function(e){return Array.isArray(e)?e:[e]},m=t.self={mapTagOperations:s,makeExecute:i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return function(t){return e({url:t,loadSpec:!0,headers:{Accept:"application/json"}}).then(function(e){return e.body})}}function o(){c.plugins.refs.clearCache()}function a(e){function t(e){s&&(c.plugins.refs.docCache[s]=e),c.plugins.refs.fetchJSON=i(n);var t=[c.plugins.refs];return"function"==typeof y&&t.push(c.plugins.parameters),"function"==typeof m&&t.push(c.plugins.properties),"strict"!==f&&t.push(c.plugins.allOf),(0,l.default)({spec:e,context:{baseDoc:s},plugins:t,allowMetaPatches:d,parameterMacro:y,modelPropertyMacro:m}).then(p.normalizeSwagger)}var n=e.http,r=e.fetch,o=e.spec,a=e.url,s=e.baseDoc,f=e.mode,h=e.allowMetaPatches,d=void 0===h||h,m=e.modelPropertyMacro,y=e.parameterMacro;return s=s||a,n=r||n||u.default,o?t(o):i(n)(s).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=i,t.clearCache=o,t.default=a;var s=n(6),u=r(s),c=n(20),l=r(c),p=n(2)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return new R(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var o=n(7),a=r(o),s=n(11),u=r(s),c=n(14),l=r(c),p=n(0),f=r(p),h=n(10),d=r(h),m=n(27),y=r(m),v=n(1),g=r(v),_=n(12),b=r(_),x=n(13),w=r(x);t.default=i;var k=n(3),S=r(k),E=n(26),C=r(E),A=n(21),T=r(A),O=n(24),D=r(O),M=n(25),P=r(M),I=n(22),j=r(I),R=function(){function e(t){(0,b.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new j.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,y.default)(this),S.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(S.default.isFunction),this.patches.push(S.default.add([],this.spec)),this.patches.push(S.default.context([],this.context)),this.updatePatches(this.patches)}return(0,w.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return u.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;S.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void n.errors.push(e);try{if(!S.default.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),S.default.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(S.default.isContextPatch(e))return void n.setContext(e.path,e.value);if(S.default.isMutation(e))return void n.updateMutations(e)}catch(e){n.errors.push(e)}})}},{key:"updateMutations",value:function(e){S.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);return t<0?void this.debug("Tried to remove a promisedPatch that isn't there!"):void this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(n){var r=(0,g.default)({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)}).catch(function(n){t.removePromisedPatch(e),t.updatePatches(n)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return S.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,a.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=S.default.fullyNormalizeArray(e),n.updatePatches(e,r))}var t=this,n=this,r=this.nextPlugin();if(!r){var i=this.nextPromisedPatch();if(i)return i.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),u.default.resolve(o)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return u.default.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(r!==this.currentPlugin&&this.promisedPatches.length){var a=this.promisedPatches.map(function(e){return e.value});return u.default.all(a.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){n.currentPlugin=r;var t=n.getCurrentMutations(),i=n.mutations.length-1;try{if(r.isGenerator){var o=!0,a=!1,s=void 0;try{for(var u,c=(0,d.default)(r(t,n.getLib()));!(o=(u=c.next()).done);o=!0)e(u.value)}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}}else e(r(t,n.getLib()))}catch(t){e([(0,g.default)((0,y.default)(t),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:i})}return n.dispatch()}()}}]),e}(),N={refs:C.default,allOf:T.default,parameters:D.default,properties:P.default};t.SpecMap=R,t.plugins=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={key:"allOf",plugin:function(e,t,n,r,i){if(!i.meta||!i.meta.$$ref){if(!Array.isArray(e)){var o=new TypeError("allOf must be an array");return o.fullPath=n,o}var a=n.slice(0,-1),s=!1;return[r.replace(a,{})].concat(e.map(function(e,t){if(!r.isObject(e)){if(s)return null;s=!0;var i=new TypeError("Elements in allOf must be objects");return i.fullPath=n,i}return r.mergeDeep(a,e)}))}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return o({children:{}},e,t)}function o(e,t,n){return e.value=t||{},e.protoValue=n?(0,c.default)({},n.protoValue,e.value):e.value,(0,s.default)(e.children).forEach(function(t){var n=e.children[t];e.children[t]=o(n,n.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=r(a),u=n(4),c=r(u),l=n(12),p=r(l),f=n(13),h=r(f),d=function(){function e(t){(0,p.default)(this,e),this.root=i(t||{})}return(0,h.default)(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(!n)return void o(this.root,t,null);var r=e[e.length-1],a=n.children;return a[r]?void o(a[r],t,n):void(a[r]=i(t,n))}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,n=void 0,r=void 0,i=0;i")+"#"+e;if(t==r.contextTree.get([]).baseDoc&&y(o,e))return!0;var s="";return!!n.some(function(e){return s=s+"/"+d(e),i[s]&&i[s].some(function(e){return y(e,a)||y(a,e)})})||void(i[o]=(i[o]||[]).concat(a))}function g(e,t){function n(e){return j.default.isObject(e)&&(r.indexOf(e)>=0||(0,w.default)(e).some(function(t){return n(e[t])}))}var r=[e];return t.path.reduce(function(e,t){return r.push(e[t]),e[t]},e),n(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var _=n(5),b=r(_),x=n(0),w=r(x),k=n(11),S=r(k),E=n(28),C=r(E),A=n(1),T=r(A),O=n(15),D=r(O),M=n(9),P=r(M),I=n(3),j=r(I),R=n(23),N=r(R),F=new RegExp("^([a-z]+://|//)","i"),B=(0,N.default)("JSONRefError",function(e,t,n){this.originalError=n,(0,T.default)(this,t||{})}),L={},z=new C.default,q={key:"$ref",plugin:function(e,t,n,r){var u=n.slice(0,-1),c=r.getContext(n).baseDoc;if("string"!=typeof e)return new B("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:c,fullPath:n});var l=a(e),p=l[0],h=l[1]||"",d=void 0;try{d=c||p?i(p,c):null}catch(t){return o(t,{pointer:h,$ref:e,basePath:d,fullPath:n})}var m=void 0,y=void 0;if(!v(h,d,u,r)){if(null==d?(y=f(h),void 0===(m=r.get(y))&&(m=new B("Could not resolve reference: "+e,{pointer:h,$ref:e,baseDoc:c,fullPath:n}))):(m=s(d,h),m=null!=m.__value?m.__value:m.catch(function(t){throw o(t,{pointer:h,$ref:e,baseDoc:c,fullPath:n})})),m instanceof Error)return[j.default.remove(n),m];var _=j.default.replace(u,m,{$$ref:e});return d&&d!==c?[_,j.default.context(u,{baseDoc:d})]:g(r.state,_)?void 0:_}}},U=(0,T.default)(q,{docCache:L,absoluteify:i,clearCache:u,JSONRefError:B,wrapError:o,getDoc:c,split:a,extractFromDoc:s,fetchJSON:l,extract:p,jsonPointerToArray:f,unescapeJsonPointerToken:h});t.default=U;var W=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=n(1037)},function(e,t){e.exports=n(1040)},function(e,t){e.exports=n(1048)},function(e,t){e.exports=n(1049)},function(e,t){e.exports=n(1053)},function(e,t){e.exports=n(1058)},function(e,t){e.exports=n(298)},function(e,t){e.exports=n(1059)},function(e,t){e.exports=n(1060)},function(e,t){e.exports=n(583)},function(e,t){e.exports=n(1061)},function(e,t){e.exports=n(1129)},function(e,t){e.exports=n(999)},function(e,t){e.exports=n(980)},function(e,t){e.exports=n(1140)},function(e,t){e.exports=n(1141)},function(e,t){e.exports=n(1142)},function(e,t){e.exports=n(1150)},function(e,t,n){e.exports=n(16)}])},function(e,t,n){e.exports={default:n(885),__esModule:!0}},function(e,t,n){n(886),e.exports=n(906).Object.keys},[1415,887,889,904],[1413,888],35,[1394,890,903],[1395,891,892,895,899],5,[1396,893,888],[1397,894],34,[1398,892,896,898],[1399,897],38,[1400,897],[1401,900,902],[1388,901],4,19,41,[1412,905,906,915],function(e,t,n){var r=n(901),i=n(906),o=n(907),a=n(909),s="prototype",u=function(e,t,n){var c,l,p,f=e&u.F,h=e&u.G,d=e&u.S,m=e&u.P,y=e&u.B,v=e&u.W,g=h?i:i[t]||(i[t]={}),_=g[s],b=h?r:d?r[t]:(r[t]||{})[s];h&&(n=t);for(c in n)l=!f&&b&&void 0!==b[c],l&&c in g||(p=l?b[c]:n[c],g[c]=h&&"function"!=typeof b[c]?n[c]:y&&l?o(p,r):v&&b[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):m&&"function"==typeof p?o(Function.call,p):p,m&&((g.virtual||(g.virtual={}))[c]=p,e&u.R&&_&&!_[c]&&a(_,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},9,[1386,908],21,[1380,910,918,914],[1381,911,913,917,914],[1382,912],13,[1383,914,915,916],[1379,915],7,[1384,912,901],[1385,912],17,function(e,t,n){e.exports={default:n(920),__esModule:!0}},function(e,t,n){n(921),e.exports=n(906).Object.assign},[1416,905,922],[1417,889,923,924,887,893,915],43,44,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(919),o=r(i);t.default=o.default||function(e){for(var t=1;t1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=500,i=16,o=Date.now;e.exports=n},[1483,966,989,991,980],[1474,979,990],431,428,435,[1470,994,1e3,989],function(e,t,n){function r(e,t){var n=a(e)||o(e)?i(e.length,String):[],r=n.length,u=!!r;for(var l in e)!t&&!c.call(e,l)||u&&("length"==l||s(l,r))||n.push(l);return n}var i=n(995),o=n(996),a=n(999),s=n(991),u=Object.prototype,c=u.hasOwnProperty;e.exports=r},423,function(e,t,n){function r(e){return i(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==o)}var i=n(997),o="[object Arguments]",a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return o(e)&&i(e)}var i=n(989),o=n(998);e.exports=r},315,346,[1472,992,1001],[1473,1002],314,function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(1004),c=n(1005);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),y=["%","/","?",";","#"].concat(m),v=["/","?","#"],g=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=n(1006);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?"x":j[N];if(!R.match(_)){var B=P.slice(0,A),L=P.slice(A+1),z=j.match(b);z&&(B.push(z[1]),L.unshift(z[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=B.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=u.toASCII(this.hostname));var q=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+q,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!x[d])for(var A=0,I=m.length;A0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=x.slice(-1)[0],A=(n.host||e.host||x.length>1)&&("."===C||".."===C)||""===C,T=0,O=x.length;O>=0;O--)C=x[O],"."===C?x.splice(O,1):".."===C?(x.splice(O,1),T++):T&&(x.splice(O,1),T--);if(!_&&!b)for(;T--;T)x.unshift("..");!_||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var D=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(S){n.hostname=n.host=D?"":x.length?x.shift():"";var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return _=_||n.host&&x.length,_&&!D&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(o){function a(e){throw RangeError(P[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(M,".");var i=e.split("."),o=s(i,t).join(".");return r+o}function c(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=R(e>>>10&1023|55296),e=56320|1023&e),t+=R(e)}).join("")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?j(e/E):e>>1,e+=j(e/t);e>I*k>>1;r+=x)e=j(e/I);return j(r+(I+1)*e/(e+S))}function d(e){var t,n,r,i,o,s,u,c,f,d,m=[],y=e.length,v=0,g=A,_=C;for(n=e.lastIndexOf(T),n<0&&(n=0),r=0;r=128&&a("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=y&&a("invalid-input"),c=p(e.charCodeAt(i++)),(c>=x||c>j((b-v)/s))&&a("overflow"),v+=c*s,f=u<=_?w:u>=_+k?k:u-_,!(cj(b/d)&&a("overflow"),s*=d;t=m.length+1,_=h(v-o,t,0==o),j(v/t)>b-g&&a("overflow"),g+=j(v/t),v%=t,m.splice(v++,0,g)}return l(m)}function m(e){var t,n,r,i,o,s,u,l,p,d,m,y,v,g,_,S=[];for(e=c(e),y=e.length,t=A,n=0,o=C,s=0;s=t&&mj((b-n)/v)&&a("overflow"),n+=(u-t)*v,t=u,s=0;sb&&a("overflow"),m==t){for(l=n,p=x;d=p<=o?w:p>=o+k?k:p-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=x-w,j=Math.floor,R=String.fromCharCode;_={version:"1.3.2",ucs2:{decode:c,encode:l},decode:d,encode:m,toASCII:v,toUnicode:y},r=function(){return _}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(318)(e),function(){return this}())},function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(1007),t.encode=t.stringify=n(1008)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=d.substr(0,m),p=d.substr(m+1)):(l=d,p=""),f=decodeURIComponent(l),h=decodeURIComponent(p),n(o,f)?Array.isArray(o[f])?o[f].push(h):o[f]=[o[f],h]:o[f]=h}return o}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){e.exports={default:n(1010),__esModule:!0}},function(e,t,n){n(942),n(929),e.exports=n(1011)},function(e,t,n){var r=n(911),i=n(1012);e.exports=n(906).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},[1427,1013,940,934,906],[1418,894,940],function(e,t,n){e.exports={default:n(1015),__esModule:!0}},function(e,t,n){n(958),n(929),n(942),n(1016),e.exports=n(906).Promise},[1433,932,901,907,1013,905,912,908,1017,1018,1021,1022,1024,940,1025,939,1026,906,1027],205,[1434,907,1019,1020,911,896,1012],[1424,911],[1425,934,940],[1435,911,908,940],[1436,907,1023,938,916,901,894],78,[1437,901,1022,894],function(e,t,n){var r=n(909);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){"use strict";var r=n(901),i=n(906),o=n(910),a=n(914),s=n(940)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},[1428,940],function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1030),o=r(i);t.default=function(){function e(e,t){for(var n=0;n=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(293),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}}).call(t,function(){return this}())},function(e,t,n){n(1036),e.exports=self.fetch.bind(self)},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){this.map={},e instanceof r?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),o(t)}function s(e){var t=new FileReader;return t.readAsText(e),o(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(d.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(d.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!d.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},d.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},d.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var n=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function f(e){var t=new r,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){r.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},r.prototype.delete=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var d={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},u.call(l.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var y=[301,302,303,307,308];h.redirect=function(e,t){if(y.indexOf(t)===-1)throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=l,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(e<100||e>599)return void r(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:f(a),url:i()},o="response"in a?a.response:a.responseText;n(new h(o,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&d.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){e.exports={default:n(1038),__esModule:!0}},function(e,t,n){n(1039);var r=n(906).Object;e.exports=function(e,t){return r.create(e,t)}},[1410,905,936],function(e,t,n){e.exports={default:n(1041),__esModule:!0}},function(e,t,n){n(958),n(942),n(1042),e.exports=n(906).WeakMap},[1438,1043,933,950,922,1046,912,1047],[1429,907,893,887,896,1044],[1430,1045],[1431,912,954,940],[1439,1025,950,911,912,1017,1018,1043,891],function(e,t,n){"use strict";var r=n(901),i=n(905),o=n(950),a=n(915),s=n(909),u=n(1025),c=n(1018),l=n(1017),p=n(912),f=n(939),h=n(910).f,d=n(1043)(0),m=n(914);e.exports=function(e,t,n,y,v,g){var _=r[e],b=_,x=v?"set":"add",w=b&&b.prototype,k={};return m&&"function"==typeof b&&(g||w.forEach&&!a(function(){(new b).entries().next()}))?(b=t(function(t,n){l(t,b,e,"_c"),t._c=new _,void 0!=n&&c(n,v,t[x],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in w&&(!g||"clear"!=e)&&s(b.prototype,e,function(n,r){if(l(this,b,e),!t&&g&&!p(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i})}),"size"in w&&h(b.prototype,"size",{get:function(){return this._c.size}})):(b=y.getConstructor(t,e,v,x),u(b.prototype,n),o.NEED=!0),f(b,e),k[e]=b,i(i.G+i.W+i.F,k),g||y.setStrong(b,e,v),b}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1050),o=r(i),a=n(1009),s=r(a);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=(0,s.default)(e);!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){e.exports={default:n(1051),__esModule:!0}},function(e,t,n){n(942),n(929),e.exports=n(1052)},function(e,t,n){var r=n(1013),i=n(940)("iterator"),o=n(934);e.exports=n(906).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1054),o=r(i);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&(e.patches=[],e.callback&&e.callback(i)),i}function l(e,t,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=g(t),a=g(e),u=!1,c=!1,p=a.length-1;p>=0;p--){var f=a[p],h=e[f];if(!t.hasOwnProperty(f)||void 0===t[f]&&void 0!==h&&E(t)===!1)r.push({op:"remove",path:i+"/"+n(f)}),c=!0;else{var d=t[f];"object"==typeof h&&null!=h&&"object"==typeof d&&null!=d?l(h,d,r,i+"/"+n(f)):h!==d&&(u=!0,r.push({op:"replace",path:i+"/"+n(f),value:s(d)}))}}if(c||o.length!=a.length)for(var p=0;p=48&&t<=57))return!1;n++}}return!0}function f(e,t,n){for(var r,i,o=[],a=0,s=t.length;a=h){o.push(x[r.op].call(r,l,i,e));break}if(E(l)){if("-"===i)i=l.length;else{if(n&&!p(i))throw new C("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a-1,r.path,r);i=parseInt(i,10)}if(f>=h){if(n&&"add"===r.op&&i>l.length)throw new C("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a-1,r.path,r);o.push(b[r.op].call(r,l,i,e));break}}else if(i&&i.indexOf("~")!=-1&&(i=i.replace(/~1/g,"/").replace(/~0/g,"~")),f>=h){o.push(_[r.op].call(r,l,i,e));break}l=l[i]}}return o}function h(e,t){var n=[];return l(e,t,n,""),n}function d(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e){if(void 0===e)return!0;if(e)if(E(e)){for(var t=0,n=e.length;t0)throw new C('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,r);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new C("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,r);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new C("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,r);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&m(t.value))throw new C("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,r);if(r)if("add"==t.op){var o=t.path.split("/").length,a=i.split("/").length;if(o!==a+1&&o!==a)throw new C("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,r)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==i)throw new C("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,r)}else if("move"===t.op||"copy"===t.op){var s={op:"_get",path:t.from,value:void 0},u=e.validate([s],r);if(u&&"OPERATION_PATH_UNRESOLVABLE"===u.name)throw new C("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,r)}}function v(e,t){try{if(!E(e))throw new C("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),f.call(this,t,e,!0);else for(var n=0;n=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(i):o<128?n+=r[o]:o<2048?n+=r[192|o>>6]+r[128|63&o]:o<55296||o>=57344?n+=r[224|o>>12]+r[128|o>>6&63]+r[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(i)),n+=r[240|o>>18]+r[128|o>>12&63]+r[128|o>>6&63]+r[128|63&o])}return n},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;var r=n||[],i=r.indexOf(e);if(i!==-1)return r[i];if(r.push(e),Array.isArray(e)){for(var o=[],a=0;a=0&&n.parseArrays&&a<=n.arrayLimit?(r=[],r[a]=s(e,t,n)):r[o]=s(e,t,n)}return r},u=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=o.exec(r),c=u?r.slice(0,u.index):r,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var p=0;null!==(u=a.exec(r))&&pp?d=p:this.setState({position:a,resized:!0}),this.props.onChange&&this.props.onChange(d),this.setState({draggedSize:d}),n.setState({size:d})}}}}},{key:"onMouseUp",value:function(){this.props.allowResize&&this.state.active&&("function"==typeof this.props.onDragFinished&&this.props.onDragFinished(this.state.draggedSize),this.setState({active:!1}))}},{key:"setSize",value:function(e,t){var n="first"===this.props.primary?this.pane1:this.pane2,r=void 0;n&&(r=e.size||t&&t.draggedSize||e.defaultSize||e.minSize,n.setState({size:r}),e.size!==t.draggedSize&&this.setState({draggedSize:r}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.split,r=t.allowResize,i=r?"":"disabled",o=u({},this.props.style||{},{display:"flex",flex:1,position:"relative",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"});"vertical"===n?u(o,{flexDirection:"row",height:"100%",position:"absolute",left:0,right:0}):u(o,{flexDirection:"column",height:"100%",minHeight:"100%",position:"absolute",top:0,bottom:0,width:"100%"});var a=this.props.children,s=["SplitPane",this.props.className,n,i],c=this.props.prefixer.prefix(u({},this.props.paneStyle||{},this.props.pane1Style||{})),l=this.props.prefixer.prefix(u({},this.props.paneStyle||{},this.props.pane2Style||{}));return p.default.createElement("div",{className:s.join(" "),style:this.props.prefixer.prefix(o),ref:function(t){e.splitPane=t}},p.default.createElement(_.default,{ref:function(t){e.pane1=t},key:"pane1",className:"Pane1",style:c,split:n,size:"first"===this.props.primary?this.props.size||this.props.defaultSize||this.props.minSize:void 0},a[0]),p.default.createElement(x.default,{ref:function(t){e.resizer=t},key:"resizer",className:i,resizerClassName:this.props.resizerClassName,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,style:this.props.resizerStyle||{},split:n}),p.default.createElement(_.default,{ref:function(t){e.pane2=t},key:"pane2",className:"Pane2",style:l,split:n,size:"second"===this.props.primary?this.props.size||this.props.defaultSize||this.props.minSize:void 0},a[1]))}}]),t}(l.Component);k.propTypes={primary:l.PropTypes.oneOf(["first","second"]),minSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),maxSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),defaultSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),size:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),allowResize:l.PropTypes.bool,split:l.PropTypes.oneOf(["vertical","horizontal"]),onDragStarted:l.PropTypes.func,onDragFinished:l.PropTypes.func,onChange:l.PropTypes.func,prefixer:l.PropTypes.instanceOf(m.default).isRequired,style:v.default,resizerStyle:v.default,paneStyle:v.default,pane1Style:v.default,pane2Style:v.default,className:l.PropTypes.string,resizerClassName:l.PropTypes.string,children:l.PropTypes.arrayOf(l.PropTypes.node).isRequired},k.defaultProps={split:"vertical",minSize:50,allowResize:!0,prefixer:new m.default({userAgent:w}),primary:"first"},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments[2],r=arguments[3];Object.keys(t).forEach(function(i){var o=e[i];Array.isArray(o)?[].concat(t[i]).forEach(function(t){e[i].indexOf(t)===-1&&e[i].splice(o.indexOf(n),r?0:1,t)}):e[i]=t[i]})}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=t._browserInfo.version}).reduce(function(e,t){return e[t]=!0,e},{}),this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0):this._usePrefixAllFallback=!0}return a(e,[{key:"prefix",value:function(e){var t=this;return this._usePrefixAllFallback?(0,u.default)(e):this._hasPropsRequiringPrefix?(Object.keys(e).forEach(function(n){var r=e[n];r instanceof Object&&!Array.isArray(r)?e[n]=t.prefix(r):t._requiresPrefix[n]&&(e[t.jsPrefix+(0,d.default)(n)]=r,t._keepUnprefixed||delete e[n])}),Object.keys(e).forEach(function(n){[].concat(e[n]).forEach(function(r){L.forEach(function(i){o(e,i({property:n,value:r,styles:e,browserInfo:t._browserInfo,prefix:{js:t.jsPrefix,css:t.cssPrefix,keyframes:t.prefixedKeyframes},keepUnprefixed:t._keepUnprefixed,requiresPrefix:t._requiresPrefix}),r,t._keepUnprefixed)})})}),(0,y.default)(e)):e}}],[{key:"prefixAll",value:function(e){return(0,u.default)(e)}}]),e}();t.default=z,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return Object.keys(e).forEach(function(t){var n=e[t];n instanceof Object&&!Array.isArray(n)?e[t]=i(n):Object.keys(s.default).forEach(function(r){var i=s.default[r];i[t]&&(e[r+(0,c.default)(t)]=n)})}),Object.keys(e).forEach(function(t){[].concat(e[t]).forEach(function(n,r){D.forEach(function(r){return o(e,r(t,n))})})}),(0,p.default)(e)}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];Object.keys(t).forEach(function(n){var r=e[n];Array.isArray(r)?[].concat(t[n]).forEach(function(t){var i=r.indexOf(t);i>-1&&e[n].splice(i,1),e[n].push(t)}):e[n]=t[n]})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(1170),s=r(a),u=n(1171),c=r(u),l=n(1172),p=r(l),f=n(1174),h=r(f),d=n(1175),m=r(d),y=n(1178),v=r(y),g=n(1179),_=r(g),b=n(1180),x=r(b),w=n(1181),k=r(w),S=n(1182),E=r(S),C=n(1184),A=r(C),T=n(1185),O=r(T),D=[h.default,m.default,v.default,x.default,k.default,E.default,A.default,O.default,_.default];e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={Webkit:{transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,backfaceVisibility:!0,perspective:!0,perspectiveOrigin:!0,transformStyle:!0,transformOriginZ:!0,animation:!0,animationDelay:!0,animationDirection:!0,animationFillMode:!0,animationDuration:!0,animationIterationCount:!0,animationName:!0,animationPlayState:!0,animationTimingFunction:!0,appearance:!0,userSelect:!0,fontKerning:!0,textEmphasisPosition:!0,textEmphasis:!0,textEmphasisStyle:!0,textEmphasisColor:!0,boxDecorationBreak:!0,clipPath:!0,maskImage:!0,maskMode:!0,maskRepeat:!0,maskPosition:!0,maskClip:!0,maskOrigin:!0,maskSize:!0,maskComposite:!0,mask:!0,maskBorderSource:!0,maskBorderMode:!0,maskBorderSlice:!0,maskBorderWidth:!0,maskBorderOutset:!0,maskBorderRepeat:!0,maskBorder:!0,maskType:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,filter:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexFlow:!0,flexShrink:!0,flexWrap:!0,alignContent:!0,alignItems:!0,alignSelf:!0,justifyContent:!0,order:!0,transition:!0,transitionDelay:!0,transitionDuration:!0,transitionProperty:!0,transitionTimingFunction:!0,backdropFilter:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,shapeImageThreshold:!0,shapeImageMargin:!0,shapeImageOutside:!0,hyphens:!0,flowInto:!0,flowFrom:!0,regionFragment:!0,textSizeAdjust:!0},Moz:{appearance:!0,userSelect:!0,boxSizing:!0,textAlignLast:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,tabSize:!0,hyphens:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0},ms:{flex:!0,flexBasis:!1,flexDirection:!0,flexGrow:!1,flexFlow:!0,flexShrink:!1,flexWrap:!0,alignContent:!1,alignItems:!1,alignSelf:!1,justifyContent:!1,order:!1,transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,userSelect:!0,wrapFlow:!0,wrapThrough:!0,wrapMargin:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,touchAction:!0,hyphens:!0,flowInto:!0,flowFrom:!0,breakBefore:!0,breakAfter:!0,breakInside:!0,regionFragment:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridTemplate:!0,gridAutoColumns:!0,gridAutoRows:!0,gridAutoFlow:!0,grid:!0,gridRowStart:!0,gridColumnStart:!0,gridRowEnd:!0,gridRow:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridRowGap:!0,gridArea:!0,gridGap:!0,textSizeAdjust:!0}},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return Object.keys(e).sort(function(e,t){return(0,a.default)(e)&&!(0,a.default)(t)?-1:!(0,a.default)(e)&&(0,a.default)(t)?1:0}).reduce(function(t,n){return t[n]=e[n],t},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1173),a=r(o);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e.match(/^(Webkit|Moz|O|ms)/)},e.exports=t.default},function(e,t){"use strict";function n(e,t){if("position"===e&&"sticky"===t)return{position:["-webkit-sticky","sticky"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("string"==typeof t&&!(0,u.default)(t)&&t.indexOf("calc(")>-1)return(0,a.default)(e,t,function(e,t){return t.replace(/calc\(/g,e+"calc(")})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1176),a=r(o),s=n(1177),u=r(s);e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?function(e,t){return e+t}:arguments[2];return n({},e,["-webkit-","-moz-",""].map(function(e){return r(e,t)}))},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)&&(e=e.join(",")),null!==e.match(/-webkit-|-moz-|-ms-/)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("cursor"===e&&s[t])return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1176),a=r(o),s={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};e.exports=t.default},function(e,t){"use strict";function n(e,t){if("display"===e&&r[t])return{display:["-webkit-box","-moz-box","-ms-"+t+"box","-webkit-"+t,t]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r={flex:!0,"inline-flex":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(s[e]&&u[t])return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1176),a=r(o),s={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},u={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("string"==typeof t&&!(0,u.default)(t)&&null!==t.match(c))return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1176),a=r(o),s=n(1177),u=r(s),c=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if("string"==typeof t&&m[e]){var n,r=a(t),o=r.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return null===e.match(/-moz-|-ms-/)}).join(",");return e.indexOf("Webkit")>-1?i({},e,o):(n={},i(n,"Webkit"+(0,l.default)(e),o),i(n,e,r),n)}}function a(e){if((0,f.default)(e))return e;var t=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return t.forEach(function(e,n){t[n]=Object.keys(d.default).reduce(function(t,n){var r="-"+n.toLowerCase()+"-";return Object.keys(d.default[n]).forEach(function(n){var i=(0,u.default)(n);e.indexOf(i)>-1&&"order"!==i&&(t=e.replace(i,r+i)+","+t)}),t},e)}),t.join(",")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var s=n(1183),u=r(s),c=n(1171),l=r(c),p=n(1177),f=r(p),h=n(1170),d=r(h),m={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0};e.exports=t.default},function(e,t){"use strict";function n(e){return e in o?o[e]:o[e]=e.replace(r,"-$&").toLowerCase().replace(i,"-ms-")}var r=/[A-Z]/g,i=/^ms-/,o={};e.exports=n},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(o[e])return n({},o[e],i[t]||t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},o={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){return"flexDirection"===e&&"string"==typeof t?{WebkitBoxOrient:t.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:t.indexOf("reverse")>-1?"reverse":"normal"}:o[e]?n({},o[e],i[t]||t):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},o={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1187),o=r(i),a={Webkit:["chrome","safari","ios","android","phantom","opera","webos","blackberry","bada","tizen","chromium","vivaldi"],Moz:["firefox","seamonkey","sailfish"],ms:["msie","msedge"]},s={chrome:[["chrome"],["chromium"]],safari:[["safari"]],firefox:[["firefox"]],edge:[["msedge"]],opera:[["opera"],["vivaldi"]],ios_saf:[["ios","mobile"],["ios","tablet"]],ie:[["msie"]],op_mini:[["opera","mobile"],["opera","tablet"]],and_uc:[["android","mobile"],["android","tablet"]],android:[["android","mobile"],["android","tablet"]]},u=function(e){if(e.firefox)return"firefox";var t="";return Object.keys(s).forEach(function(n){s[n].forEach(function(r){var i=0;r.forEach(function(t){e[t]&&(i+=1)}),r.length===i&&(t=n)})}),t};t.default=function(e){if(!e)return!1;var t=o.default._detect(e);return Object.keys(a).forEach(function(e){a[e].forEach(function(n){t[n]&&(t.prefix={inline:e,css:"-"+e.toLowerCase()+"-"})})}),t.browser=u(t),t.version=t.version?parseFloat(t.version):parseInt(parseFloat(t.osversion),10),t.osversion=parseFloat(t.osversion),"ios_saf"===t.browser&&t.version>t.osversion&&(t.version=t.osversion,t.safari=!0),"android"===t.browser&&t.chrome&&t.version>37&&(t.browser="and_chr"),"android"===t.browser&&t.osversion<5&&(t.version=t.osversion),t},e.exports=t.default},function(e,t,n){/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ +!function(t,r,i){"undefined"!=typeof e&&e.exports?e.exports=i():n(1188)(r,i)}(this,"bowser",function(){function e(e){function t(t){var n=e.match(t);return n&&n.length>1&&n[1]||""}function n(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}function r(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var i,o=t(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(e),u=!s&&/android/i.test(e),c=/nexus\s*[0-6]\s*/i.test(e),l=!c&&/nexus\s*[0-9]+/i.test(e),p=/CrOS/.test(e),f=/silk/i.test(e),h=/sailfish/i.test(e),d=/tizen/i.test(e),m=/(web|hpw)os/i.test(e),y=/windows phone/i.test(e),v=(/SamsungBrowser/i.test(e),!y&&/windows/i.test(e)),g=!o&&!f&&/macintosh/i.test(e),_=!u&&!h&&!d&&!m&&/linux/i.test(e),b=t(/edge\/(\d+(\.\d+)?)/i),x=t(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(e),k=!w&&/[^-]mobi/i.test(e),S=/xbox/i.test(e);/opera/i.test(e)?i={name:"Opera",opera:a,version:x||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr|opios/i.test(e)?i={name:"Opera",opera:a,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(e)?i={name:"Samsung Internet for Android",samsungBrowser:a,version:x||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(e)?i={name:"Opera Coast",coast:a,version:x||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?i={name:"Yandex Browser",yandexbrowser:a,version:x||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?i={name:"UC Browser",ucbrowser:a,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?i={name:"Maxthon",maxthon:a,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?i={name:"Epiphany",epiphany:a,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?i={name:"Puffin",puffin:a,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?i={name:"Sleipnir",sleipnir:a,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?i={name:"K-Meleon",kMeleon:a,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:y?(i={name:"Windows Phone",windowsphone:a},b?(i.msedge=a,i.version=b):(i.msie=a,i.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?i={name:"Internet Explorer",msie:a,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:p?i={name:"Chrome",chromeos:a,chromeBook:a,chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(e)?i={name:"Microsoft Edge",msedge:a,version:b}:/vivaldi/i.test(e)?i={name:"Vivaldi",vivaldi:a,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||x}:h?i={name:"Sailfish",sailfish:a,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?i={name:"SeaMonkey",seamonkey:a,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(i={name:"Firefox",firefox:a,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(i.firefoxos=a)):f?i={name:"Amazon Silk",silk:a,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?i={name:"PhantomJS",phantom:a,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?i={name:"SlimerJS",slimer:a,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?i={name:"BlackBerry",blackberry:a,version:x||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:m?(i={name:"WebOS",webos:a,version:x||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(i.touchpad=a)):/bada/i.test(e)?i={name:"Bada",bada:a,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:d?i={name:"Tizen",tizen:a,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(e)?i={name:"QupZilla",qupzilla:a,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(e)?i={name:"Chromium",chromium:a,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(e)?i={name:"Chrome",chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:u?i={name:"Android",version:x}:/safari|applewebkit/i.test(e)?(i={name:"Safari",safari:a},x&&(i.version=x)):o?(i={name:"iphone"==o?"iPhone":"ipad"==o?"iPad":"iPod"},x&&(i.version=x)):i=/googlebot/i.test(e)?{name:"Googlebot",googlebot:a,version:t(/googlebot\/(\d+(\.\d+))/i)||x}:{name:t(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(i.name=i.name||"Blink",i.blink=a):(i.name=i.name||"Webkit",i.webkit=a),!i.version&&x&&(i.version=x)):!i.opera&&/gecko\//i.test(e)&&(i.name=i.name||"Gecko",i.gecko=a,i.version=i.version||t(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||i.msedge||!u&&!i.silk?i.windowsphone||i.msedge||!o?g?i.mac=a:S?i.xbox=a:v?i.windows=a:_&&(i.linux=a):(i[o]=a,i.ios=a):i.android=a;var E="";i.windows?E=r(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?E=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?(E=t(/Mac OS X (\d+([_\.\s]\d+)*)/i),E=E.replace(/[_\s]/g,".")):o?(E=t(/os (\d+([_\s]\d+)*) like mac os x/i),E=E.replace(/[_\s]/g,".")):u?E=t(/android[ \/-](\d+(\.\d+)*)/i):i.webos?E=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?E=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?E=t(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(E=t(/tizen[\/\s](\d+(\.\d+)*)/i)),E&&(i.osversion=E);var C=!i.windows&&E.split(".")[0];return w||l||"ipad"==o||u&&(3==C||C>=4&&!k)||i.silk?i.tablet=a:(k||"iphone"==o||"ipod"==o||u||c||i.blackberry||i.webos||i.bada)&&(i.mobile=a),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=a:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=a:i.x=a,i}function t(e){return e.split(".").length}function n(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n=0;){if(i[0][r]>i[1][r])return 1;if(i[0][r]!==i[1][r])return-1;if(0===r)return 0}}function i(t,n,i){var o=s;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!1),i&&(o=e(i));var a=""+o.version;for(var u in t)if(t.hasOwnProperty(u)&&o[u]){if("string"!=typeof t[u])throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(t));return r([a,t[u]])<0}return n}function o(e,t,n){return!i(e,t,n)}var a=!0,s=e("undefined"!=typeof navigator?navigator.userAgent||"":"");return s.test=function(e){for(var t=0;t-1&&("firefox"===o&&a<15||"chrome"===o&&a<25||"safari"===o&&a<6.1||"ios_saf"===o&&a<7))return i({},t,(0,s.default)(n.replace(/calc\(/g,u+"calc("),n,c))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1192),s=r(a);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo,i=r.browser,o=r.version,u=e.prefix.css,c=e.keepUnprefixed;if("cursor"===t&&s[n]&&("firefox"===i&&o<24||"chrome"===i&&o<37||"safari"===i&&o<9||"opera"===i&&o<24))return{cursor:(0,a.default)(u+n,n,c)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1192),a=r(o),s={"zoom-in":!0,"zoom-out":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo.browser,i=e.prefix.css,o=e.keepUnprefixed;if("cursor"===t&&s[n]&&("firefox"===r||"chrome"===r||"safari"===r||"opera"===r))return{cursor:(0,a.default)(i+n,n,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1192),a=r(o),s={grab:!0,grabbing:!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo,i=r.browser,o=r.version,u=e.prefix.css,c=e.keepUnprefixed;if("display"===t&&s[n]&&("chrome"===i&&o<29&&o>20||("safari"===i||"ios_saf"===i)&&o<9&&o>6||"opera"===i&&(15==o||16==o)))return{display:(0,a.default)(u+n,n,c)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1192),a=r(o),s={flex:!0,"inline-flex":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.prefix.css,o=e.keepUnprefixed;if(u[t]&&c[n])return i({},t,(0,s.default)(r+n,n,o))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1192),s=r(a),u={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},c={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.browserInfo,o=r.browser,a=r.version,c=e.prefix.css,l=e.keepUnprefixed;if("string"==typeof n&&null!==n.match(u)&&("firefox"===o&&a<16||"chrome"===o&&a<26||("safari"===o||"ios_saf"===o)&&a<7||("opera"===o||"op_mini"===o)&&a<12.1||"android"===o&&a<4.4||"and_uc"===o))return i({},t,(0,s.default)(c+n,n,l))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1192),s=r(a),u=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.prefix.css,o=e.requiresPrefix,s=e.keepUnprefixed,c=(0,l.default)(t);if("string"==typeof n&&p[c]){var f=function(){var e=Object.keys(o).map(function(e){return(0,u.default)(e)}),a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return e.forEach(function(e){a.forEach(function(t,n){t.indexOf(e)>-1&&"order"!==e&&(a[n]=t.replace(e,r+e)+(s?","+t:""))})}),{v:i({},t,a.join(","))}}();if("object"===("undefined"==typeof f?"undefined":a(f)))return f.v}}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.default=o;var s=n(1183),u=r(s),c=n(1200),l=r(c),p={transition:!0,transitionProperty:!0};e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.replace(/^(ms|Webkit|Moz|O)/,"");return t.charAt(0).toLowerCase()+t.slice(1)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.styles,o=e.browserInfo,a=o.browser,l=o.version,p=e.prefix.css,f=e.keepUnprefixed;if((c[t]||"display"===t&&"string"==typeof n&&n.indexOf("flex")>-1)&&("ie_mob"===a||"ie"===a)&&10==l){if(f||Array.isArray(r[t])||delete r[t],"display"===t&&u[n])return{display:(0,s.default)(p+u[n],n,f)};if(c[t])return i({},c[t],u[n]||n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1192),s=r(a),u={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},c={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.styles,o=e.browserInfo,a=o.browser,l=o.version,f=e.prefix.css,h=e.keepUnprefixed;if((p.indexOf(t)>-1||"display"===t&&"string"==typeof n&&n.indexOf("flex")>-1)&&("firefox"===a&&l<22||"chrome"===a&&l<21||("safari"===a||"ios_saf"===a)&&l<=6.1||"android"===a&&l<4.4||"and_uc"===a)){if(h||Array.isArray(r[t])||delete r[t],"flexDirection"===t&&"string"==typeof n)return{WebkitBoxOrient:n.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:n.indexOf("reverse")>-1?"reverse":"normal"};if("display"===t&&u[n])return{display:(0,s.default)(f+u[n],n,h)};if(c[t])return i({},c[t],u[n]||n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1192),s=r(a),u={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},c={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"},l=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],p=Object.keys(c).concat(l);e.exports=t.default},function(e,t,n){var r=n(1204),i=n(621);e.exports=function(e,t,n){var i=e[t];if(i){var o=[];if(Object.keys(i).forEach(function(e){r.indexOf(e)===-1&&o.push(e)}),o.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+o.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=i.PropTypes.oneOfType([i.PropTypes.arrayOf(e.exports),e.exports])},function(e,t){e.exports=["alignContent","MozAlignContent","WebKitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebKitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebKitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebKitAll","MSAll","OAll","animation","MozAnimation","WebKitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebKitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebKitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebKitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebKitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebKitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebKitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebKitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebKitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebKitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebKitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebKitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebKitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebKitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebKitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebKitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebKitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebKitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebKitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebKitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebKitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebKitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebKitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebKitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebKitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebKitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebKitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebKitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebKitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebKitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebKitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebKitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebKitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebKitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebKitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebKitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebKitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebKitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebKitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebKitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebKitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebKitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebKitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebKitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebKitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebKitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebKitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebKitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebKitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebKitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebKitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebKitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebKitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebKitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebKitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebKitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebKitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebKitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebKitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebKitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebKitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebKitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebKitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebKitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebKitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebKitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebKitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebKitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebKitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebKitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebKitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebKitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebKitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebKitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebKitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebKitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebKitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebKitCaptionSide","MSCaptionSide","OCaptionSide","ch","MozCh","WebKitCh","MSCh","OCh","clear","MozClear","WebKitClear","MSClear","OClear","clip","MozClip","WebKitClip","MSClip","OClip","clipPath","MozClipPath","WebKitClipPath","MSClipPath","OClipPath","cm","MozCm","WebKitCm","MSCm","OCm","color","MozColor","WebKitColor","MSColor","OColor","columnCount","MozColumnCount","WebKitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebKitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebKitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebKitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebKitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebKitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebKitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebKitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebKitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebKitColumns","MSColumns","OColumns","content","MozContent","WebKitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebKitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebKitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebKitCursor","MSCursor","OCursor","deg","MozDeg","WebKitDeg","MSDeg","ODeg","direction","MozDirection","WebKitDirection","MSDirection","ODirection","display","MozDisplay","WebKitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebKitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebKitDpi","MSDpi","ODpi","dppx","MozDppx","WebKitDppx","MSDppx","ODppx","em","MozEm","WebKitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebKitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebKitEx","MSEx","OEx","filter","MozFilter","WebKitFilter","MSFilter","OFilter","flex","MozFlex","WebKitFlex","MSFlex","OFlex","flexBasis","MozFlexBasis","WebKitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebKitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebKitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebKitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebKitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebKitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebKitFloat","MSFloat","OFloat","font","MozFont","WebKitFont","MSFont","OFont","fontFamily","MozFontFamily","WebKitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebKitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebKitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebKitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebKitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebKitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebKitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebKitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebKitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebKitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebKitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebKitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebKitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebKitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebKitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebKitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebKitFontWeight","MSFontWeight","OFontWeight","grad","MozGrad","WebKitGrad","MSGrad","OGrad","grid","MozGrid","WebKitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebKitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebKitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebKitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebKitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebKitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebKitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebKitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebKitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebKitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebKitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebKitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebKitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebKitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebKitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebKitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebKitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebKitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebKitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebKitHyphens","MSHyphens","OHyphens","hz","MozHz","WebKitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebKitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebKitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebKitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebKitImeMode","MSImeMode","OImeMode","in","MozIn","WebKitIn","MSIn","OIn","inherit","MozInherit","WebKitInherit","MSInherit","OInherit","initial","MozInitial","WebKitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebKitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebKitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebKitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebKitKhz","MSKhz","OKhz","left","MozLeft","WebKitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebKitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebKitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebKitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebKitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebKitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebKitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebKitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebKitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebKitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebKitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebKitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebKitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebKitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebKitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebKitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebKitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebKitMask","MSMask","OMask","maskClip","MozMaskClip","WebKitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebKitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebKitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebKitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebKitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebKitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebKitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebKitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebKitMaskType","MSMaskType","OMaskType","maxBlockSize","MozMaxBlockSize","WebKitMaxBlockSize","MSMaxBlockSize","OMaxBlockSize","maxHeight","MozMaxHeight","WebKitMaxHeight","MSMaxHeight","OMaxHeight","maxInlineSize","MozMaxInlineSize","WebKitMaxInlineSize","MSMaxInlineSize","OMaxInlineSize","maxWidth","MozMaxWidth","WebKitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebKitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebKitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebKitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebKitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebKitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebKitMm","MSMm","OMm","ms","MozMs","WebKitMs","MSMs","OMs","objectFit","MozObjectFit","WebKitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebKitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebKitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebKitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebKitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebKitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebKitOpacity","MSOpacity","OOpacity","order","MozOrder","WebKitOrder","MSOrder","OOrder","orphans","MozOrphans","WebKitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebKitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebKitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebKitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebKitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebKitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebKitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebKitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebKitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebKitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebKitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebKitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebKitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebKitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebKitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebKitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebKitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebKitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebKitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebKitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebKitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebKitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebKitPc","MSPc","OPc","perspective","MozPerspective","WebKitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebKitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebKitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebKitPosition","MSPosition","OPosition","pt","MozPt","WebKitPt","MSPt","OPt","px","MozPx","WebKitPx","MSPx","OPx","q","MozQ","WebKitQ","MSQ","OQ","quotes","MozQuotes","WebKitQuotes","MSQuotes","OQuotes","rad","MozRad","WebKitRad","MSRad","ORad","rem","MozRem","WebKitRem","MSRem","ORem","resize","MozResize","WebKitResize","MSResize","OResize","revert","MozRevert","WebKitRevert","MSRevert","ORevert","right","MozRight","WebKitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebKitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebKitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebKitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebKitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebKitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebKitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebKitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebKitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebKitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebKitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebKitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebKitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebKitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebKitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebKitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebKitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebKitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebKitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebKitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebKitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebKitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebKitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebKitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebKitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebKitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebKitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebKitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebKitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebKitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebKitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebKitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebKitTop","MSTop","OTop","touchAction","MozTouchAction","WebKitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebKitTransform","MSTransform","OTransform","transformBox","MozTransformBox","WebKitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebKitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebKitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebKitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebKitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebKitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebKitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebKitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebKitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebKitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebKitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebKitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebKitVh","MSVh","OVh","visibility","MozVisibility","WebKitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebKitVmax","MSVmax","OVmax","vmin","MozVmin","WebKitVmin","MSVmin","OVmin","vw","MozVw","WebKitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebKitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebKitWidows","MSWidows","OWidows","width","MozWidth","WebKitWidth","MSWidth","OWidth","willChange","MozWillChange","WebKitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebKitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebKitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebKitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebKitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebKitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebKitFontSize","MSFontSize","OFontSize"]; +},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0&&_.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function c(e,t){var n,r,i;if(t.singleton){var o=g++;n=v||(v=s(t)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=f.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function l(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),y=d(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,_=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a=400?(a.updateLoadingStatus("failed"),i.newThrownErr(new Error(t.statusText+" "+e))):(a.updateLoadingStatus("success"),a.updateSpec(t.text),void a.updateUrl(e))}var i=n.errActions,o=n.specSelectors,a=n.specActions,s=t.fetch;e=e||o.url(),a.updateLoadingStatus("loading"),s({url:e,loadSpec:!0,credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(r,r)}},updateLoadingStatus:function(e){var t=[null,"loading","failed","success","failedConfig"];return t.indexOf(e)===-1&&console.error("Error: "+e+" is not one of "+JSON.stringify(t)),{type:"spec_update_loading_status",payload:e}}},r={spec_update_loading_status:function(e,t){return"string"==typeof t.payload?e.set("loadingStatus",t.payload):e}},a={loadingStatus:(0,i.createSelector)(function(e){return e||(0,o.Map)()},function(e){return e.get("loadingStatus")||null})};return{statePlugins:{spec:{actions:n,reducers:r,selectors:a}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(575),o=n(325)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n6?s-6:0),c=6;c5?c-5:0),p=5;p5?a-5:0),u=5;u key("+l[p]+")"].concat(s));if(h instanceof Error)return h}}return i(t)}function u(e){return a(e,"List",b.List.isList)}function c(e,t,n,r){function o(){for(var i=arguments.length,o=Array(i),u=0;u5?s-5:0),c=5;c5?c-5:0),p=5;p>",w={listOf:u,mapOf:l,orderedMapOf:p,setOf:f,orderedSetOf:h,stackOf:d,iterableOf:m,recordOf:y,shape:g,contains:g,mapContains:_,list:o("List",b.List.isList),map:o("Map",b.Map.isMap),orderedMap:o("OrderedMap",b.OrderedMap.isOrderedMap),set:o("Set",b.Set.isSet),orderedSet:o("OrderedSet",b.OrderedSet.isOrderedSet),stack:o("Stack",b.Stack.isStack),seq:o("Seq",b.Seq.isSeq),record:o("Record",function(e){return e instanceof b.Record}),iterable:o("Iterable",b.Iterable.isIterable)};e.exports=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n-1&&e.setState({scopes:e.state.scopes.filter(function(e){return e!==i})})},this.onInputChange=function(t){var n=t.target,r=n.dataset.name,o=n.value,a=i({},r,o);e.setState(a)},this.logout=function(t){t.preventDefault();var n=e.props,r=n.authActions,i=n.errActions,o=n.name;i.clear({authId:o,type:"auth",source:"auth"}),r.logout([o])}};t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.auth,n=e.authActions,r=e.errActions,i=e.configs,o=e.authConfigs,u=void 0===o?{}:o,c=t.schema,l=t.scopes,p=t.name,f=t.clientId,h=c.get("flow"),d=[];switch(h){case"password":return void n.authorizePassword(t);case"application":return void n.authorizeApplication(t);case"accessCode":d.push("response_type=code");break;case"implicit":d.push("response_type=token")}"string"==typeof f&&d.push("client_id="+encodeURIComponent(f));var m=i.oauth2RedirectUrl;if("undefined"==typeof m)return void r.newAuthErr({authId:p,source:"validation",level:"error",message:"oauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed."});if(d.push("redirect_uri="+encodeURIComponent(m)),Array.isArray(l)&&0=0||this.state.url.indexOf("127.0.0.1")>=0?null:l.default.createElement("span",{style:{float:"right"}},l.default.createElement("a",{target:"_blank",href:this.state.validatorUrl+"/debug?url="+this.state.url},l.default.createElement(f,{src:this.state.validatorUrl+"?url="+this.state.url,alt:"Online validator badge"})))}}]),t}(l.default.Component);p.propTypes={getComponent:c.PropTypes.func.isRequired,getConfigs:c.PropTypes.func.isRequired,specSelectors:c.PropTypes.object.isRequired},t.default=p;var f=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={loaded:!1,error:!1},n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({loaded:!0})},t.onerror=function(){e.setState({error:!0})},t.src=this.props.src}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(e.src!==this.props.src){var n=new Image;n.onload=function(){t.setState({loaded:!0})},n.onerror=function(){t.setState({error:!0})},n.src=e.src}}},{key:"render",value:function(){return this.state.error?l.default.createElement("img",{alt:"Error"}):this.state.loaded?l.default.createElement("img",{src:this.props.src,alt:this.props.alt}):l.default.createElement("img",{alt:"Loading..."})}}]),t}(l.default.Component);f.propTypes={src:c.PropTypes.string,alt:c.PropTypes.string}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0){var N=!w.get(String(s.get("status")));s=s.set("notDocumented",N)}var F=this.state.tryItOutEnabled,B=this.isShown(),L=[r,i];return l.default.createElement("div",{className:b?"opblock opblock-deprecated":B?"opblock opblock-"+i+" is-open":"opblock opblock-"+i,id:t},l.default.createElement("div",{className:"opblock-summary opblock-summary-"+i,onClick:this.toggleShown},l.default.createElement("span",{className:"opblock-summary-method"},i.toUpperCase()),l.default.createElement("span",{className:b?"opblock-summary-path__deprecated":"opblock-summary-path"},l.default.createElement("span",null,r),l.default.createElement(P,{path:n})),a?l.default.createElement("div",{className:"opblock-summary-description"},g):null,k&&k.count()?l.default.createElement(M,{authActions:y,security:k,authSelectors:v}):null),l.default.createElement(I,{isOpened:B,animated:!0},l.default.createElement("div",{className:"opblock-body"},b&&l.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),_&&l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("div",{className:"opblock-description"},l.default.createElement(j,{source:_}))),x&&x.get("url")?l.default.createElement("div",{className:"opblock-external-docs-wrapper"},l.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),l.default.createElement("div",{className:"opblock-external-docs"},l.default.createElement("span",{className:"opblock-external-docs__description"},x.get("description")),l.default.createElement("a",{className:"opblock-external-docs__link",href:x.get("url")},x.get("url")))):null,l.default.createElement(T,{parameters:C,onChangeKey:L,onTryoutClick:this.onTryoutClick,onCancelClick:this.onCancelClick,tryItOutEnabled:F,allowTryItOut:c,fn:p,getComponent:f,specActions:d,specSelectors:m,pathMethod:[r,i]}),F&&c&&E&&E.size?l.default.createElement("div",{className:"opblock-schemes"},l.default.createElement(R,{schemes:E,path:r,method:i,specActions:d})):null,l.default.createElement("div",{className:F&&s&&c?"btn-group":"execute-wrapper"},F&&c?l.default.createElement(O,{getComponent:f,operation:o,specActions:d,specSelectors:m,path:r,method:i,onExecute:this.onExecute}):null,F&&s&&c?l.default.createElement(D,{onClick:this.onClearClick,specActions:d,path:r,method:i}):null),this.state.executeInProgress?l.default.createElement("div",{className:"loading-container"},l.default.createElement("div",{className:"loading"})):null,w?l.default.createElement(A,{responses:w,request:u,tryItOutResponse:s,getComponent:f,specSelectors:m,specActions:d,produces:S,producesValue:o.get("produces_value"),pathMethod:[r,i],fn:p}):null)))}}]),t}(l.default.Component);y.propTypes={path:c.PropTypes.string.isRequired,method:c.PropTypes.string.isRequired,operation:c.PropTypes.object.isRequired,showSummary:c.PropTypes.bool,isShownKey:m.arrayOrString.isRequired,jumpToKey:m.arrayOrString.isRequired,allowTryItOut:c.PropTypes.bool,response:c.PropTypes.object,request:c.PropTypes.object,getComponent:c.PropTypes.func.isRequired,authActions:c.PropTypes.object,authSelectors:c.PropTypes.object,specActions:c.PropTypes.object.isRequired,specSelectors:c.PropTypes.object.isRequired,layoutActions:c.PropTypes.object.isRequired,layoutSelectors:c.PropTypes.object.isRequired,fn:c.PropTypes.object.isRequired},y.defaultProps={showSummary:!0,response:null,allowTryItOut:!0},t.default=y},function(e,t,n){e.exports=n(1229)},function(e,t,n){"use strict";function r(e,t,n){return!i(e.props,t)||!i(e.state,n)}var i=n(735);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectWithFuncs=t.arrayOrString=void 0;var r=n(621),i=function(e,t){return r.PropTypes.shape(e.reduce(function(e,n){return e[n]=t,e},{}))};t.arrayOrString=r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.string),r.PropTypes.string]),t.objectWithFuncs=function(e){return i(e,r.PropTypes.func.isRequired)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&(_=x[1])}p=c.default.createElement("div",null,c.default.createElement("a",{href:v,download:_},"Download file"))}else p=c.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).")}else p="string"==typeof t?c.default.createElement(s,{value:t}):c.default.createElement("div",null,"Unknown response type");return p?c.default.createElement("div",null,c.default.createElement("h5",null,"Response body"),p):null}}]),t}(c.default.Component);h.propTypes={content:u.PropTypes.any.isRequired,contentType:u.PropTypes.string.isRequired,getComponent:u.PropTypes.func.isRequired,headers:u.PropTypes.object,url:u.PropTypes.string},t.default=h},function(e,t,n){var r=n(356),i=r(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()});e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t-1)return this.renderFixed();var m=this.renderStatic,y=this.state.height,v=parseFloat(y).toFixed(1);y>-1&&m&&(this.renderStatic=!1);var g=s.default.createElement(p.default,{onHeightReady:this.onHeightReady},a);if(m){var _=n?{height:"auto"}:{overflow:"hidden",height:0};return!n&&y>-1?l?s.default.createElement("div",o({style:o({height:0,overflow:"hidden"},r)},d),g):null:s.default.createElement("div",o({style:o({},_,r)},d),g)}return s.default.createElement(c.Motion,{defaultStyle:{height:Math.max(0,y)},onRest:f,style:{height:this.getMotionHeight(y)}},function(t){if(e.height=h(t.height),!n&&"0.0"===e.height)return l?s.default.createElement("div",o({style:o({height:0,overflow:"hidden"},r)},d),g):null;var i=n&&e.height===v?{height:"auto"}:{height:t.height,overflow:"hidden"};return s.default.createElement("div",o({style:o({},i,r)},d),g)})}});t.default=d},function(e,t,n){"use strict";var r=n(1229),i={shouldComponentUpdate:function(e,t){return r(this,e,t)}};e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=n(1245);t.Motion=r(i);var o=n(1253);t.StaggeredMotion=r(o);var a=n(1254);t.TransitionMotion=r(a);var s=n(1256);t.spring=r(s);var u=n(1257);t.presets=r(u);var c=n(1258);t.reorderKeys=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t10*_&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();var i=(e.accumulatedTime-Math.floor(e.accumulatedTime/_)*_)/_,o=Math.floor(e.accumulatedTime/_),a={},s={},u={},c={};for(var p in t)if(t.hasOwnProperty(p)){var h=t[p];if("number"==typeof h)u[p]=h,c[p]=0,a[p]=h,s[p]=0;else{for(var d=e.state.lastIdealStyle[p],m=e.state.lastIdealVelocity[p],v=0;v10*b&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var o=(e.accumulatedTime-Math.floor(e.accumulatedTime/b)*b)/b,a=Math.floor(e.accumulatedTime/b),s=[],u=[],c=[],l=[],f=0;f10*S&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var u=(e.accumulatedTime-Math.floor(e.accumulatedTime/S)*S)/S,c=Math.floor(e.accumulatedTime/S),l=a(e.props.willEnter,e.props.willLeave,e.state.mergedPropsStyles,n,e.state.currentStyles,e.state.currentVelocities,e.state.lastIdealStyles,e.state.lastIdealVelocities),p=l[0],f=l[1],d=l[2],m=l[3],y=l[4],g=0;gr[l])return-1;if(i>o[l]&&ur[l])return 1;if(a>o[l]&&s=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){for(var e=arguments.length,t=Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl,collapsedContent:w},f.default.createElement("span",{className:"brace-open object"},y),r?f.default.createElement(x,{name:n}):null,f.default.createElement("span",{className:"inner-object"},f.default.createElement("table",{className:"model",style:{marginLeft:"2em"}},f.default.createElement("tbody",null,h?f.default.createElement("tr",{style:{color:"#999",fontStyle:"italic"}},f.default.createElement("td",null,"description:"),f.default.createElement("td",null,h)):null,d&&d.size?d.entrySeq().map(function(e){var t=c(e,2),r=t[0],i=t[1],l=m.List.isList(b)&&b.contains(r),p={verticalAlign:"top",paddingRight:"0.2em"};return l&&(p.fontWeight="bold"),f.default.createElement("tr",{key:r},f.default.createElement("td",{style:p},r,":"),f.default.createElement("td",{style:{verticalAlign:"top"}},f.default.createElement(k,u({key:"object-"+n+"-"+r+"_"+i},s,{required:l,getComponent:o,schema:i,depth:a+1}))))}).toArray():null,g&&g.size?f.default.createElement("tr",null,f.default.createElement("td",null,"< * >:"),f.default.createElement("td",null,f.default.createElement(k,u({},s,{required:!1,getComponent:o,schema:g,depth:a+1})))):null))),f.default.createElement("span",{className:"brace-close"},v)))}}]),t}(p.Component);b.propTypes={schema:p.PropTypes.object.isRequired,getComponent:p.PropTypes.func.isRequired,specSelectors:p.PropTypes.object.isRequired,name:p.PropTypes.string,isRef:p.PropTypes.bool,expandDepth:p.PropTypes.number,depth:p.PropTypes.number};var x=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.schema,n=e.required;if(!t||!t.get)return f.default.createElement("div",null);var r=t.get("type"),i=t.get("format"),o=t.get("xml"),a=t.get("enum"),s=t.filter(function(e,t){return["enum","type","format","$$ref"].indexOf(t)===-1}),u=n?{fontWeight:"bold"}:{};return f.default.createElement("span",{className:"prop"},f.default.createElement("span",{className:"prop-type",style:u},r)," ",n&&f.default.createElement("span",{style:{color:"red"}},"*"),i&&f.default.createElement("span",{className:"prop-format"},"($",i,")"),s.size?s.entrySeq().map(function(e){var t=c(e,2),n=t[0],r=t[1];return f.default.createElement("span",{key:n+"-"+r,style:g},f.default.createElement("br",null),"description"!==n&&n+": ",String(r))}):null,o&&o.size?f.default.createElement("span",null,f.default.createElement("br",null),f.default.createElement("span",{style:g},"xml:"),o.entrySeq().map(function(e){var t=c(e,2),n=t[0],r=t[1];return f.default.createElement("span",{key:n+"-"+r,style:g},f.default.createElement("br",null),"   ",n,": ",String(r))}).toArray()):null,a&&f.default.createElement(_,{value:a}))}}]),t}(p.Component);x.propTypes={schema:p.PropTypes.object.isRequired,required:p.PropTypes.bool};var w=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.required,n=e.schema,r=e.depth,i=e.expandDepth,o=n.get("items"),a=n.filter(function(e,t){return["type","items","$$ref"].indexOf(t)===-1});return f.default.createElement("span",{className:"model"},f.default.createElement("span",{className:"model-title"},f.default.createElement("span",{className:"model-title__text"},n.get("title"))),f.default.createElement(E,{collapsed:r>i,collapsedContent:"[...]"},"[",f.default.createElement("span",null,f.default.createElement(k,u({},this.props,{schema:o,required:!1}))),"]",a.size?f.default.createElement("span",null,a.entrySeq().map(function(e){var t=c(e,2),n=t[0],r=t[1];return f.default.createElement("span",{key:n+"-"+r,style:g},f.default.createElement("br",null),n+":",String(r))}),f.default.createElement("br",null)):null),t&&f.default.createElement("span",{style:{color:"red"}},"*"))}}]),t}(p.Component);w.propTypes={schema:p.PropTypes.object.isRequired,getComponent:p.PropTypes.func.isRequired,specSelectors:p.PropTypes.object.isRequired,name:p.PropTypes.string,required:p.PropTypes.bool,expandDepth:p.PropTypes.number,depth:p.PropTypes.number};var k=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),c=0;c=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e,t){var n=0;return o(g,t)?g[t]:35===t.charCodeAt(0)&&v.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?c(n):e}function p(e){return e.indexOf("&")<0?e:e.replace(y,l)}function f(e){return x[e]}function h(e){return _.test(e)?e.replace(b,f):e}var d=Object.prototype.hasOwnProperty,m=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,y=/&([a-z#][a-z0-9]{1,31});/gi,v=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,g=n(1283),_=/[&<>"]/,b=/[&<>"]/g,x={"&":"&","<":"<",">":">",'"':"""};t.assign=a,t.isString=i,t.has=o,t.unescapeMd=s,t.isValidEntityCode=u,t.fromCodePoint=c,t.replaceEntities=p,t.escapeHtml=h},function(e,t){"use strict";e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",GT:">",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,n){"use strict";function r(){this.rules=i.assign({},o),this.getBreak=o.getBreak}var i=n(1282),o=n(1285);e.exports=r,r.prototype.renderInline=function(e,t,n){for(var r=this.rules,i=e.length,o=0,a="";i--;)a+=r[e[o].type](e,o++,t,n,this);return a},r.prototype.render=function(e,t,n){for(var r=this.rules,i=e.length,o=-1,a="";++o=e.length-2?t:"paragraph_open"===e[t].type&&e[t].tight&&"inline"===e[t+1].type&&0===e[t+1].content.length&&"paragraph_close"===e[t+2].type&&e[t+2].tight?r(e,t+2):t}var i=n(1282).has,o=n(1282).unescapeMd,a=n(1282).replaceEntities,s=n(1282).escapeHtml,u={};u.blockquote_open=function(){return"
\n"},u.blockquote_close=function(e,t){return"
"+c(e,t)},u.code=function(e,t){return e[t].block?"
"+s(e[t].content)+"
"+c(e,t):""+s(e[t].content)+""},u.fence=function(e,t,n,r,u){var l,p,f,h=e[t],d="",m=n.langPrefix,y="";if(h.params){if(l=h.params.split(/\s+/g),p=l.join(" "),i(u.rules.fence_custom,l[0]))return u.rules.fence_custom[l[0]](e,t,n,r,u);y=s(a(o(p))),d=' class="'+m+y+'"'}return f=n.highlight?n.highlight.apply(n.highlight,[h.content].concat(l))||s(h.content):s(h.content),"
"+f+"
"+c(e,t)},u.fence_custom={},u.heading_open=function(e,t){return""},u.heading_close=function(e,t){return"\n"},u.hr=function(e,t,n){return(n.xhtmlOut?"
":"
")+c(e,t)},u.bullet_list_open=function(){return"
    \n"},u.bullet_list_close=function(e,t){return"
"+c(e,t)},u.list_item_open=function(){return"
  • "},u.list_item_close=function(){return"
  • \n"},u.ordered_list_open=function(e,t){var n=e[t],r=n.order>1?' start="'+n.order+'"':"";return"\n"},u.ordered_list_close=function(e,t){return""+c(e,t)},u.paragraph_open=function(e,t){return e[t].tight?"":"

    "},u.paragraph_close=function(e,t){var n=!(e[t].tight&&t&&"inline"===e[t-1].type&&!e[t-1].content);return(e[t].tight?"":"

    ")+(n?c(e,t):"")},u.link_open=function(e,t,n){var r=e[t].title?' title="'+s(a(e[t].title))+'"':"",i=n.linkTarget?' target="'+n.linkTarget+'"':"";return'"},u.link_close=function(){return""},u.image=function(e,t,n){var r=' src="'+s(e[t].src)+'"',i=e[t].title?' title="'+s(a(e[t].title))+'"':"",u=' alt="'+(e[t].alt?s(a(o(e[t].alt))):"")+'"',c=n.xhtmlOut?" /":"";return""},u.table_open=function(){return"\n"},u.table_close=function(){return"
    \n"},u.thead_open=function(){return"\n"},u.thead_close=function(){return"\n"},u.tbody_open=function(){return"\n"},u.tbody_close=function(){return"\n"},u.tr_open=function(){return""},u.tr_close=function(){return"\n"},u.th_open=function(e,t){var n=e[t];return""},u.th_close=function(){return""},u.td_open=function(e,t){var n=e[t];return""},u.td_close=function(){return""},u.strong_open=function(){return""},u.strong_close=function(){return""},u.em_open=function(){return""},u.em_close=function(){return""},u.del_open=function(){return""},u.del_close=function(){return""},u.ins_open=function(){return""},u.ins_close=function(){return""},u.mark_open=function(){return""},u.mark_close=function(){return""},u.sub=function(e,t){return""+s(e[t].content)+""},u.sup=function(e,t){return""+s(e[t].content)+""},u.hardbreak=function(e,t,n){return n.xhtmlOut?"
    \n":"
    \n"},u.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
    \n":"
    \n":"\n"},u.text=function(e,t){return s(e[t].content)},u.htmlblock=function(e,t){return e[t].content},u.htmltag=function(e,t){return e[t].content},u.abbr_open=function(e,t){return''},u.abbr_close=function(){return""},u.footnote_ref=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),'['+n+"]"},u.footnote_block_open=function(e,t,n){var r=n.xhtmlOut?'
    \n':'
    \n';return r+'
    \n
      \n'},u.footnote_block_close=function(){return"
    \n
    \n"},u.footnote_open=function(e,t){var n=Number(e[t].id+1).toString();return'
  • '},u.footnote_close=function(){return"
  • \n"},u.footnote_anchor=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),' '},u.dl_open=function(){return"
    \n"},u.dt_open=function(){return"
    "},u.dd_open=function(){return"
    "},u.dl_close=function(){return"
    \n"},u.dt_close=function(){return"\n"},u.dd_close=function(){ +return"\n"};var c=u.getBreak=function(e,t){return t=r(e,t),t8&&n<14);)if(92===n&&t+11))break;if(41===n&&(o--,o<0))break;t++}return s!==t&&(a=i(e.src.slice(s,t)),!!e.parser.validateLink(a)&&(e.linkContent=a,e.pos=t,!0))}},function(e,t,n){"use strict";var r=n(1282).replaceEntities;e.exports=function(e){var t=r(e);try{t=decodeURI(t)}catch(e){}return encodeURI(t)}},function(e,t,n){"use strict";var r=n(1282).unescapeMd;e.exports=function(e,t){var n,i=t,o=e.posMax,a=e.src.charCodeAt(t);if(34!==a&&39!==a&&40!==a)return!1;for(t++,40===a&&(a=41);t0?a[t].count:1,r=0;r=0;t--)if(s=a[t],"text"===s.type){for(l=0,u=s.content,f.lastIndex=0,p=s.level,c=[];h=f.exec(u);)f.lastIndex>l&&c.push({type:"text",content:u.slice(l,h.index+h[1].length),level:p}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:p++}),c.push({type:"text",content:h[2],level:p}),c.push({type:"abbr_close",level:--p}),l=f.lastIndex-h[3].length;c.length&&(l=0;s--)if("inline"===e.tokens[s].type)for(a=e.tokens[s].children,t=a.length-1;t>=0;t--)i=a[t],"text"===i.type&&(o=i.content,o=n(o),r.test(o)&&(o=o.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),i.content=o)}},function(e,t){"use strict";function n(e,t){return!(t<0||t>=e.length)&&!a.test(e[t])}function r(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}var i=/['"]/,o=/['"]/g,a=/[-\s()\[\]]/,s="’";e.exports=function(e){var t,a,u,c,l,p,f,h,d,m,y,v,g,_,b,x,w;if(e.options.typographer)for(w=[],b=e.tokens.length-1;b>=0;b--)if("inline"===e.tokens[b].type)for(x=e.tokens[b].children,w.length=0,t=0;t=0&&!(w[g].level<=f);g--);w.length=g+1,u=a.content,l=0,p=u.length;e:for(;l=0&&(m=w[g],!(w[g].level\s]/i.test(e)}function i(e){return/^<\/a\s*>/i.test(e)}function o(){var e=[],t=new a({stripPrefix:!1,url:!0,email:!0,twitter:!1,replaceFn:function(t,n){switch(n.getType()){case"url":e.push({text:n.matchedText,url:n.getUrl()});break;case"email":e.push({text:n.matchedText,url:"mailto:"+n.getEmail().replace(/^mailto:/i,"")})}return!1}});return{links:e,autolinker:t}}var a=n(1303),s=/www|@|\:\/\//;e.exports=function(e){var t,n,a,u,c,l,p,f,h,d,m,y,v,g=e.tokens,_=null;if(e.options.linkify)for(n=0,a=g.length;n=0;t--)if(c=u[t],"link_close"!==c.type){if("htmltag"===c.type&&(r(c.content)&&m>0&&m--,i(c.content)&&m++),!(m>0)&&"text"===c.type&&s.test(c.content)){if(_||(_=o(),y=_.links,v=_.autolinker),l=c.content,y.length=0,v.link(l),!y.length)continue;for(p=[],d=c.level,f=0;f + * MIT Licensed. http://www.opensource.org/licenses/mit-license.php + * + * https://github.com/gregjacobs/Autolinker.js + */ +var e=function(t){e.Util.assign(this,t)};return e.prototype={constructor:e,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser(),n=t.parse(e),r=0,i=[],o=0,a=n.length;ot&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n",this.getInnerHtml(),""].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){var n=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())});return n},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(t){return e.Util.ellipsis(t,this.truncate||Number.POSITIVE_INFINITY)}}),e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z][0-9a-zA-Z:]*/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,n=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,r=t.source+"(?:\\s*=\\s*"+n.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",r,"|",n.source+")",")*",">",")","|","(?:","<(/)?","("+e.source+")","(?:","\\s+",r,")*","\\s*/?",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,i=0,o=[];null!==(t=r.exec(e));){var a=t[0],s=t[1]||t[3],u=!!t[2],c=e.substring(i,t.index);c&&(n=this.parseTextAndEntityNodes(c),o.push.apply(o,n)),o.push(this.createElementNode(a,s,u)),i=t.index+a.length}if(i=n))&&!(e.tShift[s]=0&&(e=e.replace(s,function(t,n){var r;return 10===e.charCodeAt(n)?(a=n+1,l=0,t):(r=" ".slice((n-a-l)%4),l=n-a+1,r)})),i=new o(e,this,t,n,r),void this.tokenize(i,i.line,i.lineMax)):[]},e.exports=r},function(e,t){"use strict";function n(e,t,n,r,i){var o,a,s,u,c,l,p;for(this.src=e,this.parser=t,this.options=n,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",a=this.src,l=0,p=!1,s=u=l=0,c=a.length;u=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,t,n,r){var i,o,a,s,u,c=e;if(e>=t)return"";if(c+1===t)return o=this.bMarks[c]+Math.min(this.tShift[c],n),a=r?this.eMarks[c]+1:this.eMarks[c],this.src.slice(o,a);for(s=new Array(t-e),i=0;cn&&(u=n),u<0&&(u=0),o=this.bMarks[c]+u,a=c+1=4))break;r++,i=r}return e.line=r,e.tokens.push({type:"code",content:e.getLines(t,i,4+e.blkIndent,!0),block:!0,lines:[t,e.line],level:e.level}),!0}},function(e,t){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c=!1,l=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(l+3>p)return!1;if(i=e.src.charCodeAt(l),126!==i&&96!==i)return!1;if(u=l,l=e.skipChars(l,i),o=l-u,o<3)return!1;if(a=e.src.slice(l,p).trim(),a.indexOf("`")>=0)return!1;if(r)return!0;for(s=t;(s++,!(s>=n))&&(l=u=e.bMarks[s]+e.tShift[s],p=e.eMarks[s],!(l=4||(l=e.skipChars(l,i),l-uy)return!1;if(62!==e.src.charCodeAt(m++))return!1;if(e.level>=e.options.maxNesting)return!1;if(r)return!0;for(32===e.src.charCodeAt(m)&&m++,u=e.blkIndent,e.blkIndent=0,s=[e.bMarks[t]],e.bMarks[t]=m,m=m=y,a=[e.tShift[t]],e.tShift[t]=m-e.bMarks[t],p=e.parser.ruler.getRules("blockquote"),i=t+1;i=y));i++)if(62!==e.src.charCodeAt(m++)){if(o)break;for(d=!1,f=0,h=p.length;f=y,a.push(e.tShift[i]),e.tShift[i]=m-e.bMarks[i];for(c=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:l=[t,0],level:e.level++}),e.parser.tokenize(e,t,i),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=c,l[1]=e.line,f=0;fu)return!1;if(i=e.src.charCodeAt(s++),42!==i&&45!==i&&95!==i)return!1;for(o=1;s=i?-1:(n=e.src.charCodeAt(r++),42!==n&&45!==n&&43!==n?-1:r=i)return-1;if(n=e.src.charCodeAt(r++),n<48||n>57)return-1;for(;;){if(r>=i)return-1;if(n=e.src.charCodeAt(r++),!(n>=48&&n<=57)){if(41===n||46===n)break;return-1}}return r=0)_=!0;else{if(!((d=n(e,t))>=0))return!1;_=!1}if(e.level>=e.options.maxNesting)return!1;if(g=e.src.charCodeAt(d-1),a)return!0;for(x=e.tokens.length,_?(h=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(h,d-h-1)),e.tokens.push({type:"ordered_list_open",order:v,lines:k=[t,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:k=[t,0],level:e.level++}),s=t,w=!1,E=e.parser.ruler.getRules("list");!(!(s=m?1:b-d,y>4&&(y=1),y<1&&(y=1),u=d-e.bMarks[s]+y,e.tokens.push({type:"list_item_open",lines:S=[t,0],level:e.level++}),l=e.blkIndent,p=e.tight,c=e.tShift[t],f=e.parentType,e.tShift[t]=b-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.parser.tokenize(e,t,o,!0),e.tight&&!w||(O=!1),w=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=l,e.tShift[t]=c,e.tight=p,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),s=t=e.line,S[1]=s,b=e.bMarks[t],s>=o)||e.isEmpty(s)||e.tShift[s]l)return!1;if(91!==e.src.charCodeAt(c))return!1;if(94!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(s=c+2;s=l||58!==e.src.charCodeAt(++s))&&(!!r||(s++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),u=e.src.slice(c+2,s-2),e.env.footnotes.refs[":"+u]=-1,e.tokens.push({type:"footnote_reference_open",label:u,level:e.level++}),i=e.bMarks[t],o=e.tShift[t],a=e.parentType,e.tShift[t]=e.skipSpaces(s)-s,e.bMarks[t]=s,e.blkIndent+=4,e.parentType="footnote",e.tShift[t]=u)return!1;if(i=e.src.charCodeAt(s),35!==i||s>=u)return!1;for(o=1,i=e.src.charCodeAt(++s);35===i&&s6||ss&&32===e.src.charCodeAt(a-1)&&(u=a),e.line=t+1,e.tokens.push({type:"heading_open",hLevel:o,lines:[t,e.line],level:e.level}),s=n)&&(!(e.tShift[a]3)&&(i=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],!(i>=o)&&(r=e.src.charCodeAt(i),(45===r||61===r)&&(i=e.skipChars(i,r),i=e.skipSpaces(i),!(i=97&&t<=122}var i=n(1315),o=/^<([a-zA-Z]{1,15})[\s\/>]/,a=/^<\/([a-zA-Z]{1,15})[\s>]/;e.exports=function(e,t,n,s){var u,c,l,p=e.bMarks[t],f=e.eMarks[t],h=e.tShift[t];if(p+=h,!e.options.html)return!1;if(h>3||p+2>=f)return!1;if(60!==e.src.charCodeAt(p))return!1;if(u=e.src.charCodeAt(p+1),33===u||63===u){if(s)return!0}else{if(47!==u&&!r(u))return!1;if(47===u){if(c=e.src.slice(p,f).match(a),!c)return!1}else if(c=e.src.slice(p,f).match(o),!c)return!1;if(i[c[1].toLowerCase()]!==!0)return!1;if(s)return!0}for(l=t+1;lr)return!1;if(c=t+1,e.tShift[c]=e.eMarks[c])return!1;if(o=e.src.charCodeAt(s),124!==o&&45!==o&&58!==o)return!1;if(a=n(e,t+1),!/^[-:| ]+$/.test(a))return!1;if(l=a.split("|"),l<=2)return!1;for(f=[],u=0;u=o?-1:(r=e.src.charCodeAt(i++),126!==r&&58!==r?-1:(n=e.skipSpaces(i),i===n?-1:n>=o?-1:n))}function r(e,t){var n,r,i=e.level+2;for(n=t+2,r=e.tokens.length-2;n=0;if(f=t+1,e.isEmpty(f)&&++f>i)return!1;if(e.tShift[f]=e.options.maxNesting)return!1;p=e.tokens.length,e.tokens.push({type:"dl_open",lines:l=[t,0],level:e.level++}),u=t,s=f;e:for(;;){for(_=!0,g=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[f,0],level:e.level++}),v=e.tight,d=e.ddIndent,h=e.blkIndent,y=e.tShift[s],m=e.parentType,e.blkIndent=e.ddIndent=e.tShift[s]+2,e.tShift[s]=a-e.bMarks[s],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,s,i,!0),e.tight&&!g||(_=!1),g=e.line-s>1&&e.isEmpty(e.line-1),e.tShift[s]=y,e.tight=v,e.parentType=m,e.blkIndent=h,e.ddIndent=d,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=f=e.line,f>=i)break e;if(e.tShift[f]=i)break;if(u=f,e.isEmpty(u))break;if(e.tShift[u]=i)break;if(e.isEmpty(s)&&s++,s>=i)break;if(e.tShift[s]3)){for(i=!1,o=0,a=s.length;o0)return void(e.pos=n);for(t=0;t=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},r.prototype.parse=function(e,t,n,r){var i=new a(e,this,t,n,r);this.tokenize(i)},e.exports=r},function(e,t){"use strict";function n(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}e.exports=function(e,t){for(var r=e.pos;r=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(var o=n-2;o>=0;o--)if(32!==e.pending.charCodeAt(o)){e.pending=e.pending.substring(0,o+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(i++;i?@[]^_`{|}~-".split("").forEach(function(e){n[e.charCodeAt(0)]=1}),e.exports=function(e,t){var r,i=e.pos,o=e.posMax;if(92!==e.src.charCodeAt(i))return!1;if(i++,i=s)return!1;if(126!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),126===o)return!1;if(126===a)return!1;if(32===a||10===a)return!1;for(r=u+2;ru+3)return e.pos+=r-u,t||(e.pending+=e.src.slice(u,r)),!0;for(e.pos=u+2,i=1;e.pos+1=s)return!1;if(43!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1; +if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),43===o)return!1;if(43===a)return!1;if(32===a||10===a)return!1;for(r=u+2;r=s)return!1;if(61!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),61===o)return!1;if(61===a)return!1;if(32===a||10===a)return!1;for(r=u+2;r=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function r(e,t){var r,i,o,a=t,s=!0,u=!0,c=e.posMax,l=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):-1;a=c&&(s=!1),o=a-t,o>=4?s=u=!1:(i=a=e.options.maxNesting)return!1;for(e.pos=p+n,u=[n];e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var r,i,o=e.posMax,a=e.pos;if(126!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var r,i,o=e.posMax,a=e.pos;if(94!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos=e.options.maxNesting)return!1;if(n=v+1,s=r(e,v),s<0)return!1;if(p=s+1,p=y)return!1;for(v=p,i(e,p)?(c=e.linkContent,p=e.pos):c="",v=p;p=y||41!==e.src.charCodeAt(p))return e.pos=m,!1;p++}else{if(e.linkLevel>0)return!1;for(;p=0?u=e.src.slice(v,p++):p=v-1),u||("undefined"==typeof u&&(p=s+1),u=e.src.slice(n,s)),f=e.env.references[a(u)],!f)return e.pos=m,!1;c=f.href,l=f.title}return t||(e.pos=n,e.posMax=s,d?e.push({type:"image",src:c,title:l,alt:e.src.substr(n,s-n),level:e.level}):(e.push({type:"link_open",href:c,title:l,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=p,e.posMax=y,!0}},function(e,t,n){"use strict";var r=n(1291);e.exports=function(e,t){var n,i,o,a,s=e.posMax,u=e.pos;return!(u+2>=s)&&(94===e.src.charCodeAt(u)&&(91===e.src.charCodeAt(u+1)&&(!(e.level>=e.options.maxNesting)&&(n=u+2,i=r(e,u+1),!(i<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.pos=n,e.posMax=i,e.push({type:"footnote_ref",id:o,level:e.level}),e.linkLevel++,a=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[o]={tokens:e.tokens.splice(a)},e.linkLevel--),e.pos=i+1,e.posMax=s,!0)))))}},function(e,t){"use strict";e.exports=function(e,t){var n,r,i,o,a=e.posMax,s=e.pos;if(s+3>a)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(s))return!1;if(94!==e.src.charCodeAt(s+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(r=s+2;r=a)&&(r++,n=e.src.slice(s+2,r-1),"undefined"!=typeof e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(i=e.env.footnotes.list.length,e.env.footnotes.list[i]={label:n,count:0},e.env.footnotes.refs[":"+n]=i):i=e.env.footnotes.refs[":"+n],o=e.env.footnotes.list[i].count,e.env.footnotes.list[i].count++,e.push({type:"footnote_ref",id:i,subId:o,level:e.level})),e.pos=r,e.posMax=a,!0)))}},function(e,t,n){"use strict";var r=n(1334),i=n(1294),o=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,a=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,s,u,c,l,p=e.pos;return 60===e.src.charCodeAt(p)&&(n=e.src.slice(p),!(n.indexOf(">")<0)&&((s=n.match(a))?!(r.indexOf(s[1].toLowerCase())<0)&&(c=s[0].slice(1,-1),l=i(c),!!e.parser.validateLink(c)&&(t||(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:c,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0)):(u=n.match(o),!!u&&(c=u[0].slice(1,-1),l=i("mailto:"+c),!!e.parser.validateLink(l)&&(t||(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:c,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=u[0].length,!0)))))}},function(e,t){"use strict";e.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},function(e,t,n){"use strict";function r(e){var t=32|e;return t>=97&&t<=122}var i=n(1336).HTML_TAG_RE;e.exports=function(e,t){var n,o,a,s=e.pos;return!!e.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(s)||s+2>=a)&&(n=e.src.charCodeAt(s+1),!(33!==n&&63!==n&&47!==n&&!r(n))&&(!!(o=e.src.slice(s).match(i))&&(t||e.push({type:"htmltag",content:e.src.slice(s,s+o[0].length),level:e.level}),e.pos+=o[0].length,!0))))}},function(e,t){"use strict";function n(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,e=e.replace(r,i),n):new RegExp(e,t)}}var r=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,i=/[^"'=<>`\x00-\x20]+/,o=/'[^']*'/,a=/"[^"]*"/,s=n(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",i)("single_quoted",o)("double_quoted",a)(),u=n(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",r)("attr_value",s)(),c=n(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",u)(),l=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,p=//,f=/<[?].*?[?]>/,h=/]*>/,d=/])*\]\]>/,m=n(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",c)("close_tag",l)("comment",p)("processing",f)("declaration",h)("cdata",d)();e.exports.HTML_TAG_RE=m},function(e,t,n){"use strict";var r=n(1283),i=n(1282).has,o=n(1282).isValidEntityCode,a=n(1282).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l,p=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(p+1/g,">").replace(/\"/g,""")}function f(e,n){n=n.replace(/[\x00-\x20]+/g,""),n=n.replace(/<\!\-\-.*?\-\-\>/g,"");var r=n.match(/^([a-zA-Z]+)\:/);if(!r)return!!n.match(/^\/\//)&&!t.allowProtocolRelative;var o=r[1].toLowerCase();return i(t.allowedSchemesByTag,e)?t.allowedSchemesByTag[e].indexOf(o)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(o)===-1}function h(e,t){return t?(e=e.split(/\s+/),e.filter(function(e){return t.indexOf(e)!==-1}).join(" ")):e}var d="";t?(t=s(o.defaults,t),t.parser?t.parser=s(c,t.parser):t.parser=c):(t=o.defaults,t.parser=c);var m,y,v=t.nonTextTags||["script","style","textarea"];t.allowedAttributes&&(m={},y={},r(t.allowedAttributes,function(e,t){m[t]=[];var n=[];e.forEach(function(e){e.indexOf("*")>=0?n.push(u(e).replace(/\\\*/g,".*")):m[t].push(e)}),y[t]=new RegExp("^("+n.join("|")+")$")}));var g={};r(t.allowedClasses,function(e,t){m&&(i(m,t)||(m[t]=[]),m[t].push("class")),g[t]=e});var _,b={};r(t.transformTags,function(e,t){var n;"function"==typeof e?n=e:"string"==typeof e&&(n=o.simpleTransform(e)),"*"===t?_=n:b[t]=n});var x=0,w=[],k={},S={},E=!1,C=0,A=new a.Parser({onopentag:function(e,n){if(E)return void C++;var o=new l(e,n);w.push(o);var a,s=!1,u=!!o.text;i(b,e)&&(a=b[e](e,n),o.attribs=n=a.attribs,void 0!==a.text&&(o.innerText=a.text),e!==a.tagName&&(o.name=e=a.tagName,S[x]=a.tagName)),_&&(a=_(e,n),o.attribs=n=a.attribs,e!==a.tagName&&(o.name=e=a.tagName,S[x]=a.tagName)),t.allowedTags&&t.allowedTags.indexOf(e)===-1&&(s=!0,v.indexOf(e)!==-1&&(E=!0,C=1),k[x]=!0),x++,s||(d+="<"+e,(!m||i(m,e)||m["*"])&&r(n,function(t,n){if(!m||i(m,e)&&m[e].indexOf(n)!==-1||m["*"]&&m["*"].indexOf(n)!==-1||i(y,e)&&y[e].test(n)||y["*"]&&y["*"].test(n)){if(("href"===n||"src"===n)&&f(e,t))return void delete o.attribs[n];if("class"===n&&(t=h(t,g[e]),!t.length))return void delete o.attribs[n];d+=" "+n,t.length&&(d+='="'+p(t)+'"')}else delete o.attribs[n]}),t.selfClosing.indexOf(e)!==-1?d+=" />":(d+=">",!o.innerText||u||t.textFilter||(d+=o.innerText)))},ontext:function(e){if(!E){var n,r=w[w.length-1];if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"script"===n||"style"===n)d+=e;else{var i=p(e);d+=t.textFilter?t.textFilter(i):i}if(w.length){var o=w[w.length-1];o.text+=e}}},onclosetag:function(e){if(E){if(C--,C)return;E=!1}var n=w.pop();if(n){if(E=!1,x--,k[x])return delete k[x],void n.updateParentNodeText();if(S[x]&&(e=S[x],delete S[x]),t.exclusiveFilter&&t.exclusiveFilter(n))return void(d=d.substr(0,n.tagPosition));n.updateParentNodeText(),t.selfClosing.indexOf(e)===-1&&(d+="")}}},t.parser);return A.write(e),A.end(),d}var a=n(1342),s=n(1372),u=n(1373);e.exports=o;var c={decodeEntities:!0};o.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},o.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){var o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){function r(t,n){return delete e.exports[t],e.exports[t]=n,n}var i=n(1343),o=n(1350);e.exports={Parser:i,Tokenizer:n(1344),ElementType:n(1351),DomHandler:o,get FeedHandler(){return r("FeedHandler",n(1354))},get Stream(){return r("Stream",n(1355))},get WritableStream(){return r("WritableStream",n(1356))},get ProxyHandler(){return r("ProxyHandler",n(1358))},get DomUtils(){return r("DomUtils",n(1359))},get CollectingHandler(){return r("CollectingHandler",n(1371))},DefaultHandler:o,get RssHandler(){return r("RssHandler",this.FeedHandler)},parseDOM:function(e,t){var n=new o(t);return new i(n,t).end(e),n.dom},parseFeed:function(t,n){var r=new e.exports.FeedHandler(n);return new i(r,n).end(t),r.dom},createDomStream:function(e,t,n){var r=new o(e,t,n);return new i(r,t)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(e,t,n){function r(e,t){this._options=t||{},this._cbs=e||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=n(1344),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},a={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},s={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;n(474)(r,n(473).EventEmitter),r.prototype._updatePosition=function(e){null===this.endIndex?this._tokenizer._sectionStart<=e?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},r.prototype.ontext=function(e){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(e)},r.prototype.onopentagname=function(e){if(this._lowerCaseTagNames&&(e=e.toLowerCase()),this._tagname=e,!this._options.xmlMode&&e in a)for(var t;(t=this._stack[this._stack.length-1])in a[e];this.onclosetag(t));!this._options.xmlMode&&e in s||this._stack.push(e),this._cbs.onopentagname&&this._cbs.onopentagname(e),this._cbs.onopentag&&(this._attribs={})},r.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in s&&this._cbs.onclosetag(this._tagname),this._tagname=""},r.prototype.onclosetag=function(e){if(this._updatePosition(1),this._lowerCaseTagNames&&(e=e.toLowerCase()),!this._stack.length||e in s&&!this._options.xmlMode)this._options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this._closeCurrentTag());else{var t=this._stack.lastIndexOf(e);if(t!==-1)if(this._cbs.onclosetag)for(t=this._stack.length-t;t--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=t;else"p"!==e||this._options.xmlMode||(this.onopentagname(e),this._closeCurrentTag())}},r.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},r.prototype._closeCurrentTag=function(){var e=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===e&&(this._cbs.onclosetag&&this._cbs.onclosetag(e),this._stack.pop())},r.prototype.onattribname=function(e){this._lowerCaseAttributeNames&&(e=e.toLowerCase()),this._attribname=e},r.prototype.onattribdata=function(e){this._attribvalue+=e},r.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},r.prototype._getInstructionName=function(e){var t=e.search(u),n=t<0?e:e.substr(0,t);return this._lowerCaseTagNames&&(n=n.toLowerCase()),n},r.prototype.ondeclaration=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("!"+t,"!"+e)}},r.prototype.onprocessinginstruction=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("?"+t,"?"+e)}},r.prototype.oncomment=function(e){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(e),this._cbs.oncommentend&&this._cbs.oncommentend()},r.prototype.oncdata=function(e){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(e),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+e+"]]")},r.prototype.onerror=function(e){this._cbs.onerror&&this._cbs.onerror(e)},r.prototype.onend=function(){if(this._cbs.onclosetag)for(var e=this._stack.length;e>0;this._cbs.onclosetag(this._stack[--e]));this._cbs.onend&&this._cbs.onend()},r.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},r.prototype.parseComplete=function(e){this.reset(),this.end(e)},r.prototype.write=function(e){this._tokenizer.write(e)},r.prototype.end=function(e){this._tokenizer.end(e)},r.prototype.pause=function(){this._tokenizer.pause()},r.prototype.resume=function(){this._tokenizer.resume()},r.prototype.parseChunk=r.prototype.write,r.prototype.done=r.prototype.end,e.exports=r},function(e,t,n){function r(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function i(e,t){return function(n){n===e&&(this._state=t)}}function o(e,t,n){var r=e.toLowerCase();return e===r?function(e){e===r?this._state=t:(this._state=n,this._index--)}:function(i){i===r||i===e?this._state=t:(this._state=n,this._index--)}}function a(e,t){var n=e.toLowerCase();return function(r){r===n||r===e?this._state=t:(this._state=m,this._index--)}}function s(e,t){this._state=h,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=h,this._special=me,this._cbs=t,this._running=!0,this._ended=!1,this._xmlMode=!(!e||!e.xmlMode),this._decodeEntities=!(!e||!e.decodeEntities)}e.exports=s;var u=n(1345),c=n(1347),l=n(1348),p=n(1349),f=0,h=f++,d=f++,m=f++,y=f++,v=f++,g=f++,_=f++,b=f++,x=f++,w=f++,k=f++,S=f++,E=f++,C=f++,A=f++,T=f++,O=f++,D=f++,M=f++,P=f++,I=f++,j=f++,R=f++,N=f++,F=f++,B=f++,L=f++,z=f++,q=f++,U=f++,W=f++,K=f++,V=f++,H=f++,J=f++,G=f++,X=f++,Y=f++,$=f++,Z=f++,Q=f++,ee=f++,te=f++,ne=f++,re=f++,ie=f++,oe=f++,ae=f++,se=f++,ue=f++,ce=f++,le=f++,pe=f++,fe=f++,he=f++,de=0,me=de++,ye=de++,ve=de++;s.prototype._stateText=function(e){"<"===e?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===me&&"&"===e&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=h,this._state=ce,this._sectionStart=this._index)},s.prototype._stateBeforeTagName=function(e){"/"===e?this._state=v:"<"===e?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===e||this._special!==me||r(e)?this._state=h:"!"===e?(this._state=A,this._sectionStart=this._index+1):"?"===e?(this._state=O,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==e&&"S"!==e?m:W,this._sectionStart=this._index)},s.prototype._stateInTagName=function(e){("/"===e||">"===e||r(e))&&(this._emitToken("onopentagname"),this._state=b,this._index--)},s.prototype._stateBeforeCloseingTagName=function(e){r(e)||(">"===e?this._state=h:this._special!==me?"s"===e||"S"===e?this._state=K:(this._state=h,this._index--):(this._state=g,this._sectionStart=this._index))},s.prototype._stateInCloseingTagName=function(e){(">"===e||r(e))&&(this._emitToken("onclosetag"),this._state=_,this._index--)},s.prototype._stateAfterCloseingTagName=function(e){">"===e&&(this._state=h,this._sectionStart=this._index+1)},s.prototype._stateBeforeAttributeName=function(e){">"===e?(this._cbs.onopentagend(),this._state=h,this._sectionStart=this._index+1):"/"===e?this._state=y:r(e)||(this._state=x,this._sectionStart=this._index)},s.prototype._stateInSelfClosingTag=function(e){">"===e?(this._cbs.onselfclosingtag(),this._state=h,this._sectionStart=this._index+1):r(e)||(this._state=b,this._index--)},s.prototype._stateInAttributeName=function(e){("="===e||"/"===e||">"===e||r(e))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=w,this._index--)},s.prototype._stateAfterAttributeName=function(e){"="===e?this._state=k:"/"===e||">"===e?(this._cbs.onattribend(),this._state=b,this._index--):r(e)||(this._cbs.onattribend(),this._state=x,this._sectionStart=this._index)},s.prototype._stateBeforeAttributeValue=function(e){'"'===e?(this._state=S,this._sectionStart=this._index+1):"'"===e?(this._state=E,this._sectionStart=this._index+1):r(e)||(this._state=C,this._sectionStart=this._index,this._index--)},s.prototype._stateInAttributeValueDoubleQuotes=function(e){'"'===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateInAttributeValueSingleQuotes=function(e){"'"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateInAttributeValueNoQuotes=function(e){r(e)||">"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b,this._index--):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateBeforeDeclaration=function(e){this._state="["===e?j:"-"===e?D:T},s.prototype._stateInDeclaration=function(e){">"===e&&(this._cbs.ondeclaration(this._getSection()),this._state=h,this._sectionStart=this._index+1)},s.prototype._stateInProcessingInstruction=function(e){">"===e&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=h,this._sectionStart=this._index+1)},s.prototype._stateBeforeComment=function(e){"-"===e?(this._state=M,this._sectionStart=this._index+1):this._state=T},s.prototype._stateInComment=function(e){"-"===e&&(this._state=P)},s.prototype._stateAfterComment1=function(e){"-"===e?this._state=I:this._state=M},s.prototype._stateAfterComment2=function(e){">"===e?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):"-"!==e&&(this._state=M)},s.prototype._stateBeforeCdata1=o("C",R,T),s.prototype._stateBeforeCdata2=o("D",N,T),s.prototype._stateBeforeCdata3=o("A",F,T),s.prototype._stateBeforeCdata4=o("T",B,T),s.prototype._stateBeforeCdata5=o("A",L,T),s.prototype._stateBeforeCdata6=function(e){"["===e?(this._state=z,this._sectionStart=this._index+1):(this._state=T,this._index--)},s.prototype._stateInCdata=function(e){"]"===e&&(this._state=q)},s.prototype._stateAfterCdata1=i("]",U),s.prototype._stateAfterCdata2=function(e){">"===e?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):"]"!==e&&(this._state=z)},s.prototype._stateBeforeSpecial=function(e){"c"===e||"C"===e?this._state=V:"t"===e||"T"===e?this._state=te:(this._state=m,this._index--)},s.prototype._stateBeforeSpecialEnd=function(e){this._special!==ye||"c"!==e&&"C"!==e?this._special!==ve||"t"!==e&&"T"!==e?this._state=h:this._state=oe:this._state=Y},s.prototype._stateBeforeScript1=a("R",H),s.prototype._stateBeforeScript2=a("I",J),s.prototype._stateBeforeScript3=a("P",G),s.prototype._stateBeforeScript4=a("T",X),s.prototype._stateBeforeScript5=function(e){("/"===e||">"===e||r(e))&&(this._special=ye),this._state=m,this._index--},s.prototype._stateAfterScript1=o("R",$,h),s.prototype._stateAfterScript2=o("I",Z,h),s.prototype._stateAfterScript3=o("P",Q,h),s.prototype._stateAfterScript4=o("T",ee,h),s.prototype._stateAfterScript5=function(e){">"===e||r(e)?(this._special=me,this._state=g,this._sectionStart=this._index-6,this._index--):this._state=h},s.prototype._stateBeforeStyle1=a("Y",ne),s.prototype._stateBeforeStyle2=a("L",re),s.prototype._stateBeforeStyle3=a("E",ie),s.prototype._stateBeforeStyle4=function(e){("/"===e||">"===e||r(e))&&(this._special=ve),this._state=m,this._index--},s.prototype._stateAfterStyle1=o("Y",ae,h),s.prototype._stateAfterStyle2=o("L",se,h),s.prototype._stateAfterStyle3=o("E",ue,h),s.prototype._stateAfterStyle4=function(e){">"===e||r(e)?(this._special=me,this._state=g,this._sectionStart=this._index-5,this._index--):this._state=h},s.prototype._stateBeforeEntity=o("#",le,pe),s.prototype._stateBeforeNumericEntity=o("X",he,fe),s.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(t=6);t>=2;){var n=this._buffer.substr(e,t);if(l.hasOwnProperty(n))return this._emitPartial(l[n]),void(this._sectionStart+=t+1);t--}},s.prototype._stateInNamedEntity=function(e){";"===e?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(e<"A"||e>"Z")&&(e<"0"||e>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==h?"="!==e&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},s.prototype._decodeNumericEntity=function(e,t){var n=this._sectionStart+e;if(n!==this._index){var r=this._buffer.substring(n,this._index),i=parseInt(r,t);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},s.prototype._stateInNumericEntity=function(e){";"===e?(this._decodeNumericEntity(2,10),this._sectionStart++):(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},s.prototype._stateInHexEntity=function(e){";"===e?(this._decodeNumericEntity(3,16),this._sectionStart++):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},s.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._bufferOffset+=this._index,this._index=0):this._running&&(this._state===h?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},s.prototype.write=function(e){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=e,this._parse()},s.prototype._parse=function(){for(;this._index=55296&&e<=57343||e>1114111)return"�";e in i&&(e=i[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}var i=n(1346);e.exports=r},function(e,t){e.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(e,t){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t){e.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(e,t){e.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(e,t,n){function r(e,t,n){"object"==typeof e?(n=t,t=e,e=null):"function"==typeof t&&(n=t,t=u),this._callback=e,this._options=t||u,this._elementCB=n,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=n(1351),o=/\s+/g,a=n(1352),s=n(1353),u={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};r.prototype.onparserinit=function(e){this._parser=e},r.prototype.onreset=function(){r.call(this,this._callback,this._options,this._elementCB)},r.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},r.prototype._handleCallback=r.prototype.onerror=function(e){if("function"==typeof this._callback)this._callback(e,this.dom);else if(e)throw e},r.prototype.onclosetag=function(){var e=this._tagStack.pop();this._options.withEndIndices&&(e.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(e)},r.prototype._createDomElement=function(e){if(!this._options.withDomLvl1)return e;var t;t="tag"===e.type?Object.create(s):Object.create(a);for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r.prototype._addDomElement=function(e){var t=this._tagStack[this._tagStack.length-1],n=t?t.children:this.dom,r=n[n.length-1];e.next=null,this._options.withStartIndices&&(e.startIndex=this._parser.startIndex),this._options.withEndIndices&&(e.endIndex=this._parser.endIndex),r?(e.prev=r,r.next=e):e.prev=null,n.push(e),e.parent=t||null},r.prototype.onopentag=function(e,t){var n={type:"script"===e?i.Script:"style"===e?i.Style:i.Tag,name:e,attribs:t,children:[]},r=this._createDomElement(n);this._addDomElement(r),this._tagStack.push(r)},r.prototype.ontext=function(e){var t,n=this._options.normalizeWhitespace||this._options.ignoreWhitespace;if(!this._tagStack.length&&this.dom.length&&(t=this.dom[this.dom.length-1]).type===i.Text)n?t.data=(t.data+e).replace(o," "):t.data+=e;else if(this._tagStack.length&&(t=this._tagStack[this._tagStack.length-1])&&(t=t.children[t.children.length-1])&&t.type===i.Text)n?t.data=(t.data+e).replace(o," "):t.data+=e;else{n&&(e=e.replace(o," "));var r=this._createDomElement({data:e,type:i.Text});this._addDomElement(r)}},r.prototype.oncomment=function(e){var t=this._tagStack[this._tagStack.length-1];if(t&&t.type===i.Comment)return void(t.data+=e);var n={data:e,type:i.Comment},r=this._createDomElement(n);this._addDomElement(r),this._tagStack.push(r)},r.prototype.oncdatastart=function(){var e={children:[{data:"",type:i.Text}],type:i.CDATA},t=this._createDomElement(e);this._addDomElement(t),this._tagStack.push(t)},r.prototype.oncommentend=r.prototype.oncdataend=function(){this._tagStack.pop()},r.prototype.onprocessinginstruction=function(e,t){var n=this._createDomElement({name:e,data:t,type:i.Directive});this._addDomElement(n)},e.exports=r},function(e,t){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},function(e,t){var n=e.exports={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return i[this.type]||i.element}},r={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(r).forEach(function(e){var t=r[e];Object.defineProperty(n,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},function(e,t,n){var r=n(1352),i=e.exports=Object.create(r),o={tagName:"name"};Object.keys(o).forEach(function(e){var t=o[e];Object.defineProperty(i,e,{ +get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},function(e,t,n){function r(e,t){this.init(e,t)}function i(e,t){return l.getElementsByTagName(e,t,!0)}function o(e,t){return l.getElementsByTagName(e,t,!0,1)[0]}function a(e,t,n){return l.getText(l.getElementsByTagName(e,t,n,1)).trim()}function s(e,t,n,r,i){var o=a(n,r,i);o&&(e[t]=o)}var u=n(1342),c=u.DomHandler,l=u.DomUtils;n(474)(r,c),r.prototype.init=c;var p=function(e){return"rss"===e||"feed"===e||"rdf:RDF"===e};r.prototype.onend=function(){var e,t,n={},r=o(p,this.dom);r&&("feed"===r.name?(t=r.children,n.type="atom",s(n,"id","id",t),s(n,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(n.link=e),s(n,"description","subtitle",t),(e=a("updated",t))&&(n.updated=new Date(e)),s(n,"author","email",t,!0),n.items=i("entry",t).map(function(e){var t,n={};return e=e.children,s(n,"id","id",e),s(n,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(n.link=t),(t=a("summary",e)||a("content",e))&&(n.description=t),(t=a("updated",e))&&(n.pubDate=new Date(t)),n})):(t=o("channel",r.children).children,n.type=r.name.substr(0,3),n.id="",s(n,"title","title",t),s(n,"link","link",t),s(n,"description","description",t),(e=a("lastBuildDate",t))&&(n.updated=new Date(e)),s(n,"author","managingEditor",t,!0),n.items=i("item",r.children).map(function(e){var t,n={};return e=e.children,s(n,"id","guid",e),s(n,"title","title",e),s(n,"link","link",e),s(n,"description","description",e),(t=a("pubDate",e))&&(n.pubDate=new Date(t)),n}))),this.dom=n,c.prototype._handleCallback.call(this,r?null:Error("couldn't find root of feed"))},e.exports=r},function(e,t,n){function r(e){o.call(this,new i(this),e)}function i(e){this.scope=e}e.exports=r;var o=n(1356);n(474)(r,o),r.prototype.readable=!0;var a=n(1342).EVENTS;Object.keys(a).forEach(function(e){if(0===a[e])i.prototype["on"+e]=function(){this.scope.emit(e)};else if(1===a[e])i.prototype["on"+e]=function(t){this.scope.emit(e,t)};else{if(2!==a[e])throw Error("wrong number of arguments!");i.prototype["on"+e]=function(t,n){this.scope.emit(e,t,n)}}})},function(e,t,n){function r(e,t){var n=this._parser=new i(e,t),r=this._decoder=new a;o.call(this,{decodeStrings:!1}),this.once("finish",function(){n.end(r.end())})}e.exports=r;var i=n(1343),o=n(472).Writable||n(1357).Writable,a=n(488).StringDecoder,s=n(299).Buffer;n(474)(r,o),o.prototype._write=function(e,t,n){e instanceof s&&(e=this._decoder.write(e)),this._parser.write(e),n()}},481,function(e,t,n){function r(e){this._cbs=e||{}}e.exports=r;var i=n(1342).EVENTS;Object.keys(i).forEach(function(e){if(0===i[e])e="on"+e,r.prototype[e]=function(){this._cbs[e]&&this._cbs[e]()};else if(1===i[e])e="on"+e,r.prototype[e]=function(t){this._cbs[e]&&this._cbs[e](t)};else{if(2!==i[e])throw Error("wrong number of arguments");e="on"+e,r.prototype[e]=function(t,n){this._cbs[e]&&this._cbs[e](t,n)}}})},function(e,t,n){var r=e.exports;[n(1360),n(1366),n(1367),n(1368),n(1369),n(1370)].forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t].bind(r)})})},function(e,t,n){function r(e,t){return e.children?e.children.map(function(e){return a(e,t)}).join(""):""}function i(e){return Array.isArray(e)?e.map(i).join(""):s(e)||e.type===o.CDATA?i(e.children):e.type===o.Text?e.data:""}var o=n(1351),a=n(1361),s=o.isTag;e.exports={getInnerHTML:r,getOuterHTML:a,getText:i}},function(e,t,n){function r(e,t){if(e){var n,r="";for(var i in e)n=e[i],r&&(r+=" "),r+=!n&&p[i]?i:i+'="'+(t.decodeEntities?l.encodeXML(n):n)+'"';return r}}function i(e,t){"svg"===e.name&&(t={decodeEntities:t.decodeEntities,xmlMode:!0});var n="<"+e.name,i=r(e.attribs,t);return i&&(n+=" "+i),!t.xmlMode||e.children&&0!==e.children.length?(n+=">",e.children&&(n+=d(e.children,t)),h[e.name]&&!t.xmlMode||(n+="")):n+="/>",n}function o(e){return"<"+e.data+">"}function a(e,t){var n=e.data||"";return!t.decodeEntities||e.parent&&e.parent.name in f||(n=l.encodeXML(n)),n}function s(e){return""}function u(e){return""}var c=n(1362),l=n(1363),p={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},h={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=e.exports=function(e,t){Array.isArray(e)||e.cheerio||(e=[e]),t=t||{};for(var n="",r=0;r0&&(o=i(e,o,n,r),a=a.concat(o),r-=o.length,r<=0)));s++);return a}function o(e,t){for(var n=0,r=t.length;n0&&(n=a(e,t[r].children)));return n}function s(e,t){for(var n=0,r=t.length;n0&&s(e,t[n].children)))return!0;return!1}function u(e,t){for(var n=[],r=0,i=t.length;r0&&(n=n.concat(u(e,t[r].children))));return n}var c=n(1351).isTag;e.exports={filter:r,find:i,findOneChild:o,findOne:a,existsOne:s,findAll:u}},function(e,t,n){function r(e,t){return"function"==typeof t?function(n){return n.attribs&&t(n.attribs[e])}:function(n){return n.attribs&&n.attribs[e]===t}}function i(e,t){return function(n){return e(n)||t(n)}}var o=n(1351),a=t.isTag=o.isTag;t.testElement=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if("tag_name"===n){if(!a(t)||!e.tag_name(t.name))return!1}else if("tag_type"===n){if(!e.tag_type(t.type))return!1}else if("tag_contains"===n){if(a(t)||!e.tag_contains(t.data))return!1}else if(!t.attribs||!e[n](t.attribs[n]))return!1}else;return!0};var s={tag_name:function(e){return"function"==typeof e?function(t){return a(t)&&e(t.name)}:"*"===e?a:function(t){return a(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return!a(t)&&e(t.data)}:function(t){return!a(t)&&t.data===e}}};t.getElements=function(e,t,n,o){var a=Object.keys(e).map(function(t){var n=e[t];return t in s?s[t](n):r(t,n)});return 0===a.length?[]:this.filter(a.reduce(i),t,n,o)},t.getElementById=function(e,t,n){return Array.isArray(t)||(t=[t]),this.findOne(r("id",e),t,n!==!1)},t.getElementsByTagName=function(e,t,n,r){return this.filter(s.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return this.filter(s.tag_type(e),t,n,r)}},function(e,t){t.removeSubsets=function(e){for(var t,n,r,i=e.length;--i>-1;){for(t=n=e[i],e[i]=null,r=!0;n;){if(e.indexOf(n)>-1){r=!1,e.splice(i,1);break}n=n.parent}r&&(e[i]=t)}return e};var n={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},r=t.compareDocumentPosition=function(e,t){var r,i,o,a,s,u,c=[],l=[];if(e===t)return 0;for(r=e;r;)c.unshift(r),r=r.parent;for(r=t;r;)l.unshift(r),r=r.parent;for(u=0;c[u]===l[u];)u++;return 0===u?n.DISCONNECTED:(i=c[u-1],o=i.children,a=c[u],s=l[u],o.indexOf(a)>o.indexOf(s)?i===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:i===e?n.PRECEDING|n.CONTAINS:n.PRECEDING)};t.uniqueSort=function(e){var t,i,o=e.length;for(e=e.slice();--o>-1;)t=e[o],i=e.indexOf(t),i>-1&&ii;)Se(e,n=r[i++],t[n]);return e},Ce=function(e,t){return void 0===t?Q(e):Ee(Q(e),t)},Ae=function(e){var t=he.call(this,e=$(e,!0));return!(this===ve&&j(me,e)&&!j(ye,e))&&(!(t||!j(this,e)||!j(me,e)||j(this,pe)&&this[pe][e])||t)},Te=function(e,t){if(e=Y(e),t=$(t,!0),e!==ve||!j(me,t)||j(ye,t)){var n=ie(e,t);return!n||!j(me,t)||j(e,pe)&&e[pe][t]||(n.enumerable=!0),n}},Oe=function(e){for(var t,n=ae(Y(e)),r=[],i=0;n.length>i;)j(me,t=n[i++])||t==pe||t==B||r.push(t);return r},De=function(e){for(var t,n=e===ve,r=ae(n?ye:Y(e)),i=[],o=0;r.length>o;)!j(me,t=r[o++])||n&&!j(ve,t)||i.push(me[t]);return i};ge||(se=function(){if(this instanceof se)throw TypeError("Symbol is not a constructor!");var e=U(arguments.length>0?arguments[0]:void 0),t=function(n){this===ve&&t.call(ye,n),j(this,pe)&&j(this[pe],e)&&(this[pe][e]=!1),xe(this,e,Z(1,n))};return R&&be&&xe(ve,e,{configurable:!0,set:t}),we(e)},F(se[le],"toString",function(){return this._k}),te.f=Te,ne.f=Se,n(T).f=ee.f=Oe,n(O).f=Ae,n(D).f=De,R&&!n(M)&&F(ve,"propertyIsEnumerable",Ae,!0),K.f=function(e){return we(W(e))}),N(N.G+N.W+N.F*!ge,{Symbol:se});for(var Me="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Pe=0;Me.length>Pe;)W(Me[Pe++]);for(var Me=re(W.store),Pe=0;Me.length>Pe;)V(Me[Pe++]);N(N.S+N.F*!ge,"Symbol",{for:function(e){return j(de,e+="")?de[e]:de[e]=se(e)},keyFor:function(e){if(ke(e))return H(de,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){be=!0},useSimple:function(){be=!1}}),N(N.S+N.F*!ge,"Object",{create:Ce,defineProperty:Se,defineProperties:Ee,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Oe,getOwnPropertySymbols:De}),ue&&N(N.S+N.F*(!ge||L(function(){var e=se();return"[null]"!=ce([e])||"{}"!=ce({a:e})||"{}"!=ce(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!ke(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&G(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!ke(t))return t}),r[1]=t,ce.apply(ue,r)}}}),se[le][fe]||n(P)(se[le],fe,se[le].valueOf),q(se,"Symbol"),q(Math,"Math",!0),q(I.JSON,"JSON",!0)},function(e,t,n,r){e.exports=!n(r)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n,r,i,o){var a=n(r),s=n(i);e.exports=n(o)?function(e,t,n){return a.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i),c=n(o),l=Object.defineProperty;t.f=n(a)?Object.defineProperty:function(e,t,n){if(s(e),t=c(t,!0),s(n),u)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n,r){var i=n(r);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n,r,i,o){e.exports=!n(r)&&!n(i)(function(){return 7!=Object.defineProperty(n(o)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n,r,i){var o=n(r),a=n(i).document,s=o(a)&&o(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},function(e,t,n,r){var i=n(r);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n,r){var i=n(r);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n,r,i,o,a,s){var u=n(r)("meta"),c=n(i),l=n(o),p=n(a).f,f=0,h=Object.isExtensible||function(){return!0},d=!n(s)(function(){return h(Object.preventExtensions({}))}),m=function(e){p(e,u,{value:{i:"O"+ ++f,w:{}}})},y=function(e,t){if(!c(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l(e,u)){if(!h(e))return"F";if(!t)return"E";m(e)}return e[u].i},v=function(e,t){if(!l(e,u)){if(!h(e))return!0;if(!t)return!1;m(e)}return e[u].w},g=function(e){return d&&_.NEED&&h(e)&&!l(e,u)&&m(e),e},_=e.exports={KEY:u,NEED:!1,fastKey:y,getWeak:v,onFreeze:g}},function(e,t,n,r){var i=n(r),o="__core-js_shared__",a=i[o]||(i[o]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t,n,r,i,o){var a=n(r).f,s=n(i),u=n(o)("toStringTag");e.exports=function(e,t,n){e&&!s(e=n?e:e.prototype,u)&&a(e,u,{configurable:!0,value:t})}},function(e,t,n,r,i,o){var a=n(r)("wks"),s=n(i),u=n(o).Symbol,c="function"==typeof u,l=e.exports=function(e){return a[e]||(a[e]=c&&u[e]||(c?u:s)("Symbol."+e))};l.store=a},function(e,t,n,r){t.f=n(r)},function(e,t,n,r,i,o,a,s){var u=n(r),c=n(i),l=n(o),p=n(a),f=n(s).f;e.exports=function(e){var t=c.Symbol||(c.Symbol=l?{}:u.Symbol||{});"_"==e.charAt(0)||e in t||f(t,e,{value:p.f(e)})}},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=function(e,t){for(var n,r=a(e),i=o(r),s=i.length,u=0;s>u;)if(r[n=i[u++]]===t)return n}},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=Object.keys||function(e){return o(e,a)}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i),c=n(o)(!1),l=n(a)("IE_PROTO");e.exports=function(e,t){var n,r=u(e),i=0,o=[];for(n in r)n!=l&&s(r,n)&&o.push(n);for(;t.length>i;)s(r,n=t[i++])&&(~c(o,n)||o.push(n));return o}},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=function(e){return o(a(e))}},function(e,t,n,r){var i=n(r);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o);e.exports=function(e){return function(t,n,r){var i,o=a(t),c=s(o.length),l=u(r,c);if(e&&n!=n){for(;c>l;)if(i=o[l++],i!=i)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n,r){var i=n(r),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t,n,r){var i=n(r),o=Math.max,a=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):a(e,t)}},function(e,t,n,r,i){var o=n(r)("keys"),a=n(i);e.exports=function(e){return o[e]||(o[e]=a(e))}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o);e.exports=function(e){var t=a(e),n=s.f;if(n)for(var r,i=n(e),o=u.f,c=0;i.length>c;)o.call(e,r=i[c++])&&t.push(r);return t}},function(e,t,n,r){var i=n(r);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n,r,i,o,a,s,u){var c=n(r),l=n(i),p=n(o),f=n(a)("IE_PROTO"),h=function(){},d="prototype",m=function(){var e,t=n(s)("iframe"),r=p.length,i="<",o=">";for(t.style.display="none",n(u).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+o+"document.F=Object"+i+"/script"+o),e.close(),m=e.F;r--;)delete m[d][p[r]];return m()};e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=c(e),n=new h,h[d]=null,n[f]=e):n=m(),void 0===t?n:l(n,t)}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i),c=n(o);e.exports=n(a)?Object.defineProperties:function(e,t){u(e);for(var n,r=c(t),i=r.length,o=0;i>o;)s.f(e,n=r[o++],t[n]);return e}},function(e,t,n,r){e.exports=n(r).document&&document.documentElement},function(e,t,n,r,i){var o=n(r),a=n(i).f,s={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return a(e)}catch(e){return u.slice()}};e.exports.f=function(e){return u&&"[object Window]"==s.call(e)?c(e):a(o(e))}},function(e,t,n,r,i){var o=n(r),a=n(i).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,a)}},function(e,t,n,r,i,o,a,s,u,c){var l=n(r),p=n(i),f=n(o),h=n(a),d=n(s),m=n(u),y=Object.getOwnPropertyDescriptor;t.f=n(c)?y:function(e,t){if(e=f(e),t=h(t,!0),m)try{return y(e,t)}catch(e){}if(d(e,t))return p(!l.f.call(e,t),e[t])}},function(e,t,n,r,i){var o=n(r);o(o.S,"Object",{create:n(i)})},function(e,t,n,r,i,o){var a=n(r);a(a.S+a.F*!n(i),"Object",{defineProperty:n(o).f})},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o);e.exports=function(e,t){var n=(s.Object||{})[e]||Object[e],r={};r[e]=t(n),a(a.S+a.F*u(function(){n(1)}),"Object",r)}},function(e,t,n,r){var i=n(r);e.exports=function(e){return Object(i(e))}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o)("IE_PROTO"),c=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=s(e), +a(e,u)?e[u]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},function(e,t,n,r,i,o){var a=n(r),s=n(i);n(o)("keys",function(){return function(e){return s(a(e))}})},function(e,t,n,r,i){var o=n(r);o(o.S+o.F,"Object",{assign:n(i)})},function(e,t,n,r,i,o,a,s,u){"use strict";var c=n(r),l=n(i),p=n(o),f=n(a),h=n(s),d=Object.assign;e.exports=!d||n(u)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=d({},e)[n]||Object.keys(d({},t)).join("")!=r})?function(e,t){for(var n=f(e),r=arguments.length,i=1,o=l.f,a=p.f;r>i;)for(var s,u=h(arguments[i++]),d=o?c(u).concat(o(u)):c(u),m=d.length,y=0;m>y;)a.call(u,s=d[y++])&&(n[s]=u[s]);return n}:d},function(e,t,n,r,i){var o=n(r),a=n(i)("toStringTag"),s="Arguments"==o(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(t=Object(e),a))?n:s?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n,r,i){"use strict";var o=n(r)(!0);n(i)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=function(e){return function(t,n){var r,i,s=String(a(t)),u=o(n),c=s.length;return u<0||u>=c?e?"":void 0:(r=s.charCodeAt(u),r<55296||r>56319||u+1===c||(i=s.charCodeAt(u+1))<56320||i>57343?e?s.charAt(u):r:e?s.slice(u,u+2):(r-55296<<10)+(i-56320)+65536)}}},function(e,t,n,r,i,o,a,s,u,c,l,p,f){"use strict";var h=n(r),d=n(i),m=n(o),y=n(a),v=n(s),g=n(u),_=n(c),b=n(l),x=n(p),w=n(f)("iterator"),k=!([].keys&&"next"in[].keys()),S="@@iterator",E="keys",C="values",A=function(){return this};e.exports=function(e,t,n,r,i,o,a){_(n,t,r);var s,u,c,l=function(e){if(!k&&e in O)return O[e];switch(e){case E:return function(){return new n(this,e)};case C:return function(){return new n(this,e)}}return function(){return new n(this,e)}},p=t+" Iterator",f=i==C,T=!1,O=e.prototype,D=O[w]||O[S]||i&&O[i],M=D||l(i),P=i?f?l("entries"):M:void 0,I="Array"==t?O.entries||D:D;if(I&&(c=x(I.call(new e)),c!==Object.prototype&&(b(c,p,!0),h||v(c,w)||y(c,w,A))),f&&D&&D.name!==C&&(T=!0,M=function(){return D.call(this)}),h&&!a||!k&&!T&&O[w]||y(O,w,M),g[t]=M,g[p]=A,i)if(s={values:f?M:l(C),keys:o?M:l(E),entries:P},a)for(u in s)u in O||m(O,u,s[u]);else d(d.P+d.F*(k||T),t,s);return s}},function(e,t,n,r,i,o,a,s){"use strict";var u=n(r),c=n(i),l=n(o),p={};n(a)(p,n(s)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=u(p,{next:c(1,n)}),l(e,t+" Iterator")}},function(e,t,n,r,i,o,a,s,u,c,l,p){"use strict";var f=n(r),h=n(i),d=n(o),m=n(a),y=n(s),v=n(u),g=n(c),_=n(l);h(h.S+h.F*!n(p)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,i,o=d(e),a="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,c=void 0!==u,l=0,p=_(o);if(c&&(u=f(u,s>2?arguments[2]:void 0,2)),void 0==p||a==Array&&y(p))for(t=v(o.length),n=new a(t);t>l;l++)g(n,l,c?u(o[l],l):o[l]);else for(i=p.call(o),n=new a;!(r=i.next()).done;l++)g(n,l,c?m(i,u,[r.value,l],!0):r.value);return n.length=l,n}})},function(e,t,n,r){var i=n(r);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&i(o.call(e)),t}}},function(e,t,n,r,i){var o=n(r),a=n(i)("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[a]===e)}},function(e,t,n,r,i){"use strict";var o=n(r),a=n(i);e.exports=function(e,t,n){t in e?o.f(e,t,a(0,n)):e[t]=n}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i)("iterator"),c=n(o);e.exports=n(a).getIteratorMethod=function(e){if(void 0!=e)return e[u]||e["@@iterator"]||c[s(e)]}},function(e,t,n,r){var i=n(r)("iterator"),o=!1;try{var a=[7][i]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},function(e,t,n,r,i,o,a,s){var u=n(r),c=n(i),l=n(o),p=n(a),f=n(s);e.exports=function(e,t){var n=1==e,r=2==e,i=3==e,o=4==e,a=6==e,s=5==e||a,h=t||f;return function(t,f,d){for(var m,y,v=l(t),g=c(v),_=u(f,d,3),b=p(g.length),x=0,w=n?h(t,b):r?h(t,0):void 0;b>x;x++)if((s||x in g)&&(m=g[x],y=_(m,x,v),e))if(n)w[x]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(o)return!1;return a?-1:i||o?o:w}}},function(e,t,n,r){var i=n(r);e.exports=function(e,t){return new(i(e))(t)}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o)("species");e.exports=function(e){var t;return s(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!s(t.prototype)||(t=void 0),a(t)&&(t=t[u],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n,r,i,o,a,s){"use strict";var u=n(r),c=n(i),l=n(o),p=n(a);e.exports=n(s)(Array,"Array",function(e,t){this._t=p(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,c(1)):"keys"==t?c(0,n):"values"==t?c(0,e[n]):c(0,[n,e[n]])},"values"),l.Arguments=l.Array,u("keys"),u("values"),u("entries")},function(e,t,n,r,i,o,a,s,u,c,l,p,f,h,d,m,y,v,g,_,b){"use strict";var x,w,k,S=n(r),E=n(i),C=n(o),A=n(a),T=n(s),O=n(u),D=n(c),M=n(l),P=n(p),I=n(f),j=n(h).set,R=n(d)(),N="Promise",F=E.TypeError,B=E.process,L=E[N],B=E.process,z="process"==A(B),q=function(){},U=!!function(){try{var e=L.resolve(1),t=(e.constructor={})[n(m)("species")]=function(e){e(q,q)};return(z||"function"==typeof PromiseRejectionEvent)&&e.then(q)instanceof t}catch(e){}}(),W=function(e,t){return e===t||e===L&&t===k},K=function(e){var t;return!(!O(e)||"function"!=typeof(t=e.then))&&t},V=function(e){return W(L,e)?new H(e):new w(e)},H=w=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw F("Bad Promise constructor");t=e,n=r}),this.resolve=D(t),this.reject=D(n)},J=function(e){try{e()}catch(e){return{error:e}}},G=function(e,t){if(!e._n){e._n=!0;var n=e._c;R(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(i||(2==e._h&&$(e),e._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===t.promise?u(F("Promise-chain cycle")):(o=K(n))?o.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&X(e)})}},X=function(e){j.call(E,function(){var t,n,r,i=e._v;if(Y(e)&&(t=J(function(){z?B.emit("unhandledRejection",i,e):(n=E.onunhandledrejection)?n({promise:e,reason:i}):(r=E.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=z||Y(e)?2:1),e._a=void 0,t)throw t.error})},Y=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!Y(t.promise))return!1;return!0},$=function(e){j.call(E,function(){var t;z?B.emit("rejectionHandled",e):(t=E.onrejectionhandled)&&t({promise:e,reason:e._v})})},Z=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),G(t,!0))},Q=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw F("Promise can't be resolved itself");(t=K(e))?R(function(){var r={_w:n,_d:!1};try{t.call(e,C(Q,r,1),C(Z,r,1))}catch(e){Z.call(r,e)}}):(n._v=e,n._s=1,G(n,!1))}catch(e){Z.call({_w:n,_d:!1},e)}}};U||(L=function(e){M(this,L,N,"_h"),D(e),x.call(this);try{e(C(Q,this,1),C(Z,this,1))}catch(e){Z.call(this,e)}},x=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},x.prototype=n(y)(L.prototype,{then:function(e,t){var n=V(I(this,L));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=z?B.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&G(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),H=function(){var e=new x;this.promise=e,this.resolve=C(Q,e,1),this.reject=C(Z,e,1)}),T(T.G+T.W+T.F*!U,{Promise:L}),n(v)(L,N),n(g)(N),k=n(_)[N],T(T.S+T.F*!U,N,{reject:function(e){var t=V(this),n=t.reject;return n(e),t.promise}}),T(T.S+T.F*(S||!U),N,{resolve:function(e){if(e instanceof L&&W(e.constructor,this))return e;var t=V(this),n=t.resolve;return n(e),t.promise}}),T(T.S+T.F*!(U&&n(b)(function(e){L.all(e).catch(q)})),N,{all:function(e){var t=this,n=V(t),r=n.resolve,i=n.reject,o=J(function(){var n=[],o=0,a=1;P(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(e){var t=this,n=V(t),r=n.reject,i=J(function(){P(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t,n,r,i,o,a,s,u){var c=n(r),l=n(i),p=n(o),f=n(a),h=n(s),d=n(u),m={},y={},t=e.exports=function(e,t,n,r,i){var o,a,s,u,v=i?function(){return e}:d(e),g=c(n,r,t?2:1),_=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(p(v)){for(o=h(e.length);o>_;_++)if(u=t?g(f(a=e[_])[0],a[1]):g(e[_]),u===m||u===y)return u}else for(s=v.call(e);!(a=s.next()).done;)if(u=l(s,g,a.value,t),u===m||u===y)return u};t.BREAK=m,t.RETURN=y},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o)("species");e.exports=function(e,t){var n,r=a(e).constructor;return void 0===r||void 0==(n=a(r)[u])?t:s(n)}},function(e,t,n,r,i,o,a,s,u){var c,l,p,f=n(r),h=n(i),d=n(o),m=n(a),y=n(s),v=y.process,g=y.setImmediate,_=y.clearImmediate,b=y.MessageChannel,x=0,w={},k="onreadystatechange",S=function(){var e=+this;if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},E=function(e){S.call(e.data)};g&&_||(g=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return w[++x]=function(){h("function"==typeof e?e:Function(e),t)},c(x),x},_=function(e){delete w[e]},"process"==n(u)(v)?c=function(e){v.nextTick(f(S,e,1))}:b?(l=new b,p=l.port2,l.port1.onmessage=E,c=f(p.postMessage,p,1)):y.addEventListener&&"function"==typeof postMessage&&!y.importScripts?(c=function(e){y.postMessage(e+"","*")},y.addEventListener("message",E,!1)):c=k in m("script")?function(e){d.appendChild(m("script"))[k]=function(){d.removeChild(this),S.call(e)}}:function(e){setTimeout(f(S,e,1),0)}),e.exports={set:g,clear:_}},function(e,t,n,r,i,o){var a=n(r),s=n(i).set,u=a.MutationObserver||a.WebKitMutationObserver,c=a.process,l=a.Promise,p="process"==n(o)(c);e.exports=function(){var e,t,n,r=function(){var r,i;for(p&&(r=c.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(p)n=function(){c.nextTick(r)};else if(u){var i=!0,o=document.createTextNode("");new u(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(l&&l.resolve){var f=l.resolve();n=function(){f.then(r)}}else n=function(){s.call(a,r)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n,r,i,o,a,s,u,c){"use strict";var l,p=n(r)(0),f=n(i),h=n(o),d=n(a),m=n(s),y=n(u),v=h.getWeak,g=Object.isExtensible,_=m.ufstore,b={},x=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},w={get:function(e){if(y(e)){var t=v(e);return t===!0?_(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return m.def(this,e,t)}},k=e.exports=n(c)("WeakMap",x,w,m,!0,!0);7!=(new k).set((Object.freeze||Object)(b),7).get(b)&&(l=m.getConstructor(x),d(l.prototype,w),h.NEED=!0,p(["delete","has","get","set"],function(e){var t=k.prototype,n=t[e];f(t,e,function(t,r){if(y(t)&&!g(t)){this._f||(this._f=new l);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)})}))},function(e,t,n,r,i,o,a,s,u,c,l){"use strict";var p=n(r),f=n(i).getWeak,h=n(o),d=n(a),m=n(s),y=n(u),v=n(c),g=n(l),_=v(5),b=v(6),x=0,w=function(e){return e._l||(e._l=new k)},k=function(){this.a=[]},S=function(e,t){return _(e.a,function(e){return e[0]===t})};k.prototype={get:function(e){var t=S(this,e);if(t)return t[1]},has:function(e){return!!S(this,e)},set:function(e,t){var n=S(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=b(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var i=e(function(e,o){m(e,i,t,"_i"),e._i=x++,e._l=void 0,void 0!=o&&y(o,n,e[r],e)});return p(i.prototype,{delete:function(e){if(!d(e))return!1;var t=f(e);return t===!0?w(this).delete(e):t&&g(t,this._i)&&delete t[this._i]},has:function(e){if(!d(e))return!1;var t=f(e);return t===!0?w(this).has(e):t&&g(t,this._i)}}),i},def:function(e,t,n){var r=f(h(t),!0);return r===!0?w(e).set(t,n):r[e._i]=n,e},ufstore:w}},function(e,t,n,r){n(r)("asyncIterator")},function(e,t,n,r){n(r)("observable")},function(e,t,n,r){var i=n(r),o=i.Symbol;e.exports=o},function(e,t,n,r){var i=n(r),o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")();e.exports=a},function(e,t,n,r){var i=n(r),o=i(Object.getPrototypeOf,Object);e.exports=o},function(e,t,n,r,i,o){function a(){this.size=0,this.__data__={hash:new s,map:new(c||u),string:new s}}var s=n(r),u=n(i),c=n(o);e.exports=a},function(e,t,n,r){function i(){this.__data__=o?o(null):{},this.size=0}var o=n(r);e.exports=i},function(e,t,n,r){var i=n(r),o=i(Object,"create");e.exports=o},function(e,t,n,r,i){function o(e,t){var n=s(e,t);return a(n)?n:void 0}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o,a){function s(e){if(!l(e)||c(e))return!1;var t=u(e)?g:h;return t.test(p(e))}var u=n(r),c=n(i),l=n(o),p=n(a),f=/[\\^$.*+?()[\]{}|]/g,h=/^\[object .+?Constructor\]$/,d=Function.prototype,m=Object.prototype,y=d.toString,v=m.hasOwnProperty,g=RegExp("^"+y.call(v).replace(f,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=s},function(e,t,n,r){function i(e){return!!a&&a in e}var o=n(r),a=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=i},function(e,t,n,r){var i=n(r),o=i["__core-js_shared__"];e.exports=o},function(e,t,n,r){function i(e){var t=this.__data__;if(o){var n=t[e];return n===a?void 0:n}return u.call(t,e)?t[e]:void 0}var o=n(r),a="__lodash_hash_undefined__",s=Object.prototype,u=s.hasOwnProperty;e.exports=i},function(e,t,n,r){function i(e){var t=this.__data__;return o?void 0!==t[e]:s.call(t,e)}var o=n(r),a=Object.prototype,s=a.hasOwnProperty;e.exports=i},function(e,t,n,r){function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o&&void 0===t?a:t,this}var o=n(r),a="__lodash_hash_undefined__";e.exports=i},function(e,t,n,r){function i(e){var t=this.__data__,n=o(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():s.call(t,n,1),--this.size,!0}var o=n(r),a=Array.prototype,s=a.splice;e.exports=i},function(e,t,n,r){function i(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this.__data__,e)>-1}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var o=n(r);e.exports=i},function(e,t,n,r,i){var o=n(r),a=n(i),s=o(a,"Map");e.exports=s},function(e,t,n,r){function i(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this,e).get(e)}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this,e).has(e)}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var o=n(r);e.exports=i},function(e,t,n,r,i,o,a,s,u){function c(e){var t=this.__data__=new l(e);this.size=t.size}var l=n(r),p=n(i),f=n(o),h=n(a),d=n(s),m=n(u);c.prototype.clear=p,c.prototype.delete=f,c.prototype.get=h,c.prototype.has=d,c.prototype.set=m,e.exports=c},function(e,t,n,r){function i(){this.__data__=new o,this.size=0}var o=n(r);e.exports=i},function(e,t,n,r,i,o){function a(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!u||r.length0&&n(l)?t>1?o(l,t-1,n,r,i):a(i,l):r||(i[i.length]=l)}return i}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o){function a(e){return c(e)||u(e)||!!(l&&e&&e[l])}var s=n(r),u=n(i),c=n(o),l=s?s.isConcatSpreadable:void 0;e.exports=a},function(e,t,n,r){function i(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=a(r.length-t,0),u=Array(s);++i1){for(var g=Array(m),x=0;x1){for(var D=Array(y),b=0;blabel{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:\"loading\";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:\"\";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{-webkit-animation:pulse 2s infinite;animation:pulse 2s infinite;color:#fff;border-color:#4990e2}@-webkit-keyframes pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}@keyframes pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:-webkit-box;display:-ms-flexbox;display:flex;padding:30px}.swagger-ui .btn-group .btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:-webkit-box;display:-ms-flexbox;display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;-webkit-box-flex:0;-ms-flex:none;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{-webkit-transform:scale(.9);transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E\") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:-webkit-transform .15s ease-in;transition:transform .15s ease-in;transition:transform .15s ease-in,-webkit-transform .15s ease-in;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:\"\";background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E\") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models.is-open h4 svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.swagger-ui section.models h4{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:\"required\";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper{-ms-flex-align:center}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;max-width:300px;text-decoration:none;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-align:center;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:3;-ms-flex:3;flex:3}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.swagger-ui .auth-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;-webkit-animation:scaleUp .5s;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@-webkit-keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}",""]); +},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&D.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",s(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",s(e,t),t}function c(e,t){var r,i,n;if(t.singleton){var s=y++;r=x||(x=a(t)),i=l.bind(null,r,s,!1),n=l.bind(null,r,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=u(t),i=p.bind(null,r),n=function(){o(r),r.href&&URL.revokeObjectURL(r.href)}):(r=a(t),i=h.bind(null,r),n=function(){o(r)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else n()}}function l(e,t,r,i){var n=r?"":i.css;if(e.styleSheet)e.styleSheet.cssText=b(t,n);else{var s=document.createTextNode(n),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function h(e,t){var r=t.css,i=t.media;t.sourceMap;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function p(e,t){var r=t.css,i=(t.media,t.sourceMap);i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var n=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(n),s&&URL.revokeObjectURL(s)}var f={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=d(function(){return document.head||document.getElementsByTagName("head")[0]}),x=null,y=0,D=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=n(e);return i(r,t),function(e){for(var s=[],o=0;o=400?(n.updateLoadingStatus("failedConfig"),n.updateLoadingStatus("failedConfig"),n.updateUrl(""),console.error(r.statusText+" "+e),t(null)):t(c(r.text))}var n=r.specActions;if(e)return n.downloadConfig(e).then(i,i)}}},i={getLocalConfig:function(){return c(u.default)}};return{statePlugins:{spec:{actions:r,selectors:i}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var s=r(41),o=i(s),a=r(76),u=i(a),c=function(e,t){try{return o.default.safeLoad(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}}},function(e,t,r){"use strict";var i=r(42);e.exports=i},function(e,t,r){"use strict";function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var n=r(43),s=r(75);e.exports.Type=r(49),e.exports.Schema=r(48),e.exports.FAILSAFE_SCHEMA=r(52),e.exports.JSON_SCHEMA=r(51),e.exports.CORE_SCHEMA=r(50),e.exports.DEFAULT_SAFE_SCHEMA=r(47),e.exports.DEFAULT_FULL_SCHEMA=r(70),e.exports.load=n.load,e.exports.loadAll=n.loadAll,e.exports.safeLoad=n.safeLoad,e.exports.safeLoadAll=n.safeLoadAll,e.exports.dump=s.dump,e.exports.safeDump=s.safeDump,e.exports.YAMLException=r(45),e.exports.MINIMAL_SCHEMA=r(52),e.exports.SAFE_SCHEMA=r(47),e.exports.DEFAULT_SCHEMA=r(70),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},function(e,t,r){"use strict";function i(e){return 10===e||13===e}function n(e){return 9===e||32===e}function s(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function a(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function h(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function p(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Y,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function f(e,t){return new j(t,new X(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw f(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,f(e,t))}function g(e,t,r,i){var n,s,o,a;if(t1&&(e.result+=z.repeat("\n",t-1))}function E(e,t,r){var a,u,c,l,h,p,f,d,m,x=e.kind,y=e.result;if(m=e.input.charCodeAt(e.position),s(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),s(u)||r&&o(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,h=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),s(u)||r&&o(u))break}else if(35===m){if(a=e.input.charCodeAt(e.position-1),s(a))break}else{if(e.position===e.lineStart&&v(e)||r&&o(m))break;if(i(m)){if(p=e.line,f=e.lineStart,d=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){h=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=p,e.lineStart=f,e.lineIndent=d;break}}h&&(g(e,c,l,!1),w(e,e.line-p),c=l=e.position,h=!1),n(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,c,l,!1),!!e.result||(e.kind=x,e.result=y,!1)}function k(e,t){var r,n,s;if(r=e.input.charCodeAt(e.position),39!==r)return!1;for(e.kind="scalar",e.result="",e.position++,n=s=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(g(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),39!==r)return!0;n=e.position,e.position++,s=e.position}else i(r)?(g(e,n,s,!0),w(e,b(e,!1,t)),n=s=e.position):e.position===e.lineStart&&v(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function A(e,t){var r,n,s,o,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,r,e.position,!0),e.position++,!0;if(92===l){if(g(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))b(e,!1,t);else if(l<256&&ne[l])e.result+=se[l],e.position++;else if((c=u(l))>0){for(s=c,o=0;s>0;s--)l=e.input.charCodeAt(++e.position),(c=a(l))>=0?o=(o<<4)+c:d(e,"expected hexadecimal character");e.result+=h(o),e.position++}else d(e,"unknown escape sequence");r=n=e.position}else i(l)?(g(e,r,n,!0),w(e,b(e,!1,t)),r=n=e.position):e.position===e.lineStart&&v(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function C(e,t){var r,i,n,o,a,u,c,l,h,p,f,m=!0,g=e.tag,x=e.anchor,D={};if(f=e.input.charCodeAt(e.position),91===f)o=93,c=!1,i=[];else{if(123!==f)return!1;o=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(b(e,!0,t),f=e.input.charCodeAt(e.position),f===o)return e.position++,e.tag=g,e.anchor=x,e.kind=c?"mapping":"sequence",e.result=i,!0;m||d(e,"missed comma between flow collection entries"),h=l=p=null,a=u=!1,63===f&&(n=e.input.charCodeAt(e.position+1),s(n)&&(a=u=!0,e.position++,b(e,!0,t))),r=e.line,P(e,t,W,!1,!0),h=e.tag,l=e.result,b(e,!0,t),f=e.input.charCodeAt(e.position),!u&&e.line!==r||58!==f||(a=!0,f=e.input.charCodeAt(++e.position),b(e,!0,t),P(e,t,W,!1,!0),p=e.result),c?y(e,i,D,h,l,p):a?i.push(y(e,null,D,h,l,p)):i.push(l),b(e,!0,t),f=e.input.charCodeAt(e.position),44===f?(m=!0,f=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function S(e,t){var r,s,o,a,u=V,l=!1,h=!1,p=t,f=0,m=!1;if(a=e.input.charCodeAt(e.position),124===a)s=!1;else{if(62!==a)return!1;s=!0}for(e.kind="scalar",e.result="";0!==a;)if(a=e.input.charCodeAt(++e.position),43===a||45===a)V===u?u=43===a?Z:$:d(e,"repeat of a chomping mode identifier");else{if(!((o=c(a))>=0))break;0===o?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?d(e,"repeat of an indentation width identifier"):(p=t+o-1,h=!0)}if(n(a)){do a=e.input.charCodeAt(++e.position);while(n(a));if(35===a)do a=e.input.charCodeAt(++e.position);while(!i(a)&&0!==a)}for(;0!==a;){for(D(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!h||e.lineIndentp&&(p=e.lineIndent),i(a))f++;else{if(e.lineIndentt)&&0!==n)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(P(e,t,G,!0,o)&&(D?g=e.result:x=e.result),D||(y(e,p,f,m,g,x,a,u),m=g=x=null),b(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function M(e){var t,r,o,a,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(a=e.input.charCodeAt(e.position))&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==a));){for(c=!0,a=e.input.charCodeAt(++e.position),t=e.position;0!==a&&!s(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(t,e.position),o=[],r.length<1&&d(e,"directive name must not be less than one character in length");0!==a;){for(;n(a);)a=e.input.charCodeAt(++e.position);if(35===a){do a=e.input.charCodeAt(++e.position);while(0!==a&&!i(a));break}if(i(a))break;for(t=e.position;0!==a&&!s(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==a&&D(e),K.call(ae,r)?ae[r](e,r,o):m(e,'unknown document directive "'+r+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&d(e,"directives end mark is expected"),P(e,e.lineIndent-1,G,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&v(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>t/2-1){r=" ... ",i+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),n.repeat(" ",e)+r+a+s+"\n"+n.repeat(" ",e+this.position-i+r.length)+"^"},i.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(r+=":\n"+t)),r},e.exports=i},function(e,t,r){"use strict";var i=r(48);e.exports=new i({include:[r(50)],implicit:[r(60),r(61)],explicit:[r(62),r(67),r(68),r(69)]})},function(e,t,r){"use strict";function i(e,t,r){var n=[];return e.include.forEach(function(e){r=i(e,t,r)}),e[t].forEach(function(e){r.forEach(function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)}),r.push(e)}),r.filter(function(e,t){return n.indexOf(t)===-1})}function n(){function e(e){i[e.kind][e.tag]=i.fallback[e.tag]=e}var t,r,i={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,r=arguments.length;t=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){n.unshift(parseFloat(e,10))}),t=0,i=1,n.forEach(function(e){t+=e*i,i*=60}),r*t):r*parseFloat(t,10)}function s(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(e))return"-0.0";return r=e.toString(10),l.test(r)?r.replace("e",".e"):r}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||a.isNegativeZero(e))}var a=r(44),u=r(49),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s,defaultStyle:"lowercase"})},function(e,t,r){"use strict";function i(e){return null!==e&&(null!==a.exec(e)||null!==u.exec(e))}function n(e){var t,r,i,n,s,o,c,l,h,p,f=0,d=null;if(t=a.exec(e),null===t&&(t=u.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(s=+t[4],o=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(l=+t[10],h=+(t[11]||0),d=6e4*(60*l+h),"-"===t[9]&&(d=-d)),p=new Date(Date.UTC(r,i,n,s,o,c,f)),d&&p.setTime(p.getTime()-d),p}function s(e){return e.toISOString()}var o=r(49),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:n,instanceOf:Date,represent:s})},function(e,t,r){"use strict";function i(e){return"<<"===e||null===e}var n=r(49);e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},function(e,t,r){function i(e){if(null===e)return!1;var t,r,i=0,n=e.length,s=c;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}function n(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=c,o=0,u=[];for(t=0;t>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|s.indexOf(i.charAt(t));return r=n%4*6,0===r?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===r?(u.push(o>>10&255),u.push(o>>2&255)):12===r&&u.push(o>>4&255),a?a.from?a.from(u):new a(u):u}function s(e){var t,r,i="",n=0,s=e.length,o=c;for(t=0;t>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]),n=(n<<8)+e[t];return r=s%3,0===r?(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]):2===r?(i+=o[n>>10&63],i+=o[n>>4&63],i+=o[n<<2&63],i+=o[64]):1===r&&(i+=o[n>>2&63],i+=o[n<<4&63],i+=o[64],i+=o[64]),i}function o(e){return a&&a.isBuffer(e)}var a;try{a=r(63).Buffer}catch(e){}var u=r(49),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s})},function(e,t,r){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function i(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),o.alloc(+e)}function x(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return N(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return F(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function D(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function b(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=o.from(t,i)),o.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}var c;if(n){var l=-1;for(c=r;ca&&(r=a-u),c=r;c>=0;c--){for(var h=!0,p=0;pn&&(i=n)):i=n;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var o=0;o239?4:s>223?3:s>191?2:1;if(n+a<=r){var u,c,l,h;switch(a){case 1:s<128&&(o=s);break;case 2:u=e[n+1],128===(192&u)&&(h=(31&s)<<6|63&u,h>127&&(o=h));break;case 3:u=e[n+1],c=e[n+2],128===(192&u)&&128===(192&c)&&(h=(15&s)<<12|(63&u)<<6|63&c,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:u=e[n+1],c=e[n+2],l=e[n+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(h=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l,h>65535&&h<1114112&&(o=h))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=a}return B(i)}function B(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",i=0;ii)&&(r=i);for(var n="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,i,n,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function R(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,s=Math.min(e.length-r,2);n>>8*(i?n:1-n)}function U(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,s=Math.min(e.length-r,4);n>>8*(i?n:3-n)&255}function _(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,i,n){return n||_(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,i,23,4),r+4}function j(e,t,r,i,n){return n||_(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,i,52,8),r+8}function X(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var r,i=e.length,n=null,s=[],o=0;o55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function W(e){for(var t=[],r=0;r>8,n=r%256,s.push(n),s.push(i);return s}function q(e){return $.toByteArray(X(e))}function G(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function V(e){return e!==e}var $=r(64),Z=r(65),Q=r(66);t.Buffer=o,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:i(),t.kMaxLength=n(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,r){return a(null,e,t,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,r){return c(null,e,t,r)},o.allocUnsafe=function(e){return l(null,e)},o.allocUnsafeSlow=function(e){return l(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,s=Math.min(r,i);n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},o.prototype.compare=function(e,t,r,i,n){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var s=n-i,a=r-t,u=Math.min(s,a),c=this.slice(i,n),l=e.slice(t,r),h=0;hn)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return A(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t0&&(n*=256);)i+=this[e+--t]*n;return i},o.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var i=this[e],n=1,s=0;++s=n&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var i=t,n=1,s=this[e+--i];i>0&&(n*=256);)s+=this[e+--i]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t|=0,r|=0,!i){var n=Math.pow(2,8*r)-1;L(this,e,t,r,n,0)}var s=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+s]=e/o&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--n)e[n+t]=this[n+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function n(e){var t,i,n,s,o,a,u=e.length;o=r(e),a=new l(3*u/4-o),n=o>0?u-4:u;var h=0;for(t=0,i=0;t>16&255,a[h++]=s>>8&255,a[h++]=255&s;return 2===o?(s=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[h++]=255&s):1===o&&(s=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[h++]=s>>8&255,a[h++]=255&s),a}function s(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function o(e,t,r){for(var i,n=[],o=t;ol?l:c+a));return 1===i?(t=e[r-1],n+=u[t>>2],n+=u[t<<4&63],n+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],n+=u[t>>10],n+=u[t>>4&63],n+=u[t<<2&63],n+="="),s.push(n),s.join("")}t.byteLength=i,t.toByteArray=n,t.fromByteArray=a;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,f=h.length;p>1,l=-7,h=r?n-1:0,p=r?-1:1,f=e[t+h];for(h+=p,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+h],h+=p,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=i;l>0;o=256*o+e[t+h],h+=p,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,i),s-=c}return(f?-1:1)*o*Math.pow(2,s-i)},t.write=function(e,t,r,i,n,s){var o,a,u,c=8*s-n-1,l=(1<>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:s-1,d=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+h>=1?p/u:p*Math.pow(2,1-h),t*u>=2&&(o++,u/=2),o+h>=l?(a=0,o=l):o+h>=1?(a=(t*u-1)*Math.pow(2,n),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&a,f+=d,a/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=d,o/=256,c-=8);e[r+f-d]|=128*m}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function i(e){if(null===e)return!0;var t,r,i,n,s,u=[],c=e;for(t=0,r=c.length;t3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0}function n(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function s(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var a=r(49);e.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s})},function(e,t,r){function i(e){if(null===e)return!1;try{var t="("+e+")",r=a.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&"FunctionExpression"===r.body[0].expression.type}catch(e){return!1}}function n(e){var t,r="("+e+")",i=a.parse(r,{range:!0}),n=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){n.push(e.name)}),t=i.body[0].expression.body.range,new Function(n,r.slice(t[0]+1,t[1]-1))}function s(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var a;try{a=r(74)}catch(e){"undefined"!=typeof window&&(a=window.esprima)}var u=r(49);e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s})},function(e,t,r){!function(t,r){e.exports=r()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function i(e,t,r){var i=null,n=function(e,t){r&&r(e,t),i&&i.visit(e,t)},u="function"==typeof r?n:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&(i=new s.CommentHandler,i.attach=l,t.comment=!0,u=n)}var h;h=t&&"boolean"==typeof t.jsx&&t.jsx?new a.JSXParser(e,t,u):new o.Parser(e,t,u);var p=h.parseProgram();return c&&(p.comments=i.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}function n(e,t,r){var i,n=new u.Tokenizer(e,t);i=[];try{for(;;){var s=n.getNextToken();if(!s)break;r&&(s=r(s)),i.push(s)}}catch(e){n.errorHandler.tolerate(e)}return n.errorHandler.tolerant&&(i.errors=n.errors()),i}var s=r(1),o=r(3),a=r(11),u=r(15);t.parse=i,t.tokenize=n;var c=r(2);t.Syntax=c.Syntax,t.version="3.1.3"},function(e,t,r){"use strict";var i=r(2),n=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var r=[],n=this.leading.length-1;n>=0;--n){var s=this.leading[n];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(n,1),this.trailing.splice(n,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var i=this.trailing.length-1;i>=0;--i){var n=this.trailing[i];n.start>=t.end.offset&&r.unshift(n.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var o=s.node.trailingComments[0];o&&o.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,i=[];this.stack.length>0;){var n=this.stack[this.stack.length-1];if(!(n&&n.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(var s=r.leadingComments?r.leadingComments.length:0,o=s-1;o>=0;--o){var a=r.leadingComments[o];a.range[1]<=t.start.offset&&(i.unshift(a),r.leadingComments.splice(o,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,i}for(var o=this.leading.length-1;o>=0;--o){var n=this.leading[o];n.start<=t.start.offset&&(i.unshift(n.comment),this.leading.splice(o,1))}return i},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),n=this.findLeadingComments(e,t);n.length>0&&(e.leadingComments=n),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",i={type:r,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(n.comment.loc=e.loc),e.type=r,this.leading.push(n),this.trailing.push(n)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=n},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=r(4),n=r(5),s=r(6),o=r(7),a=r(8),u=r(2),c=r(10),l="ArrowParameterPlaceHolder",h=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3, +"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var n=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=i,n},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var n=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,n},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===o.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,i,s=this.createNode();switch(this.lookahead.type){case o.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(s,new c.Identifier(this.nextToken().value));break;case o.Token.NumericLiteral:case o.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,n.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,r=this.nextToken(),i=this.getTokenRaw(r),e=this.finalize(s,new c.Literal(r.value,i));break;case o.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,r=this.nextToken(),r.value="true"===r.value,i=this.getTokenRaw(r),e=this.finalize(s,new c.Literal(r.value,i));break;case o.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,r=this.nextToken(),r.value=null,i=this.getTokenRaw(r),e=this.finalize(s,new c.Literal(r.value,i));break;case o.Token.Template:e=this.parseTemplateLiteral();break;case o.Token.Punctuator:switch(t=this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,r=this.nextRegexToken(),i=this.getTokenRaw(r),e=this.finalize(s,new c.RegexLiteral(r.value,i,r.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case o.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(s,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(s,new c.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new c.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new c.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=!1,t=this.createNode(),r=this.context.allowYield;this.context.allowYield=!1;var i=this.parseFormalParameters(),n=this.parsePropertyMethod(i);return this.context.allowYield=r,this.finalize(t,new c.FunctionExpression(null,i.params,n,e))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case o.Token.StringLiteral:case o.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,n.Messages.StrictOctalLiteral);var i=this.getTokenRaw(t);r=this.finalize(e,new c.Literal(t.value,i));break;case o.Token.Identifier:case o.Token.BooleanLiteral:case o.Token.NullLiteral:case o.Token.Keyword:r=this.finalize(e,new c.Identifier(t.value));break;case o.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,i,s=this.createNode(),a=this.lookahead,u=!1,l=!1,h=!1;a.type===o.Token.Identifier?(this.nextToken(),r=this.finalize(s,new c.Identifier(a.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(a.type===o.Token.Identifier&&"get"===a.value&&p)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,i=this.parseGetterMethod();else if(a.type===o.Token.Identifier&&"set"===a.value&&p)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),i=this.parseSetterMethod();else if(a.type===o.Token.Punctuator&&"*"===a.value&&p)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),i=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(n.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),i=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))i=this.parsePropertyMethodFunction(),l=!0;else if(a.type===o.Token.Identifier){var f=this.finalize(s,new c.Identifier(a.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),h=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);i=this.finalize(s,new c.AssignmentPattern(f,d))}else h=!0,i=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new c.Property(t,r,u,i,l,h))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new c.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==o.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],i=this.parseTemplateHead();for(r.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),r.push(i);return this.finalize(e,new c.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e]};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var n=[];for(this.context.isAssignmentTarget=!1,n.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:l,params:[e]}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s0){this.nextToken(),r.prec=i,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var n=[e,this.lookahead],s=t,o=this.isolateCoverGrammar(this.parseExponentiationExpression),a=[s,r,o];;){if(i=this.binaryPrecedence(this.lookahead),i<=0)break;for(;a.length>2&&i<=a[a.length-2].prec;){o=a.pop();var u=a.pop().value;s=a.pop(),n.pop();var l=this.startNode(n[n.length-1]);a.push(this.finalize(l,new c.BinaryExpression(u,s,o)))}r=this.nextToken(),r.prec=i,a.push(r),n.push(this.lookahead),a.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=a.length-1;for(t=a[h],n.pop();h>1;){var l=this.startNode(n.pop());t=this.finalize(l,new c.BinaryExpression(a[h-1].value,a[h-2],t)),h-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new c.ConditionalExpression(t,i,n)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,o=this.context.allowYield;this.context.allowYield=!0;var a=this.startNode(t);this.expect("=>");var h=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=h.type!==u.Syntax.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=this.finalize(a,new c.ArrowFunctionExpression(i.params,h,p)),this.context.strict=s,this.context.allowYield=o}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(n.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(r,n.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(r,n.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new c.AssignmentExpression(r.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template"},function(e,t,r){"use strict";function i(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function n(e){return"01234567".indexOf(e)}var s=r(4),o=r(5),a=r(9),u=r(7),c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,o.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,i;for(this.trackComment&&(t=[],r=this.index-e,i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(++this.index,a.Character.isLineTerminator(n)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(s)}return 13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(a.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(n)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(n)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(a.Character.isWhiteSpace(r))++this.index;else if(a.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(r=this.source.charCodeAt(this.index+1),47===r){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==r)break;this.index+=2;var i=this.skipMultiLineComment();this.trackComment&&(e=e.concat(i))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var i=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(i))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var i=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=1024*(i-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,n=0;n1114111||"}"!==e)&&this.throwUnexpectedToken(),a.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!a.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=a.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&a.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),a.Character.isIdentifierPart(e));)r=a.Character.fromCodePoint(e),t+=r,this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&a.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=n(e);return!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+n(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+n(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&a.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),a.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(a.Character.isIdentifierStart(t)||a.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",i=!1;for(a.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return i||0!==r.length||this.throwUnexpectedToken(),(a.Character.isIdentifierStart(this.source.charCodeAt(this.index))||a.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var s=parseInt(t||i,16);return s>1114111&&n.throwUnexpectedToken(o.Messages.InvalidRegExp),s<=65535?String.fromCharCode(s):r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r));try{RegExp(i)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,i=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],a.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(a.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}i||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);var n=t.substr(1,t.length-2);return{value:n,literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!a.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if(r=this.source[this.index],"u"===r){++this.index;var i=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";i=55296&&e<57343&&a.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ +};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var i=r(2),n=function(){function e(e){this.type=i.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=n;var s=function(){function e(e){this.type=i.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=s;var o=function(){function e(e,t,r){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}return e}();t.ArrowFunctionExpression=o;var a=function(){function e(e,t,r){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}return e}();t.AssignmentExpression=a;var u=function(){function e(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var c=function(){function e(e,t,r){var n="||"===e||"&&"===e;this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}return e}();t.BinaryExpression=c;var l=function(){function e(e){this.type=i.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=l;var h=function(){function e(e){this.type=i.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=h;var p=function(){function e(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=p;var f=function(){function e(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=f;var d=function(){function e(e){this.type=i.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,r){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassDeclaration=m;var g=function(){function e(e,t,r){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassExpression=g;var x=function(){function e(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=x;var y=function(){function e(e,t,r){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}return e}();t.ConditionalExpression=y;var D=function(){function e(e){this.type=i.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=D;var b=function(){function e(){this.type=i.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=b;var v=function(){function e(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=v;var w=function(){function e(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=w;var E=function(){function e(){this.type=i.Syntax.EmptyStatement}return e}();t.EmptyStatement=E;var k=function(){function e(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=k;var A=function(){function e(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=A;var C=function(){function e(e,t,r){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}return e}();t.ExportNamedDeclaration=C;var S=function(){function e(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=S;var F=function(){function e(e){this.type=i.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=F;var T=function(){function e(e,t,r){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}return e}();t.ForInStatement=T;var B=function(){function e(e,t,r){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}return e}();t.ForOfStatement=B;var N=function(){function e(e,t,r,n){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=n}return e}();t.ForStatement=N;var I=function(){function e(e,t,r,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=n,this.expression=!1}return e}();t.FunctionDeclaration=I;var P=function(){function e(e,t,r,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=n,this.expression=!1}return e}();t.FunctionExpression=P;var M=function(){function e(e){this.type=i.Syntax.Identifier,this.name=e}return e}();t.Identifier=M;var O=function(){function e(e,t,r){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}return e}();t.IfStatement=O;var L=function(){function e(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=L;var R=function(){function e(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=R;var U=function(){function e(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=U;var _=function(){function e(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=_;var z=function(){function e(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=z;var j=function(){function e(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=j;var X=function(){function e(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=X;var J=function(){function e(e,t,r,n,s){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=n,this.static=s}return e}();t.MethodDefinition=J;var Y=function(){function e(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=Y;var K=function(){function e(e){this.type=i.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=K;var W=function(){function e(e){this.type=i.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=W;var H=function(){function e(e,t){this.type=i.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=H;var q=function(){function e(e,t,r,n,s,o){this.type=i.Syntax.Property,this.key=t,this.computed=r,this.value=n,this.kind=e,this.method=s,this.shorthand=o}return e}();t.Property=q;var G=function(){function e(e,t,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}return e}();t.RegexLiteral=G;var V=function(){function e(e){this.type=i.Syntax.RestElement,this.argument=e}return e}();t.RestElement=V;var $=function(){function e(e){this.type=i.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=i.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=i.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=i.Syntax.Super}return e}();t.Super=te;var re=function(){function e(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=re;var ie=function(){function e(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=ie;var ne=function(){function e(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ne;var se=function(){function e(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=se;var oe=function(){function e(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=oe;var ae=function(){function e(){this.type=i.Syntax.ThisExpression}return e}();t.ThisExpression=ae;var ue=function(){function e(e){this.type=i.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var ce=function(){function e(e,t,r){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}return e}();t.TryStatement=ce;var le=function(){function e(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=le;var he=function(){function e(e,t,r){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}return e}();t.UpdateExpression=he;var pe=function(){function e(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=pe;var fe=function(){function e(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=fe;var de=function(){function e(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ge=function(){function e(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ge},function(e,t,r){"use strict";function i(e){var t;switch(e.type){case l.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case l.JSXSyntax.JSXNamespacedName:var n=e;t=i(n.namespace)+":"+i(n.name);break;case l.JSXSyntax.JSXMemberExpression:var s=e;t=i(s.object)+"."+i(s.property)}return t}var n,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=r(9),a=r(7),u=r(3),c=r(12),l=r(13),h=r(10),p=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(n||(n={})),a.TokenName[n.Identifier]="JSXIdentifier",a.TokenName[n.Text]="JSXText";var f=function(e){function t(t,r,i){e.call(this,t,r,i)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,i=!1,n=!1,s=!1;!this.scanner.eof()&&r&&!i;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:n="#"===a;break;case 3:n&&(s="x"===a,r=s||o.Character.isDecimalDigit(a.charCodeAt(0)),n=n&&!s);break;default:r=r&&!(n&&!o.Character.isDecimalDigit(a.charCodeAt(0))),r=r&&!(s&&!o.Character.isHexDigit(a.charCodeAt(0)))}}if(r&&i&&t.length>2){var u=t.substr(1,t.length-2);n&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):n||s||!c.XHTMLEntities[u]||(t=c.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:a.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var r=this.scanner.index,i=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===i)break;s+="&"===u?this.scanXHTMLEntity(i):u}return{type:a.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(46===e){var c=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===c&&46===l?"...":".",r=this.scanner.index;return this.scanner.index+=t.length,{type:a.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(96===e)return{type:a.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){var r=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var h=this.scanner.source.slice(r,this.scanner.index);return{type:n.Identifier,value:h,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,o.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var i={type:n.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var i=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,i},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===a.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==n.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new p.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXNamespacedName(r,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var n=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXMemberExpression(n,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();e=this.finalize(t,new p.JSXNamespacedName(i,n))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==a.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new h.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new p.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(t,i,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new p.JSXClosingElement(t))}var r=this.parseJSXElementName(),i=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(r,n,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new p.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start0))break;var o=this.finalize(e.node,new p.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(o)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children,i=n.closing}return this.finalize(e,new p.JSXElement(t,r,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var i=r(13),n=function(){function e(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=n;var s=function(){function e(e,t,r){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}return e}();t.JSXElement=s;var o=function(){function e(){this.type=i.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=o;var a=function(){function e(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=a;var u=function(){function e(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var c=function(){function e(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=c;var l=function(){function e(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=l;var h=function(){function e(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=h;var p=function(){function e(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}return e}();t.JSXOpeningElement=p;var f=function(){function e(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=f;var d=function(){function e(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,r){"use strict";var i=r(8),n=r(6),s=r(7),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var i=this.values[this.curly-4];t=!!i&&!this.beforeFunctionExpression(i)}else if("function"===this.values[this.curly-4]){var n=this.values[this.curly-5];t=!n||!this.beforeFunctionExpression(n)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;ti&&" "!==e[d+1],d=s);else if(!l(o))return le;m=m&&h(o)}u=u||f&&s-d-1>i&&" "!==e[d+1]}return a||u?" "===e[0]&&r>9?le:u?ce:ue:m&&!n(e)?oe:ae}function d(e,t,r,i){e.dump=function(){function n(t){return u(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&se.indexOf(t)!==-1)return"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),c=i||e.flowLevel>-1&&r>=e.flowLevel;switch(f(t,c,e.indent,a,n)){case oe:return t;case ae:return"'"+t.replace(/'/g,"''")+"'";case ue:return"|"+m(t,e.indent)+g(o(t,s));case ce:return">"+m(t,e.indent)+g(o(x(t,a),s));case le:return'"'+D(t,a)+'"';default:throw new N("impossible error: invalid scalar style")}}()}function m(e,t){var r=" "===e[0]?String(t):"",i="\n"===e[e.length-1],n=i&&("\n"===e[e.length-2]||"\n"===e),s=n?"+":i?"":"-";return r+s+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function x(e,t){for(var r,i,n=/(\n+)([^\n]*)/g,s=function(){var r=e.indexOf("\n");return r=r!==-1?r:e.length,n.lastIndex=r,y(e.slice(0,r),t)}(),o="\n"===e[0]||" "===e[0];i=n.exec(e);){var a=i[1],u=i[2];r=" "===u[0],s+=a+(o||r||""===u?"":"\n")+y(u,t),o=r}return s}function y(e,t){if(""===e||" "===e[0])return e;for(var r,i,n=/ [^ ]/g,s=0,o=0,a=0,u="";r=n.exec(e);)a=r.index,a-s>t&&(i=o>s?o:a,u+="\n"+e.slice(s,i),s=i+1),o=a;return u+="\n",u+=e.length-s>t&&o>s?e.slice(s,o)+"\n"+e.slice(o+1):e.slice(s),u.slice(1)}function D(e){for(var t,r,i="",s=0;s1024&&(a+="? "),a+=e.dump+": ",A(e,t,o,!1,!1)&&(a+=e.dump,u+=a));e.tag=c,e.dump="{"+u+"}"}function E(e,t,r,i){var n,s,o,u,c,l,h="",p=e.tag,f=Object.keys(r);if(e.sortKeys===!0)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new N("sortKeys must be a boolean or a function"); +for(n=0,s=f.length;n1024,c&&(l+=e.dump&&R===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=a(e,t)),A(e,t+1,u,!0,c)&&(l+=e.dump&&R===e.dump.charCodeAt(0)?":":": ",l+=e.dump,h+=l));e.tag=p,e.dump=h||"{}"}function k(e,t,r){var i,n,s,o,a,u;for(n=r?e.explicitTypes:e.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+u+'" style');i=a.represent[u](t,u)}e.dump=i}return!0}return!1}function A(e,t,r,i,n,s){e.tag=null,e.dump=r,k(e,r,!1)||k(e,r,!0);var o=M.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var a,u,c="[object Object]"===o||"[object Array]"===o;if(c&&(a=e.duplicates.indexOf(r),u=a!==-1),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(n=!1),u&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(c&&u&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===o)i&&0!==Object.keys(e.dump).length?(E(e,t,e.dump,n),u&&(e.dump="&ref_"+a+e.dump)):(w(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===o)i&&0!==e.dump.length?(v(e,t,e.dump,n),u&&(e.dump="&ref_"+a+e.dump)):(b(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new N("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&d(e,e.dump,t,s)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function C(e,t){var r,i,n=[],s=[];for(S(e,n,s),r=0,i=s.length;rlabel{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:"loading";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:"";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{-webkit-animation:pulse 2s infinite;animation:pulse 2s infinite;color:#fff;border-color:#4990e2}@-webkit-keyframes pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}@keyframes pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:-webkit-box;display:-ms-flexbox;display:flex;padding:30px}.swagger-ui .btn-group .btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:-webkit-box;display:-ms-flexbox;display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;-webkit-box-flex:0;-ms-flex:none;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{-webkit-transform:scale(.9);transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url("data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:-webkit-transform .15s ease-in;transition:transform .15s ease-in;transition:transform .15s ease-in,-webkit-transform .15s ease-in;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:"";background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models.is-open h4 svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.swagger-ui section.models h4{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:"required";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper{-ms-flex-align:center}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;max-width:300px;text-decoration:none;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-align:center;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:3;-ms-flex:3;flex:3}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.swagger-ui .auth-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;-webkit-animation:scaleUp .5s;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@-webkit-keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.swagger-ui .Resizer.vertical.disabled{display:none} +/*# sourceMappingURL=swagger-ui.css.map*/ \ No newline at end of file diff --git a/api/public/docs/swagger-ui.css.map b/api/public/docs/swagger-ui.css.map new file mode 100644 index 0000000..dbf47ea --- /dev/null +++ b/api/public/docs/swagger-ui.css.map @@ -0,0 +1 @@ +{"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""} \ No newline at end of file diff --git a/api/public/docs/swagger-ui.js b/api/public/docs/swagger-ui.js new file mode 100644 index 0000000..fed293d --- /dev/null +++ b/api/public/docs/swagger-ui.js @@ -0,0 +1,15 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable"),require("sanitize-html")):"function"==typeof define&&define.amd?define(["babel-polyfill","deep-extend","redux","immutable","redux-immutable","serialize-error","base64-js","ieee754","isarray","shallowequal","xml","memoizee","reselect","js-yaml","url-parse","react","react-dom","react-redux","yaml-js","swagger-client","react-split-pane","react-immutable-proptypes","react-addons-shallow-compare","react-collapse","react-remarkable","sanitize-html"],t):"object"==typeof exports?exports.SwaggerUICore=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable"),require("sanitize-html")):e.SwaggerUICore=t(e["babel-polyfill"],e["deep-extend"],e.redux,e.immutable,e["redux-immutable"],e["serialize-error"],e["base64-js"],e.ieee754,e.isarray,e.shallowequal,e.xml,e.memoizee,e.reselect,e["js-yaml"],e["url-parse"],e.react,e["react-dom"],e["react-redux"],e["yaml-js"],e["swagger-client"],e["react-split-pane"],e["react-immutable-proptypes"],e["react-addons-shallow-compare"],e["react-collapse"],e["react-remarkable"],e["sanitize-html"])}(this,function(e,t,r,n,o,a,u,i,s,l,c,f,p,d,h,y,m,v,b,g,_,E,w,j,P,O){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){r(1),r(2),e.exports=r(3)},function(e,t){e.exports=require("babel-polyfill")},function(e,t){},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=r(4),i=o(u),s=r(5),l=o(s),c=r(11),f=o(c),p=r(157),d=o(p),h=r(316),y=n(h),m=r(12),v=["url","spec","validatorUrl","onComplete","onFailure","authorizations","docExpansion","apisSorter","operationsSorter","supportedSubmitMethods","dom_id","defaultModelRendering","oauth2RedirectUrl","showRequestHeaders","custom","modelPropertyMacro","parameterMacro"],b={PACKAGE_VERSION:"3.0.13",GIT_COMMIT:"g5952bb6",GIT_DIRTY:!1},g=b.GIT_DIRTY,_=b.GIT_COMMIT,E=b.PACKAGE_VERSION;e.exports=function(e){f.default.versions=f.default.versions||{},f.default.versions.swaggerUi=E+"/"+(_||"unknown")+(g?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},custom:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},r=(0,i.default)({},t,e),n=(0,i.default)({},r.store,{system:{configs:r.configs},plugins:r.presets,state:{layout:{layout:r.layout},spec:{spec:"",url:r.url}}}),o=function(){return{fn:r.fn,components:r.components,state:r.state}},u=new l.default(n);u.register([r.plugins,o]);var s=u.getSystem(),c=(0,m.parseSeach)();s.initOAuth=s.authActions.configureAuth;var p=function(e){if("object"!==("undefined"==typeof r?"undefined":a(r)))return s;var t=s.specSelectors.getLocalConfig?s.specSelectors.getLocalConfig():{},n=(0,i.default)({},t,r,e||{},c);return u.setConfigs((0,m.filterConfigs)(n,v)),null!==e&&(!c.url&&"object"===a(n.spec)&&Object.keys(n.spec).length?(s.specActions.updateUrl(""),s.specActions.updateLoadingStatus("success"),s.specActions.updateSpec(JSON.stringify(n.spec))):s.specActions.download&&n.url&&(s.specActions.updateUrl(n.url),s.specActions.download(n.url))),n.dom_id?s.render(n.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),s},d=c.config||r.configUrl;if(!d||!s.specActions.getConfigByUrl||s.specActions.getConfigByUrl&&!s.specActions.getConfigByUrl(d,p))return p()},e.exports.presets={apis:d.default},e.exports.plugins=y},function(e,t){e.exports=require("deep-extend")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,r){var n=[(0,O.systemThunkMiddleware)(r)],o=P.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||h.compose;return(0,h.createStore)(e,t,o(h.applyMiddleware.apply(void 0,n)))}function i(e,t){return(0,O.isObject)(e)&&!(0,O.isArray)(e)?e:(0,O.isFunc)(e)?i(e(t),t):(0,O.isArray)(e)?e.map(function(e){return i(e,t)}).reduce(s,{}):{}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,O.isObject)(e))return{};if(!(0,O.isObject)(t))return e;var r=e.statePlugins;if((0,O.isObject)(r))for(var n in r){var o=r[n];if((0,O.isObject)(o)&&(0,O.isObject)(o.wrapActions)){var a=o.wrapActions;for(var u in a){var i=a[u];Array.isArray(i)||(i=[i],a[u]=i),t&&t.statePlugins&&t.statePlugins[n]&&t.statePlugins[n].wrapActions&&t.statePlugins[n].wrapActions[u]&&(t.statePlugins[n].wrapActions[u]=a[u].concat(t.statePlugins[n].wrapActions[u]))}}}return(0,b.default)(e,t)}function l(e){var t=(0,O.objMap)(e,function(e){return e.reducers});return c(t)}function c(e){var t=Object.keys(e).reduce(function(t,r){return t[r]=f(e[r]),t},{});return Object.keys(t).length?(0,g.combineReducers)(t):T}function f(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new y.Map,r=arguments[1];if(!e)return t;var n=e[r.type];return n?n(t,r):t}}function p(e,t,r){var n=u(e,t,r);return n}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),(0,b.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=p(T,(0,y.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return d(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i(e,this.getSystem());s(this.system,r),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:m.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(l(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,O.objReduce)(this.system.statePlugins,function(r,n){var a=r[e];if(a)return o({},n+t,a)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,O.objMap)(e,function(e){return(0,O.objReduce)(e,function(e,t){if((0,O.isFn)(e))return o({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,r=this.getBoundActions(e);return(0,O.objMap)(r,function(e,r){var n=t.system.statePlugins[r.slice(0,-7)].wrapActions;return n?(0,O.objMap)(e,function(e,r){var o=n[r];return o?(Array.isArray(o)||(o=[o]),o.reduce(function(e,r){var n=function(){return r(e,t.getSystem()).apply(void 0,arguments)};if(!(0,O.isFn)(n))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return n},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=e.get(r),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=function(){return e().get(r)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,O.objMap)(this.getSelectors(),function(r,n){var o=[n.slice(0,-9)],a=function(){return e().getIn(o)};return(0,O.objMap)(r,function(e){return function(){for(var r=arguments.length,n=Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:y,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=o,t.newThrownErrBatch=a,t.newSpecErr=u,t.newAuthErr=i,t.clear=s;var l=r(9),c=n(l),f=t.NEW_THROWN_ERR="err_new_thrown_err",p=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",d=t.NEW_SPEC_ERR="err_new_spec_err",h=t.NEW_AUTH_ERR="err_new_auth_err",y=t.CLEAR="err_clear"},function(e,t){"use strict";function r(){var e={location:{},history:{},open:function(){},close:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],r=!0,n=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var i=a.value;i in window&&(e[i]=window[i])}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}}catch(e){console.error(e)}return e}e.exports=r()},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return c(e)?F(e)?e.toObject():e:{}}function a(e){return e?e.toArray?e.toArray():s(e):[]}function u(e){return F(e)?e:c(e)?Array.isArray(e)?S.default.Seq(e).map(u).toList():S.default.Seq(e).map(u).toOrderedMap():e}function i(e,t){var r={};return Object.keys(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(n){return r[n]=e[n].bind(null,t)}),r}function s(e){return Array.isArray(e)?e:[e]}function l(e){return"function"==typeof e}function c(e){return!!e&&"object"===("undefined"==typeof e?"undefined":O(e))}function f(e){return"function"==typeof e}function p(e){return Array.isArray(e)}function d(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=t(e[n],n),r},{})}function h(e,t){return Object.keys(e).reduce(function(r,n){var o=t(e[n],n);return o&&"object"===("undefined"==typeof o?"undefined":O(o))&&Object.assign(r,o),r},{})}function y(e){return function(t){t.dispatch,t.getState;return function(t){return function(r){return"function"==typeof r?r(e()):t(r)}}}}function m(e){var t=e.keySeq();return t.contains(B)?B:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function v(e,t){if(!S.default.Iterable.isIterable(e))return S.default.List();var r=e.getIn(Array.isArray(t)?t:[t]);return S.default.List.isList(r)?r:S.default.List()}function b(e){var t,r,n,o,a,u,i,s,l,c,f,p;for(c=/(>)(<)(\/*)/g,p=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(c,"$1\n$2$3").replace(p,"$1\n").replace(t,"$1\n$2"),n="",s=e.split("\n"),o=0,u="other",f={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},r=function(e){var t,r,a,i,s,l;s={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},i=function(){var e;e=[];for(r in s)l=s[r],l&&e.push(r);return e}()[0],i=void 0===i?"other":i,t=u+"->"+i,u=i,a="",o+=f[t],a=function(){var e,t,r,n;for(r=[],n=e=0,t=o;0<=t?et;n=0<=t?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?n=n.substr(0,n.length-1)+e+"\n":n+=a+e+"\n"},a=0,i=s.length;at)return e.textContent;var a=function(e){for(var t,a,u,i,s,l=e.textContent,c=0,f=l[0],p=1,d=e.innerHTML="",h=0;a=t,t=h<7&&"\\"==t?1:p;){if(p=f,f=l[++c],i=d.length>1,!p||h>8&&"\n"==p||[/\S/[o](p),1,1,!/[$\w]/[o](p),("/"==t||"\n"==t)&&i,'"'==t&&i,"'"==t&&i,l[c-4]+a+t=="-->",a+t=="*/"][h])for(d&&(e[n](s=r.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][h?h<3?2:h>6?4:h>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[o](d):0]),s[n](r.createTextNode(d))),u=h&&h<7?h:u,d="",h=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[o](p),/[\])]/[o](p),/[$\w]/[o](p),"/"==p&&u<2&&"<"!=t,'"'==p,"'"==p,p+f+l[c+1]+l[c+2]=="':null;var n=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=n[1]}return(0,L.memoizedCreateXMLExample)(e,r)}return JSON.stringify((0,L.memoizedSampleFromSchema)(e,r),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var r=t.substr(1).split("&");for(var n in r)n=r[n].split("="),e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e},t.btoa=function(t){var r=void 0;return r=t instanceof e?t:new e(t.toString(),"utf-8"),r.toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}}},t.buildFormData=function(e){var t=[];for(var r in e){var n=e[r];void 0!==n&&""!==n&&t.push([r,"=",encodeURIComponent(n).replace(/%20/g,"+")].join(""))}return t.join("&")},t.filterConfigs=function(e,t){var r=void 0,n={};for(r in e)t.indexOf(r)!==-1&&(n[r]=e[r]);return n}}).call(t,r(13).Buffer)},function(e,t,r){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),u.alloc(+e)}function v(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return W(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return q(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):E(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function E(e,t,r,n,o){function a(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}var u=1,i=e.length,s=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;u=2,i/=2,s/=2,r/=2}var l;if(o){var c=-1;for(l=r;li&&(r=i-s),l=r;l>=0;l--){for(var f=!0,p=0;po&&(n=o)):n=o;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var u=0;u239?4:a>223?3:a>191?2:1;if(o+i<=r){var s,l,c,f;switch(i){case 1:a<128&&(u=a);break;case 2:s=e[o+1],128===(192&s)&&(f=(31&a)<<6|63&s,f>127&&(u=f));break;case 3:s=e[o+1],l=e[o+2],128===(192&s)&&128===(192&l)&&(f=(15&a)<<12|(63&s)<<6|63&l,f>2047&&(f<55296||f>57343)&&(u=f));break;case 4:s=e[o+1],l=e[o+2],c=e[o+3],128===(192&s)&&128===(192&l)&&128===(192&c)&&(f=(15&a)<<18|(63&s)<<12|(63&l)<<6|63&c,f>65535&&f<1114112&&(u=f))}}null===u?(u=65533,i=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=i}return A(n)}function A(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function U(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function z(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function D(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return o||D(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return o||D(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function F(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){t=t||1/0;for(var r,n=e.length,o=null,a=[],u=0;u55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(u+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function H(e){for(var t=[],r=0;r>8,o=r%256,a.push(o),a.push(n);return a}function $(e){return G.toByteArray(F(e))}function K(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function X(e){return e!==e}var G=r(14),Z=r(15),Q=r(16);t.Buffer=u,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return i(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return l(null,e,t,r)},u.allocUnsafe=function(e){return c(null,e)},u.allocUnsafeSlow=function(e){return c(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var a=o-n,i=r-t,s=Math.min(a,i),l=this.slice(n,o),c=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return j(this,e,t,r);case"ascii":return P(this,e,t,r);case"latin1":case"binary":return O(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],o=1,a=0;++a=o&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=t,o=1,a=this[e+--n];n>0&&(o*=256);)a+=this[e+--n]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var o=Math.pow(2,8*r)-1;I(this,e,t,r,o,0)}var a=1,u=0;for(this[t]=255&e;++u=0&&(u*=256);)this[t+a]=e/u&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var a=0,u=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var a=r-1,u=1,i=0;for(this[t+a]=255&e;--a>=0&&(u*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/u>>0)-i&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a=n?e:o(e,t,r)}var o=r(35);e.exports=n},function(e,t){function r(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n-1}var o=r(70);e.exports=n},function(e,t,r){function n(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var o=r(70);e.exports=n},function(e,t,r){var n=r(55),o=r(23),a=n(o,"Map");e.exports=a},function(e,t,r){function n(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}var o=r(77);e.exports=n},function(e,t,r){function n(e,t){var r=e.__data__;return o(t)?r["string"==typeof t?"string":"hash"]:r.map}var o=r(78);e.exports=n},function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(77);e.exports=n},function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(77);e.exports=n},function(e,t,r){function n(e,t){var r=o(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var o=r(77);e.exports=n},function(e,t,r){function n(e,t,r){var n=i(e)?o:u;return r&&s(e,t,r)&&(t=void 0), +n(e,a(t,3))}var o=r(83),a=r(84),u=r(147),i=r(26),s=r(153);e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length;++rp))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var y=-1,m=!0,v=r&s?new o:void 0;for(c.set(e,t),c.set(t,e);++y-1&&e%1==0&&e-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){(function(e){var n=r(24),o="object"==typeof t&&t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===o,i=u&&n.process,s=function(){try{return i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s}).call(t,r(111)(e))},function(e,t,r){function n(e){if(!o(e))return a(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}var o=r(120),a=r(121),u=Object.prototype,i=u.hasOwnProperty;e.exports=n},function(e,t){function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},function(e,t,r){var n=r(122),o=n(Object.keys,Object);e.exports=o},function(e,t){function r(e,t){return function(r){return e(t(r))}}e.exports=r},function(e,t,r){function n(e){return null!=e&&a(e.length)&&!o(e)}var o=r(57),a=r(116);e.exports=n},function(e,t,r){var n=r(125),o=r(75),a=r(126),u=r(127),i=r(128),s=r(28),l=r(61),c="[object Map]",f="[object Object]",p="[object Promise]",d="[object Set]",h="[object WeakMap]",y="[object DataView]",m=l(n),v=l(o),b=l(a),g=l(u),_=l(i),E=s;(n&&E(new n(new ArrayBuffer(1)))!=y||o&&E(new o)!=c||a&&E(a.resolve())!=p||u&&E(new u)!=d||i&&E(new i)!=h)&&(E=function(e){var t=s(e),r=t==f?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case m:return y;case v:return c;case b:return p;case g:return d;case _:return h}return t}),e.exports=E},function(e,t,r){var n=r(55),o=r(23),a=n(o,"DataView");e.exports=a},function(e,t,r){var n=r(55),o=r(23),a=n(o,"Promise");e.exports=a},function(e,t,r){var n=r(55),o=r(23),a=n(o,"Set");e.exports=a},function(e,t,r){var n=r(55),o=r(23),a=n(o,"WeakMap");e.exports=a},function(e,t,r){function n(e){for(var t=a(e),r=t.length;r--;){var n=t[r],u=e[n];t[r]=[n,u,o(u)]}return t}var o=r(130),a=r(105);e.exports=n},function(e,t,r){function n(e){return e===e&&!o(e)}var o=r(58);e.exports=n},function(e,t){function r(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}e.exports=r},function(e,t,r){function n(e,t){return i(e)&&s(t)?l(c(e),t):function(r){var n=a(r,e);return void 0===n&&n===t?u(r,e):o(t,n,f|p)}}var o=r(93),a=r(133),u=r(140),i=r(136),s=r(130),l=r(131),c=r(139),f=1,p=2;e.exports=n},function(e,t,r){function n(e,t,r){var n=null==e?void 0:o(e,t);return void 0===n?r:n}var o=r(134);e.exports=n},function(e,t,r){function n(e,t){t=o(t,e);for(var r=0,n=t.length;null!=e&&r1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.objectify)(t),o=n.type,u=n.example,i=n.properties,s=n.additionalProperties,l=n.items,c=r.includeReadOnly;if(void 0!==u)return u;if(!o)if(i)o="object";else{if(!l)return;o="array"}if("object"===o){var p=(0,a.objectify)(i),d={};for(var h in p)p[h].readOnly&&!c||(d[h]=e(p[h],{includeReadOnly:c}));if(s===!0)d.additionalProp1={};else if(s)for(var y=(0,a.objectify)(s),m=e(y,{includeReadOnly:c}),v=1;v<4;v++)d["additionalProp"+v]=m;return d}return"array"===o?[e(l,{includeReadOnly:c})]:t.enum?t.default?t.default:(0,a.normalizeArray)(t.enum)[0]:f(t)},d=(t.inferSchema=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},t.sampleXmlFromSchema=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.objectify)(t),o=n.type,u=n.properties,i=n.additionalProperties,s=n.items,l=n.example,c=r.includeReadOnly,p=n.default,d={},h={},y=t.xml,m=y.name,v=y.prefix,b=y.namespace,g=n.enum,_=void 0,E=void 0;if(!o)if(u||i)o="object";else{if(!s)return;o="array"}if(m=m||"notagname",_=(v?v+":":"")+m,b){var w=v?"xmlns:"+v:"xmlns";h[w]=b}if("array"===o&&s){if(s.xml=s.xml||y||{},s.xml.name=s.xml.name||y.name,y.wrapped)return d[_]=[],Array.isArray(l)?l.forEach(function(t){s.example=t,d[_].push(e(s,r))}):Array.isArray(p)?p.forEach(function(t){s.default=t,d[_].push(e(s,r))}):d[_]=[e(s,r)],h&&d[_].push({_attr:h}),d;var j=[];return Array.isArray(l)?(l.forEach(function(t){s.example=t,j.push(e(s,r))}),j):Array.isArray(p)?(p.forEach(function(t){s.default=t,j.push(e(s,r))}),j):e(s,r)}if("object"===o){var P=(0,a.objectify)(u);d[_]=[],l=l||{};for(var O in P)if(!P[O].readOnly||c)if(P[O].xml=P[O].xml||{},P[O].xml.attribute){var T=Array.isArray(P[O].enum)&&P[O].enum[0],S=P[O].example,x=P[O].default;h[P[O].xml.name||O]=void 0!==S&&S||void 0!==l[O]&&l[O]||void 0!==x&&x||T||f(P[O])}else{P[O].xml.name=P[O].xml.name||O,P[O].example=void 0!==P[O].example?P[O].example:l[O];var C=e(P[O]);Array.isArray(C)?d[_]=d[_].concat(C):d[_].push(C)}return i===!0?d[_].push({additionalProp:"Anything can be here"}):i&&d[_].push({additionalProp:f(i)}),h&&d[_].push({_attr:h}),d}return E=void 0!==l?l:void 0!==p?p:Array.isArray(g)?g[0]:f(t),d[_]=h?[{_attr:h},E]:E,d});t.memoizedCreateXMLExample=(0,l.default)(o),t.memoizedSampleFromSchema=(0,l.default)(p)},function(e,t){e.exports=require("xml")},function(e,t){e.exports=require("memoizee")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(){return[u.default]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=r(158),u=n(a)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e={components:{App:A.default,authorizationPopup:k.default,authorizeBtn:M.default,authorizeOperationBtn:I.default,auths:z.default,authError:L.default,oauth2:H.default,apiKeyAuth:F.default,basicAuth:V.default,clear:$.default,liveResponse:X.default,info:Te.default,onlineValidatorBadge:Z.default,operations:ee.default,operation:re.default,highlightCode:oe.default,responses:ue.default,response:se.default,responseBody:ce.default,parameters:pe.default,parameterRow:he.default,execute:me.default,headers:be.default,errors:_e.default,contentType:we.default,overview:Pe.default,footer:xe.default,ParamBody:Ae.default,curl:ke.default,schemes:Me.default,modelExample:Ie.default,model:ze.default,models:Le.default,TryItOutButton:Fe.default,Markdown:Ve.default,BaseLayout:He.default}},t={components:$e},r={components:Xe};return[P.default,m.default,p.default,c.default,u.default,s.default,h.default,e,t,_.default,r,w.default,b.default,T.default,x.default]};var a=r(159),u=o(a),i=r(174),s=o(i),l=r(178),c=o(l),f=r(185),p=o(f),d=r(240),h=o(d),y=r(241),m=o(y),v=r(242),b=o(v),g=r(253),_=o(g),E=r(255),w=o(E),j=r(260),P=o(j),O=r(262),T=o(O),S=r(268),x=o(S),C=r(269),A=o(C),R=r(270),k=o(R),q=r(271),M=o(q),N=r(272),I=o(N),U=r(274),z=o(U),D=r(275),L=o(D),B=r(276),F=o(B),J=r(277),V=o(J),W=r(278),H=o(W),Y=r(280),$=o(Y),K=r(281),X=o(K),G=r(282),Z=o(G),Q=r(283),ee=o(Q),te=r(284),re=o(te),ne=r(287),oe=o(ne),ae=r(288),ue=o(ae),ie=r(289),se=o(ie),le=r(290),ce=o(le),fe=r(292),pe=o(fe),de=r(293),he=o(de),ye=r(294),me=o(ye),ve=r(295),be=o(ve),ge=r(296),_e=o(ge),Ee=r(298),we=o(Ee),je=r(299),Pe=o(je),Oe=r(301),Te=o(Oe),Se=r(302),xe=o(Se),Ce=r(303),Ae=o(Ce),Re=r(304),ke=o(Re),qe=r(306),Me=o(qe),Ne=r(307),Ie=o(Ne),Ue=r(308),ze=o(Ue),De=r(309),Le=o(De),Be=r(310),Fe=o(Be),Je=r(311),Ve=o(Je),We=r(314),He=o(We),Ye=r(300),$e=n(Ye),Ke=r(315),Xe=n(Ke)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{statePlugins:{err:{reducers:(0,u.default)(e),actions:s,selectors:c}}}};var a=r(160),u=o(a),i=r(10),s=n(i),l=r(172),c=n(l)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return t={},o(t,a.NEW_THROWN_ERR,function(t,r){var n=r.payload,o=Object.assign(p,n,{type:"thrown"});return t.update("errors",function(e){return(e||(0,s.List)()).push((0,s.fromJS)(o))}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.NEW_THROWN_ERR_BATCH,function(t,r){var n=r.payload;return n=n.map(function(e){return(0,s.fromJS)(Object.assign(p,e,{type:"thrown"}))}),t.update("errors",function(e){return(e||(0,s.List)()).concat((0,s.fromJS)(n))}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.NEW_SPEC_ERR,function(t,r){var n=r.payload,o=(0,s.fromJS)(n);return o=o.set("type","spec"),t.update("errors",function(e){return(e||(0,s.List)()).push((0,s.fromJS)(o)).sortBy(function(e){return e.get("line")})}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.NEW_AUTH_ERR,function(t,r){var n=r.payload,o=(0,s.fromJS)(Object.assign({},n));return o=o.set("type","auth"),t.update("errors",function(e){return(e||(0,s.List)()).push((0,s.fromJS)(o))}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.CLEAR,function(e,t){var r=t.payload;if(r){var n=l.default.fromJS((0,i.default)((e.get("errors")||(0,s.List)()).toJS(),r));return e.merge({errors:n})}}),t};var a=r(10),u=r(161),i=n(u),s=r(7),l=n(s),c=r(165),f=n(c),p={line:0,level:"error",message:"Unknown error"}},function(e,t,r){function n(e,t){var r=i(e)?o:a;return r(e,s(u(t,3)))}var o=r(162),a=r(163),u=r(84),i=r(26),s=r(164);e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r-1||l.push({name:a(e).replace(".js","").replace("./",""),transform:s(e).transform}))})},function(e,t,r){function n(e,t,r){var n=s(e)?o:i,l=arguments.length<3;return n(e,u(t,4),r,l,a)}var o=r(41),a=r(148),u=r(84),i=r(167),s=r(26);e.exports=n},function(e,t){function r(e,t,r,n,o){return o(e,function(e,o,a){r=n?(n=!1,e):t(r,e,o,a)}),r}e.exports=r},function(e,t,r){function n(e){return r(o(e))}function o(e){return a[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var a={"./not-of-type.js":169,"./parameter-oneof.js":170,"./strip-instance.js":171};n.keys=function(){return Object.keys(a)},n.resolve=o,e.exports=n,n.id=168},function(e,t){"use strict";function r(e){return e.map(function(e){var t="is not of a type(s)",r=e.get("message").indexOf(t);if(r>-1){var o=e.get("message").slice(r+t.length).split(",");return e.set("message",e.get("message").slice(0,r)+n(o))}return e})}function n(e){return e.reduce(function(e,t,r,n){return r===n.length-1&&n.length>1?e+"or "+t:n[r+1]&&n.length>2?e+t+", ":n[r+1]?e+t+" ":e+t},"should be a")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){t.jsSpec;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=o;var a=r(133);n(a),r(7)},function(e,t){"use strict";function r(e){return e.map(function(e){return e.set("message",n(e.get("message"),"instance."))})}function n(e,t){return e.replace(new RegExp(t,"g"),"")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastError=t.allErrors=void 0;var n=r(7),o=r(173),a=function(e){return e},u=t.allErrors=(0,o.createSelector)(a,function(e){return e.get("errors",(0,n.List)())});t.lastError=(0,o.createSelector)(u,function(e){return e.last()})},function(e,t){e.exports=require("reselect")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{layout:{reducers:u.default,actions:s,selectors:c}}}};var a=r(175),u=o(a),i=r(176),s=n(i),l=r(177),c=n(l)},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var o,a=r(176);t.default=(o={},n(o,a.UPDATE_LAYOUT,function(e,t){return e.set("layout",t.payload)}),n(o,a.SHOW,function(e,t){var r=t.payload.thing,n=t.payload.shown;return e.setIn(["shown"].concat(r),n)}),n(o,a.UPDATE_MODE,function(e,t){var r=t.payload.thing,n=t.payload.mode;return e.setIn(["modes"].concat(r),(n||"")+"")}),o)},function(e,t,r){"use strict";function n(e){return{type:i,payload:e}}function o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=(0,u.normalizeArray)(e),{type:l,payload:{thing:e,shown:t}}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=(0,u.normalizeArray)(e),{type:s,payload:{thing:e,mode:t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW=t.UPDATE_MODE=t.UPDATE_LAYOUT=void 0,t.updateLayout=n,t.show=o,t.changeMode=a;var u=r(12),i=t.UPDATE_LAYOUT="layout_update_layout",s=t.UPDATE_MODE="layout_update_mode",l=t.SHOW="layout_show"},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:"";return t=(0,a.normalizeArray)(t),e.getIn(["modes"].concat(n(t)),r)},t.showSummary=(0,o.createSelector)(u,function(e){return!i(e,"editor")})},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:p,reducers:u.default,actions:s,selectors:c}}}};var a=r(179),u=o(a),i=r(180),s=n(i),l=r(183),c=n(l),f=r(184),p=n(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){return e instanceof Error?{type:O,error:!0,payload:e}:"string"==typeof e?{type:O,payload:e.replace(/\t/g," ")||""}:{type:O,payload:""}}function u(e){return{type:U,payload:e}}function i(e){return{type:T,payload:e}}function s(e){if(!e||"object"!==("undefined"==typeof e?"undefined":b(e)))throw new Error("updateJson must only accept a simple JSON object");return{type:S,payload:e}}function l(e,t,r,n){return{type:x,payload:{path:e,value:r,paramName:t,isXml:n}}}function c(e){return{type:C,payload:{pathMethod:e}}}function f(e){return{type:N,payload:{pathMethod:e}}}function p(e,t){return{type:I,payload:{path:e,value:t,key:"consumes_value"}}}function d(e,t){return{type:I,payload:{path:e,value:t,key:"produces_value"}}}function h(e,t){return{type:q,payload:{path:e,method:t}}}function y(e,t){return{type:M,payload:{path:e,method:t}}}function m(e,t,r){return{type:z,payload:{scheme:e,path:t,method:r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.executeRequest=t.logRequest=t.setRequest=t.setResponse=t.formatIntoYaml=t.resolveSpec=t.parseToJson=t.SET_SCHEME=t.UPDATE_RESOLVED=t.UPDATE_OPERATION_VALUE=t.ClEAR_VALIDATE_PARAMS=t.CLEAR_REQUEST=t.CLEAR_RESPONSE=t.LOG_REQUEST=t.SET_REQUEST=t.SET_RESPONSE=t.VALIDATE_PARAMS=t.UPDATE_PARAM=t.UPDATE_JSON=t.UPDATE_URL=t.UPDATE_SPEC=void 0;var v=Object.assign||function(e){for(var t=1;t0){var o=r.map(function(e){return console.error(e),e.line=e.fullPath?h(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});a.newThrownErrBatch(o)}return n.updateResolved(t)})}},t.formatIntoYaml=function(){return function(e){var t=e.specActions,r=e.specSelectors,n=r.specStr,o=t.updateSpec;try{var a=_.default.safeDump(_.default.safeLoad(n()),{indent:2});o(a)}catch(e){o(e)}}},t.setResponse=function(e,t,r){return{payload:{path:e,method:t,res:r},type:A}},t.setRequest=function(e,t,r){return{payload:{path:e,method:t,req:r},type:R}},t.logRequest=function(e){return{payload:e,type:k}},t.executeRequest=function(e){return function(t){var r=t.fn,n=t.specActions,o=t.specSelectors,a=e.pathName,u=e.method,i=e.operation,s=i.toJS();e.contextUrl=(0,w.default)(o.url()).toString(),s&&s.operationId?e.operationId=s.operationId:s&&a&&u&&(e.operationId=r.opId(s,a,u));var l=Object.assign({},e);return l=r.buildRequest(l),n.setRequest(e.pathName,e.method,l),r.execute(e).then(function(t){return n.setResponse(e.pathName,e.method,t)}).catch(function(t){return n.setResponse(e.pathName,e.method,{error:!0,err:(0,P.default)(t)})})}},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,r=e.method,n=o(e,["path","method"]);return function(e){var o=e.fn.fetch,a=e.specSelectors,u=e.specActions,i=a.spec().toJS(),s=a.operationScheme(t,r),l=a.contentTypeValues([t,r]).toJS(),c=l.requestContentType,f=l.responseContentType,p=/xml/i.test(c),d=a.parameterValues([t,r],p).toJS();return u.executeRequest(v({fetch:o,spec:i,pathName:t,method:r,parameters:d,requestContentType:c,scheme:s,responseContentType:f},n))}});t.execute=D},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("url-parse")},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(e))return e.some(function(e){return d.Map.isMap(e)&&e.get("in")===t})}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(e))return e.some(function(e){return d.Map.isMap(e)&&e.get("type")===t})}function s(e,t){var r=g(e).getIn(["paths"].concat(n(t)),(0,d.fromJS)({})),o=r.get("parameters")||new d.List,a=i(o,"file")?"multipart/form-data":u(o,"formData")?"application/x-www-form-urlencoded":r.get("consumes_value");return(0,d.fromJS)({requestContentType:a,responseContentType:r.get("produces_value")})}function l(e,t){return g(e).getIn(["paths"].concat(n(t),["consumes"]),(0,d.fromJS)({}))}function c(e){return d.Map.isMap(e)?e:new d.Map}Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.allowTryItOutFor=t.requestFor=t.responseFor=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=t.schemes=t.host=t.basePath=t.definitions=t.findDefinition=t.securityDefinitions=t.security=t.produces=t.consumes=t.operations=t.paths=t.semver=t.version=t.externalDocs=t.info=t.spec=t.specResolved=t.specJson=t.specSource=t.specStr=t.url=t.lastError=void 0,t.getParameter=o,t.parameterValues=a,t.parametersIncludeIn=u,t.parametersIncludeType=i,t.contentTypeValues=s,t.operationConsumes=l;var f=r(173),p=r(12),d=r(7),h="default",y=["get","put","post","delete","options","head","patch"],m=function(e){return e||(0,d.Map)()},v=(t.lastError=(0,f.createSelector)(m,function(e){return e.get("lastError")}),t.url=(0,f.createSelector)(m,function(e){return e.get("url")}),t.specStr=(0,f.createSelector)(m,function(e){return e.get("spec")||""}),t.specSource=(0,f.createSelector)(m,function(e){return e.get("specSource")||"not-editor"}),t.specJson=(0,f.createSelector)(m,function(e){return e.get("json",(0,d.Map)())})),b=t.specResolved=(0,f.createSelector)(m,function(e){return e.get("resolved",(0,d.Map)())}),g=t.spec=function(e){var t=b(e);return t.count()<1&&(t=v(e)),t},_=t.info=(0,f.createSelector)(g,function(e){return c(e&&e.get("info"))}),E=(t.externalDocs=(0,f.createSelector)(g,function(e){return c(e&&e.get("externalDocs"))}),t.version=(0,f.createSelector)(_,function(e){return e&&e.get("version")})),w=(t.semver=(0,f.createSelector)(E,function(e){return/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e).slice(1)}),t.paths=(0,f.createSelector)(g,function(e){return e.get("paths")})),j=t.operations=(0,f.createSelector)(w,function(e){if(!e||e.size<1)return(0,d.List)();var t=(0,d.List)();return e&&e.forEach?(e.forEach(function(e,r){return e&&e.forEach?void e.forEach(function(e,n){y.indexOf(n)!==-1&&(t=t.push((0,d.fromJS)({path:r,method:n,operation:e,id:n+"-"+r})))}):{}}),t):(0,d.List)()}),P=t.consumes=(0,f.createSelector)(g,function(e){return(0,d.Set)(e.get("consumes"))}),O=t.produces=(0,f.createSelector)(g,function(e){return(0,d.Set)(e.get("produces"))}),T=(t.security=(0,f.createSelector)(g,function(e){return e.get("security",(0,d.List)())}),t.securityDefinitions=(0,f.createSelector)(g,function(e){return e.get("securityDefinitions")}),t.findDefinition=function(e,t){return b(e).getIn(["definitions",t],null)},t.definitions=(0,f.createSelector)(g,function(e){return e.get("definitions")||(0,d.Map)()}),t.basePath=(0,f.createSelector)(g,function(e){return e.get("basePath")}),t.host=(0,f.createSelector)(g,function(e){return e.get("host")}),t.schemes=(0,f.createSelector)(g,function(e){return e.get("schemes",(0,d.Map)())}),t.operationsWithRootInherited=(0,f.createSelector)(j,P,O,function(e,t,r){return e.map(function(e){return e.update("operation",function(e){if(e){if(!d.Map.isMap(e))return;return e.withMutations(function(e){return e.get("consumes")||e.update("consumes",function(e){return(0,d.Set)(e).merge(t)}),e.get("produces")||e.update("produces",function(e){return(0,d.Set)(e).merge(r)}),e})}return(0,d.Map)()})})})),S=t.tags=(0,f.createSelector)(g,function(e){return e.get("tags",(0,d.List)())}),x=t.tagDetails=function(e,t){var r=S(e)||(0,d.List)();return r.filter(d.Map.isMap).find(function(e){return e.get("name")===t},(0,d.Map)())},C=t.operationsWithTags=(0,f.createSelector)(T,function(e){return e.reduce(function(e,t){var r=(0,d.Set)(t.getIn(["operation","tags"]));return r.count()<1?e.update(h,(0,d.List)(),function(e){return e.push(t)}):r.reduce(function(e,r){return e.update(r,(0,d.List)(),function(e){return e.push(t)})},e)},(0,d.Map)())}),A=(t.taggedOperations=function(e){return function(t){var r=t.getConfigs,n=r(),o=n.operationsSorter;return C(e).map(function(t,r){var n="function"==typeof o?o:p.sorters.operationsSorter[o],a=n?t.sort(n):t;return(0,d.Map)({tagDetails:x(e,r),operations:a})})}},t.responses=(0,f.createSelector)(m,function(e){return e.get("responses",(0,d.Map)())})),R=t.requests=(0,f.createSelector)(m,function(e){return e.get("requests",(0,d.Map)())}),k=(t.responseFor=function(e,t,r){return A(e).getIn([t,r],null)},t.requestFor=function(e,t,r){return R(e).getIn([t,r],null)},t.allowTryItOutFor=function(){return!0},t.hasHost=(0,f.createSelector)(g,function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]}),t.operationScheme=function(e,t,r){var n=e.get("url"),o=n.match(/^([a-z][a-z0-9+\-.]*):/),a=Array.isArray(o)?o[1]:null;return e.getIn(["scheme",t,r])||e.getIn(["scheme","_defaultScheme"])||a||""});t.canExecuteScheme=function(e,t,r){return["http","https"].indexOf(k(e,t,r))>-1},t.validateBeforeExecute=function(e,t){var r=g(e).getIn(["paths"].concat(n(t),["parameters"]),(0,d.fromJS)([])),o=!0;return r.forEach(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)}),o}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.updateSpec=function(e,t){var r=t.specActions;return function(){e.apply(void 0,arguments),r.parseToJson.apply(r,arguments)}},t.updateJsonSpec=function(e,t){var r=t.specActions;return function(){e.apply(void 0,arguments),r.resolveSpec.apply(r,arguments)}},t.executeRequest=function(e,t){var r=t.specActions;return function(t){return r.logRequest(t),e(t)}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getComponents,r=e.getStore,n=e.getSystem,o=a.getComponent,i=a.render,s=a.makeMappedContainer,l=(0,u.memoize)(o.bind(null,n,r,t)),c=(0,u.memoize)(s.bind(null,n,r,l,t));return{rootInjects:{getComponent:l,makeMappedContainer:c,render:i.bind(null,n,r,o,t)}}};var o=r(186),a=n(o),u=r(12)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getComponent=t.render=t.makeMappedContainer=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t1),t}),i(e,l(e),r),s&&(r=o(r,c|f|p));for(var d=t.length;d--;)a(r,t[d]);return r});e.exports=d},function(e,t,r){function n(e,t,r,S,x,C){var A,q=t&j,M=t&P,I=t&O;if(r&&(A=x?r(e,S,x,C):r(e)),void 0!==A)return A;if(!E(e))return e;var U=g(e);if(U){if(A=m(e),!q)return c(e,A)}else{var z=y(e),D=z==R||z==k;if(_(e))return l(e,q);if(z==N||z==T||D&&!x){if(A=M||D?{}:b(e),!q)return M?p(e,s(A,e)):f(e,i(A,e))}else{if(!Z[z])return x?e:{};A=v(e,z,n,q)}}C||(C=new o);var L=C.get(e);if(L)return L;C.set(e,A);var B=I?M?h:d:M?keysIn:w,F=U?void 0:B(e);return a(F||e,function(o,a){F&&(a=o,o=e[a]),u(A,a,n(o,t,r,a,e,C))}),A}var o=r(87),a=r(192),u=r(193),i=r(196),s=r(198),l=r(202),c=r(203),f=r(204),p=r(207),d=r(211),h=r(213),y=r(124),m=r(214),v=r(215),b=r(225),g=r(26),_=r(110),E=r(58),w=r(105),j=1,P=2,O=4,T="[object Arguments]",S="[object Array]",x="[object Boolean]",C="[object Date]",A="[object Error]",R="[object Function]",k="[object GeneratorFunction]",q="[object Map]",M="[object Number]",N="[object Object]",I="[object RegExp]",U="[object Set]",z="[object String]",D="[object Symbol]",L="[object WeakMap]",B="[object ArrayBuffer]",F="[object DataView]",J="[object Float32Array]",V="[object Float64Array]",W="[object Int8Array]",H="[object Int16Array]",Y="[object Int32Array]",$="[object Uint8Array]",K="[object Uint8ClampedArray]",X="[object Uint16Array]",G="[object Uint32Array]",Z={};Z[T]=Z[S]=Z[B]=Z[F]=Z[x]=Z[C]=Z[J]=Z[V]=Z[W]=Z[H]=Z[Y]=Z[q]=Z[M]=Z[N]=Z[I]=Z[U]=Z[z]=Z[D]=Z[$]=Z[K]=Z[X]=Z[G]=!0,Z[A]=Z[R]=Z[L]=!1,e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length;++r0&&r(c)?t>1?n(c,t-1,r,u,i):o(i,c):u||(i[i.length]=c)}return i}var o=r(209),a=r(233);e.exports=n},function(e,t,r){function n(e){return u(e)||a(e)||!!(i&&e&&e[i])}var o=r(22),a=r(108),u=r(26),i=o?o.isConcatSpreadable:void 0;e.exports=n},function(e,t,r){function n(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var n=arguments,u=-1,i=a(n.length-t,0),s=Array(i);++u0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,o=16,a=Date.now;e.exports=r},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:a}};var o=r(154),a=n(o)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a=u&&(t=console)[e].apply(t,n)}var r=e.configs,n={debug:0,info:1,log:2,warn:3,error:4},o=function(e){return n[e]||-1},a=r.logLevel,u=o(a);return t.warn=t.bind(null,"warn"),t.error=t.bind(null,"error"),t.info=t.bind(null,"info"),t.debug=t.bind(null,"debug"),{rootInjects:{log:t}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{AST:u},components:{JumpToPath:s.default}}};var a=r(243),u=o(a),i=r(252),s=n(i)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){function r(e,t,o){if(!e)return o&&o.start_mark?o.start_mark.line:0;if(t.length&&e.tag===v)for(n=0;n=t.column:t.line===e.start_mark.line?t.column>=e.start_mark.column:t.line===e.end_mark.line?t.column<=e.end_mark.column:e.start_mark.linet.line}var a=0;if(!e||[v,b].indexOf(e.tag)===-1)return o;if(e.tag===v)for(a=0;a-1?i[s?t[l]:l]:void 0}}var o=r(84),a=r(123),u=r(105);e.exports=n},function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=null==r?0:u(r);return s<0&&(s=i(n+s,0)),o(e,a(t,3),s)}var o=r(248),a=r(84),u=r(249),i=Math.max;e.exports=n},function(e,t){function r(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a=400?(u.updateLoadingStatus("failed"),o.newThrownErr(new Error(t.statusText+" "+e))):(u.updateLoadingStatus("success"),u.updateSpec(t.text),void u.updateUrl(e))}var o=r.errActions,a=r.specSelectors,u=r.specActions,i=t.fetch;e=e||a.url(),u.updateLoadingStatus("loading"),i({url:e,loadSpec:!0,credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(n,n)}},updateLoadingStatus:function(e){var t=[null,"loading","failed","success","failedConfig"];return t.indexOf(e)===-1&&console.error("Error: "+e+" is not one of "+JSON.stringify(t)),{type:"spec_update_loading_status",payload:e}}},n={spec_update_loading_status:function(e,t){return"string"==typeof t.payload?e.set("loadingStatus",t.payload):e}},u={loadingStatus:(0,o.createSelector)(function(e){return e||(0,a.Map)()},function(e){return e.get("loadingStatus")||null})};return{statePlugins:{spec:{actions:r,reducers:n,selectors:u}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var o=r(173),a=r(7)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r-1&&e.setState({scopes:e.state.scopes.filter(function(e){return e!==o})})},this.onInputChange=function(t){var r=t.target,n=r.dataset.name,a=r.value,u=o({},n,a);e.setState(u)},this.logout=function(t){t.preventDefault();var r=e.props,n=r.authActions,o=r.errActions,a=r.name;o.clear({authId:a,type:"auth",source:"auth"}),n.logout([a])}};t.default=v},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.auth,r=e.authActions,n=e.errActions,o=e.configs,a=e.authConfigs,s=void 0===a?{}:a,l=t.schema,c=t.scopes,f=t.name,p=t.clientId,d=l.get("flow"),h=[];switch(d){case"password":return void r.authorizePassword(t);case"application":return void r.authorizeApplication(t);case"accessCode":h.push("response_type=code");break;case"implicit":h.push("response_type=token")}"string"==typeof p&&h.push("client_id="+encodeURIComponent(p));var y=o.oauth2RedirectUrl;if("undefined"==typeof y)return void n.newAuthErr({authId:f,source:"validation",level:"error",message:"oauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed."});if(h.push("redirect_uri="+encodeURIComponent(y)),Array.isArray(c)&&0=0||this.state.url.indexOf("127.0.0.1")>=0?null:c.default.createElement("span",{style:{float:"right"}},c.default.createElement("a",{target:"_blank",href:this.state.validatorUrl+"/debug?url="+this.state.url},c.default.createElement(p,{src:this.state.validatorUrl+"?url="+this.state.url,alt:"Online validator badge"})))}}]),t}(c.default.Component);f.propTypes={getComponent:l.PropTypes.func.isRequired,getConfigs:l.PropTypes.func.isRequired,specSelectors:l.PropTypes.object.isRequired},t.default=f;var p=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.state={loaded:!1,error:!1},r}return u(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({loaded:!0})},t.onerror=function(){e.setState({error:!0})},t.src=this.props.src}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(e.src!==this.props.src){var r=new Image;r.onload=function(){t.setState({loaded:!0})},r.onerror=function(){t.setState({error:!0})},r.src=e.src}}},{key:"render",value:function(){return this.state.error?c.default.createElement("img",{alt:"Error"}):this.state.loaded?c.default.createElement("img",{src:this.props.src,alt:this.props.alt}):c.default.createElement("img",{alt:"Loading..."})}}]),t}(c.default.Component);p.propTypes={src:l.PropTypes.string,alt:l.PropTypes.string}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0){var I=!w.get(String(i.get("status")));i=i.set("notDocumented",I)}var U=this.state.tryItOutEnabled,z=this.isShown(),D=[n,o];return c.default.createElement("div",{className:_?"opblock opblock-deprecated":z?"opblock opblock-"+o+" is-open":"opblock opblock-"+o,id:t},c.default.createElement("div",{className:"opblock-summary opblock-summary-"+o,onClick:this.toggleShown},c.default.createElement("span",{className:"opblock-summary-method"},o.toUpperCase()),c.default.createElement("span",{className:_?"opblock-summary-path__deprecated":"opblock-summary-path"},c.default.createElement("span",null,n),c.default.createElement(k,{path:r})),u?c.default.createElement("div",{className:"opblock-summary-description"},b):null,j&&j.count()?c.default.createElement(R,{authActions:m,security:j,authSelectors:v}):null),c.default.createElement(q,{isOpened:z,animated:!0},c.default.createElement("div",{className:"opblock-body"},_&&c.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),g&&c.default.createElement("div",{className:"opblock-description-wrapper"},c.default.createElement("div",{className:"opblock-description"},c.default.createElement(M,{source:g}))),E&&E.get("url")?c.default.createElement("div",{className:"opblock-external-docs-wrapper"},c.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),c.default.createElement("div",{className:"opblock-external-docs"},c.default.createElement("span",{className:"opblock-external-docs__description"},E.get("description")),c.default.createElement("a",{className:"opblock-external-docs__link",href:E.get("url")},E.get("url")))):null,c.default.createElement(x,{parameters:T,onChangeKey:D,onTryoutClick:this.onTryoutClick,onCancelClick:this.onCancelClick,tryItOutEnabled:U,allowTryItOut:l,fn:f,getComponent:p,specActions:h,specSelectors:y,pathMethod:[n,o]}),U&&l&&O&&O.size?c.default.createElement("div",{className:"opblock-schemes"},c.default.createElement(N,{schemes:O,path:n,method:o,specActions:h})):null,c.default.createElement("div",{className:U&&i&&l?"btn-group":"execute-wrapper"},U&&l?c.default.createElement(C,{getComponent:p,operation:a,specActions:h,specSelectors:y,path:n,method:o,onExecute:this.onExecute}):null,U&&i&&l?c.default.createElement(A,{onClick:this.onClearClick,specActions:h,path:n,method:o}):null),this.state.executeInProgress?c.default.createElement("div",{className:"loading-container"},c.default.createElement("div",{className:"loading"})):null,w?c.default.createElement(S,{responses:w,request:s,tryItOutResponse:i,getComponent:p,specSelectors:y,specActions:h,produces:P,producesValue:a.get("produces_value"),pathMethod:[n,o],fn:f}):null)))}}]),t}(c.default.Component);m.propTypes={path:l.PropTypes.string.isRequired,method:l.PropTypes.string.isRequired,operation:l.PropTypes.object.isRequired,showSummary:l.PropTypes.bool,isShownKey:y.arrayOrString.isRequired,jumpToKey:y.arrayOrString.isRequired,allowTryItOut:l.PropTypes.bool,response:l.PropTypes.object,request:l.PropTypes.object,getComponent:l.PropTypes.func.isRequired,authActions:l.PropTypes.object,authSelectors:l.PropTypes.object,specActions:l.PropTypes.object.isRequired,specSelectors:l.PropTypes.object.isRequired,layoutActions:l.PropTypes.object.isRequired,layoutSelectors:l.PropTypes.object.isRequired,fn:l.PropTypes.object.isRequired},m.defaultProps={showSummary:!0,response:null,allowTryItOut:!0},t.default=m},function(e,t){e.exports=require("react-addons-shallow-compare")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectWithFuncs=t.arrayOrString=void 0;var n=r(187),o=function(e,t){return n.PropTypes.shape(e.reduce(function(e,r){return e[r]=t,e},{}))};t.arrayOrString=n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.string),n.PropTypes.string]),t.objectWithFuncs=function(e){return o(e,n.PropTypes.func.isRequired)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r1&&(g=E[1])}f=l.default.createElement("div",null,l.default.createElement("a",{href:v,download:g},"Download file"))}else f=l.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).")}else f="string"==typeof t?l.default.createElement(i,{value:t}):l.default.createElement("div",null,"Unknown response type");return f?l.default.createElement("div",null,l.default.createElement("h5",null,"Response body"),f):null}}]),t}(l.default.Component);d.propTypes={content:s.PropTypes.any.isRequired,contentType:s.PropTypes.string.isRequired,getComponent:s.PropTypes.func.isRequired,headers:s.PropTypes.object,url:s.PropTypes.string},t.default=d},function(e,t,r){var n=r(40),o=n(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()});e.exports=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){for(var e=arguments.length,t=Array(e),r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;tc,collapsedContent:w},p.default.createElement("span",{className:"brace-open object"},m),n?p.default.createElement(E,{name:r}):null,p.default.createElement("span",{className:"inner-object"},p.default.createElement("table",{className:"model",style:{marginLeft:"2em"}},p.default.createElement("tbody",null,d?p.default.createElement("tr",{style:{color:"#999",fontStyle:"italic"}},p.default.createElement("td",null,"description:"),p.default.createElement("td",null,d)):null,h&&h.size?h.entrySeq().map(function(e){var t=l(e,2),n=t[0],o=t[1],c=y.List.isList(_)&&_.contains(n),f={verticalAlign:"top",paddingRight:"0.2em"};return c&&(f.fontWeight="bold"),p.default.createElement("tr",{key:n},p.default.createElement("td",{style:f},n,":"),p.default.createElement("td",{style:{verticalAlign:"top"}},p.default.createElement(j,s({key:"object-"+r+"-"+n+"_"+o},i,{required:c,getComponent:a,schema:o,depth:u+1}))))}).toArray():null,b&&b.size?p.default.createElement("tr",null,p.default.createElement("td",null,"< * >:"),p.default.createElement("td",null,p.default.createElement(j,s({},i,{required:!1,getComponent:a,schema:b,depth:u+1})))):null))),p.default.createElement("span",{className:"brace-close"},v)))}}]),t}(f.Component);_.propTypes={schema:f.PropTypes.object.isRequired,getComponent:f.PropTypes.func.isRequired,specSelectors:f.PropTypes.object.isRequired,name:f.PropTypes.string,isRef:f.PropTypes.bool,expandDepth:f.PropTypes.number,depth:f.PropTypes.number};var E=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.schema,r=e.required;if(!t||!t.get)return p.default.createElement("div",null);var n=t.get("type"),o=t.get("format"),a=t.get("xml"),u=t.get("enum"),i=t.filter(function(e,t){return["enum","type","format","$$ref"].indexOf(t)===-1}),s=r?{fontWeight:"bold"}:{};return p.default.createElement("span",{className:"prop"},p.default.createElement("span",{className:"prop-type",style:s},n)," ",r&&p.default.createElement("span",{style:{color:"red"}},"*"),o&&p.default.createElement("span",{className:"prop-format"},"($",o,")"),i.size?i.entrySeq().map(function(e){var t=l(e,2),r=t[0],n=t[1];return p.default.createElement("span",{key:r+"-"+n,style:b},p.default.createElement("br",null),"description"!==r&&r+": ",String(n))}):null,a&&a.size?p.default.createElement("span",null,p.default.createElement("br",null),p.default.createElement("span",{style:b},"xml:"),a.entrySeq().map(function(e){var t=l(e,2),r=t[0],n=t[1];return p.default.createElement("span",{key:r+"-"+n,style:b},p.default.createElement("br",null),"   ",r,": ",String(n))}).toArray()):null,u&&p.default.createElement(g,{value:u}))}}]),t}(f.Component);E.propTypes={schema:f.PropTypes.object.isRequired,required:f.PropTypes.bool};var w=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.required,r=e.schema,n=e.depth,o=e.expandDepth,a=r.get("items"),u=r.filter(function(e,t){return["type","items","$$ref"].indexOf(t)===-1});return p.default.createElement("span",{className:"model"},p.default.createElement("span",{className:"model-title"},p.default.createElement("span",{className:"model-title__text"},r.get("title"))),p.default.createElement(O,{collapsed:n>o,collapsedContent:"[...]"},"[",p.default.createElement("span",null,p.default.createElement(j,s({},this.props,{schema:a,required:!1}))),"]",u.size?p.default.createElement("span",null,u.entrySeq().map(function(e){var t=l(e,2),r=t[0],n=t[1];return p.default.createElement("span",{key:r+"-"+n,style:b},p.default.createElement("br",null),r+":",String(n))}),p.default.createElement("br",null)):null),t&&p.default.createElement("span",{style:{color:"red"}},"*"))}}]),t}(f.Component);w.propTypes={schema:f.PropTypes.object.isRequired,getComponent:f.PropTypes.func.isRequired,specSelectors:f.PropTypes.object.isRequired,name:f.PropTypes.string,required:f.PropTypes.bool,expandDepth:f.PropTypes.number,depth:f.PropTypes.number};var j=function(e){function t(){var e,r,n,o;a(this,t);for(var i=arguments.length,s=Array(i),l=0;lget('vacatures/overzicht', 'NewsController@jobslist' ); $app->get('vacatures/details/{id:\d+}', 'NewsController@jobsitem' ); $app->get('beelden/overzicht', 'NewsController@featuredimageslist' ); -$app->get('nieuws/regio/{region:[a-z0-9-]+}', 'NewsController@featuredimagesregion' ); +//$app->get('beelden/regio/{region:[a-z0-9-]+}', 'NewsController@featuredimagesregion' ); $app->get('blog/overzicht', 'NewsController@bloglist'); $app->get('blog/overzicht/{id:\d+}', 'NewsController@blogitemlist'); @@ -61,6 +61,7 @@ $app->get('programma/schema/periode/{from:\d\d\d\d-\d\d?-\d\d?}/{to:\d\d\d\d-\d\ $app->get('programma/details/{id:\d+}', 'ProgramController@details' ); $app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete'); +$app->get('programma/studiocam/onair', 'ProgramController@studiocam' ); $app->get('kerkdienst', 'KerkdienstController@get'); $app->get('kerkdienst/stream', 'KerkdienstController@podcast'); diff --git a/api/vendor/autoload.php b/api/vendor/autoload.php index ba5e52f..05e08b7 100644 --- a/api/vendor/autoload.php +++ b/api/vendor/autoload.php @@ -2,6 +2,24 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInitecade5dba42e84368ee2088f4e1ded1f::getLoader(); diff --git a/api/vendor/bin/phpunit b/api/vendor/bin/phpunit old mode 100644 new mode 100755 index f288633..e92cddc --- a/api/vendor/bin/phpunit +++ b/api/vendor/bin/phpunit @@ -1,52 +1,123 @@ #!/usr/bin/env php + * This file includes the referenced bin path (../phpunit/phpunit/phpunit) + * using a stream wrapper to prevent the shebang from being output on PHP<8 * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. + * @generated */ -if (version_compare('5.6.0', PHP_VERSION, '>')) { - fwrite( - STDERR, - sprintf( - 'This version of PHPUnit is supported on PHP 5.6, PHP 7.0, and PHP 7.1.' . PHP_EOL . - 'You are using PHP %s (%s).' . PHP_EOL, - PHP_VERSION, - PHP_BINARY - ) - ); +namespace Composer; - die(1); -} +$GLOBALS['_composer_bin_dir'] = __DIR__; +$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php'; +$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] = $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'] = array(realpath(__DIR__ . '/..'.'/phpunit/phpunit/phpunit')); -if (!ini_get('date.timezone')) { - ini_set('date.timezone', 'UTC'); -} +if (PHP_VERSION_ID < 80000) { + if (!class_exists('Composer\BinProxyWrapper')) { + /** + * @internal + */ + final class BinProxyWrapper + { + private $handle; + private $position; + private $realpath; -foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) { - if (file_exists($file)) { - define('PHPUNIT_COMPOSER_INSTALL', $file); + public function stream_open($path, $mode, $options, &$opened_path) + { + // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution + $opened_path = substr($path, 17); + $this->realpath = realpath($opened_path) ?: $opened_path; + $opened_path = 'phpvfscomposer://'.$this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; - break; + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data); + $data = str_replace('__FILE__', var_export($this->realpath, true), $data); + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit'); + exit(0); } } -unset($file); - -if (!defined('PHPUNIT_COMPOSER_INSTALL')) { - fwrite(STDERR, - 'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL . - ' composer install' . PHP_EOL . PHP_EOL . - 'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL - ); - - die(1); -} - -require PHPUNIT_COMPOSER_INSTALL; - -PHPUnit_TextUI_Command::main(); +include __DIR__ . '/..'.'/phpunit/phpunit/phpunit'; diff --git a/api/vendor/bin/upgrade-carbon b/api/vendor/bin/upgrade-carbon new file mode 100755 index 0000000..c1c8574 --- /dev/null +++ b/api/vendor/bin/upgrade-carbon @@ -0,0 +1,120 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/upgrade-carbon'); + exit(0); + } +} + +include __DIR__ . '/..'.'/nesbot/carbon/bin/upgrade-carbon'; diff --git a/api/vendor/composer/ClassLoader.php b/api/vendor/composer/ClassLoader.php index 2c72175..fd56bd7 100644 --- a/api/vendor/composer/ClassLoader.php +++ b/api/vendor/composer/ClassLoader.php @@ -37,57 +37,134 @@ namespace Composer\Autoload; * * @author Fabien Potencier * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var ?string */ + private $vendorDir; + // PSR-4 + /** + * @var array[] + * @psalm-var array> + */ private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array> + */ private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array + */ private $fallbackDirsPsr4 = array(); // PSR-0 + /** + * @var array[] + * @psalm-var array> + */ private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array + */ private $fallbackDirsPsr0 = array(); + /** @var bool */ private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array + */ private $classMap = array(); + + /** @var bool */ private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array + */ private $missingClasses = array(); + + /** @var ?string */ private $apcuPrefix; + /** + * @var self[] + */ + private static $registeredLoaders = array(); + + /** + * @param ?string $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return string[] + */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); } + /** + * @return array[] + * @psalm-return array> + */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } + /** + * @return array[] + * @psalm-return array + */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } + /** + * @return array[] + * @psalm-return array + */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } + /** + * @return string[] Array of classname => path + * @psalm-return array + */ public function getClassMap() { return $this->classMap; } /** - * @param array $classMap Class to filename map + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap + * + * @return void */ public function addClassMap(array $classMap) { @@ -102,9 +179,11 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void */ public function add($prefix, $paths, $prepend = false) { @@ -147,11 +226,13 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException + * + * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { @@ -195,8 +276,10 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void */ public function set($prefix, $paths) { @@ -211,10 +294,12 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException + * + * @return void */ public function setPsr4($prefix, $paths) { @@ -234,6 +319,8 @@ class ClassLoader * Turns on searching the include path for class files. * * @param bool $useIncludePath + * + * @return void */ public function setUseIncludePath($useIncludePath) { @@ -256,6 +343,8 @@ class ClassLoader * that have not been registered with the class map. * * @param bool $classMapAuthoritative + * + * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { @@ -276,10 +365,12 @@ class ClassLoader * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix + * + * @return void */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** @@ -296,33 +387,54 @@ class ClassLoader * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void */ public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } } /** * Unregisters this instance as an autoloader. + * + * @return void */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } } /** * Loads the given class or interface. * * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise + * @return true|null True if loaded, null otherwise */ public function loadClass($class) { if ($file = $this->findFile($class)) { - includeFile($file); + (self::$includeFile)($file); return true; } + + return null; } /** @@ -367,6 +479,21 @@ class ClassLoader return $file; } + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -377,11 +504,11 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; + $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { - $length = $this->prefixLengthsPsr4[$first][$search]; - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + if (file_exists($file = $dir . $pathEnd)) { return $file; } } @@ -432,14 +559,23 @@ class ClassLoader return false; } -} -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; + private static function initializeIncludeClosure(): void + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = static function($file) { + include $file; + }; + } } diff --git a/api/vendor/composer/InstalledVersions.php b/api/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..c6b54af --- /dev/null +++ b/api/vendor/composer/InstalledVersions.php @@ -0,0 +1,352 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/api/vendor/composer/autoload_classmap.php b/api/vendor/composer/autoload_classmap.php index c16b520..48186b3 100644 --- a/api/vendor/composer/autoload_classmap.php +++ b/api/vendor/composer/autoload_classmap.php @@ -2,10 +2,12 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( + 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php', 'ExampleTest' => $baseDir . '/tests/ExampleTest.php', 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', @@ -80,9 +82,12 @@ return array( 'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', 'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', + 'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', 'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', + 'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', 'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', + 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', @@ -458,6 +463,7 @@ return array( 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', 'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php', @@ -537,6 +543,9 @@ return array( 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php', 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', + 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', 'TestCase' => $baseDir . '/tests/TestCase.php', 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', + 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', ); diff --git a/api/vendor/composer/autoload_files.php b/api/vendor/composer/autoload_files.php index 6d26fe1..f1fd0c8 100644 --- a/api/vendor/composer/autoload_files.php +++ b/api/vendor/composer/autoload_files.php @@ -2,14 +2,17 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', '1d1b89d124cc9cb8219922c9d5569199' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php', + '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', '253c157292f75eb38082b5acb06f3f01' => $vendorDir . '/nikic/fast-route/src/functions.php', 'bee9632da3ca00a99623b9c35d0c4f8b' => $vendorDir . '/laravel/lumen-framework/src/helpers.php', '83c5b4042a3162a51b89dd77dc1632db' => $baseDir . '/app/helpers.php', diff --git a/api/vendor/composer/autoload_namespaces.php b/api/vendor/composer/autoload_namespaces.php index 2bd0218..45d67ff 100644 --- a/api/vendor/composer/autoload_namespaces.php +++ b/api/vendor/composer/autoload_namespaces.php @@ -2,11 +2,10 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( - 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'), + 'UpdateHelper\\' => array($vendorDir . '/kylekatarnls/update-helper/src'), 'Mockery' => array($vendorDir . '/mockery/mockery/library'), - 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), ); diff --git a/api/vendor/composer/autoload_psr4.php b/api/vendor/composer/autoload_psr4.php index 81e8d67..b5bb703 100644 --- a/api/vendor/composer/autoload_psr4.php +++ b/api/vendor/composer/autoload_psr4.php @@ -2,13 +2,17 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( - 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'), + 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'), 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), + 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), + 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), @@ -19,8 +23,9 @@ return array( 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), + 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), - 'Model\\' => array($baseDir . '/../common/classes'), + 'Model\\' => array('/srv/api/common/classes'), 'Laravel\\Lumen\\' => array($vendorDir . '/laravel/lumen-framework/src'), 'Illuminate\\View\\' => array($vendorDir . '/illuminate/view'), 'Illuminate\\Validation\\' => array($vendorDir . '/illuminate/validation'), @@ -48,8 +53,10 @@ return array( 'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'), 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), + 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), 'Cron\\' => array($vendorDir . '/mtdowling/cron-expression/src/Cron'), - 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), 'App\\' => array($baseDir . '/app'), + '' => array($vendorDir . '/nesbot/carbon/src'), ); diff --git a/api/vendor/composer/autoload_real.php b/api/vendor/composer/autoload_real.php index adda143..e831e43 100644 --- a/api/vendor/composer/autoload_real.php +++ b/api/vendor/composer/autoload_real.php @@ -13,58 +13,38 @@ class ComposerAutoloaderInitecade5dba42e84368ee2088f4e1ded1f } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInitecade5dba42e84368ee2088f4e1ded1f', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInitecade5dba42e84368ee2088f4e1ded1f', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::getInitializer($loader)); $loader->register(true); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequireecade5dba42e84368ee2088f4e1ded1f($fileIdentifier, $file); + $filesToLoad = \Composer\Autoload\ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$files; + $requireFile = static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }; + foreach ($filesToLoad as $fileIdentifier => $file) { + ($requireFile)($fileIdentifier, $file); } return $loader; } } - -function composerRequireecade5dba42e84368ee2088f4e1ded1f($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/api/vendor/composer/autoload_static.php b/api/vendor/composer/autoload_static.php index ed15ddd..312b7a0 100644 --- a/api/vendor/composer/autoload_static.php +++ b/api/vendor/composer/autoload_static.php @@ -7,10 +7,13 @@ namespace Composer\Autoload; class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f { public static $files = array ( - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', '1d1b89d124cc9cb8219922c9d5569199' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php', + '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', '253c157292f75eb38082b5acb06f3f01' => __DIR__ . '/..' . '/nikic/fast-route/src/functions.php', 'bee9632da3ca00a99623b9c35d0c4f8b' => __DIR__ . '/..' . '/laravel/lumen-framework/src/helpers.php', '83c5b4042a3162a51b89dd77dc1632db' => __DIR__ . '/../..' . '/app/helpers.php', @@ -27,7 +30,11 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f ), 'S' => array ( + 'Symfony\\Polyfill\\Php80\\' => 23, 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Ctype\\' => 23, + 'Symfony\\Contracts\\Translation\\' => 30, + 'Symfony\\Contracts\\EventDispatcher\\' => 34, 'Symfony\\Component\\Yaml\\' => 23, 'Symfony\\Component\\Translation\\' => 30, 'Symfony\\Component\\Process\\' => 26, @@ -41,6 +48,7 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f 'P' => array ( 'Psr\\Log\\' => 8, + 'Prophecy\\' => 9, ), 'M' => array ( @@ -85,12 +93,13 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f array ( 'Dotenv\\' => 7, 'Doctrine\\Instantiator\\' => 22, + 'Doctrine\\Inflector\\' => 19, + 'Doctrine\\Common\\Inflector\\' => 26, 'DeepCopy\\' => 9, ), 'C' => array ( 'Cron\\' => 5, - 'Carbon\\' => 7, ), 'A' => array ( @@ -102,17 +111,33 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f 'phpDocumentor\\Reflection\\' => array ( 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', - 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', - 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', + 1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', + 2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', ), 'Webmozart\\Assert\\' => array ( 0 => __DIR__ . '/..' . '/webmozart/assert/src', ), + 'Symfony\\Polyfill\\Php80\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', + ), 'Symfony\\Polyfill\\Mbstring\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', ), + 'Symfony\\Polyfill\\Ctype\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', + ), + 'Symfony\\Contracts\\Translation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/translation-contracts', + ), + 'Symfony\\Contracts\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', + ), 'Symfony\\Component\\Yaml\\' => array ( 0 => __DIR__ . '/..' . '/symfony/yaml', @@ -153,13 +178,17 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f array ( 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', ), + 'Prophecy\\' => + array ( + 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', + ), 'Monolog\\' => array ( 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', ), 'Model\\' => array ( - 0 => __DIR__ . '/../..' . '/../common/classes', + 0 => '/srv/api/common/classes', ), 'Laravel\\Lumen\\' => array ( @@ -269,6 +298,14 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f array ( 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', ), + 'Doctrine\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector', + ), + 'Doctrine\\Common\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector', + ), 'DeepCopy\\' => array ( 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy', @@ -277,22 +314,22 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f array ( 0 => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron', ), - 'Carbon\\' => - array ( - 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', - ), 'App\\' => array ( 0 => __DIR__ . '/../..' . '/app', ), ); + public static $fallbackDirsPsr4 = array ( + 0 => __DIR__ . '/..' . '/nesbot/carbon/src', + ); + public static $prefixesPsr0 = array ( - 'P' => + 'U' => array ( - 'Prophecy\\' => + 'UpdateHelper\\' => array ( - 0 => __DIR__ . '/..' . '/phpspec/prophecy/src', + 0 => __DIR__ . '/..' . '/kylekatarnls/update-helper/src', ), ), 'M' => @@ -302,16 +339,11 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f 0 => __DIR__ . '/..' . '/mockery/mockery/library', ), ), - 'D' => - array ( - 'Doctrine\\Common\\Inflector\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/inflector/lib', - ), - ), ); public static $classMap = array ( + 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php', 'ExampleTest' => __DIR__ . '/../..' . '/tests/ExampleTest.php', 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', @@ -386,9 +418,12 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f 'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', 'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', + 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', + 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', + 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', 'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', 'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', 'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', @@ -764,6 +799,7 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', 'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php', @@ -843,8 +879,11 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php', 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', + 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', 'TestCase' => __DIR__ . '/../..' . '/tests/TestCase.php', 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', + 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', ); public static function getInitializer(ClassLoader $loader) @@ -852,6 +891,7 @@ class ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$prefixDirsPsr4; + $loader->fallbackDirsPsr4 = ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$fallbackDirsPsr4; $loader->prefixesPsr0 = ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$prefixesPsr0; $loader->classMap = ComposerStaticInitecade5dba42e84368ee2088f4e1ded1f::$classMap; diff --git a/api/vendor/composer/installed.json b/api/vendor/composer/installed.json index d8e6aa9..f813470 100644 --- a/api/vendor/composer/installed.json +++ b/api/vendor/composer/installed.json @@ -1,3731 +1,4825 @@ -[ - { - "name": "psr/log", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-10-10 12:19:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "symfony/debug", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "ef5f19a7a68075a0bd05969a329ead3b0776fb7a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/ef5f19a7a68075a0bd05969a329ead3b0776fb7a", - "reference": "ef5f19a7a68075a0bd05969a329ead3b0776fb7a", - "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/http-kernel": "~2.8|~3.0" - }, - "time": "2017-05-27 16:02:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" +{ + "packages": [ + { + "name": "doctrine/inflector", + "version": "1.4.4", + "version_normalized": "1.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", + "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", + "shasum": "" }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2016-11-14 01:06:16", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "require": { + "php": "^7.1 || ^8.0" }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "require-dev": { + "doctrine/coding-standard": "^8.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/http-foundation", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "a3272c06d538bd48261e7d83308e7f84992d4ec8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a3272c06d538bd48261e7d83308e7f84992d4ec8", - "reference": "a3272c06d538bd48261e7d83308e7f84992d4ec8", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "symfony/expression-language": "~2.8|~3.0" - }, - "time": "2017-05-25 13:39:26", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" + "time": "2021-04-16T17:34:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector", + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/event-dispatcher", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a9f8b02b0ef07302eca92cd4bba73200b7980e9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a9f8b02b0ef07302eca92cd4bba73200b7980e9c", - "reference": "a9f8b02b0ef07302eca92cd4bba73200b7980e9c", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "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" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2017-05-04 12:23:07", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "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 EventDispatcher Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/http-kernel", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", - "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "psr/log": "~1.0", - "symfony/debug": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/http-foundation": "~3.3" - }, - "conflict": { - "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.3", - "symfony/var-dumper": "<3.3" - }, - "require-dev": { - "psr/cache": "~1.0", - "symfony/browser-kit": "~2.8|~3.0", - "symfony/class-loader": "~2.8|~3.0", - "symfony/config": "~2.8|~3.0", - "symfony/console": "~2.8|~3.0", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/dom-crawler": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/finder": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0", - "symfony/routing": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0", - "symfony/templating": "~2.8|~3.0", - "symfony/translation": "~2.8|~3.0", - "symfony/var-dumper": "~3.3" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" - }, - "time": "2017-05-29 21:02:12", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "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 HttpKernel Component", - "homepage": "https://symfony.com" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.10", - "version_normalized": "2.0.10.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "time": "2017-03-13 16:27:32", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ] - }, - { - "name": "nikic/fast-route", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "b5f95749071c82a8e0f58586987627054400cdf6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/b5f95749071c82a8e0f58586987627054400cdf6", - "reference": "b5f95749071c82a8e0f58586987627054400cdf6", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "time": "2017-01-19 11:35:12", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ] - }, - { - "name": "mtdowling/cron-expression", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9504fa9ea681b586028adaaa0877db4aecf32bad", - "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "time": "2017-01-23 04:29:33", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ] - }, - { - "name": "monolog/monolog", - "version": "1.22.1", - "version_normalized": "1.22.1.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0", - "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "~5.3" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "time": "2017-03-13 07:08:03", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ] - }, - { - "name": "illuminate/contracts", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "ab2825726bee46a67c8cc66789852189dbef74a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/ab2825726bee46a67c8cc66789852189dbef74a9", - "reference": "ab2825726bee46a67c8cc66789852189dbef74a9", - "shasum": "" - }, - "require": { - "php": ">=5.6.4" - }, - "time": "2017-03-29 13:17:47", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "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" - }, - { - "name": "doctrine/inflector", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "time": "2015-11-06 14:35:42", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "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" - ] - }, - { - "name": "illuminate/support", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "b8cb37e15331c59da51c8ee5838038baa22d7955" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/b8cb37e15331c59da51c8ee5838038baa22d7955", - "reference": "b8cb37e15331c59da51c8ee5838038baa22d7955", - "shasum": "" - }, - "require": { - "doctrine/inflector": "~1.0", - "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" - }, - "replace": { - "tightenco/collect": "self.version" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." - }, - "time": "2017-04-09 14:34:57", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "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" - }, - { - "name": "symfony/finder", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "30cb2a2c09627823a7243638dd456de4e2748fed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/30cb2a2c09627823a7243638dd456de4e2748fed", - "reference": "30cb2a2c09627823a7243638dd456de4e2748fed", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "time": "2017-05-25 23:10:31", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "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 Finder Component", - "homepage": "https://symfony.com" - }, - { - "name": "illuminate/filesystem", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "7f656e3421b94d759627e891567380b50586f045" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/7f656e3421b94d759627e891567380b50586f045", - "reference": "7f656e3421b94d759627e891567380b50586f045", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/finder": "~3.2" - }, - "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." - }, - "time": "2017-04-07 19:38:05", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/container", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "50aa19491d478edd907d1f67e0928944e8b2dcb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/50aa19491d478edd907d1f67e0928944e8b2dcb5", - "reference": "50aa19491d478edd907d1f67e0928944e8b2dcb5", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-04-16 13:32:45", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "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" - }, - { - "name": "illuminate/events", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/events.git", - "reference": "5a50ce08fa9efaf9213a720ee7c5c2c73aa071bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/5a50ce08fa9efaf9213a720ee7c5c2c73aa071bf", - "reference": "5a50ce08fa9efaf9213a720ee7c5c2c73aa071bf", - "shasum": "" - }, - "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-04-09 00:57:11", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Events\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Events package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/view", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/view.git", - "reference": "f56446ee98479b9891d78b388bb015e45ff58bc7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/f56446ee98479b9891d78b388bb015e45ff58bc7", - "reference": "f56446ee98479b9891d78b388bb015e45ff58bc7", - "shasum": "" - }, - "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/debug": "~3.2" - }, - "time": "2017-04-09 14:27:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\View\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate View package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/translation", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/translation.git", - "reference": "9c81480d66e6f4a225e319ca1d36b95a422890d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/9c81480d66e6f4a225e319ca1d36b95a422890d5", - "reference": "9c81480d66e6f4a225e319ca1d36b95a422890d5", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-04-07 13:49:47", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Translation package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/validation", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/validation.git", - "reference": "935aac1451069c23db9ff928b0051d91bf298d64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/935aac1451069c23db9ff928b0051d91bf298d64", - "reference": "935aac1451069c23db9ff928b0051d91bf298d64", - "shasum": "" - }, - "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "illuminate/translation": "5.4.*", - "php": ">=5.6.4", - "symfony/http-foundation": "~3.2" - }, - "suggest": { - "illuminate/database": "Required to use the database presence verifier (5.4.*)." - }, - "time": "2017-04-05 14:24:42", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Validation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Validation package.", - "homepage": "https://laravel.com" - }, - { - "name": "symfony/process", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", - "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "time": "2017-05-22 12:32:03", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "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 Process Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/translation", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/dc3b2a0c6cfff60327ba1c043a82092735397543", - "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<2.8", - "symfony/yaml": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~3.3" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2017-05-22 07:42:36", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "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" - }, - { - "name": "nesbot/carbon", - "version": "1.22.1", - "version_normalized": "1.22.1.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" - }, - "time": "2017-01-16 07:55:07", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "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" - ] - }, - { - "name": "symfony/console", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "c80e63f3f5e3a331bfc25e6e9332b10422eb9b05" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c80e63f3f5e3a331bfc25e6e9332b10422eb9b05", - "reference": "c80e63f3f5e3a331bfc25e6e9332b10422eb9b05", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "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" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/filesystem": "", - "symfony/process": "" - }, - "time": "2017-05-28 14:08:56", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "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 Console Component", - "homepage": "https://symfony.com" - }, - { - "name": "illuminate/console", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/console.git", - "reference": "8ea19d470cdc0d6ab88269b1841dfd234cf308b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/8ea19d470cdc0d6ab88269b1841dfd234cf308b8", - "reference": "8ea19d470cdc0d6ab88269b1841dfd234cf308b8", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4", - "symfony/console": "~3.2" - }, - "suggest": { - "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", - "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", - "symfony/process": "Required to use scheduling component (~3.2)." - }, - "time": "2017-03-23 15:59:01", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Console package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/queue", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/queue.git", - "reference": "f73b851bf92c049c854f3db0d8f92f8aa730b526" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/queue/zipball/f73b851bf92c049c854f3db0d8f92f8aa730b526", - "reference": "f73b851bf92c049c854f3db0d8f92f8aa730b526", - "shasum": "" - }, - "require": { - "illuminate/console": "5.4.*", - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4", - "symfony/debug": "~3.2", - "symfony/process": "~3.2" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", - "illuminate/redis": "Required to use the Redis queue driver (5.4.*).", - "pda/pheanstalk": "Required to use the Beanstalk queue driver (~3.0)." - }, - "time": "2017-04-12 19:11:35", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Queue\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Queue package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/pipeline", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pipeline.git", - "reference": "ada6dc2435afa57a74e3dcd4570c31a1a1244e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pipeline/zipball/ada6dc2435afa57a74e3dcd4570c31a1a1244e65", - "reference": "ada6dc2435afa57a74e3dcd4570c31a1a1244e65", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-01-17 14:21:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "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" - }, - { - "name": "illuminate/pagination", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pagination.git", - "reference": "cabab5b5a9c124efb9013d5ca28ab8d479f8dfac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/cabab5b5a9c124efb9013d5ca28ab8d479f8dfac", - "reference": "cabab5b5a9c124efb9013d5ca28ab8d479f8dfac", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-03-28 13:05:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Pagination\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Pagination package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/session", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/session.git", - "reference": "59f994b299318ba5a91b390fe482e24fdaa08ec5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/59f994b299318ba5a91b390fe482e24fdaa08ec5", - "reference": "59f994b299318ba5a91b390fe482e24fdaa08ec5", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4", - "symfony/finder": "~3.2", - "symfony/http-foundation": "~3.2" - }, - "suggest": { - "illuminate/console": "Required to use the session:table command (5.4.*)." - }, - "time": "2017-03-30 14:26:45", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Session\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Session package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/http", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/http.git", - "reference": "2c66bd7791505899afa86bb4d467e3ea8b7dab8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/2c66bd7791505899afa86bb4d467e3ea8b7dab8c", - "reference": "2c66bd7791505899afa86bb4d467e3ea8b7dab8c", - "shasum": "" - }, - "require": { - "illuminate/session": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/http-foundation": "~3.2", - "symfony/http-kernel": "~3.2" - }, - "time": "2017-03-15 14:15:59", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Http\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Http package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/hashing", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/hashing.git", - "reference": "b5c377960fb6dd32a0172dabbe6579589e210b9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/hashing/zipball/b5c377960fb6dd32a0172dabbe6579589e210b9e", - "reference": "b5c377960fb6dd32a0172dabbe6579589e210b9e", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-03-08 23:05:14", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Hashing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Hashing package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/encryption", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/encryption.git", - "reference": "beacee0662bf20ff60e5a319529300f29b840b94" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/encryption/zipball/beacee0662bf20ff60e5a319529300f29b840b94", - "reference": "beacee0662bf20ff60e5a319529300f29b840b94", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" - }, - "time": "2016-12-30 22:45:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Encryption\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Encryption package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/database", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/database.git", - "reference": "890564c6b84bcb2b45d41d3da072fabf422c07f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/890564c6b84bcb2b45d41d3da072fabf422c07f5", - "reference": "890564c6b84bcb2b45d41d3da072fabf422c07f5", - "shasum": "" - }, - "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4" - }, - "suggest": { - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", - "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", - "illuminate/console": "Required to use the database commands (5.4.*).", - "illuminate/events": "Required to use the observers with Eloquent (5.4.*).", - "illuminate/filesystem": "Required to use the migrations (5.4.*).", - "illuminate/pagination": "Required to paginate the result set (5.4.*)." - }, - "time": "2017-04-11 22:53:18", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "illuminate/config", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/config.git", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/8fe700aa596bc623d347e4578041fbda7a44c3d9", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-02-04 20:27:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Config package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/cache", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/cache.git", - "reference": "a0a4cb345e40b18e99c0cd49e260dbddb66dec5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/a0a4cb345e40b18e99c0cd49e260dbddb66dec5f", - "reference": "a0a4cb345e40b18e99c0cd49e260dbddb66dec5f", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4" - }, - "suggest": { - "illuminate/database": "Required to use the database cache driver (5.4.*).", - "illuminate/filesystem": "Required to use the file cache driver (5.4.*).", - "illuminate/redis": "Required to use the redis cache driver (5.4.*)." - }, - "time": "2017-02-27 20:54:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Cache package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/bus", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/bus.git", - "reference": "2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6", - "reference": "2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/pipeline": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "time": "2017-01-17 14:21:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Bus\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Bus package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/broadcasting", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/broadcasting.git", - "reference": "6a250693e3b598c40512ff6b0a9d87d55d073443" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/6a250693e3b598c40512ff6b0a9d87d55d073443", - "reference": "6a250693e3b598c40512ff6b0a9d87d55d073443", - "shasum": "" - }, - "require": { - "illuminate/bus": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/queue": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" - }, - "suggest": { - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0)." - }, - "time": "2017-03-15 17:10:29", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Broadcasting\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Broadcasting package.", - "homepage": "https://laravel.com" - }, - { - "name": "illuminate/auth", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/auth.git", - "reference": "d8e8648b7a351084791fbfdb6315a50d66e393d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/auth/zipball/d8e8648b7a351084791fbfdb6315a50d66e393d0", - "reference": "d8e8648b7a351084791fbfdb6315a50d66e393d0", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.4.*", - "illuminate/http": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4" - }, - "suggest": { - "illuminate/console": "Required to use the auth:clear-resets command (5.4.*).", - "illuminate/queue": "Required to fire login / logout events (5.4.*).", - "illuminate/session": "Required to use the session based guard (5.4.*)." - }, - "time": "2017-04-16 13:31:21", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Auth\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Auth package.", - "homepage": "https://laravel.com" - }, - { - "name": "laravel/lumen-framework", - "version": "v5.4.6", - "version_normalized": "5.4.6.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/lumen-framework.git", - "reference": "5997a38fe261ed88cac215cb191f45cf35f70a02" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/5997a38fe261ed88cac215cb191f45cf35f70a02", - "reference": "5997a38fe261ed88cac215cb191f45cf35f70a02", - "shasum": "" - }, - "require": { - "illuminate/auth": "5.4.*", - "illuminate/broadcasting": "5.4.*", - "illuminate/bus": "5.4.*", - "illuminate/cache": "5.4.*", - "illuminate/config": "5.4.*", - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/database": "5.4.*", - "illuminate/encryption": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/hashing": "5.4.*", - "illuminate/http": "5.4.*", - "illuminate/pagination": "5.4.*", - "illuminate/pipeline": "5.4.*", - "illuminate/queue": "5.4.*", - "illuminate/support": "5.4.*", - "illuminate/translation": "5.4.*", - "illuminate/validation": "5.4.*", - "illuminate/view": "5.4.*", - "monolog/monolog": "~1.11", - "mtdowling/cron-expression": "~1.0", - "nikic/fast-route": "~1.0", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4", - "symfony/http-foundation": "~3.2", - "symfony/http-kernel": "~3.2" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpunit/phpunit": "~5.7" - }, - "suggest": { - "laravel/tinker": "Required to use the tinker console command (~1.0).", - "vlucas/phpdotenv": "Required to use .env files (~2.2)." - }, - "time": "2017-04-03 21:20:22", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Laravel\\Lumen\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Laravel Lumen Framework.", - "homepage": "http://laravel.com", - "keywords": [ - "framework", - "laravel", - "lumen" - ] - }, - { - "name": "vlucas/phpdotenv", - "version": "v2.4.0", - "version_normalized": "2.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "time": "2016-09-01 10:05:43", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause-Attribution" - ], - "authors": [ - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ] - }, - { - "name": "fzaninotto/faker", - "version": "v1.6.0", - "version_normalized": "1.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", - "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", - "shasum": "" - }, - "require": { - "php": "^5.3.3|^7.0" - }, - "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "time": "2016-04-29 12:21:54", - "type": "library", - "extra": { - "branch-alias": [] - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ] - }, - { - "name": "symfony/yaml", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "885db865f6b2b918404a1fae28f9ac640f71f994" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/885db865f6b2b918404a1fae28f9ac640f71f994", - "reference": "885db865f6b2b918404a1fae28f9ac640f71f994", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "time": "2017-05-28 10:56:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "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 Yaml Component", - "homepage": "https://symfony.com" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "time": "2016-10-03 07:35:21", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "version_normalized": "1.0.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" - }, - "time": "2015-07-28 20:34:47", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "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" - }, - { - "name": "sebastian/recursion-context", - "version": "2.0.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2016-11-19 07:33:16", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context" - }, - { - "name": "sebastian/object-enumerator", - "version": "2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "time": "2017-02-18 15:18:39", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "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/" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "time": "2015-10-12 03:26:01", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ] - }, - { - "name": "sebastian/exporter", - "version": "2.0.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "time": "2016-11-19 08:54:04", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ] - }, - { - "name": "sebastian/environment", - "version": "2.0.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.0" - }, - "time": "2016-11-26 07:53:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ] - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "version_normalized": "1.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "time": "2017-05-22 07:24:03", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ] - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "version_normalized": "1.2.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2017-01-29 09:50:25", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ] - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "version_normalized": "1.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "time": "2015-06-14 21:17:01", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ] - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 13:50:34", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ] - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.4.3", - "version_normalized": "3.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-soap": "*" - }, - "time": "2016-12-08 20:27:08", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "version_normalized": "1.0.9.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "time": "2017-02-26 11:10:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ] - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "version_normalized": "1.4.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2016-10-03 07:40:28", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ] - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "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" - }, - "time": "2017-03-04 06:30:41", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.11", - "version_normalized": "1.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2017-02-27 10:12:30", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ] - }, - { - "name": "phpunit/php-code-coverage", - "version": "4.0.8", - "version_normalized": "4.0.8.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" - }, - "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-xdebug": "^2.5.1" - }, - "time": "2017-04-02 07:44:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ] - }, - { - "name": "webmozart/assert", - "version": "1.2.0", - "version_normalized": "1.2.0.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" - }, - "time": "2016-11-23 20:04:58", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0", - "version_normalized": "1.0.0.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" - }, - "time": "2015-12-27 11:43:31", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2.1", - "version_normalized": "0.2.1.0", - "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" - }, - "time": "2016-11-25 06:54:22", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ] - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", - "version_normalized": "3.1.1.0", - "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" - }, - "time": "2016-09-30 07:12:33", - "type": "library", - "installation-source": "dist", - "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." - }, - { - "name": "phpspec/prophecy", - "version": "v1.7.0", - "version_normalized": "1.7.0.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" - }, - "time": "2017-03-02 20:05:34", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "myclabs/deep-copy", - "version": "1.6.1", - "version_normalized": "1.6.1.0", - "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" - }, - "time": "2017-04-12 18:52:22", - "type": "library", - "installation-source": "dist", - "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" - ] - }, - { - "name": "phpunit/phpunit", - "version": "5.7.20", - "version_normalized": "5.7.20.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b", - "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" - }, - "time": "2017-05-22 07:42:55", - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.7.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ] - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", - "version_normalized": "1.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" - }, - "time": "2015-05-11 14:41:42", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "hamcrest" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "files": [ - "hamcrest/Hamcrest.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ] - }, - { - "name": "mockery/mockery", - "version": "0.9.9", - "version_normalized": "0.9.9.0", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/6fdb61243844dc924071d3404bb23994ea0b6856", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~1.1", - "lib-pcre": ">=7.0", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2017-02-28 12:52:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/1.4.4" }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ] - } -] + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "install-path": "../doctrine/inflector" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "time": "2022-12-30T00:15:36+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "install-path": "../doctrine/instantiator" + }, + { + "name": "fzaninotto/faker", + "version": "v1.9.2", + "version_normalized": "1.9.2.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^2.9.2" + }, + "time": "2020-12-11T09:56:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + }, + "abandoned": true, + "install-path": "../fzaninotto/faker" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "satooshi/php-coveralls": "dev-master" + }, + "time": "2015-05-11T14:41:42+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "hamcrest" + ], + "files": [ + "hamcrest/Hamcrest.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "install-path": "../hamcrest/hamcrest-php" + }, + { + "name": "illuminate/auth", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/auth.git", + "reference": "f11e142d4e60ed84272f988dddeb73f87c132db6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/auth/zipball/f11e142d4e60ed84272f988dddeb73f87c132db6", + "reference": "f11e142d4e60ed84272f988dddeb73f87c132db6", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/http": "5.4.*", + "illuminate/queue": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4" + }, + "suggest": { + "illuminate/console": "Required to use the auth:clear-resets command (5.4.*).", + "illuminate/queue": "Required to fire login / logout events (5.4.*).", + "illuminate/session": "Required to use the session based guard (5.4.*)." + }, + "time": "2017-08-23T20:25:41+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Auth\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Auth package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/auth" + }, + { + "name": "illuminate/broadcasting", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/broadcasting.git", + "reference": "dbc7a85ce36a61c57b9312965ec023378388c9ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/dbc7a85ce36a61c57b9312965ec023378388c9ab", + "reference": "dbc7a85ce36a61c57b9312965ec023378388c9ab", + "shasum": "" + }, + "require": { + "illuminate/bus": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/queue": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "suggest": { + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0)." + }, + "time": "2017-07-24T13:37:02+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Broadcasting\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Broadcasting package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/broadcasting" + }, + { + "name": "illuminate/bus", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/bus.git", + "reference": "2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/bus/zipball/2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6", + "reference": "2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/pipeline": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-01-17T14:21:32+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Bus\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Bus package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/bus" + }, + { + "name": "illuminate/cache", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/cache.git", + "reference": "281adfd3fc7067ee1e23320e1abe0fa090c5fc22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/cache/zipball/281adfd3fc7067ee1e23320e1abe0fa090c5fc22", + "reference": "281adfd3fc7067ee1e23320e1abe0fa090c5fc22", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4" + }, + "suggest": { + "illuminate/database": "Required to use the database cache driver (5.4.*).", + "illuminate/filesystem": "Required to use the file cache driver (5.4.*).", + "illuminate/redis": "Required to use the redis cache driver (5.4.*)." + }, + "time": "2017-08-22T15:53:21+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Cache package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/cache" + }, + { + "name": "illuminate/config", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/config.git", + "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/config/zipball/8fe700aa596bc623d347e4578041fbda7a44c3d9", + "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-02-04T20:27:32+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Config package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/config" + }, + { + "name": "illuminate/console", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/console.git", + "reference": "4f0413ffd240d2004c3e9e4cd8f63df249939a15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/console/zipball/4f0413ffd240d2004c3e9e4cd8f63df249939a15", + "reference": "4f0413ffd240d2004c3e9e4cd8f63df249939a15", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4", + "symfony/console": "~3.2" + }, + "suggest": { + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", + "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", + "symfony/process": "Required to use scheduling component (~3.2)." + }, + "time": "2017-08-24T22:31:32+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Console package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/console" + }, + { + "name": "illuminate/container", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/container.git", + "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/container/zipball/c5b8a02a34a52c307f16922334c355c5eef725a6", + "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-05-24T14:15:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "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", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/container" + }, + { + "name": "illuminate/contracts", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "67f642e018f3e95fb0b2ebffc206c3200391b1ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/67f642e018f3e95fb0b2ebffc206c3200391b1ab", + "reference": "67f642e018f3e95fb0b2ebffc206c3200391b1ab", + "shasum": "" + }, + "require": { + "php": ">=5.6.4" + }, + "time": "2017-08-26T23:56:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "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", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/contracts" + }, + { + "name": "illuminate/database", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/database.git", + "reference": "405aa061a5bc8588cbf3a78fba383541a568e3fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/database/zipball/405aa061a5bc8588cbf3a78fba383541a568e3fe", + "reference": "405aa061a5bc8588cbf3a78fba383541a568e3fe", + "shasum": "" + }, + "require": { + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4" + }, + "suggest": { + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "illuminate/console": "Required to use the database commands (5.4.*).", + "illuminate/events": "Required to use the observers with Eloquent (5.4.*).", + "illuminate/filesystem": "Required to use the migrations (5.4.*).", + "illuminate/pagination": "Required to paginate the result set (5.4.*)." + }, + "time": "2017-08-24T12:07:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "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" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/database" + }, + { + "name": "illuminate/encryption", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/encryption.git", + "reference": "7020853ed0276a23bf88697140a6b28c15aae20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/encryption/zipball/7020853ed0276a23bf88697140a6b28c15aae20d", + "reference": "7020853ed0276a23bf88697140a6b28c15aae20d", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4" + }, + "time": "2017-08-02T13:07:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Encryption\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Encryption package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/encryption" + }, + { + "name": "illuminate/events", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/events.git", + "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/events/zipball/ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "shasum": "" + }, + "require": { + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-05-02T12:57:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Events\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Events package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/events" + }, + { + "name": "illuminate/filesystem", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/filesystem.git", + "reference": "b800a1423d06869ee5c2768eee123917f12b693e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/b800a1423d06869ee5c2768eee123917f12b693e", + "reference": "b800a1423d06869ee5c2768eee123917f12b693e", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4", + "symfony/finder": "~3.2" + }, + "suggest": { + "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + }, + "time": "2017-08-02T21:58:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Filesystem package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/filesystem" + }, + { + "name": "illuminate/hashing", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/hashing.git", + "reference": "b5c377960fb6dd32a0172dabbe6579589e210b9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/hashing/zipball/b5c377960fb6dd32a0172dabbe6579589e210b9e", + "reference": "b5c377960fb6dd32a0172dabbe6579589e210b9e", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-03-08T23:05:14+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Hashing\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Hashing package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/hashing" + }, + { + "name": "illuminate/http", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/http.git", + "reference": "48b951df8c9f90ed42681c012bd336a16d54adf5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/http/zipball/48b951df8c9f90ed42681c012bd336a16d54adf5", + "reference": "48b951df8c9f90ed42681c012bd336a16d54adf5", + "shasum": "" + }, + "require": { + "illuminate/session": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2" + }, + "time": "2017-08-25T01:40:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Http\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Http package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/http" + }, + { + "name": "illuminate/pagination", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pagination.git", + "reference": "ae1540acf02c8b642666d6901c18d2deb5606b47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pagination/zipball/ae1540acf02c8b642666d6901c18d2deb5606b47", + "reference": "ae1540acf02c8b642666d6901c18d2deb5606b47", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-07-24T13:37:02+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Pagination\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Pagination package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/pagination" + }, + { + "name": "illuminate/pipeline", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pipeline.git", + "reference": "ada6dc2435afa57a74e3dcd4570c31a1a1244e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pipeline/zipball/ada6dc2435afa57a74e3dcd4570c31a1a1244e65", + "reference": "ada6dc2435afa57a74e3dcd4570c31a1a1244e65", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-01-17T14:21:32+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "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", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/pipeline" + }, + { + "name": "illuminate/queue", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/queue.git", + "reference": "874144ac76df651572fc884951f80f3afd9d7057" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/queue/zipball/874144ac76df651572fc884951f80f3afd9d7057", + "reference": "874144ac76df651572fc884951f80f3afd9d7057", + "shasum": "" + }, + "require": { + "illuminate/console": "5.4.*", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/database": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4", + "symfony/debug": "~3.2", + "symfony/process": "~3.2" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", + "illuminate/redis": "Required to use the Redis queue driver (5.4.*).", + "pda/pheanstalk": "Required to use the Beanstalk queue driver (~3.0)." + }, + "time": "2017-08-28T21:32:02+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Queue\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Queue package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/queue" + }, + { + "name": "illuminate/session", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/session.git", + "reference": "59f994b299318ba5a91b390fe482e24fdaa08ec5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/session/zipball/59f994b299318ba5a91b390fe482e24fdaa08ec5", + "reference": "59f994b299318ba5a91b390fe482e24fdaa08ec5", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "php": ">=5.6.4", + "symfony/finder": "~3.2", + "symfony/http-foundation": "~3.2" + }, + "suggest": { + "illuminate/console": "Required to use the session:table command (5.4.*)." + }, + "time": "2017-03-30T14:26:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Session\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Session package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/session" + }, + { + "name": "illuminate/support", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "feab1d1495fd6d38970bd6c83586ba2ace8f299a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/feab1d1495fd6d38970bd6c83586ba2ace8f299a", + "reference": "feab1d1495fd6d38970bd6c83586ba2ace8f299a", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.1", + "ext-mbstring": "*", + "illuminate/contracts": "5.4.*", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4" + }, + "replace": { + "tightenco/collect": "self.version" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (5.2.*).", + "symfony/process": "Required to use the composer class (~3.2).", + "symfony/var-dumper": "Required to use the dd function (~3.2)." + }, + "time": "2017-08-15T13:25:41+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "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", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/support" + }, + { + "name": "illuminate/translation", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/translation.git", + "reference": "b671ddf78cbee60b0b357ad5745eceda2df26082" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/translation/zipball/b671ddf78cbee60b0b357ad5745eceda2df26082", + "reference": "b671ddf78cbee60b0b357ad5745eceda2df26082", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4" + }, + "time": "2017-06-11T21:19:31+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Translation package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/translation" + }, + { + "name": "illuminate/validation", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/validation.git", + "reference": "c9b7beedfb94e50becfbce1aa354e0851c519809" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/validation/zipball/c9b7beedfb94e50becfbce1aa354e0851c519809", + "reference": "c9b7beedfb94e50becfbce1aa354e0851c519809", + "shasum": "" + }, + "require": { + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "illuminate/translation": "5.4.*", + "php": ">=5.6.4", + "symfony/http-foundation": "~3.2" + }, + "suggest": { + "illuminate/database": "Required to use the database presence verifier (5.4.*)." + }, + "time": "2017-08-26T19:43:17+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Validation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Validation package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/validation" + }, + { + "name": "illuminate/view", + "version": "v5.4.36", + "version_normalized": "5.4.36.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/view.git", + "reference": "785f41f8f01653dc830c5c89eb0f25c311af7615" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/view/zipball/785f41f8f01653dc830c5c89eb0f25c311af7615", + "reference": "785f41f8f01653dc830c5c89eb0f25c311af7615", + "shasum": "" + }, + "require": { + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/events": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "php": ">=5.6.4", + "symfony/debug": "~3.2" + }, + "time": "2017-08-05T12:41:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\View\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate View package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "install-path": "../illuminate/view" + }, + { + "name": "kylekatarnls/update-helper", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/kylekatarnls/update-helper.git", + "reference": "429be50660ed8a196e0798e5939760f168ec8ce9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/429be50660ed8a196e0798e5939760f168ec8ce9", + "reference": "429be50660ed8a196e0798e5939760f168ec8ce9", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0.0", + "php": ">=5.3.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "composer/composer": "2.0.x-dev || ^2.0.0-dev", + "phpunit/phpunit": ">=4.8.35 <6.0" + }, + "time": "2020-04-07T20:44:10+00:00", + "type": "composer-plugin", + "extra": { + "class": "UpdateHelper\\ComposerPlugin" + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "UpdateHelper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Update helper", + "support": { + "issues": "https://github.com/kylekatarnls/update-helper/issues", + "source": "https://github.com/kylekatarnls/update-helper/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "install-path": "../kylekatarnls/update-helper" + }, + { + "name": "laravel/lumen-framework", + "version": "v5.4.7", + "version_normalized": "5.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/lumen-framework.git", + "reference": "7a5c02ce40d45a364fd5c686ff0838bc0b6d0515" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/7a5c02ce40d45a364fd5c686ff0838bc0b6d0515", + "reference": "7a5c02ce40d45a364fd5c686ff0838bc0b6d0515", + "shasum": "" + }, + "require": { + "illuminate/auth": "5.4.*", + "illuminate/broadcasting": "5.4.*", + "illuminate/bus": "5.4.*", + "illuminate/cache": "5.4.*", + "illuminate/config": "5.4.*", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/database": "5.4.*", + "illuminate/encryption": "5.4.*", + "illuminate/events": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/hashing": "5.4.*", + "illuminate/http": "5.4.*", + "illuminate/pagination": "5.4.*", + "illuminate/pipeline": "5.4.*", + "illuminate/queue": "5.4.*", + "illuminate/support": "5.4.*", + "illuminate/translation": "5.4.*", + "illuminate/validation": "5.4.*", + "illuminate/view": "5.4.*", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nikic/fast-route": "~1.0", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "phpunit/phpunit": "~5.7" + }, + "suggest": { + "laravel/tinker": "Required to use the tinker console command (~1.0).", + "vlucas/phpdotenv": "Required to use .env files (~2.2)." + }, + "time": "2017-08-25T13:22:55+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Lumen\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Laravel Lumen Framework.", + "homepage": "https://lumen.laravel.com", + "keywords": [ + "framework", + "laravel", + "lumen" + ], + "support": { + "issues": "https://github.com/laravel/lumen-framework/issues", + "source": "https://github.com/laravel/lumen-framework" + }, + "install-path": "../laravel/lumen-framework" + }, + { + "name": "mockery/mockery", + "version": "0.9.11", + "version_normalized": "0.9.11.0", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "be9bf28d8e57d67883cba9fcadfcff8caab667f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/be9bf28d8e57d67883cba9fcadfcff8caab667f8", + "reference": "be9bf28d8e57d67883cba9fcadfcff8caab667f8", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~1.1", + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2019-02-12T16:07:13+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/0.9" + }, + "install-path": "../mockery/mockery" + }, + { + "name": "monolog/monolog", + "version": "1.27.1", + "version_normalized": "1.27.1.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "904713c5929655dc9b97288b69cfeedad610c9a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/904713c5929655dc9b97288b69cfeedad610c9a1", + "reference": "904713c5929655dc9b97288b69cfeedad610c9a1", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpstan/phpstan": "^0.12.59", + "phpunit/phpunit": "~4.5", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "time": "2022-06-09T08:53:42+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/1.27.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "install-path": "../monolog/monolog" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.2.3", + "version_normalized": "1.2.3.0", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/cron-expression.git", + "reference": "9be552eebcc1ceec9776378f7dcc085246cacca6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9be552eebcc1ceec9776378f7dcc085246cacca6", + "reference": "9be552eebcc1ceec9776378f7dcc085246cacca6", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "time": "2019-12-28T04:23:06+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/mtdowling/cron-expression/issues", + "source": "https://github.com/mtdowling/cron-expression/tree/v1.2.3" + }, + "abandoned": "dragonmantank/cron-expression", + "install-path": "../mtdowling/cron-expression" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "time": "2022-03-03T13:19:32+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "install-path": "../myclabs/deep-copy" + }, + { + "name": "nesbot/carbon", + "version": "1.39.1", + "version_normalized": "1.39.1.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4be0c005164249208ce1b5ca633cd57bdd42ff33", + "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33", + "shasum": "" + }, + "require": { + "kylekatarnls/update-helper": "^1.1", + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" + }, + "require-dev": { + "composer/composer": "^1.2", + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" + }, + "time": "2019-10-14T05:51:36+00:00", + "bin": [ + "bin/upgrade-carbon" + ], + "type": "library", + "extra": { + "update-helper": "Carbon\\Upgrade", + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + } + }, + "installation-source": "dist", + "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" + ], + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "install-path": "../nesbot/carbon" + }, + { + "name": "nikic/fast-route", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + }, + "time": "2018-02-13T20:26:39+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "FastRoute\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "support": { + "issues": "https://github.com/nikic/FastRoute/issues", + "source": "https://github.com/nikic/FastRoute/tree/master" + }, + "install-path": "../nikic/fast-route" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.21", + "version_normalized": "2.0.21.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "time": "2022-02-16T17:07:03+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "install-path": "../paragonie/random_compat" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "time": "2020-06-27T09:03:43+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "install-path": "../phpdocumentor/reflection-common" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "version_normalized": "5.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "time": "2021-10-19T17:43:47+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "install-path": "../phpdocumentor/reflection-docblock" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", + "version_normalized": "1.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "time": "2022-10-14T12:47:21+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" + }, + "install-path": "../phpdocumentor/type-resolver" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "version_normalized": "1.10.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "time": "2020-03-05T15:02:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + }, + "install-path": "../phpspec/prophecy" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.8", + "version_normalized": "4.0.8.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "time": "2017-04-02T07:44:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "install-path": "../phpunit/php-code-coverage" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "version_normalized": "1.4.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2017-11-27T13:52:08+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + }, + "install-path": "../phpunit/php-file-iterator" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2015-06-21T13:50:34+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "install-path": "../phpunit/php-text-template" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "version_normalized": "1.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "time": "2017-02-26T11:10:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "install-path": "../phpunit/php-timer" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.2", + "version_normalized": "2.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "791198a2c6254db10131eecfe8c06670700904db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "time": "2017-11-27T05:48:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "abandoned": true, + "install-path": "../phpunit/php-token-stream" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.27", + "version_normalized": "5.7.27.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "time": "2018-02-01T05:50:59+00:00", + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/5.7.27" + }, + "install-path": "../phpunit/phpunit" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.4", + "version_normalized": "3.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "time": "2017-06-30T09:13:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", + "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/3.4" + }, + "abandoned": true, + "install-path": "../phpunit/phpunit-mock-objects" + }, + { + "name": "psr/log", + "version": "1.1.4", + "version_normalized": "1.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2021-05-03T11:20:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "install-path": "../psr/log" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "version_normalized": "1.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "time": "2020-11-30T08:15:22+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/code-unit-reverse-lookup" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "version_normalized": "1.2.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2017-01-29T09:50:25+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "install-path": "../sebastian/comparator" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "version_normalized": "1.4.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "time": "2017-05-22T07:24:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "install-path": "../sebastian/diff" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "time": "2016-11-26T07:53:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "install-path": "../sebastian/environment" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "time": "2016-11-19T08:54:04+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "install-path": "../sebastian/exporter" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "time": "2015-10-12T03:26:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "install-path": "../sebastian/global-state" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "version_normalized": "2.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "time": "2017-02-18T15:18:39+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "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/", + "install-path": "../sebastian/object-enumerator" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "time": "2016-11-19T07:33:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "install-path": "../sebastian/recursion-context" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "version_normalized": "1.0.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" + }, + "time": "2015-07-28T20:34:47+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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", + "install-path": "../sebastian/resource-operations" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "version_normalized": "2.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "time": "2016-10-03T07:35:21+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "install-path": "../sebastian/version" + }, + { + "name": "symfony/console", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "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.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.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/lock": "", + "symfony/process": "" + }, + "time": "2020-10-24T10:57:07+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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 Console Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/console" + }, + { + "name": "symfony/debug", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", + "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "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/http-kernel": "~2.8|~3.0|~4.0" + }, + "time": "2020-10-24T10:57:07+00:00", + "type": "library", + "installation-source": "dist", + "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", + "support": { + "source": "https://github.com/symfony/debug/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "abandoned": "symfony/error-handler", + "install-path": "../symfony/debug" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.4.44", + "version_normalized": "4.4.44.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1e866e9e5c1b22168e0ce5f0b467f19bba61266a", + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/event-dispatcher-contracts": "^1.1", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^3.4|^4.0|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2022-07-20T09:59:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.44" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/event-dispatcher" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.13", + "version_normalized": "1.1.13.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/1d5cd762abaa6b2a4169d3e77610193a7157129e", + "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e", + "shasum": "" + }, + "require": { + "php": ">=7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "time": "2022-01-02T09:41:36+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/event-dispatcher-contracts" + }, + { + "name": "symfony/finder", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "time": "2020-11-16T17:02:08+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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 Finder Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/finder" + }, + { + "name": "symfony/http-foundation", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b9885fcce6fe494201da4f70a9309770e9d13dc8", + "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php70": "~1.6" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0|~4.0" + }, + "time": "2020-10-24T10:57:07+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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 HttpFoundation Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/http-foundation" + }, + { + "name": "symfony/http-kernel", + "version": "v3.4.49", + "version_normalized": "3.4.49.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "5aa72405f5bd5583c36ed6e756acb17d3f98ac40" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5aa72405f5bd5583c36ed6e756acb17d3f98ac40", + "reference": "5aa72405f5bd5583c36ed6e756acb17d3f98ac40", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0", + "symfony/debug": "^3.3.3|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php56": "~1.8" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.4.10|<4.0.10,>=4", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "^3.4.10|^4.0.10", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "time": "2021-05-19T12:06:59+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "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 HttpKernel Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v3.4.49" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/http-kernel" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "version_normalized": "1.27.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2022-11-03T14:55:06+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-ctype" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "version_normalized": "1.27.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2022-11-03T14:55:06+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-mbstring" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.20.0", + "version_normalized": "1.20.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675", + "reference": "54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2020-10-23T14:02:19+00:00", + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php56/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": null + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.20.0", + "version_normalized": "1.20.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2020-10-23T14:02:19+00:00", + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": null + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "version_normalized": "1.27.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2022-11-03T14:55:06+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php80" + }, + { + "name": "symfony/process", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/b8648cf1d5af12a44a51d07ef9bf980921f15fca", + "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "time": "2020-10-24T10:57:07+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "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 Process Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/process" + }, + { + "name": "symfony/translation", + "version": "v4.3.11", + "version_normalized": "4.3.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "46e462be71935ae15eab531e4d491d801857f24c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/46e462be71935ae15eab531e4d491d801857f24c", + "reference": "46e462be71935ae15eab531e4d491d801857f24c", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^1.1.6" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "symfony/translation-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/service-contracts": "^1.1.2", + "symfony/var-dumper": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "time": "2020-01-04T12:24:57+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "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", + "support": { + "source": "https://github.com/symfony/translation/tree/4.3" + }, + "install-path": "../symfony/translation" + }, + { + "name": "symfony/translation-contracts", + "version": "v1.1.13", + "version_normalized": "1.1.13.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "7462e5c4cb8b9cd152f992e8f10963b5641921f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/7462e5c4cb8b9cd152f992e8f10963b5641921f6", + "reference": "7462e5c4cb8b9cd152f992e8f10963b5641921f6", + "shasum": "" + }, + "require": { + "php": ">=7.1.3" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "time": "2022-06-27T13:16:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v1.1.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/translation-contracts" + }, + { + "name": "symfony/yaml", + "version": "v4.4.45", + "version_normalized": "4.4.45.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d", + "reference": "aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "^3.4|^4.0|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "time": "2022-08-02T15:47:23+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v4.4.45" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/yaml" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.6.9", + "version_normalized": "2.6.9.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141", + "reference": "2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141", + "shasum": "" + }, + "require": { + "php": "^5.3.9 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.17" + }, + "require-dev": { + "ext-filter": "*", + "ext-pcre": "*", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator.", + "ext-pcre": "Required to use most of the library." + }, + "time": "2021-12-12T22:59:22+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v2.6.9" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "install-path": "../vlucas/phpdotenv" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "time": "2022-06-03T18:03:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "install-path": "../webmozart/assert" + } + ], + "dev": true, + "dev-package-names": [ + "doctrine/instantiator", + "fzaninotto/faker", + "hamcrest/hamcrest-php", + "mockery/mockery", + "myclabs/deep-copy", + "phpdocumentor/reflection-common", + "phpdocumentor/reflection-docblock", + "phpdocumentor/type-resolver", + "phpspec/prophecy", + "phpunit/php-code-coverage", + "phpunit/php-file-iterator", + "phpunit/php-text-template", + "phpunit/php-timer", + "phpunit/php-token-stream", + "phpunit/phpunit", + "phpunit/phpunit-mock-objects", + "sebastian/code-unit-reverse-lookup", + "sebastian/comparator", + "sebastian/diff", + "sebastian/environment", + "sebastian/exporter", + "sebastian/global-state", + "sebastian/object-enumerator", + "sebastian/recursion-context", + "sebastian/resource-operations", + "sebastian/version", + "symfony/yaml", + "webmozart/assert" + ] +} diff --git a/api/vendor/composer/installed.php b/api/vendor/composer/installed.php new file mode 100644 index 0000000..736ea66 --- /dev/null +++ b/api/vendor/composer/installed.php @@ -0,0 +1,747 @@ + array( + 'name' => 'laravel/lumen', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + 'cordoval/hamcrest-php' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), + 'davedevelopment/hamcrest-php' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), + 'doctrine/inflector' => array( + 'pretty_version' => '1.4.4', + 'version' => '1.4.4.0', + 'reference' => '4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/inflector', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'doctrine/instantiator' => array( + 'pretty_version' => '1.5.0', + 'version' => '1.5.0.0', + 'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/instantiator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'fzaninotto/faker' => array( + 'pretty_version' => 'v1.9.2', + 'version' => '1.9.2.0', + 'reference' => '848d8125239d7dbf8ab25cb7f054f1a630e68c2e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../fzaninotto/faker', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'hamcrest/hamcrest-php' => array( + 'pretty_version' => 'v1.2.2', + 'version' => '1.2.2.0', + 'reference' => 'b37020aa976fa52d3de9aa904aa2522dc518f79c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../hamcrest/hamcrest-php', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'illuminate/auth' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'f11e142d4e60ed84272f988dddeb73f87c132db6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/auth', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/broadcasting' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'dbc7a85ce36a61c57b9312965ec023378388c9ab', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/broadcasting', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/bus' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '2abdce5ca18c87f4c6137ad5e97c4c2fed318fe6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/bus', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/cache' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '281adfd3fc7067ee1e23320e1abe0fa090c5fc22', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/cache', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/config' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '8fe700aa596bc623d347e4578041fbda7a44c3d9', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/config', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/console' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '4f0413ffd240d2004c3e9e4cd8f63df249939a15', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/console', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/container' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'c5b8a02a34a52c307f16922334c355c5eef725a6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/container', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/contracts' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '67f642e018f3e95fb0b2ebffc206c3200391b1ab', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/database' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '405aa061a5bc8588cbf3a78fba383541a568e3fe', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/database', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/encryption' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '7020853ed0276a23bf88697140a6b28c15aae20d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/encryption', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/events' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'ebdca3b0305e9fc954afb9e422c4559482cd11e6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/events', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/filesystem' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'b800a1423d06869ee5c2768eee123917f12b693e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/filesystem', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/hashing' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'b5c377960fb6dd32a0172dabbe6579589e210b9e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/hashing', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/http' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '48b951df8c9f90ed42681c012bd336a16d54adf5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/http', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/pagination' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'ae1540acf02c8b642666d6901c18d2deb5606b47', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/pagination', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/pipeline' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'ada6dc2435afa57a74e3dcd4570c31a1a1244e65', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/pipeline', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/queue' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '874144ac76df651572fc884951f80f3afd9d7057', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/queue', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/session' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '59f994b299318ba5a91b390fe482e24fdaa08ec5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/session', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/support' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'feab1d1495fd6d38970bd6c83586ba2ace8f299a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/support', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/translation' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'b671ddf78cbee60b0b357ad5745eceda2df26082', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/translation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/validation' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => 'c9b7beedfb94e50becfbce1aa354e0851c519809', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/validation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'illuminate/view' => array( + 'pretty_version' => 'v5.4.36', + 'version' => '5.4.36.0', + 'reference' => '785f41f8f01653dc830c5c89eb0f25c311af7615', + 'type' => 'library', + 'install_path' => __DIR__ . '/../illuminate/view', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'kodova/hamcrest-php' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), + 'kylekatarnls/update-helper' => array( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'reference' => '429be50660ed8a196e0798e5939760f168ec8ce9', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../kylekatarnls/update-helper', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'laravel/lumen' => array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'laravel/lumen-framework' => array( + 'pretty_version' => 'v5.4.7', + 'version' => '5.4.7.0', + 'reference' => '7a5c02ce40d45a364fd5c686ff0838bc0b6d0515', + 'type' => 'library', + 'install_path' => __DIR__ . '/../laravel/lumen-framework', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'mockery/mockery' => array( + 'pretty_version' => '0.9.11', + 'version' => '0.9.11.0', + 'reference' => 'be9bf28d8e57d67883cba9fcadfcff8caab667f8', + 'type' => 'library', + 'install_path' => __DIR__ . '/../mockery/mockery', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'monolog/monolog' => array( + 'pretty_version' => '1.27.1', + 'version' => '1.27.1.0', + 'reference' => '904713c5929655dc9b97288b69cfeedad610c9a1', + 'type' => 'library', + 'install_path' => __DIR__ . '/../monolog/monolog', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'mtdowling/cron-expression' => array( + 'pretty_version' => 'v1.2.3', + 'version' => '1.2.3.0', + 'reference' => '9be552eebcc1ceec9776378f7dcc085246cacca6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../mtdowling/cron-expression', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'myclabs/deep-copy' => array( + 'pretty_version' => '1.11.0', + 'version' => '1.11.0.0', + 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614', + 'type' => 'library', + 'install_path' => __DIR__ . '/../myclabs/deep-copy', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'nesbot/carbon' => array( + 'pretty_version' => '1.39.1', + 'version' => '1.39.1.0', + 'reference' => '4be0c005164249208ce1b5ca633cd57bdd42ff33', + 'type' => 'library', + 'install_path' => __DIR__ . '/../nesbot/carbon', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'nikic/fast-route' => array( + 'pretty_version' => 'v1.3.0', + 'version' => '1.3.0.0', + 'reference' => '181d480e08d9476e61381e04a71b34dc0432e812', + 'type' => 'library', + 'install_path' => __DIR__ . '/../nikic/fast-route', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'paragonie/random_compat' => array( + 'pretty_version' => 'v2.0.21', + 'version' => '2.0.21.0', + 'reference' => '96c132c7f2f7bc3230723b66e89f8f150b29d5ae', + 'type' => 'library', + 'install_path' => __DIR__ . '/../paragonie/random_compat', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpdocumentor/reflection-common' => array( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpdocumentor/reflection-docblock' => array( + 'pretty_version' => '5.3.0', + 'version' => '5.3.0.0', + 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpdocumentor/type-resolver' => array( + 'pretty_version' => '1.6.2', + 'version' => '1.6.2.0', + 'reference' => '48f445a408c131e38cab1c235aa6d2bb7a0bb20d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpspec/prophecy' => array( + 'pretty_version' => 'v1.10.3', + 'version' => '1.10.3.0', + 'reference' => '451c3cd1418cf640de218914901e51b064abb093', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpspec/prophecy', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-code-coverage' => array( + 'pretty_version' => '4.0.8', + 'version' => '4.0.8.0', + 'reference' => 'ef7b2f56815df854e66ceaee8ebe9393ae36a40d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-file-iterator' => array( + 'pretty_version' => '1.4.5', + 'version' => '1.4.5.0', + 'reference' => '730b01bc3e867237eaac355e06a36b85dd93a8b4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-file-iterator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-text-template' => array( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'reference' => '31f8b717e51d9a2afca6c9f046f5d69fc27c8686', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-text-template', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-timer' => array( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'reference' => '3dcf38ca72b158baf0bc245e9184d3fdffa9c46f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-timer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-token-stream' => array( + 'pretty_version' => '2.0.2', + 'version' => '2.0.2.0', + 'reference' => '791198a2c6254db10131eecfe8c06670700904db', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-token-stream', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/phpunit' => array( + 'pretty_version' => '5.7.27', + 'version' => '5.7.27.0', + 'reference' => 'b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/phpunit', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/phpunit-mock-objects' => array( + 'pretty_version' => '3.4.4', + 'version' => '3.4.4.0', + 'reference' => 'a23b761686d50a560cc56233b9ecf49597cc9118', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/phpunit-mock-objects', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'psr/event-dispatcher-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/log' => array( + 'pretty_version' => '1.1.4', + 'version' => '1.1.4.0', + 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/log', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'psr/log-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0.0', + 1 => '1.0', + ), + ), + 'sebastian/code-unit-reverse-lookup' => array( + 'pretty_version' => '1.0.2', + 'version' => '1.0.2.0', + 'reference' => '1de8cd5c010cb153fcd68b8d0f64606f523f7619', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/comparator' => array( + 'pretty_version' => '1.2.4', + 'version' => '1.2.4.0', + 'reference' => '2b7424b55f5047b47ac6e5ccb20b2aea4011d9be', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/comparator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/diff' => array( + 'pretty_version' => '1.4.3', + 'version' => '1.4.3.0', + 'reference' => '7f066a26a962dbe58ddea9f72a4e82874a3975a4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/diff', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/environment' => array( + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => '5795ffe5dc5b02460c3e34222fee8cbe245d8fac', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/environment', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/exporter' => array( + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => 'ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/exporter', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/global-state' => array( + 'pretty_version' => '1.1.1', + 'version' => '1.1.1.0', + 'reference' => 'bc37d50fea7d017d3d340f230811c9f1d7280af4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/global-state', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/object-enumerator' => array( + 'pretty_version' => '2.0.1', + 'version' => '2.0.1.0', + 'reference' => '1311872ac850040a79c3c058bea3e22d0f09cbb7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/object-enumerator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/recursion-context' => array( + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => '2c3ba150cbec723aa057506e73a8d33bdb286c9a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/recursion-context', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/resource-operations' => array( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'reference' => 'ce990bb21759f94aeafd30209e8cfcdfa8bc3f52', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/resource-operations', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/version' => array( + 'pretty_version' => '2.0.1', + 'version' => '2.0.1.0', + 'reference' => '99732be0ddb3361e16ad77b68ba41efc8e979019', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/version', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'symfony/console' => array( + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', + 'reference' => 'a10b1da6fc93080c180bba7219b5ff5b7518fe81', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/console', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/debug' => array( + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', + 'reference' => 'ab42889de57fdfcfcc0759ab102e2fd4ea72dcae', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/debug', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/event-dispatcher' => array( + 'pretty_version' => 'v4.4.44', + 'version' => '4.4.44.0', + 'reference' => '1e866e9e5c1b22168e0ce5f0b467f19bba61266a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/event-dispatcher', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/event-dispatcher-contracts' => array( + 'pretty_version' => 'v1.1.13', + 'version' => '1.1.13.0', + 'reference' => '1d5cd762abaa6b2a4169d3e77610193a7157129e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/event-dispatcher-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.1', + ), + ), + 'symfony/finder' => array( + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', + 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/finder', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/http-foundation' => array( + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', + 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/http-foundation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/http-kernel' => array( + 'pretty_version' => 'v3.4.49', + 'version' => '3.4.49.0', + 'reference' => '5aa72405f5bd5583c36ed6e756acb17d3f98ac40', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/http-kernel', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-ctype' => array( + 'pretty_version' => 'v1.27.0', + 'version' => '1.27.0.0', + 'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-mbstring' => array( + 'pretty_version' => 'v1.27.0', + 'version' => '1.27.0.0', + 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php56' => array( + 'pretty_version' => 'v1.20.0', + 'version' => '1.20.0.0', + 'reference' => '54b8cd7e6c1643d78d011f3be89f3ef1f9f4c675', + 'type' => 'metapackage', + 'install_path' => NULL, + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php70' => array( + 'pretty_version' => 'v1.20.0', + 'version' => '1.20.0.0', + 'reference' => '5f03a781d984aae42cebd18e7912fa80f02ee644', + 'type' => 'metapackage', + 'install_path' => NULL, + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php80' => array( + 'pretty_version' => 'v1.27.0', + 'version' => '1.27.0.0', + 'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php80', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/process' => array( + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', + 'reference' => 'b8648cf1d5af12a44a51d07ef9bf980921f15fca', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/process', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation' => array( + 'pretty_version' => 'v4.3.11', + 'version' => '4.3.11.0', + 'reference' => '46e462be71935ae15eab531e4d491d801857f24c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/translation', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation-contracts' => array( + 'pretty_version' => 'v1.1.13', + 'version' => '1.1.13.0', + 'reference' => '7462e5c4cb8b9cd152f992e8f10963b5641921f6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/translation-contracts', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/translation-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'symfony/yaml' => array( + 'pretty_version' => 'v4.4.45', + 'version' => '4.4.45.0', + 'reference' => 'aeccc4dc52a9e634f1d1eebeb21eacfdcff1053d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/yaml', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'tightenco/collect' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => 'v5.4.36', + ), + ), + 'vlucas/phpdotenv' => array( + 'pretty_version' => 'v2.6.9', + 'version' => '2.6.9.0', + 'reference' => '2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141', + 'type' => 'library', + 'install_path' => __DIR__ . '/../vlucas/phpdotenv', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'webmozart/assert' => array( + 'pretty_version' => '1.11.0', + 'version' => '1.11.0.0', + 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', + 'type' => 'library', + 'install_path' => __DIR__ . '/../webmozart/assert', + 'aliases' => array(), + 'dev_requirement' => true, + ), + ), +); diff --git a/api/vendor/composer/platform_check.php b/api/vendor/composer/platform_check.php new file mode 100644 index 0000000..cd1bd2c --- /dev/null +++ b/api/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70103)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/api/vendor/doctrine/inflector/.gitignore b/api/vendor/doctrine/inflector/.gitignore deleted file mode 100644 index f2cb7f8..0000000 --- a/api/vendor/doctrine/inflector/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -vendor/ -composer.lock -composer.phar -phpunit.xml diff --git a/api/vendor/doctrine/inflector/.travis.yml b/api/vendor/doctrine/inflector/.travis.yml deleted file mode 100644 index 9ec68f7..0000000 --- a/api/vendor/doctrine/inflector/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php - -sudo: false - -cache: - directory: - - $HOME/.composer/cache - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -install: - - composer install -n - -script: - - phpunit diff --git a/api/vendor/doctrine/inflector/README.md b/api/vendor/doctrine/inflector/README.md index acb55a0..341f8b2 100644 --- a/api/vendor/doctrine/inflector/README.md +++ b/api/vendor/doctrine/inflector/README.md @@ -1,6 +1,8 @@ # Doctrine Inflector Doctrine Inflector is a small library that can perform string manipulations -with regard to upper-/lowercase and singular/plural forms of words. +with regard to uppercase/lowercase and singular/plural forms of words. -[![Build Status](https://travis-ci.org/doctrine/inflector.svg?branch=master)](https://travis-ci.org/doctrine/inflector) +[![Build Status](https://travis-ci.org/doctrine/inflector.svg)](https://travis-ci.org/doctrine/inflector) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/inflector/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/inflector/?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/inflector/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/inflector/?branch=master) diff --git a/api/vendor/doctrine/inflector/composer.json b/api/vendor/doctrine/inflector/composer.json index 7e5b2ef..6f258ea 100644 --- a/api/vendor/doctrine/inflector/composer.json +++ b/api/vendor/doctrine/inflector/composer.json @@ -1,9 +1,9 @@ { "name": "doctrine/inflector", "type": "library", - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "keywords": ["string", "inflection", "singularize", "pluralize"], - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "keywords": ["php", "strings", "words", "manipulation", "inflector", "inflection", "uppercase", "lowercase", "singular", "plural"], + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "license": "MIT", "authors": [ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, @@ -13,17 +13,30 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": ">=5.3.2" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "4.*" + "doctrine/coding-standard": "^8.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "autoload": { - "psr-0": { "Doctrine\\Common\\Inflector\\": "lib/" } + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Tests\\Common\\Inflector\\": "tests/Doctrine/Tests/Common/Inflector", + "Doctrine\\Tests\\Inflector\\": "tests/Doctrine/Tests/Inflector" + } }, "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } } } diff --git a/api/vendor/doctrine/inflector/docs/en/index.rst b/api/vendor/doctrine/inflector/docs/en/index.rst new file mode 100644 index 0000000..273b040 --- /dev/null +++ b/api/vendor/doctrine/inflector/docs/en/index.rst @@ -0,0 +1,227 @@ +Introduction +============ + +The Doctrine Inflector has methods for inflecting text. The features include pluralization, +singularization, converting between camelCase and under_score and capitalizing +words. + +Installation +============ + +You can install the Inflector with composer: + +.. code-block:: console + + $ composer require doctrine/inflector + +Usage +===== + +Using the inflector is easy, you can create a new ``Doctrine\Inflector\Inflector`` instance by using +the ``Doctrine\Inflector\InflectorFactory`` class: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + + $inflector = InflectorFactory::create()->build(); + +By default it will create an English inflector. If you want to use another language, just pass the language +you want to create an inflector for to the ``createForLanguage()`` method: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + use Doctrine\Inflector\Language; + + $inflector = InflectorFactory::createForLanguage(Language::SPANISH)->build(); + +The supported languages are as follows: + +- ``Language::ENGLISH`` +- ``Language::FRENCH`` +- ``Language::NORWEGIAN_BOKMAL`` +- ``Language::PORTUGUESE`` +- ``Language::SPANISH`` +- ``Language::TURKISH`` + +If you want to manually construct the inflector instead of using a factory, you can do so like this: + +.. code-block:: php + + use Doctrine\Inflector\CachedWordInflector; + use Doctrine\Inflector\RulesetInflector; + use Doctrine\Inflector\Rules\English; + + $inflector = new Inflector( + new CachedWordInflector(new RulesetInflector( + English\Rules::getSingularRuleset() + )), + new CachedWordInflector(new RulesetInflector( + English\Rules::getPluralRuleset() + )) + ); + +Adding Languages +---------------- + +If you are interested in adding support for your language, take a look at the other languages defined in the +``Doctrine\Inflector\Rules`` namespace and the tests located in ``Doctrine\Tests\Inflector\Rules``. You can copy +one of the languages and update the rules for your language. + +Once you have done this, send a pull request to the ``doctrine/inflector`` repository with the additions. + +Custom Setup +============ + +If you want to setup custom singular and plural rules, you can configure these in the factory: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + use Doctrine\Inflector\Rules\Pattern; + use Doctrine\Inflector\Rules\Patterns; + use Doctrine\Inflector\Rules\Ruleset; + use Doctrine\Inflector\Rules\Substitution; + use Doctrine\Inflector\Rules\Substitutions; + use Doctrine\Inflector\Rules\Transformation; + use Doctrine\Inflector\Rules\Transformations; + use Doctrine\Inflector\Rules\Word; + + $inflector = InflectorFactory::create() + ->withSingularRules( + new Ruleset( + new Transformations( + new Transformation(new Pattern('/^(bil)er$/i'), '\1'), + new Transformation(new Pattern('/^(inflec|contribu)tors$/i'), '\1ta') + ), + new Patterns(new Pattern('singulars')), + new Substitutions(new Substitution(new Word('spins'), new Word('spinor'))) + ) + ) + ->withPluralRules( + new Ruleset( + new Transformations( + new Transformation(new Pattern('^(bil)er$'), '\1'), + new Transformation(new Pattern('^(inflec|contribu)tors$'), '\1ta') + ), + new Patterns(new Pattern('noflect'), new Pattern('abtuse')), + new Substitutions( + new Substitution(new Word('amaze'), new Word('amazable')), + new Substitution(new Word('phone'), new Word('phonezes')) + ) + ) + ) + ->build(); + +No operation inflector +---------------------- + +The ``Doctrine\Inflector\NoopWordInflector`` may be used to configure an inflector that doesn't perform any operation for +pluralization and/or singularization. If will simply return the input as output. + +This is an implementation of the `Null Object design pattern `_. + +.. code-block:: php + + use Doctrine\Inflector\Inflector; + use Doctrine\Inflector\NoopWordInflector; + + $inflector = new Inflector(new NoopWordInflector(), new NoopWordInflector()); + +Tableize +======== + +Converts ``ModelName`` to ``model_name``: + +.. code-block:: php + + echo $inflector->tableize('ModelName'); // model_name + +Classify +======== + +Converts ``model_name`` to ``ModelName``: + +.. code-block:: php + + echo $inflector->classify('model_name'); // ModelName + +Camelize +======== + +This method uses `Classify`_ and then converts the first character to lowercase: + +.. code-block:: php + + echo $inflector->camelize('model_name'); // modelName + +Capitalize +========== + +Takes a string and capitalizes all of the words, like PHP's built-in +``ucwords`` function. This extends that behavior, however, by allowing the +word delimiters to be configured, rather than only separating on +whitespace. + +Here is an example: + +.. code-block:: php + + $string = 'top-o-the-morning to all_of_you!'; + + echo $inflector->capitalize($string); // Top-O-The-Morning To All_of_you! + + echo $inflector->capitalize($string, '-_ '); // Top-O-The-Morning To All_Of_You! + +Pluralize +========= + +Returns a word in plural form. + +.. code-block:: php + + echo $inflector->pluralize('browser'); // browsers + +Singularize +=========== + +Returns a word in singular form. + +.. code-block:: php + + echo $inflector->singularize('browsers'); // browser + +Urlize +====== + +Generate a URL friendly string from a string of text: + +.. code-block:: php + + echo $inflector->urlize('My first blog post'); // my-first-blog-post + +Unaccent +======== + +You can unaccent a string of text using the ``unaccent()`` method: + +.. code-block:: php + + echo $inflector->unaccent('año'); // ano + +Legacy API +========== + +As of 1.4.0, the API present in Inflector 1.x has been marked as deprecated. In the 2.x release series, +the legacy API has been dropped completely. +Support for languages other than English is available in the 2.0 API only. + +Acknowledgements +================ + +The language rules in this library have been adapted from several different sources, including but not limited to: + +- `Ruby On Rails Inflector `_ +- `ICanBoogie Inflector `_ +- `CakePHP Inflector `_ diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/api/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php index a53828a..763b116 100644 --- a/api/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -19,260 +19,97 @@ namespace Doctrine\Common\Inflector; +use Doctrine\Inflector\Inflector as InflectorObject; +use Doctrine\Inflector\InflectorFactory; +use Doctrine\Inflector\LanguageInflectorFactory; +use Doctrine\Inflector\Rules\Pattern; +use Doctrine\Inflector\Rules\Patterns; +use Doctrine\Inflector\Rules\Ruleset; +use Doctrine\Inflector\Rules\Substitution; +use Doctrine\Inflector\Rules\Substitutions; +use Doctrine\Inflector\Rules\Transformation; +use Doctrine\Inflector\Rules\Transformations; +use Doctrine\Inflector\Rules\Word; +use InvalidArgumentException; +use function array_keys; +use function array_map; +use function array_unshift; +use function array_values; +use function sprintf; +use function trigger_error; +use const E_USER_DEPRECATED; + /** - * Doctrine inflector has static methods for inflecting text. - * - * The methods in these classes are from several different sources collected - * across several different php projects and several different authors. The - * original author names and emails are not known. - * - * Pluralize & Singularize implementation are borrowed from CakePHP with some modifications. - * - * @link www.doctrine-project.org - * @since 1.0 - * @author Konsta Vesterinen - * @author Jonathan H. Wage + * @deprecated */ class Inflector { /** - * Plural inflector rules. - * - * @var array + * @var LanguageInflectorFactory|null */ - private static $plural = array( - 'rules' => array( - '/(s)tatus$/i' => '\1\2tatuses', - '/(quiz)$/i' => '\1zes', - '/^(ox)$/i' => '\1\2en', - '/([m|l])ouse$/i' => '\1ice', - '/(matr|vert|ind)(ix|ex)$/i' => '\1ices', - '/(x|ch|ss|sh)$/i' => '\1es', - '/([^aeiouy]|qu)y$/i' => '\1ies', - '/(hive)$/i' => '\1s', - '/(?:([^f])fe|([lr])f)$/i' => '\1\2ves', - '/sis$/i' => 'ses', - '/([ti])um$/i' => '\1a', - '/(p)erson$/i' => '\1eople', - '/(m)an$/i' => '\1en', - '/(c)hild$/i' => '\1hildren', - '/(f)oot$/i' => '\1eet', - '/(buffal|her|potat|tomat|volcan)o$/i' => '\1\2oes', - '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i', - '/us$/i' => 'uses', - '/(alias)$/i' => '\1es', - '/(analys|ax|cris|test|thes)is$/i' => '\1es', - '/s$/' => 's', - '/^$/' => '', - '/$/' => 's', - ), - 'uninflected' => array( - '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people', 'cookie' - ), - 'irregular' => array( - 'atlas' => 'atlases', - 'axe' => 'axes', - 'beef' => 'beefs', - 'brother' => 'brothers', - 'cafe' => 'cafes', - 'chateau' => 'chateaux', - 'child' => 'children', - 'cookie' => 'cookies', - 'corpus' => 'corpuses', - 'cow' => 'cows', - 'criterion' => 'criteria', - 'curriculum' => 'curricula', - 'demo' => 'demos', - 'domino' => 'dominoes', - 'echo' => 'echoes', - 'foot' => 'feet', - 'fungus' => 'fungi', - 'ganglion' => 'ganglions', - 'genie' => 'genies', - 'genus' => 'genera', - 'graffito' => 'graffiti', - 'hippopotamus' => 'hippopotami', - 'hoof' => 'hoofs', - 'human' => 'humans', - 'iris' => 'irises', - 'leaf' => 'leaves', - 'loaf' => 'loaves', - 'man' => 'men', - 'medium' => 'media', - 'memorandum' => 'memoranda', - 'money' => 'monies', - 'mongoose' => 'mongooses', - 'motto' => 'mottoes', - 'move' => 'moves', - 'mythos' => 'mythoi', - 'niche' => 'niches', - 'nucleus' => 'nuclei', - 'numen' => 'numina', - 'occiput' => 'occiputs', - 'octopus' => 'octopuses', - 'opus' => 'opuses', - 'ox' => 'oxen', - 'penis' => 'penises', - 'person' => 'people', - 'plateau' => 'plateaux', - 'runner-up' => 'runners-up', - 'sex' => 'sexes', - 'soliloquy' => 'soliloquies', - 'son-in-law' => 'sons-in-law', - 'syllabus' => 'syllabi', - 'testis' => 'testes', - 'thief' => 'thieves', - 'tooth' => 'teeth', - 'tornado' => 'tornadoes', - 'trilby' => 'trilbys', - 'turf' => 'turfs', - 'volcano' => 'volcanoes', - ) - ); + private static $factory; - /** - * Singular inflector rules. - * - * @var array - */ - private static $singular = array( - 'rules' => array( - '/(s)tatuses$/i' => '\1\2tatus', - '/^(.*)(menu)s$/i' => '\1\2', - '/(quiz)zes$/i' => '\\1', - '/(matr)ices$/i' => '\1ix', - '/(vert|ind)ices$/i' => '\1ex', - '/^(ox)en/i' => '\1', - '/(alias)(es)*$/i' => '\1', - '/(buffal|her|potat|tomat|volcan)oes$/i' => '\1o', - '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us', - '/([ftw]ax)es/i' => '\1', - '/(analys|ax|cris|test|thes)es$/i' => '\1is', - '/(shoe|slave)s$/i' => '\1', - '/(o)es$/i' => '\1', - '/ouses$/' => 'ouse', - '/([^a])uses$/' => '\1us', - '/([m|l])ice$/i' => '\1ouse', - '/(x|ch|ss|sh)es$/i' => '\1', - '/(m)ovies$/i' => '\1\2ovie', - '/(s)eries$/i' => '\1\2eries', - '/([^aeiouy]|qu)ies$/i' => '\1y', - '/([lr])ves$/i' => '\1f', - '/(tive)s$/i' => '\1', - '/(hive)s$/i' => '\1', - '/(drive)s$/i' => '\1', - '/([^fo])ves$/i' => '\1fe', - '/(^analy)ses$/i' => '\1sis', - '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', - '/([ti])a$/i' => '\1um', - '/(p)eople$/i' => '\1\2erson', - '/(m)en$/i' => '\1an', - '/(c)hildren$/i' => '\1\2hild', - '/(f)eet$/i' => '\1oot', - '/(n)ews$/i' => '\1\2ews', - '/eaus$/' => 'eau', - '/^(.*us)$/' => '\\1', - '/s$/i' => '', - ), - 'uninflected' => array( - '.*[nrlm]ese', - '.*deer', - '.*fish', - '.*measles', - '.*ois', - '.*pox', - '.*sheep', - '.*ss', - ), - 'irregular' => array( - 'criteria' => 'criterion', - 'curves' => 'curve', - 'emphases' => 'emphasis', - 'foes' => 'foe', - 'hoaxes' => 'hoax', - 'media' => 'medium', - 'neuroses' => 'neurosis', - 'waves' => 'wave', - 'oases' => 'oasis', - ) - ); + /** @var InflectorObject|null */ + private static $instance; - /** - * Words that should not be inflected. - * - * @var array - */ - private static $uninflected = array( - 'Amoyese', 'bison', 'Borghese', 'bream', 'breeches', 'britches', 'buffalo', 'cantus', - 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'Congoese', 'contretemps', 'corps', - 'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder', - 'Foochowese', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', - 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', - 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', '.*?media', - 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', - 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', - 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', - 'sea[- ]bass', 'series', 'Shavese', 'shears', 'siemens', 'species', 'staff', 'swine', - 'testes', 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', 'whiting', - 'wildebeest', 'Yengeese' - ); + private static function getInstance() : InflectorObject + { + if (self::$factory === null) { + self::$factory = self::createFactory(); + } - /** - * Method cache array. - * - * @var array - */ - private static $cache = array(); + if (self::$instance === null) { + self::$instance = self::$factory->build(); + } - /** - * The initial state of Inflector so reset() works. - * - * @var array - */ - private static $initialState = array(); + return self::$instance; + } + + private static function createFactory() : LanguageInflectorFactory + { + return InflectorFactory::create(); + } /** * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. * - * @param string $word The word to tableize. - * - * @return string The tableized word. + * @deprecated */ - public static function tableize($word) + public static function tableize(string $word) : string { - return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word)); + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->tableize($word); } /** * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. - * - * @param string $word The word to classify. - * - * @return string The classified word. */ - public static function classify($word) + public static function classify(string $word) : string { - return str_replace(" ", "", ucwords(strtr($word, "_-", " "))); + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->classify($word); } /** * Camelizes a word. This uses the classify() method and turns the first character to lowercase. * - * @param string $word The word to camelize. - * - * @return string The camelized word. + * @deprecated */ - public static function camelize($word) + public static function camelize(string $word) : string { - return lcfirst(self::classify($word)); + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->camelize($word); } /** - * Uppercases words with configurable delimeters between words. + * Uppercases words with configurable delimiters between words. * * Takes a string and capitalizes all of the words, like PHP's built-in - * ucwords function. This extends that behavior, however, by allowing the - * word delimeters to be configured, rather than only separating on + * ucwords function. This extends that behavior, however, by allowing the + * word delimiters to be configured, rather than only separating on * whitespace. * * Here is an example: @@ -290,38 +127,29 @@ class Inflector * @param string $string The string to operate on. * @param string $delimiters A list of word separators. * - * @return string The string with all delimeter-separated words capitalized. + * @return string The string with all delimiter-separated words capitalized. + * + * @deprecated */ - public static function ucwords($string, $delimiters = " \n\t\r\0\x0B-") + public static function ucwords(string $string, string $delimiters = " \n\t\r\0\x0B-") : string { - return preg_replace_callback( - '/[^' . preg_quote($delimiters, '/') . ']+/', - function($matches) { - return ucfirst($matches[0]); - }, - $string - ); + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please use the "ucwords" function instead.', __METHOD__), E_USER_DEPRECATED); + + return ucwords($string, $delimiters); } /** * Clears Inflectors inflected value caches, and resets the inflection * rules to the initial values. * - * @return void + * @deprecated */ - public static function reset() + public static function reset() : void { - if (empty(self::$initialState)) { - self::$initialState = get_class_vars('Inflector'); + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); - return; - } - - foreach (self::$initialState as $key => $val) { - if ($key != 'initialState') { - self::${$key} = $val; - } - } + self::$factory = null; + self::$instance = null; } /** @@ -338,42 +166,88 @@ class Inflector * )); * }}} * - * @param string $type The type of inflection, either 'plural' or 'singular' - * @param array $rules An array of rules to be added. - * @param boolean $reset If true, will unset default inflections for all - * new rules that are being defined in $rules. + * @param string $type The type of inflection, either 'plural' or 'singular' + * @param array|iterable $rules An array of rules to be added. + * @param boolean $reset If true, will unset default inflections for all + * new rules that are being defined in $rules. * * @return void + * + * @deprecated */ - public static function rules($type, $rules, $reset = false) + public static function rules(string $type, iterable $rules, bool $reset = false) : void { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + if (self::$factory === null) { + self::$factory = self::createFactory(); + } + + self::$instance = null; + + switch ($type) { + case 'singular': + self::$factory->withSingularRules(self::buildRuleset($rules), $reset); + break; + case 'plural': + self::$factory->withPluralRules(self::buildRuleset($rules), $reset); + break; + default: + throw new InvalidArgumentException(sprintf('Cannot define custom inflection rules for type "%s".', $type)); + } + } + + /** + * @param array|iterable $rules An array of rules to be added. + */ + private static function buildRuleset(iterable $rules) : Ruleset + { + $regular = []; + $irregular = []; + $uninflected = []; + foreach ($rules as $rule => $pattern) { if ( ! is_array($pattern)) { + $regular[$rule] = $pattern; + continue; } - if ($reset) { - self::${$type}[$rule] = $pattern; - } else { - self::${$type}[$rule] = ($rule === 'uninflected') - ? array_merge($pattern, self::${$type}[$rule]) - : $pattern + self::${$type}[$rule]; - } - - unset($rules[$rule], self::${$type}['cache' . ucfirst($rule)]); - - if (isset(self::${$type}['merged'][$rule])) { - unset(self::${$type}['merged'][$rule]); - } - - if ($type === 'plural') { - self::$cache['pluralize'] = self::$cache['tableize'] = array(); - } elseif ($type === 'singular') { - self::$cache['singularize'] = array(); + switch ($rule) { + case 'uninflected': + $uninflected = $pattern; + break; + case 'irregular': + $irregular = $pattern; + break; + case 'rules': + $regular = $pattern; + break; } } - self::${$type}['rules'] = $rules + self::${$type}['rules']; + return new Ruleset( + new Transformations(...array_map( + static function (string $pattern, string $replacement) : Transformation { + return new Transformation(new Pattern($pattern), $replacement); + }, + array_keys($regular), + array_values($regular) + )), + new Patterns(...array_map( + static function (string $pattern) : Pattern { + return new Pattern($pattern); + }, + $uninflected + )), + new Substitutions(...array_map( + static function (string $word, string $to) : Substitution { + return new Substitution(new Word($word), new Word($to)); + }, + array_keys($irregular), + array_values($irregular) + )) + ); } /** @@ -382,45 +256,14 @@ class Inflector * @param string $word The word in singular form. * * @return string The word in plural form. + * + * @deprecated */ - public static function pluralize($word) + public static function pluralize(string $word) : string { - if (isset(self::$cache['pluralize'][$word])) { - return self::$cache['pluralize'][$word]; - } + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); - if (!isset(self::$plural['merged']['irregular'])) { - self::$plural['merged']['irregular'] = self::$plural['irregular']; - } - - if (!isset(self::$plural['merged']['uninflected'])) { - self::$plural['merged']['uninflected'] = array_merge(self::$plural['uninflected'], self::$uninflected); - } - - if (!isset(self::$plural['cacheUninflected']) || !isset(self::$plural['cacheIrregular'])) { - self::$plural['cacheUninflected'] = '(?:' . implode('|', self::$plural['merged']['uninflected']) . ')'; - self::$plural['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$plural['merged']['irregular'])) . ')'; - } - - if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) { - self::$cache['pluralize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1); - - return self::$cache['pluralize'][$word]; - } - - if (preg_match('/^(' . self::$plural['cacheUninflected'] . ')$/i', $word, $regs)) { - self::$cache['pluralize'][$word] = $word; - - return $word; - } - - foreach (self::$plural['rules'] as $rule => $replacement) { - if (preg_match($rule, $word)) { - self::$cache['pluralize'][$word] = preg_replace($rule, $replacement, $word); - - return self::$cache['pluralize'][$word]; - } - } + return self::getInstance()->pluralize($word); } /** @@ -429,54 +272,13 @@ class Inflector * @param string $word The word in plural form. * * @return string The word in singular form. + * + * @deprecated */ - public static function singularize($word) + public static function singularize(string $word) : string { - if (isset(self::$cache['singularize'][$word])) { - return self::$cache['singularize'][$word]; - } + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); - if (!isset(self::$singular['merged']['uninflected'])) { - self::$singular['merged']['uninflected'] = array_merge( - self::$singular['uninflected'], - self::$uninflected - ); - } - - if (!isset(self::$singular['merged']['irregular'])) { - self::$singular['merged']['irregular'] = array_merge( - self::$singular['irregular'], - array_flip(self::$plural['irregular']) - ); - } - - if (!isset(self::$singular['cacheUninflected']) || !isset(self::$singular['cacheIrregular'])) { - self::$singular['cacheUninflected'] = '(?:' . join('|', self::$singular['merged']['uninflected']) . ')'; - self::$singular['cacheIrregular'] = '(?:' . join('|', array_keys(self::$singular['merged']['irregular'])) . ')'; - } - - if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) { - self::$cache['singularize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1); - - return self::$cache['singularize'][$word]; - } - - if (preg_match('/^(' . self::$singular['cacheUninflected'] . ')$/i', $word, $regs)) { - self::$cache['singularize'][$word] = $word; - - return $word; - } - - foreach (self::$singular['rules'] as $rule => $replacement) { - if (preg_match($rule, $word)) { - self::$cache['singularize'][$word] = preg_replace($rule, $replacement, $word); - - return self::$cache['singularize'][$word]; - } - } - - self::$cache['singularize'][$word] = $word; - - return $word; + return self::getInstance()->singularize($word); } } diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php new file mode 100644 index 0000000..2d52908 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php @@ -0,0 +1,24 @@ +wordInflector = $wordInflector; + } + + public function inflect(string $word): string + { + return $this->cache[$word] ?? $this->cache[$word] = $this->wordInflector->inflect($word); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php new file mode 100644 index 0000000..166061d --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php @@ -0,0 +1,66 @@ +singularRulesets[] = $this->getSingularRuleset(); + $this->pluralRulesets[] = $this->getPluralRuleset(); + } + + final public function build(): Inflector + { + return new Inflector( + new CachedWordInflector(new RulesetInflector( + ...$this->singularRulesets + )), + new CachedWordInflector(new RulesetInflector( + ...$this->pluralRulesets + )) + ); + } + + final public function withSingularRules(?Ruleset $singularRules, bool $reset = false): LanguageInflectorFactory + { + if ($reset) { + $this->singularRulesets = []; + } + + if ($singularRules instanceof Ruleset) { + array_unshift($this->singularRulesets, $singularRules); + } + + return $this; + } + + final public function withPluralRules(?Ruleset $pluralRules, bool $reset = false): LanguageInflectorFactory + { + if ($reset) { + $this->pluralRulesets = []; + } + + if ($pluralRules instanceof Ruleset) { + array_unshift($this->pluralRulesets, $pluralRules); + } + + return $this; + } + + abstract protected function getSingularRuleset(): Ruleset; + + abstract protected function getPluralRuleset(): Ruleset; +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php new file mode 100644 index 0000000..610a4cf --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php @@ -0,0 +1,507 @@ + 'A', + 'Á' => 'A', + 'Â' => 'A', + 'Ã' => 'A', + 'Ä' => 'Ae', + 'Æ' => 'Ae', + 'Å' => 'Aa', + 'æ' => 'a', + 'Ç' => 'C', + 'È' => 'E', + 'É' => 'E', + 'Ê' => 'E', + 'Ë' => 'E', + 'Ì' => 'I', + 'Í' => 'I', + 'Î' => 'I', + 'Ï' => 'I', + 'Ñ' => 'N', + 'Ò' => 'O', + 'Ó' => 'O', + 'Ô' => 'O', + 'Õ' => 'O', + 'Ö' => 'Oe', + 'Ù' => 'U', + 'Ú' => 'U', + 'Û' => 'U', + 'Ü' => 'Ue', + 'Ý' => 'Y', + 'ß' => 'ss', + 'à' => 'a', + 'á' => 'a', + 'â' => 'a', + 'ã' => 'a', + 'ä' => 'ae', + 'å' => 'aa', + 'ç' => 'c', + 'è' => 'e', + 'é' => 'e', + 'ê' => 'e', + 'ë' => 'e', + 'ì' => 'i', + 'í' => 'i', + 'î' => 'i', + 'ï' => 'i', + 'ñ' => 'n', + 'ò' => 'o', + 'ó' => 'o', + 'ô' => 'o', + 'õ' => 'o', + 'ö' => 'oe', + 'ù' => 'u', + 'ú' => 'u', + 'û' => 'u', + 'ü' => 'ue', + 'ý' => 'y', + 'ÿ' => 'y', + 'Ā' => 'A', + 'ā' => 'a', + 'Ă' => 'A', + 'ă' => 'a', + 'Ą' => 'A', + 'ą' => 'a', + 'Ć' => 'C', + 'ć' => 'c', + 'Ĉ' => 'C', + 'ĉ' => 'c', + 'Ċ' => 'C', + 'ċ' => 'c', + 'Č' => 'C', + 'č' => 'c', + 'Ď' => 'D', + 'ď' => 'd', + 'Đ' => 'D', + 'đ' => 'd', + 'Ē' => 'E', + 'ē' => 'e', + 'Ĕ' => 'E', + 'ĕ' => 'e', + 'Ė' => 'E', + 'ė' => 'e', + 'Ę' => 'E', + 'ę' => 'e', + 'Ě' => 'E', + 'ě' => 'e', + 'Ĝ' => 'G', + 'ĝ' => 'g', + 'Ğ' => 'G', + 'ğ' => 'g', + 'Ġ' => 'G', + 'ġ' => 'g', + 'Ģ' => 'G', + 'ģ' => 'g', + 'Ĥ' => 'H', + 'ĥ' => 'h', + 'Ħ' => 'H', + 'ħ' => 'h', + 'Ĩ' => 'I', + 'ĩ' => 'i', + 'Ī' => 'I', + 'ī' => 'i', + 'Ĭ' => 'I', + 'ĭ' => 'i', + 'Į' => 'I', + 'į' => 'i', + 'İ' => 'I', + 'ı' => 'i', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ĵ' => 'J', + 'ĵ' => 'j', + 'Ķ' => 'K', + 'ķ' => 'k', + 'ĸ' => 'k', + 'Ĺ' => 'L', + 'ĺ' => 'l', + 'Ļ' => 'L', + 'ļ' => 'l', + 'Ľ' => 'L', + 'ľ' => 'l', + 'Ŀ' => 'L', + 'ŀ' => 'l', + 'Ł' => 'L', + 'ł' => 'l', + 'Ń' => 'N', + 'ń' => 'n', + 'Ņ' => 'N', + 'ņ' => 'n', + 'Ň' => 'N', + 'ň' => 'n', + 'ʼn' => 'N', + 'Ŋ' => 'n', + 'ŋ' => 'N', + 'Ō' => 'O', + 'ō' => 'o', + 'Ŏ' => 'O', + 'ŏ' => 'o', + 'Ő' => 'O', + 'ő' => 'o', + 'Œ' => 'OE', + 'œ' => 'oe', + 'Ø' => 'O', + 'ø' => 'o', + 'Ŕ' => 'R', + 'ŕ' => 'r', + 'Ŗ' => 'R', + 'ŗ' => 'r', + 'Ř' => 'R', + 'ř' => 'r', + 'Ś' => 'S', + 'ś' => 's', + 'Ŝ' => 'S', + 'ŝ' => 's', + 'Ş' => 'S', + 'ş' => 's', + 'Š' => 'S', + 'š' => 's', + 'Ţ' => 'T', + 'ţ' => 't', + 'Ť' => 'T', + 'ť' => 't', + 'Ŧ' => 'T', + 'ŧ' => 't', + 'Ũ' => 'U', + 'ũ' => 'u', + 'Ū' => 'U', + 'ū' => 'u', + 'Ŭ' => 'U', + 'ŭ' => 'u', + 'Ů' => 'U', + 'ů' => 'u', + 'Ű' => 'U', + 'ű' => 'u', + 'Ų' => 'U', + 'ų' => 'u', + 'Ŵ' => 'W', + 'ŵ' => 'w', + 'Ŷ' => 'Y', + 'ŷ' => 'y', + 'Ÿ' => 'Y', + 'Ź' => 'Z', + 'ź' => 'z', + 'Ż' => 'Z', + 'ż' => 'z', + 'Ž' => 'Z', + 'ž' => 'z', + 'ſ' => 's', + '€' => 'E', + '£' => '', + ]; + + /** @var WordInflector */ + private $singularizer; + + /** @var WordInflector */ + private $pluralizer; + + public function __construct(WordInflector $singularizer, WordInflector $pluralizer) + { + $this->singularizer = $singularizer; + $this->pluralizer = $pluralizer; + } + + /** + * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. + */ + public function tableize(string $word): string + { + $tableized = preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word); + + if ($tableized === null) { + throw new RuntimeException(sprintf( + 'preg_replace returned null for value "%s"', + $word + )); + } + + return mb_strtolower($tableized); + } + + /** + * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. + */ + public function classify(string $word): string + { + return str_replace([' ', '_', '-'], '', ucwords($word, ' _-')); + } + + /** + * Camelizes a word. This uses the classify() method and turns the first character to lowercase. + */ + public function camelize(string $word): string + { + return lcfirst($this->classify($word)); + } + + /** + * Uppercases words with configurable delimiters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimiters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * capitalize($string); + * // Top-O-The-Morning To All_of_you! + * + * echo $inflector->capitalize($string, '-_ '); + * // Top-O-The-Morning To All_Of_You! + * ?> + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimiter-separated words capitalized. + */ + public function capitalize(string $string, string $delimiters = " \n\t\r\0\x0B-"): string + { + return ucwords($string, $delimiters); + } + + /** + * Checks if the given string seems like it has utf8 characters in it. + * + * @param string $string The string to check for utf8 characters in. + */ + public function seemsUtf8(string $string): bool + { + for ($i = 0; $i < strlen($string); $i++) { + if (ord($string[$i]) < 0x80) { + continue; // 0bbbbbbb + } + + if ((ord($string[$i]) & 0xE0) === 0xC0) { + $n = 1; // 110bbbbb + } elseif ((ord($string[$i]) & 0xF0) === 0xE0) { + $n = 2; // 1110bbbb + } elseif ((ord($string[$i]) & 0xF8) === 0xF0) { + $n = 3; // 11110bbb + } elseif ((ord($string[$i]) & 0xFC) === 0xF8) { + $n = 4; // 111110bb + } elseif ((ord($string[$i]) & 0xFE) === 0xFC) { + $n = 5; // 1111110b + } else { + return false; // Does not match any model + } + + for ($j = 0; $j < $n; $j++) { // n bytes matching 10bbbbbb follow ? + if (++$i === strlen($string) || ((ord($string[$i]) & 0xC0) !== 0x80)) { + return false; + } + } + } + + return true; + } + + /** + * Remove any illegal characters, accents, etc. + * + * @param string $string String to unaccent + * + * @return string Unaccented string + */ + public function unaccent(string $string): string + { + if (preg_match('/[\x80-\xff]/', $string) === false) { + return $string; + } + + if ($this->seemsUtf8($string)) { + $string = strtr($string, self::ACCENTED_CHARACTERS); + } else { + $characters = []; + + // Assume ISO-8859-1 if not UTF-8 + $characters['in'] = + chr(128) + . chr(131) + . chr(138) + . chr(142) + . chr(154) + . chr(158) + . chr(159) + . chr(162) + . chr(165) + . chr(181) + . chr(192) + . chr(193) + . chr(194) + . chr(195) + . chr(196) + . chr(197) + . chr(199) + . chr(200) + . chr(201) + . chr(202) + . chr(203) + . chr(204) + . chr(205) + . chr(206) + . chr(207) + . chr(209) + . chr(210) + . chr(211) + . chr(212) + . chr(213) + . chr(214) + . chr(216) + . chr(217) + . chr(218) + . chr(219) + . chr(220) + . chr(221) + . chr(224) + . chr(225) + . chr(226) + . chr(227) + . chr(228) + . chr(229) + . chr(231) + . chr(232) + . chr(233) + . chr(234) + . chr(235) + . chr(236) + . chr(237) + . chr(238) + . chr(239) + . chr(241) + . chr(242) + . chr(243) + . chr(244) + . chr(245) + . chr(246) + . chr(248) + . chr(249) + . chr(250) + . chr(251) + . chr(252) + . chr(253) + . chr(255); + + $characters['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'; + + $string = strtr($string, $characters['in'], $characters['out']); + + $doubleChars = []; + + $doubleChars['in'] = [ + chr(140), + chr(156), + chr(198), + chr(208), + chr(222), + chr(223), + chr(230), + chr(240), + chr(254), + ]; + + $doubleChars['out'] = ['OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th']; + + $string = str_replace($doubleChars['in'], $doubleChars['out'], $string); + } + + return $string; + } + + /** + * Convert any passed string to a url friendly string. + * Converts 'My first blog post' to 'my-first-blog-post' + * + * @param string $string String to urlize. + * + * @return string Urlized string. + */ + public function urlize(string $string): string + { + // Remove all non url friendly characters with the unaccent function + $unaccented = $this->unaccent($string); + + if (function_exists('mb_strtolower')) { + $lowered = mb_strtolower($unaccented); + } else { + $lowered = strtolower($unaccented); + } + + $replacements = [ + '/\W/' => ' ', + '/([A-Z]+)([A-Z][a-z])/' => '\1_\2', + '/([a-z\d])([A-Z])/' => '\1_\2', + '/[^A-Z^a-z^0-9^\/]+/' => '-', + ]; + + $urlized = $lowered; + + foreach ($replacements as $pattern => $replacement) { + $replaced = preg_replace($pattern, $replacement, $urlized); + + if ($replaced === null) { + throw new RuntimeException(sprintf( + 'preg_replace returned null for value "%s"', + $urlized + )); + } + + $urlized = $replaced; + } + + return trim($urlized, '-'); + } + + /** + * Returns a word in singular form. + * + * @param string $word The word in plural form. + * + * @return string The word in singular form. + */ + public function singularize(string $word): string + { + return $this->singularizer->inflect($word); + } + + /** + * Returns a word in plural form. + * + * @param string $word The word in singular form. + * + * @return string The word in plural form. + */ + public function pluralize(string $word): string + { + return $this->pluralizer->inflect($word); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php new file mode 100644 index 0000000..a0740a7 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php @@ -0,0 +1,52 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php new file mode 100644 index 0000000..e2656cc --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php @@ -0,0 +1,193 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php new file mode 100644 index 0000000..3cf2444 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php @@ -0,0 +1,34 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php new file mode 100644 index 0000000..5d878c6 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php @@ -0,0 +1,36 @@ +pattern = $pattern; + + if (isset($this->pattern[0]) && $this->pattern[0] === '/') { + $this->regex = $this->pattern; + } else { + $this->regex = '/' . $this->pattern . '/i'; + } + } + + public function getPattern(): string + { + return $this->pattern; + } + + public function getRegex(): string + { + return $this->regex; + } + + public function matches(string $word): bool + { + return preg_match($this->getRegex(), $word) === 1; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php new file mode 100644 index 0000000..e8d45cb --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php @@ -0,0 +1,34 @@ +patterns = $patterns; + + $patterns = array_map(static function (Pattern $pattern): string { + return $pattern->getPattern(); + }, $this->patterns); + + $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; + } + + public function matches(string $word): bool + { + return preg_match($this->regex, $word, $regs) === 1; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php new file mode 100644 index 0000000..95564d4 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php @@ -0,0 +1,104 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php new file mode 100644 index 0000000..58c34f9 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php @@ -0,0 +1,38 @@ +regular = $regular; + $this->uninflected = $uninflected; + $this->irregular = $irregular; + } + + public function getRegular(): Transformations + { + return $this->regular; + } + + public function getUninflected(): Patterns + { + return $this->uninflected; + } + + public function getIrregular(): Substitutions + { + return $this->irregular; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php new file mode 100644 index 0000000..c6862fa --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php @@ -0,0 +1,53 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php new file mode 100644 index 0000000..c743b39 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php @@ -0,0 +1,36 @@ +from = $from; + $this->to = $to; + } + + public function getFrom(): Word + { + return $this->from; + } + + public function getTo(): Word + { + return $this->to; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php new file mode 100644 index 0000000..17ee296 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php @@ -0,0 +1,57 @@ +substitutions[$substitution->getFrom()->getWord()] = $substitution; + } + } + + public function getFlippedSubstitutions(): Substitutions + { + $substitutions = []; + + foreach ($this->substitutions as $substitution) { + $substitutions[] = new Substitution( + $substitution->getTo(), + $substitution->getFrom() + ); + } + + return new Substitutions(...$substitutions); + } + + public function inflect(string $word): string + { + $lowerWord = strtolower($word); + + if (isset($this->substitutions[$lowerWord])) { + $firstLetterUppercase = $lowerWord[0] !== $word[0]; + + $toWord = $this->substitutions[$lowerWord]->getTo()->getWord(); + + if ($firstLetterUppercase) { + return strtoupper($toWord[0]) . substr($toWord, 1); + } + + return $toWord; + } + + return $word; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php new file mode 100644 index 0000000..30dcd59 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php @@ -0,0 +1,39 @@ +pattern = $pattern; + $this->replacement = $replacement; + } + + public function getPattern(): Pattern + { + return $this->pattern; + } + + public function getReplacement(): string + { + return $this->replacement; + } + + public function inflect(string $word): string + { + return (string) preg_replace($this->pattern->getRegex(), $this->replacement, $word); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php new file mode 100644 index 0000000..b6a48fa --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php @@ -0,0 +1,29 @@ +transformations = $transformations; + } + + public function inflect(string $word): string + { + foreach ($this->transformations as $transformation) { + if ($transformation->getPattern()->matches($word)) { + return $transformation->inflect($word); + } + } + + return $word; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php new file mode 100644 index 0000000..d7b7064 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php @@ -0,0 +1,40 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php new file mode 100644 index 0000000..a75d248 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php @@ -0,0 +1,36 @@ +word = $word; + } + + public function getWord(): string + { + return $this->word; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php new file mode 100644 index 0000000..12b2ed5 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php @@ -0,0 +1,56 @@ +rulesets = array_merge([$ruleset], $rulesets); + } + + public function inflect(string $word): string + { + if ($word === '') { + return ''; + } + + foreach ($this->rulesets as $ruleset) { + if ($ruleset->getUninflected()->matches($word)) { + return $word; + } + + $inflected = $ruleset->getIrregular()->inflect($word); + + if ($inflected !== $word) { + return $inflected; + } + + $inflected = $ruleset->getRegular()->inflect($word); + + if ($inflected !== $word) { + return $inflected; + } + } + + return $word; + } +} diff --git a/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php new file mode 100644 index 0000000..b88b1d6 --- /dev/null +++ b/api/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php @@ -0,0 +1,10 @@ + - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - - - - performance - - - diff --git a/api/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php b/api/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php deleted file mode 100644 index 4198d22..0000000 --- a/api/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php +++ /dev/null @@ -1,309 +0,0 @@ -assertEquals( - $singular, - Inflector::singularize($plural), - "'$plural' should be singularized to '$singular'" - ); - } - - /** - * testInflectingPlurals method - * - * @dataProvider dataSampleWords - * @return void - */ - public function testInflectingPlurals($singular, $plural) - { - $this->assertEquals( - $plural, - Inflector::pluralize($singular), - "'$singular' should be pluralized to '$plural'" - ); - } - - /** - * testCustomPluralRule method - * - * @return void - */ - public function testCustomPluralRule() - { - Inflector::reset(); - Inflector::rules('plural', array('/^(custom)$/i' => '\1izables')); - - $this->assertEquals(Inflector::pluralize('custom'), 'customizables'); - - Inflector::rules('plural', array('uninflected' => array('uninflectable'))); - - $this->assertEquals(Inflector::pluralize('uninflectable'), 'uninflectable'); - - Inflector::rules('plural', array( - 'rules' => array('/^(alert)$/i' => '\1ables'), - 'uninflected' => array('noflect', 'abtuse'), - 'irregular' => array('amaze' => 'amazable', 'phone' => 'phonezes') - )); - - $this->assertEquals(Inflector::pluralize('noflect'), 'noflect'); - $this->assertEquals(Inflector::pluralize('abtuse'), 'abtuse'); - $this->assertEquals(Inflector::pluralize('alert'), 'alertables'); - $this->assertEquals(Inflector::pluralize('amaze'), 'amazable'); - $this->assertEquals(Inflector::pluralize('phone'), 'phonezes'); - } - - /** - * testCustomSingularRule method - * - * @return void - */ - public function testCustomSingularRule() - { - Inflector::reset(); - Inflector::rules('singular', array('/(eple)r$/i' => '\1', '/(jente)r$/i' => '\1')); - - $this->assertEquals(Inflector::singularize('epler'), 'eple'); - $this->assertEquals(Inflector::singularize('jenter'), 'jente'); - - Inflector::rules('singular', array( - 'rules' => array('/^(bil)er$/i' => '\1', '/^(inflec|contribu)tors$/i' => '\1ta'), - 'uninflected' => array('singulars'), - 'irregular' => array('spins' => 'spinor') - )); - - $this->assertEquals(Inflector::singularize('inflectors'), 'inflecta'); - $this->assertEquals(Inflector::singularize('contributors'), 'contributa'); - $this->assertEquals(Inflector::singularize('spins'), 'spinor'); - $this->assertEquals(Inflector::singularize('singulars'), 'singulars'); - } - - /** - * test that setting new rules clears the inflector caches. - * - * @return void - */ - public function testRulesClearsCaches() - { - Inflector::reset(); - - $this->assertEquals(Inflector::singularize('Bananas'), 'Banana'); - $this->assertEquals(Inflector::pluralize('Banana'), 'Bananas'); - - Inflector::rules('singular', array( - 'rules' => array('/(.*)nas$/i' => '\1zzz') - )); - - $this->assertEquals('Banazzz', Inflector::singularize('Bananas'), 'Was inflected with old rules.'); - - Inflector::rules('plural', array( - 'rules' => array('/(.*)na$/i' => '\1zzz'), - 'irregular' => array('corpus' => 'corpora') - )); - - $this->assertEquals(Inflector::pluralize('Banana'), 'Banazzz', 'Was inflected with old rules.'); - $this->assertEquals(Inflector::pluralize('corpus'), 'corpora', 'Was inflected with old irregular form.'); - } - - /** - * Test resetting inflection rules. - * - * @return void - */ - public function testCustomRuleWithReset() - { - Inflector::reset(); - - $uninflected = array('atlas', 'lapis', 'onibus', 'pires', 'virus', '.*x'); - $pluralIrregular = array('as' => 'ases'); - - Inflector::rules('singular', array( - 'rules' => array('/^(.*)(a|e|o|u)is$/i' => '\1\2l'), - 'uninflected' => $uninflected, - ), true); - - Inflector::rules('plural', array( - 'rules' => array( - '/^(.*)(a|e|o|u)l$/i' => '\1\2is', - ), - 'uninflected' => $uninflected, - 'irregular' => $pluralIrregular - ), true); - - $this->assertEquals(Inflector::pluralize('Alcool'), 'Alcoois'); - $this->assertEquals(Inflector::pluralize('Atlas'), 'Atlas'); - $this->assertEquals(Inflector::singularize('Alcoois'), 'Alcool'); - $this->assertEquals(Inflector::singularize('Atlas'), 'Atlas'); - } - - /** - * Test basic ucwords functionality. - * - * @return void - */ - public function testUcwords() - { - $this->assertSame('Top-O-The-Morning To All_of_you!', Inflector::ucwords( 'top-o-the-morning to all_of_you!')); - } - - /** - * Test ucwords functionality with custom delimeters. - * - * @return void - */ - public function testUcwordsWithCustomDelimeters() - { - $this->assertSame('Top-O-The-Morning To All_Of_You!', Inflector::ucwords( 'top-o-the-morning to all_of_you!', '-_ ')); - } -} - diff --git a/api/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php b/api/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php deleted file mode 100644 index e8323d2..0000000 --- a/api/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php +++ /dev/null @@ -1,10 +0,0 @@ - composer-installer.php - hhvm composer-installer.php - hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 composer.phar update --prefer-source -elif [ "$TRAVIS_PHP_VERSION" = '5.3.3' ] ; then - composer self-update - composer update --prefer-source --no-dev - composer dump-autoload -else - composer self-update - composer update --prefer-source -fi diff --git a/api/vendor/doctrine/instantiator/.travis.yml b/api/vendor/doctrine/instantiator/.travis.yml deleted file mode 100644 index 7f1ec5f..0000000 --- a/api/vendor/doctrine/instantiator/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - -before_script: - - ./.travis.install.sh - - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then PHPUNIT_FLAGS="--coverage-clover coverage.clover"; else PHPUNIT_FLAGS=""; fi - -script: - - if [ $TRAVIS_PHP_VERSION = '5.3.3' ]; then phpunit; fi - - if [ $TRAVIS_PHP_VERSION != '5.3.3' ]; then ./vendor/bin/phpunit $PHPUNIT_FLAGS; fi - - if [ $TRAVIS_PHP_VERSION != '5.3.3' ]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/; fi - - if [[ $TRAVIS_PHP_VERSION != '5.3.3' && $TRAVIS_PHP_VERSION != '5.4.29' && $TRAVIS_PHP_VERSION != '5.5.13' ]]; then php -n ./vendor/bin/athletic -p ./tests/DoctrineTest/InstantiatorPerformance/ -f GroupedFormatter; fi - -after_script: - - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi diff --git a/api/vendor/doctrine/instantiator/CONTRIBUTING.md b/api/vendor/doctrine/instantiator/CONTRIBUTING.md index 75b84b2..c1a2c42 100644 --- a/api/vendor/doctrine/instantiator/CONTRIBUTING.md +++ b/api/vendor/doctrine/instantiator/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing - * Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) + * Follow the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard) * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php) * Any contribution must provide tests for additional introduced conditions * Any un-confirmed issue needs a failing test case before being accepted diff --git a/api/vendor/doctrine/instantiator/README.md b/api/vendor/doctrine/instantiator/README.md index 393ec7c..1fa9567 100644 --- a/api/vendor/doctrine/instantiator/README.md +++ b/api/vendor/doctrine/instantiator/README.md @@ -3,10 +3,8 @@ This library provides a way of avoiding usage of constructors when instantiating PHP classes. [![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator) -[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) +[![Code Coverage](https://codecov.io/gh/doctrine/instantiator/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/instantiator/branch/master) [![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) -[![HHVM Status](http://hhvm.h4cc.de/badge/doctrine/instantiator.png)](http://hhvm.h4cc.de/package/doctrine/instantiator) [![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) [![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) @@ -16,7 +14,7 @@ This library provides a way of avoiding usage of constructors when instantiating The suggested installation method is via [composer](https://getcomposer.org/): ```sh -php composer.phar require "doctrine/instantiator:~1.0.3" +composer require doctrine/instantiator ``` ## Usage @@ -27,7 +25,7 @@ itself: ```php $instantiator = new \Doctrine\Instantiator\Instantiator(); -$instance = $instantiator->instantiate('My\\ClassName\\Here'); +$instance = $instantiator->instantiate(\My\ClassName\Here::class); ``` ## Contributing diff --git a/api/vendor/doctrine/instantiator/composer.json b/api/vendor/doctrine/instantiator/composer.json index 4823890..fab8172 100644 --- a/api/vendor/doctrine/instantiator/composer.json +++ b/api/vendor/doctrine/instantiator/composer.json @@ -3,7 +3,7 @@ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "type": "library", "license": "MIT", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "instantiate", "constructor" @@ -12,18 +12,21 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1 || ^8.0" }, "require-dev": { "ext-phar": "*", "ext-pdo": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0", - "athletic/athletic": "~0.1.8" + "doctrine/coding-standard": "^9 || ^11", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "autoload": { "psr-4": { @@ -37,9 +40,9 @@ "DoctrineTest\\InstantiatorTestAsset\\": "tests" } }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/api/vendor/doctrine/instantiator/docs/en/index.rst b/api/vendor/doctrine/instantiator/docs/en/index.rst new file mode 100644 index 0000000..0c85da0 --- /dev/null +++ b/api/vendor/doctrine/instantiator/docs/en/index.rst @@ -0,0 +1,68 @@ +Introduction +============ + +This library provides a way of avoiding usage of constructors when instantiating PHP classes. + +Installation +============ + +The suggested installation method is via `composer`_: + +.. code-block:: console + + $ composer require doctrine/instantiator + +Usage +===== + +The instantiator is able to create new instances of any class without +using the constructor or any API of the class itself: + +.. code-block:: php + + instantiate(User::class); + +Contributing +============ + +- Follow the `Doctrine Coding Standard`_ +- The project will follow strict `object calisthenics`_ +- Any contribution must provide tests for additional introduced + conditions +- Any un-confirmed issue needs a failing test case before being + accepted +- Pull requests must be sent from a new hotfix/feature branch, not from + ``master``. + +Testing +======= + +The PHPUnit version to be used is the one installed as a dev- dependency +via composer: + +.. code-block:: console + + $ ./vendor/bin/phpunit + +Accepted coverage for new contributions is 80%. Any contribution not +satisfying this requirement won’t be merged. + +Credits +======= + +This library was migrated from `ocramius/instantiator`_, which has been +donated to the doctrine organization, and which is now deprecated in +favour of this package. + +.. _composer: https://getcomposer.org/ +.. _CONTRIBUTING.md: CONTRIBUTING.md +.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator +.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard +.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php diff --git a/api/vendor/doctrine/instantiator/docs/en/sidebar.rst b/api/vendor/doctrine/instantiator/docs/en/sidebar.rst new file mode 100644 index 0000000..0c36479 --- /dev/null +++ b/api/vendor/doctrine/instantiator/docs/en/sidebar.rst @@ -0,0 +1,4 @@ +.. toctree:: + :depth: 3 + + index diff --git a/api/vendor/doctrine/instantiator/phpmd.xml.dist b/api/vendor/doctrine/instantiator/phpmd.xml.dist deleted file mode 100644 index 8254105..0000000 --- a/api/vendor/doctrine/instantiator/phpmd.xml.dist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/api/vendor/doctrine/instantiator/phpunit.xml.dist b/api/vendor/doctrine/instantiator/phpunit.xml.dist deleted file mode 100644 index 0a8d570..0000000 --- a/api/vendor/doctrine/instantiator/phpunit.xml.dist +++ /dev/null @@ -1,22 +0,0 @@ - - - - ./tests/DoctrineTest/InstantiatorTest - - - - ./src - - - diff --git a/api/vendor/doctrine/instantiator/psalm.xml b/api/vendor/doctrine/instantiator/psalm.xml new file mode 100644 index 0000000..e9b622b --- /dev/null +++ b/api/vendor/doctrine/instantiator/psalm.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php index 3065375..e6a5195 100644 --- a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +++ b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -1,29 +1,12 @@ . - */ namespace Doctrine\Instantiator\Exception; +use Throwable; + /** * Base exception marker interface for the instantiator component - * - * @author Marco Pivetta */ -interface ExceptionInterface +interface ExceptionInterface extends Throwable { } diff --git a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php index ea8d28c..33de31c 100644 --- a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php +++ b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php @@ -1,62 +1,50 @@ . - */ namespace Doctrine\Instantiator\Exception; use InvalidArgumentException as BaseInvalidArgumentException; use ReflectionClass; +use function interface_exists; +use function sprintf; +use function trait_exists; + /** * Exception for invalid arguments provided to the instantiator - * - * @author Marco Pivetta */ class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface { - /** - * @param string $className - * - * @return self - */ - public static function fromNonExistingClass($className) + public static function fromNonExistingClass(string $className): self { if (interface_exists($className)) { - return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className)); + return new self(sprintf('The provided type "%s" is an interface, and cannot be instantiated', $className)); } - if (PHP_VERSION_ID >= 50400 && trait_exists($className)) { - return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className)); + if (trait_exists($className)) { + return new self(sprintf('The provided type "%s" is a trait, and cannot be instantiated', $className)); } return new self(sprintf('The provided class "%s" does not exist', $className)); } /** - * @param ReflectionClass $reflectionClass + * @phpstan-param ReflectionClass $reflectionClass * - * @return self + * @template T of object */ - public static function fromAbstractClass(ReflectionClass $reflectionClass) + public static function fromAbstractClass(ReflectionClass $reflectionClass): self { return new self(sprintf( - 'The provided class "%s" is abstract, and can not be instantiated', + 'The provided class "%s" is abstract, and cannot be instantiated', $reflectionClass->getName() )); } + + public static function fromEnum(string $className): self + { + return new self(sprintf( + 'The provided class "%s" is an enum, and cannot be instantiated', + $className + )); + } } diff --git a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php index 1681e56..4e55ac5 100644 --- a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +++ b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -1,21 +1,4 @@ . - */ namespace Doctrine\Instantiator\Exception; @@ -23,21 +6,22 @@ use Exception; use ReflectionClass; use UnexpectedValueException as BaseUnexpectedValueException; +use function sprintf; + /** * Exception for given parameters causing invalid/unexpected state on instantiation - * - * @author Marco Pivetta */ class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface { /** - * @param ReflectionClass $reflectionClass - * @param Exception $exception + * @phpstan-param ReflectionClass $reflectionClass * - * @return self + * @template T of object */ - public static function fromSerializationTriggeredException(ReflectionClass $reflectionClass, Exception $exception) - { + public static function fromSerializationTriggeredException( + ReflectionClass $reflectionClass, + Exception $exception + ): self { return new self( sprintf( 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', @@ -49,21 +33,17 @@ class UnexpectedValueException extends BaseUnexpectedValueException implements E } /** - * @param ReflectionClass $reflectionClass - * @param string $errorString - * @param int $errorCode - * @param string $errorFile - * @param int $errorLine + * @phpstan-param ReflectionClass $reflectionClass * - * @return UnexpectedValueException + * @template T of object */ public static function fromUncleanUnSerialization( ReflectionClass $reflectionClass, - $errorString, - $errorCode, - $errorFile, - $errorLine - ) { + string $errorString, + int $errorCode, + string $errorFile, + int $errorLine + ): self { return new self( sprintf( 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' diff --git a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php index 6d5b3b6..10067a0 100644 --- a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +++ b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -1,62 +1,73 @@ . - */ namespace Doctrine\Instantiator; -use Closure; +use ArrayIterator; +use Doctrine\Instantiator\Exception\ExceptionInterface; use Doctrine\Instantiator\Exception\InvalidArgumentException; use Doctrine\Instantiator\Exception\UnexpectedValueException; use Exception; use ReflectionClass; +use ReflectionException; +use Serializable; + +use function class_exists; +use function enum_exists; +use function is_subclass_of; +use function restore_error_handler; +use function set_error_handler; +use function sprintf; +use function strlen; +use function unserialize; + +use const PHP_VERSION_ID; -/** - * {@inheritDoc} - * - * @author Marco Pivetta - */ final class Instantiator implements InstantiatorInterface { /** * Markers used internally by PHP to define whether {@see \unserialize} should invoke * the method {@see \Serializable::unserialize()} when dealing with classes implementing * the {@see \Serializable} interface. + * + * @deprecated This constant will be private in 2.0 */ - const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; - const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; + public const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; + + /** @deprecated This constant will be private in 2.0 */ + public const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; /** - * @var \Closure[] of {@see \Closure} instances used to instantiate specific classes + * Used to instantiate specific classes, indexed by class name. + * + * @var callable[] */ - private static $cachedInstantiators = array(); + private static $cachedInstantiators = []; /** - * @var object[] of objects that can directly be cloned + * Array of objects that can directly be cloned, indexed by class name. + * + * @var object[] */ - private static $cachedCloneables = array(); + private static $cachedCloneables = []; /** - * {@inheritDoc} + * @param string $className + * @phpstan-param class-string $className + * + * @return object + * @phpstan-return T + * + * @throws ExceptionInterface + * + * @template T of object */ public function instantiate($className) { if (isset(self::$cachedCloneables[$className])) { - return clone self::$cachedCloneables[$className]; + /** @phpstan-var T */ + $cachedCloneable = self::$cachedCloneables[$className]; + + return clone $cachedCloneable; } if (isset(self::$cachedInstantiators[$className])) { @@ -71,11 +82,14 @@ final class Instantiator implements InstantiatorInterface /** * Builds the requested object and caches it in static properties for performance * - * @param string $className + * @phpstan-param class-string $className * * @return object + * @phpstan-return T + * + * @template T of object */ - private function buildAndCacheFromFactory($className) + private function buildAndCacheFromFactory(string $className) { $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); $instance = $factory(); @@ -88,50 +102,61 @@ final class Instantiator implements InstantiatorInterface } /** - * Builds a {@see \Closure} capable of instantiating the given $className without + * Builds a callable capable of instantiating the given $className without * invoking its constructor. * - * @param string $className + * @phpstan-param class-string $className * - * @return Closure + * @phpstan-return callable(): T + * + * @throws InvalidArgumentException + * @throws UnexpectedValueException + * @throws ReflectionException + * + * @template T of object */ - private function buildFactory($className) + private function buildFactory(string $className): callable { $reflectionClass = $this->getReflectionClass($className); if ($this->isInstantiableViaReflection($reflectionClass)) { - return function () use ($reflectionClass) { - return $reflectionClass->newInstanceWithoutConstructor(); - }; + return [$reflectionClass, 'newInstanceWithoutConstructor']; } $serializedString = sprintf( '%s:%d:"%s":0:{}', - $this->getSerializationFormat($reflectionClass), + is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER, strlen($className), $className ); $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); - return function () use ($serializedString) { + return static function () use ($serializedString) { return unserialize($serializedString); }; } /** - * @param string $className + * @phpstan-param class-string $className * - * @return ReflectionClass + * @phpstan-return ReflectionClass * * @throws InvalidArgumentException + * @throws ReflectionException + * + * @template T of object */ - private function getReflectionClass($className) + private function getReflectionClass(string $className): ReflectionClass { if (! class_exists($className)) { throw InvalidArgumentException::fromNonExistingClass($className); } + if (PHP_VERSION_ID >= 80100 && enum_exists($className, false)) { + throw InvalidArgumentException::fromEnum($className); + } + $reflection = new ReflectionClass($className); if ($reflection->isAbstract()) { @@ -142,16 +167,15 @@ final class Instantiator implements InstantiatorInterface } /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString + * @phpstan-param ReflectionClass $reflectionClass * * @throws UnexpectedValueException * - * @return void + * @template T of object */ - private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, $serializedString) + private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void { - set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { + set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool { $error = UnexpectedValueException::fromUncleanUnSerialization( $reflectionClass, $message, @@ -159,11 +183,15 @@ final class Instantiator implements InstantiatorInterface $file, $line ); + + return true; }); - $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); - - restore_error_handler(); + try { + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + } finally { + restore_error_handler(); + } if ($error) { throw $error; @@ -171,103 +199,64 @@ final class Instantiator implements InstantiatorInterface } /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString + * @phpstan-param ReflectionClass $reflectionClass * * @throws UnexpectedValueException * - * @return void + * @template T of object */ - private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void { try { unserialize($serializedString); } catch (Exception $exception) { - restore_error_handler(); - throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); } } /** - * @param ReflectionClass $reflectionClass + * @phpstan-param ReflectionClass $reflectionClass * - * @return bool + * @template T of object */ - private function isInstantiableViaReflection(ReflectionClass $reflectionClass) + private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool { - if (\PHP_VERSION_ID >= 50600) { - return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); - } - - return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass); + return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); } /** * Verifies whether the given class is to be considered internal * - * @param ReflectionClass $reflectionClass + * @phpstan-param ReflectionClass $reflectionClass * - * @return bool + * @template T of object */ - private function hasInternalAncestors(ReflectionClass $reflectionClass) + private function hasInternalAncestors(ReflectionClass $reflectionClass): bool { do { if ($reflectionClass->isInternal()) { return true; } - } while ($reflectionClass = $reflectionClass->getParentClass()); + + $reflectionClass = $reflectionClass->getParentClass(); + } while ($reflectionClass); return false; } - /** - * Verifies if the given PHP version implements the `Serializable` interface serialization - * with an incompatible serialization format. If that's the case, use serialization marker - * "C" instead of "O". - * - * @link http://news.php.net/php.internals/74654 - * - * @param ReflectionClass $reflectionClass - * - * @return string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER - * or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER - */ - private function getSerializationFormat(ReflectionClass $reflectionClass) - { - if ($this->isPhpVersionWithBrokenSerializationFormat() - && $reflectionClass->implementsInterface('Serializable') - ) { - return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER; - } - - return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER; - } - - /** - * Checks whether the current PHP runtime uses an incompatible serialization format - * - * @return bool - */ - private function isPhpVersionWithBrokenSerializationFormat() - { - return PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513; - } - /** * Checks if a class is cloneable * - * @param ReflectionClass $reflection + * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects. * - * @return bool + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object */ - private function isSafeToClone(ReflectionClass $reflection) + private function isSafeToClone(ReflectionClass $reflectionClass): bool { - if (method_exists($reflection, 'isCloneable') && ! $reflection->isCloneable()) { - return false; - } - - // not cloneable if it implements `__clone`, as we want to avoid calling it - return ! $reflection->hasMethod('__clone'); + return $reflectionClass->isCloneable() + && ! $reflectionClass->hasMethod('__clone') + && ! $reflectionClass->isSubclassOf(ArrayIterator::class); } } diff --git a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php index b665bea..10508b5 100644 --- a/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +++ b/api/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -1,37 +1,24 @@ . - */ namespace Doctrine\Instantiator; +use Doctrine\Instantiator\Exception\ExceptionInterface; + /** * Instantiator provides utility methods to build objects without invoking their constructors - * - * @author Marco Pivetta */ interface InstantiatorInterface { /** * @param string $className + * @phpstan-param class-string $className * * @return object + * @phpstan-return T * - * @throws \Doctrine\Instantiator\Exception\ExceptionInterface + * @throws ExceptionInterface + * + * @template T of object */ public function instantiate($className); } diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php deleted file mode 100644 index 3e8fc6f..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php +++ /dev/null @@ -1,96 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorPerformance; - -use Athletic\AthleticEvent; -use Doctrine\Instantiator\Instantiator; - -/** - * Performance tests for {@see \Doctrine\Instantiator\Instantiator} - * - * @author Marco Pivetta - */ -class InstantiatorPerformanceEvent extends AthleticEvent -{ - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->instantiator = new Instantiator(); - - $this->instantiator->instantiate(__CLASS__); - $this->instantiator->instantiate('ArrayObject'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); - } - - /** - * @iterations 20000 - * @baseline - * @group instantiation - */ - public function testInstantiateSelf() - { - $this->instantiator->instantiate(__CLASS__); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateInternalClass() - { - $this->instantiator->instantiate('ArrayObject'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateSimpleSerializableAssetClass() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateSerializableArrayObjectAsset() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateUnCloneableAsset() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php deleted file mode 100644 index 39d9b94..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php +++ /dev/null @@ -1,83 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest\Exception; - -use Doctrine\Instantiator\Exception\InvalidArgumentException; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Exception\InvalidArgumentException} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Exception\InvalidArgumentException - */ -class InvalidArgumentExceptionTest extends PHPUnit_Framework_TestCase -{ - public function testFromNonExistingTypeWithNonExistingClass() - { - $className = __CLASS__ . uniqid(); - $exception = InvalidArgumentException::fromNonExistingClass($className); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\InvalidArgumentException', $exception); - $this->assertSame('The provided class "' . $className . '" does not exist', $exception->getMessage()); - } - - public function testFromNonExistingTypeWithTrait() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestSkipped('Need at least PHP 5.4.0, as this test requires traits support to run'); - } - - $exception = InvalidArgumentException::fromNonExistingClass( - 'DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset' - ); - - $this->assertSame( - 'The provided type "DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset" is a trait, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } - - public function testFromNonExistingTypeWithInterface() - { - $exception = InvalidArgumentException::fromNonExistingClass('Doctrine\\Instantiator\\InstantiatorInterface'); - - $this->assertSame( - 'The provided type "Doctrine\\Instantiator\\InstantiatorInterface" is an interface, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } - - public function testFromAbstractClass() - { - $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); - $exception = InvalidArgumentException::fromAbstractClass($reflection); - - $this->assertSame( - 'The provided class "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" is abstract, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php deleted file mode 100644 index 84154e7..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php +++ /dev/null @@ -1,69 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest\Exception; - -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Exception; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Exception\UnexpectedValueException} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Exception\UnexpectedValueException - */ -class UnexpectedValueExceptionTest extends PHPUnit_Framework_TestCase -{ - public function testFromSerializationTriggeredException() - { - $reflectionClass = new ReflectionClass($this); - $previous = new Exception(); - $exception = UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $previous); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); - $this->assertSame($previous, $exception->getPrevious()); - $this->assertSame( - 'An exception was raised while trying to instantiate an instance of "' - . __CLASS__ . '" via un-serialization', - $exception->getMessage() - ); - } - - public function testFromUncleanUnSerialization() - { - $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); - $exception = UnexpectedValueException::fromUncleanUnSerialization($reflection, 'foo', 123, 'bar', 456); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); - $this->assertSame( - 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" ' - . 'via un-serialization, since an error was triggered in file "bar" at line "456"', - $exception->getMessage() - ); - - $previous = $exception->getPrevious(); - - $this->assertInstanceOf('Exception', $previous); - $this->assertSame('foo', $previous->getMessage()); - $this->assertSame(123, $previous->getCode()); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php deleted file mode 100644 index 0a2cb93..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php +++ /dev/null @@ -1,219 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest; - -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Doctrine\Instantiator\Instantiator; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Instantiator} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Instantiator - */ -class InstantiatorTest extends PHPUnit_Framework_TestCase -{ - /** - * @var Instantiator - */ - private $instantiator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->instantiator = new Instantiator(); - } - - /** - * @param string $className - * - * @dataProvider getInstantiableClasses - */ - public function testCanInstantiate($className) - { - $this->assertInstanceOf($className, $this->instantiator->instantiate($className)); - } - - /** - * @param string $className - * - * @dataProvider getInstantiableClasses - */ - public function testInstantiatesSeparateInstances($className) - { - $instance1 = $this->instantiator->instantiate($className); - $instance2 = $this->instantiator->instantiate($className); - - $this->assertEquals($instance1, $instance2); - $this->assertNotSame($instance1, $instance2); - } - - public function testExceptionOnUnSerializationException() - { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped( - 'As of facebook/hhvm#3432, HHVM has no PDORow, and therefore ' - . ' no internal final classes that cannot be instantiated' - ); - } - - $className = 'DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'; - - if (\PHP_VERSION_ID >= 50600) { - $className = 'PDORow'; - } - - if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { - $className = 'DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'; - } - - $this->setExpectedException('Doctrine\\Instantiator\\Exception\\UnexpectedValueException'); - - $this->instantiator->instantiate($className); - } - - public function testNoticeOnUnSerializationException() - { - if (\PHP_VERSION_ID >= 50600) { - $this->markTestSkipped( - 'PHP 5.6 supports `ReflectionClass#newInstanceWithoutConstructor()` for some internal classes' - ); - } - - try { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - - $this->fail('No exception was raised'); - } catch (UnexpectedValueException $exception) { - $wakeUpNoticesReflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - $previous = $exception->getPrevious(); - - $this->assertInstanceOf('Exception', $previous); - - // in PHP 5.4.29 and PHP 5.5.13, this case is not a notice, but an exception being thrown - if (! (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513)) { - $this->assertSame( - 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\WakeUpNoticesAsset" ' - . 'via un-serialization, since an error was triggered in file "' - . $wakeUpNoticesReflection->getFileName() . '" at line "36"', - $exception->getMessage() - ); - - $this->assertSame('Something went bananas while un-serializing this instance', $previous->getMessage()); - $this->assertSame(\E_USER_NOTICE, $previous->getCode()); - } - } - } - - /** - * @param string $invalidClassName - * - * @dataProvider getInvalidClassNames - */ - public function testInstantiationFromNonExistingClass($invalidClassName) - { - $this->setExpectedException('Doctrine\\Instantiator\\Exception\\InvalidArgumentException'); - - $this->instantiator->instantiate($invalidClassName); - } - - public function testInstancesAreNotCloned() - { - $className = 'TemporaryClass' . uniqid(); - - eval('namespace ' . __NAMESPACE__ . '; class ' . $className . '{}'); - - $instance = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); - - $instance->foo = 'bar'; - - $instance2 = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); - - $this->assertObjectNotHasAttribute('foo', $instance2); - } - - /** - * Provides a list of instantiable classes (existing) - * - * @return string[][] - */ - public function getInstantiableClasses() - { - $classes = array( - array('stdClass'), - array(__CLASS__), - array('Doctrine\\Instantiator\\Instantiator'), - array('Exception'), - array('PharException'), - array('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\ExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\FinalExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\PharExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\XMLReaderAsset'), - ); - - if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { - return $classes; - } - - $classes = array_merge( - $classes, - array( - array('PharException'), - array('ArrayObject'), - array('DoctrineTest\\InstantiatorTestAsset\\ArrayObjectAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'), - ) - ); - - if (\PHP_VERSION_ID >= 50600) { - $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'); - } - - return $classes; - } - - /** - * Provides a list of instantiable classes (existing) - * - * @return string[][] - */ - public function getInvalidClassNames() - { - $classNames = array( - array(__CLASS__ . uniqid()), - array('Doctrine\\Instantiator\\InstantiatorInterface'), - array('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'), - ); - - if (\PHP_VERSION_ID >= 50400) { - $classNames[] = array('DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset'); - } - - return $classNames; - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php deleted file mode 100644 index fbe28dd..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -abstract class AbstractClassAsset -{ -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php deleted file mode 100644 index 56146d7..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; - -/** - * Test asset that extends an internal PHP class - * - * @author Marco Pivetta - */ -class ArrayObjectAsset extends ArrayObject -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php deleted file mode 100644 index 43bbe46..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Exception; - -/** - * Test asset that extends an internal PHP base exception - * - * @author Marco Pivetta - */ -class ExceptionAsset extends Exception -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php deleted file mode 100644 index 7d268f5..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Exception; - -/** - * Test asset that extends an internal PHP base exception - * - * @author Marco Pivetta - */ -final class FinalExceptionAsset extends Exception -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php deleted file mode 100644 index 553fd56..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Phar; - -/** - * Test asset that extends an internal PHP class - * - * @author Marco Pivetta - */ -class PharAsset extends Phar -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php deleted file mode 100644 index 42bf73e..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php +++ /dev/null @@ -1,44 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use PharException; - -/** - * Test asset that extends an internal PHP class - * This class should be serializable without problems - * and without getting the "Erroneous data format for unserializing" - * error - * - * @author Marco Pivetta - */ -class PharExceptionAsset extends PharException -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php deleted file mode 100644 index ba19aaf..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; -use Serializable; - -/** - * Serializable test asset that also extends an internal class - * - * @author Marco Pivetta - */ -class SerializableArrayObjectAsset extends ArrayObject implements Serializable -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * {@inheritDoc} - */ - public function serialize() - { - return ''; - } - - /** - * {@inheritDoc} - * - * Should not be called - * - * @throws BadMethodCallException - */ - public function unserialize($serialized) - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php deleted file mode 100644 index 39f84a6..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php +++ /dev/null @@ -1,61 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Serializable; - -/** - * Base serializable test asset - * - * @author Marco Pivetta - */ -class SimpleSerializableAsset implements Serializable -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * {@inheritDoc} - */ - public function serialize() - { - return ''; - } - - /** - * {@inheritDoc} - * - * Should not be called - * - * @throws BadMethodCallException - */ - public function unserialize($serialized) - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php deleted file mode 100644 index 04e7806..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -/** - * A simple trait with no attached logic - * - * @author Marco Pivetta - */ -trait SimpleTraitAsset -{ -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php deleted file mode 100644 index 7d03bda..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php +++ /dev/null @@ -1,50 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; - -/** - * Base un-cloneable asset - * - * @author Marco Pivetta - */ -class UnCloneableAsset -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * Magic `__clone` - should not be invoked - * - * @throws BadMethodCallException - */ - public function __clone() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php deleted file mode 100644 index b348a40..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php +++ /dev/null @@ -1,39 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -class UnserializeExceptionArrayObjectAsset extends ArrayObject -{ - /** - * {@inheritDoc} - */ - public function __wakeup() - { - throw new BadMethodCallException(); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php deleted file mode 100644 index 18dc671..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php +++ /dev/null @@ -1,38 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -class WakeUpNoticesAsset extends ArrayObject -{ - /** - * Wakeup method called after un-serialization - */ - public function __wakeup() - { - trigger_error('Something went bananas while un-serializing this instance'); - } -} diff --git a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php b/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php deleted file mode 100644 index 39ee699..0000000 --- a/api/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use XMLReader; - -/** - * Test asset that extends an internal PHP class - * - * @author Dave Marshall - */ -class XMLReaderAsset extends XMLReader -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/api/vendor/fzaninotto/faker/.github/ISSUE_TEMPLATE/bug_report.md b/api/vendor/fzaninotto/faker/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..3e8543b --- /dev/null +++ b/api/vendor/fzaninotto/faker/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,39 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +### Summary + + + +### Versions + + + +| | Version | +|:--------------------|:--------| +| PHP | x.y.z | +| `fzaninotto/faker` | x.y.z | + +### Self-enclosed code snippet for reproduction + +```php + +``` + +### Expected output + +```txt + +``` + +### Actual output + +```txt + +``` diff --git a/api/vendor/fzaninotto/faker/.gitignore b/api/vendor/fzaninotto/faker/.gitignore deleted file mode 100644 index 7579f74..0000000 --- a/api/vendor/fzaninotto/faker/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor -composer.lock diff --git a/api/vendor/fzaninotto/faker/.travis.yml b/api/vendor/fzaninotto/faker/.travis.yml deleted file mode 100644 index 80bebb2..0000000 --- a/api/vendor/fzaninotto/faker/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -before_script: - - travis_retry composer self-update - - travis_retry composer install --no-interaction --prefer-dist - -script: make sniff test diff --git a/api/vendor/fzaninotto/faker/.travis/xdebug.sh b/api/vendor/fzaninotto/faker/.travis/xdebug.sh new file mode 100644 index 0000000..c3cebe3 --- /dev/null +++ b/api/vendor/fzaninotto/faker/.travis/xdebug.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# The problem is that we do not want to remove the configuration file, just disable it for a few tasks, then enable it +# +# For reference, see +# +# - https://docs.travis-ci.com/user/languages/php#Disabling-preinstalled-PHP-extensions +# - https://docs.travis-ci.com/user/languages/php#Custom-PHP-configuration + +config="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" + +function xdebug-disable() { + if [[ -f $config ]]; then + mv $config "$config.bak" + fi +} + +function xdebug-enable() { + if [[ -f "$config.bak" ]]; then + mv "$config.bak" $config + fi +} diff --git a/api/vendor/fzaninotto/faker/CHANGELOG.md b/api/vendor/fzaninotto/faker/CHANGELOG.md index b251047..d27a7be 100644 --- a/api/vendor/fzaninotto/faker/CHANGELOG.md +++ b/api/vendor/fzaninotto/faker/CHANGELOG.md @@ -1,11 +1,466 @@ -CHANGELOG -========= +# CHANGELOG -2015-05-29, v1.5.0 ------------------- +## 2019-12-03, v1.9.1 + +- Add link to PHPStan extension to readme [\#1834](https://github.com/fzaninotto/Faker/pull/1834) ([finwe](https://github.com/finwe)) +- Enhancement: Collect code coverage [\#1824](https://github.com/fzaninotto/Faker/pull/1824) ([localheinz](https://github.com/localheinz)) +- Enhancement: Use all columns when running tests [\#1823](https://github.com/fzaninotto/Faker/pull/1823) ([localheinz](https://github.com/localheinz)) +- Enhancement: Configure verbose output via phpunit.xml.dist [\#1822](https://github.com/fzaninotto/Faker/pull/1822) ([localheinz](https://github.com/localheinz)) +- Curly braces for arrays is deprecated in PHP 7.4 [\#1843](https://github.com/fzaninotto/Faker/pull/1843) ([wimg](https://github.com/wimg)) +- Fix: Reduce visibility of setUp\(\) and tearDown\(\) [\#1821](https://github.com/fzaninotto/Faker/pull/1821) ([localheinz](https://github.com/localheinz)) +- Fix: Mark test classes as final [\#1820](https://github.com/fzaninotto/Faker/pull/1820) ([localheinz](https://github.com/localheinz)) +- Fix: Remove unnecessary class-level DocBlocks [\#1819](https://github.com/fzaninotto/Faker/pull/1819) ([localheinz](https://github.com/localheinz)) + +## 2019-11-10, v1.9.0 + +This will the last minor release in the `1.x` cycle. + +- Add all Iran's provinces land lines numbers [\#1806](https://github.com/fzaninotto/Faker/pull/1806) ([kingofnull](https://github.com/kingofnull)) +- replace latin "B" to cyrillic "B" for uk\_UA locale [\#1800](https://github.com/fzaninotto/Faker/pull/1800) ([FI-LIFE](https://github.com/FI-LIFE)) +- Add elgentos/masquerade to third-party library list [\#1798](https://github.com/fzaninotto/Faker/pull/1798) ([erikhansen](https://github.com/erikhansen)) +- Add link to Gravatar provider repository [\#1796](https://github.com/fzaninotto/Faker/pull/1796) ([ottaviano](https://github.com/ottaviano)) +- Add mobileNumber\(\) method for nb\_NO [\#1788](https://github.com/fzaninotto/Faker/pull/1788) ([carestad](https://github.com/carestad)) +- Enhancement: Slightly clean up Company provider [\#1783](https://github.com/fzaninotto/Faker/pull/1783) ([localheinz](https://github.com/localheinz)) +- Added some more information for autoloading in the readme [\#1780](https://github.com/fzaninotto/Faker/pull/1780) ([pimjansen](https://github.com/pimjansen)) +- Enhancement: Add issue template for bug report [\#1779](https://github.com/fzaninotto/Faker/pull/1779) ([localheinz](https://github.com/localheinz)) +- Add hslColor to ColorProvider [\#1776](https://github.com/fzaninotto/Faker/pull/1776) ([icanhazstring](https://github.com/icanhazstring)) +- Enhancement: Consistently use composer package name for link content [\#1770](https://github.com/fzaninotto/Faker/pull/1770) ([localheinz](https://github.com/localheinz)) +- Add Correct Thai words for streets,soi etc names and add Thai First a… [\#1769](https://github.com/fzaninotto/Faker/pull/1769) ([pierrejoye](https://github.com/pierrejoye)) +- Enhancement: Assert that postcode generated by Austrian Address provider matches format [\#1766](https://github.com/fzaninotto/Faker/pull/1766) ([localheinz](https://github.com/localheinz)) +- Enhancement: Update squizlabs/php\_codesniffer [\#1763](https://github.com/fzaninotto/Faker/pull/1763) ([localheinz](https://github.com/localheinz)) +- Enhancement: Assert that imageUrl can be used with gray flag [\#1762](https://github.com/fzaninotto/Faker/pull/1762) ([localheinz](https://github.com/localheinz)) +- Enhancement: Introduce build and help targets [\#1761](https://github.com/fzaninotto/Faker/pull/1761) ([localheinz](https://github.com/localheinz)) +- Enhancement: Disable Xdebug as early as possible [\#1758](https://github.com/fzaninotto/Faker/pull/1758) ([localheinz](https://github.com/localheinz)) +- Enhancement: Clean up .gitattributes [\#1756](https://github.com/fzaninotto/Faker/pull/1756) ([localheinz](https://github.com/localheinz)) +- Enhancement: Reference phpunit.xsd as installed with composer [\#1755](https://github.com/fzaninotto/Faker/pull/1755) ([localheinz](https://github.com/localheinz)) +- add id\_ID Color [\#1754](https://github.com/fzaninotto/Faker/pull/1754) ([cacing69](https://github.com/cacing69)) +- PHP 7.4 compatibility [\#1748](https://github.com/fzaninotto/Faker/pull/1748) ([pimjansen](https://github.com/pimjansen)) +- Add lastName gender specific on ru\_RU locale [\#1747](https://github.com/fzaninotto/Faker/pull/1747) ([aanfarhan](https://github.com/aanfarhan)) +- Update README - Add a new faker. [\#1731](https://github.com/fzaninotto/Faker/pull/1731) ([drupol](https://github.com/drupol)) +- Add faker-eddy-malou third-party library [\#1717](https://github.com/fzaninotto/Faker/pull/1717) ([Metrakit](https://github.com/Metrakit)) +- \[de\_DE\] Company\JobTitle: list of common german job titles [\#1716](https://github.com/fzaninotto/Faker/pull/1716) ([amacado](https://github.com/amacado)) +- Added 'red' to $safeColorNames [\#1701](https://github.com/fzaninotto/Faker/pull/1701) ([xfudox](https://github.com/xfudox)) +- \[pt\_PT/Address\] Add abbreviature to 'travessa' and 'largo' [\#1606](https://github.com/fzaninotto/Faker/pull/1606) ([simaolemos](https://github.com/simaolemos)) +- Fix method name for en\_NZ provider in readme [\#1595](https://github.com/fzaninotto/Faker/pull/1595) ([gdhnz](https://github.com/gdhnz)) +- Refactoring of the TextTest class [\#1590](https://github.com/fzaninotto/Faker/pull/1590) ([stevegrunwell](https://github.com/stevegrunwell)) +- add gender variants for last name \[lt\_LT\] [\#1586](https://github.com/fzaninotto/Faker/pull/1586) ([ikerasLT](https://github.com/ikerasLT)) +- add .id TLD [\#1566](https://github.com/fzaninotto/Faker/pull/1566) ([ad3n](https://github.com/ad3n)) +- Add Color provider to es\_ES locale [\#1559](https://github.com/fzaninotto/Faker/pull/1559) ([juananruiz](https://github.com/juananruiz)) +- Enhancement: Keep packages sorted in composer.json [\#1551](https://github.com/fzaninotto/Faker/pull/1551) ([localheinz](https://github.com/localheinz)) +- Portuguese providers for Companies and Internet [\#1537](https://github.com/fzaninotto/Faker/pull/1537) ([promatik](https://github.com/promatik)) +- Improve Dutch company names [\#1529](https://github.com/fzaninotto/Faker/pull/1529) ([koole](https://github.com/koole)) +- Document randomDigitNot base formatter. [\#1514](https://github.com/fzaninotto/Faker/pull/1514) ([shawnlindstrom](https://github.com/shawnlindstrom)) +- Estonian names [\#1461](https://github.com/fzaninotto/Faker/pull/1461) ([much-rebel](https://github.com/much-rebel)) +- add birthplace support for ID nik generator [\#1451](https://github.com/fzaninotto/Faker/pull/1451) ([mikk150](https://github.com/mikk150)) +- List of banks in Brazil added [\#1427](https://github.com/fzaninotto/Faker/pull/1427) ([diegohenicka](https://github.com/diegohenicka)) +- Remove last names from the male first names array \(et\_EE\) [\#1799](https://github.com/fzaninotto/Faker/pull/1799) ([Mihkel100](https://github.com/Mihkel100)) +- Update out-of-date currency codes [\#1795](https://github.com/fzaninotto/Faker/pull/1795) ([Brindster](https://github.com/Brindster)) +- Floor is not always returning an int [\#1790](https://github.com/fzaninotto/Faker/pull/1790) ([pimjansen](https://github.com/pimjansen)) +- typo [\#1789](https://github.com/fzaninotto/Faker/pull/1789) ([enumag](https://github.com/enumag)) +- Added batch inserts for doctrine orm populate [\#1781](https://github.com/fzaninotto/Faker/pull/1781) ([pimjansen](https://github.com/pimjansen)) +- FIx: Avoid deprecation warning in newer CakePHP version [\#1777](https://github.com/fzaninotto/Faker/pull/1777) ([icanhazstring](https://github.com/icanhazstring)) +- Fix: Consistently link to GitHub repositories [\#1774](https://github.com/fzaninotto/Faker/pull/1774) ([localheinz](https://github.com/localheinz)) +- Fix: Name of package [\#1772](https://github.com/fzaninotto/Faker/pull/1772) ([localheinz](https://github.com/localheinz)) +- Remove BV and HM country codes. [\#1767](https://github.com/fzaninotto/Faker/pull/1767) ([oliverpool](https://github.com/oliverpool)) +- Fix: Remove sudo configuration [\#1760](https://github.com/fzaninotto/Faker/pull/1760) ([localheinz](https://github.com/localheinz)) +- Fix: Allow nightly builds to fail [\#1759](https://github.com/fzaninotto/Faker/pull/1759) ([localheinz](https://github.com/localheinz)) +- Fix: No need to update composer itself [\#1757](https://github.com/fzaninotto/Faker/pull/1757) ([localheinz](https://github.com/localheinz)) +- duplicate first name and last name removal [\#1729](https://github.com/fzaninotto/Faker/pull/1729) ([sagautam5](https://github.com/sagautam5)) +- Fix-Isreal--Israel [\#1724](https://github.com/fzaninotto/Faker/pull/1724) ([GitEvil](https://github.com/GitEvil)) +- fix\(issue-1721\): add phpdoc method and properties annotations for php… [\#1722](https://github.com/fzaninotto/Faker/pull/1722) ([lugus](https://github.com/lugus)) +- Typo in function PHPDoc [\#1711](https://github.com/fzaninotto/Faker/pull/1711) ([Dzhuneyt](https://github.com/Dzhuneyt)) +- Fix: Add allowed type DateTime to param annotation [\#1697](https://github.com/fzaninotto/Faker/pull/1697) ([localheinz](https://github.com/localheinz)) +- Calling a non static method as static not allowed. [\#1696](https://github.com/fzaninotto/Faker/pull/1696) ([wilco-1985](https://github.com/wilco-1985)) +- Bug Fix en\_SG mobile number generation [\#1658](https://github.com/fzaninotto/Faker/pull/1658) ([ziming](https://github.com/ziming)) +- Update ja\_JP Address Provider [\#1649](https://github.com/fzaninotto/Faker/pull/1649) ([atmngw](https://github.com/atmngw)) +- Fixed realText on ja\_JP locale broken, /u missing [\#1634](https://github.com/fzaninotto/Faker/pull/1634) ([mihit](https://github.com/mihit)) +- Removed comma and space from $firstNameMale for en\_IN [\#1608](https://github.com/fzaninotto/Faker/pull/1608) ([phpspider](https://github.com/phpspider)) +- Prevent Transliterator class autoloading [\#1575](https://github.com/fzaninotto/Faker/pull/1575) ([MontealegreLuis](https://github.com/MontealegreLuis)) +- building numbers in Germany never start with a zero or are zero [\#1530](https://github.com/fzaninotto/Faker/pull/1530) ([fostam](https://github.com/fostam)) +- Fixing sk\_SK men last names set [\#1459](https://github.com/fzaninotto/Faker/pull/1459) ([pavoltanuska](https://github.com/pavoltanuska)) +- Taiwan ID. The initial letter must be a capital letter. p-\>P [\#1434](https://github.com/fzaninotto/Faker/pull/1434) ([slawa-dev](https://github.com/slawa-dev)) +- Revert "Added 'red' to $safeColorNames" [\#1778](https://github.com/fzaninotto/Faker/pull/1778) ([fzaninotto](https://github.com/fzaninotto)) +- Added realText capability for fr\_CA [\#1686](https://github.com/fzaninotto/Faker/pull/1686) ([bobanum](https://github.com/bobanum)) +- Add loremflickr.com Provider to the thrid parties [\#1683](https://github.com/fzaninotto/Faker/pull/1683) ([xvladxtremal](https://github.com/xvladxtremal)) +- Add Undeclared Faker Instance to PhoneNumber Test in en\_NG [\#1682](https://github.com/fzaninotto/Faker/pull/1682) ([thearsalan](https://github.com/thearsalan)) +- PSR-2 updates to readme [\#1679](https://github.com/fzaninotto/Faker/pull/1679) ([b3none](https://github.com/b3none)) +- PHPDoc for `passthrough` function on Generator [\#1678](https://github.com/fzaninotto/Faker/pull/1678) ([tabakhase](https://github.com/tabakhase)) +- Make en\_CA Phone Provider Extend the en\_US One [\#1676](https://github.com/fzaninotto/Faker/pull/1676) ([darrylhein](https://github.com/darrylhein)) +- Add Valid National Code Generator to fa\_IR Person [\#1675](https://github.com/fzaninotto/Faker/pull/1675) ([thearsalan](https://github.com/thearsalan)) +- Updated readme.md: added a missing backslash [\#1673](https://github.com/fzaninotto/Faker/pull/1673) ([aubryfr](https://github.com/aubryfr)) +- Add 'Faker\Provider\en\_US\Company::catchPhrase' to ru\_RU locale [\#1668](https://github.com/fzaninotto/Faker/pull/1668) ([axklim](https://github.com/axklim)) +- Update deprecated \PHPUnit\_Framework\_TestCase with PHPUnit\Framework\TestCase [\#1664](https://github.com/fzaninotto/Faker/pull/1664) ([thewhit](https://github.com/thewhit)) +- Support populating Doctrine's immutable date types [\#1639](https://github.com/fzaninotto/Faker/pull/1639) ([voronkovich](https://github.com/voronkovich)) +- add titleMale and titleFemale method to all Person classes [\#1635](https://github.com/fzaninotto/Faker/pull/1635) ([RiverDanceGit](https://github.com/RiverDanceGit)) +- Minor typo fix [\#1631](https://github.com/fzaninotto/Faker/pull/1631) ([nhedger](https://github.com/nhedger)) +- Add link to er1z/fakemock [\#1622](https://github.com/fzaninotto/Faker/pull/1622) ([er1z](https://github.com/er1z)) +- Add Dutch \(nl\_NL\) job titles [\#1618](https://github.com/fzaninotto/Faker/pull/1618) ([SjorsO](https://github.com/SjorsO)) +- Exclude files and folder from release archive [\#1617](https://github.com/fzaninotto/Faker/pull/1617) ([ankurk91](https://github.com/ankurk91)) +- Update doc block [\#1615](https://github.com/fzaninotto/Faker/pull/1615) ([ankurk91](https://github.com/ankurk91)) +- Suggest PSR-4 compliant autoloader in comment [\#1614](https://github.com/fzaninotto/Faker/pull/1614) ([samnela](https://github.com/samnela)) +- Fix dateTimeBetween\(\) Argument on Generator phpdoc [\#1583](https://github.com/fzaninotto/Faker/pull/1583) ([hisomura](https://github.com/hisomura)) +- Fix Dutch typo [\#1580](https://github.com/fzaninotto/Faker/pull/1580) ([gizburdt](https://github.com/gizburdt)) +- Old city names changed to new ones [\#1578](https://github.com/fzaninotto/Faker/pull/1578) ([goszowski](https://github.com/goszowski)) +- Correct documentation [\#1571](https://github.com/fzaninotto/Faker/pull/1571) ([rquadling](https://github.com/rquadling)) +- Make $suffix protected not private in nl\_NL\Person provider [\#1561](https://github.com/fzaninotto/Faker/pull/1561) ([SpadXIII](https://github.com/SpadXIII)) +- Add PicsumPhotos Provider to the thrid parties [\#1560](https://github.com/fzaninotto/Faker/pull/1560) ([bluemmb](https://github.com/bluemmb)) +- fix austrian postal codes starting with invalid 0 [\#1545](https://github.com/fzaninotto/Faker/pull/1545) ([mpge](https://github.com/mpge)) +- Restore a random seed when the Generator is destroyed [\#1534](https://github.com/fzaninotto/Faker/pull/1534) ([lyrixx](https://github.com/lyrixx)) +- Add a swiss social security number \(AVS13\) generator [\#1533](https://github.com/fzaninotto/Faker/pull/1533) ([nhedger](https://github.com/nhedger)) +- Small tweaks [\#1526](https://github.com/fzaninotto/Faker/pull/1526) ([carusogabriel](https://github.com/carusogabriel)) +- fix ukraine first name person, delete space [\#1525](https://github.com/fzaninotto/Faker/pull/1525) ([Yasuslik](https://github.com/Yasuslik)) +- Removed unknown postcode [\#1440](https://github.com/fzaninotto/Faker/pull/1440) ([ayanozturk](https://github.com/ayanozturk)) +- Add more PhoneNumber options for es\_ES [\#1219](https://github.com/fzaninotto/Faker/pull/1219) ([driade](https://github.com/driade)) +- Fix duplication in uk\_UA male first names [\#1214](https://github.com/fzaninotto/Faker/pull/1214) ([fre5h](https://github.com/fre5h)) +- Added missing grayscale option/flag to Image provider [\#928](https://github.com/fzaninotto/Faker/pull/928) ([sebastianvilla](https://github.com/sebastianvilla)) + +## 2018-07-12, v1.8.0 + +- Typo in readme [\#1521](https://github.com/fzaninotto/Faker/pull/1521) ([jmhobbs](https://github.com/jmhobbs)) +- Replaced Hilll with Hill [\#1516](https://github.com/fzaninotto/Faker/pull/1516) ([MarkVaughn](https://github.com/MarkVaughn)) +- \[it\_IT\] Improve vat ID generated using official rules [\#1508](https://github.com/fzaninotto/Faker/pull/1508) ([mavimo](https://github.com/mavimo)) +- \[hu\_HU\] Address: Fix unnecessary new line in string [\#1507](https://github.com/fzaninotto/Faker/pull/1507) ([ntomka](https://github.com/ntomka)) +- add phone numer format [\#1506](https://github.com/fzaninotto/Faker/pull/1506) ([Enosh-Yu](https://github.com/Enosh-Yu)) +- Fix typo in fr\_CA Provider [\#1505](https://github.com/fzaninotto/Faker/pull/1505) ([ultreson](https://github.com/ultreson)) +- Add fake-car provider link [\#1497](https://github.com/fzaninotto/Faker/pull/1497) ([pelmered](https://github.com/pelmered)) +- create `passthrough` function [\#1493](https://github.com/fzaninotto/Faker/pull/1493) ([browner12](https://github.com/browner12)) +- update Polish bank list [\#1482](https://github.com/fzaninotto/Faker/pull/1482) ([IonBazan](https://github.com/IonBazan)) +- Update the parameters to check if the setter is callable [\#1470](https://github.com/fzaninotto/Faker/pull/1470) ([rossmitchell](https://github.com/rossmitchell)) +- Push the max date far into the future so the test can pass [\#1469](https://github.com/fzaninotto/Faker/pull/1469) ([rossmitchell](https://github.com/rossmitchell)) +- Update Address.php [\#1465](https://github.com/fzaninotto/Faker/pull/1465) ([Saibamen](https://github.com/Saibamen)) +- Turkish identity number for tr\_TR [\#1462](https://github.com/fzaninotto/Faker/pull/1462) ([aykutaras](https://github.com/aykutaras)) +- Fixing rare iin with 13-digits. [\#1450](https://github.com/fzaninotto/Faker/pull/1450) ([vadimonus](https://github.com/vadimonus)) +- Fix Polish PESEL faker [\#1449](https://github.com/fzaninotto/Faker/pull/1449) ([Dartui](https://github.com/Dartui)) +- Adds valid 08 number formats for fr\_FR [\#1439](https://github.com/fzaninotto/Faker/pull/1439) ([ppelgrims](https://github.com/ppelgrims)) +- Add YouTube provider link [\#1422](https://github.com/fzaninotto/Faker/pull/1422) ([aalaap](https://github.com/aalaap)) +- Update PHPDoc of the DateTime provider. [\#1419](https://github.com/fzaninotto/Faker/pull/1419) ([tomzx](https://github.com/tomzx)) +- Normalize name of variable [\#1412](https://github.com/fzaninotto/Faker/pull/1412) ([eaglewu](https://github.com/eaglewu)) +- Added "blockchain" to en-us company provider catchPhrase method [\#1411](https://github.com/fzaninotto/Faker/pull/1411) ([samoldenburg](https://github.com/samoldenburg)) +- Fix for Spot2 ORM EntityPopulator [\#1408](https://github.com/fzaninotto/Faker/pull/1408) ([michal-borek](https://github.com/michal-borek)) +- TH color name [\#1404](https://github.com/fzaninotto/Faker/pull/1404) ([Naruedom](https://github.com/Naruedom)) +- added Malaysia \[ms\_MY\] locale [\#1403](https://github.com/fzaninotto/Faker/pull/1403) ([kenfai](https://github.com/kenfai)) +- Implementation of the function that generates Brazilian area codes fixed. [\#1401](https://github.com/fzaninotto/Faker/pull/1401) ([jackmiras](https://github.com/jackmiras)) +- VISA retired the 13 digit PAN moved to new cardParams [\#1400](https://github.com/fzaninotto/Faker/pull/1400) ([hppycoder](https://github.com/hppycoder)) +- Remove unused variable inside closure [\#1395](https://github.com/fzaninotto/Faker/pull/1395) ([carusogabriel](https://github.com/carusogabriel)) +- .nz domain updates [\#1393](https://github.com/fzaninotto/Faker/pull/1393) ([xurizaemon](https://github.com/xurizaemon)) +- Add licenceCode method in the to es\_ES person provider [\#1392](https://github.com/fzaninotto/Faker/pull/1392) ([ffiguereo](https://github.com/ffiguereo)) +- allow `randomElements` to accept a Traversable object [\#1389](https://github.com/fzaninotto/Faker/pull/1389) ([browner12](https://github.com/browner12)) +- Doc: rg remove formatting [\#1387](https://github.com/fzaninotto/Faker/pull/1387) ([emtudo](https://github.com/emtudo)) +- Add numbers with start 4 [\#1386](https://github.com/fzaninotto/Faker/pull/1386) ([emtudo](https://github.com/emtudo)) +- update th\_TH mobile number format [\#1385](https://github.com/fzaninotto/Faker/pull/1385) ([earthpyy](https://github.com/earthpyy)) +- Translate country names for lv\_LV provider. [\#1383](https://github.com/fzaninotto/Faker/pull/1383) ([ronaldsgailis](https://github.com/ronaldsgailis)) +- Clean elses [\#1382](https://github.com/fzaninotto/Faker/pull/1382) ([carusogabriel](https://github.com/carusogabriel)) +- French vat formatter [\#1381](https://github.com/fzaninotto/Faker/pull/1381) ([ppelgrims](https://github.com/ppelgrims)) +- Replaces rtrim with preg\_replace [\#1380](https://github.com/fzaninotto/Faker/pull/1380) ([ppelgrims](https://github.com/ppelgrims)) +- Refactoring tests [\#1375](https://github.com/fzaninotto/Faker/pull/1375) ([carusogabriel](https://github.com/carusogabriel)) +- Added link in readme to provider FakerRestaurant [\#1374](https://github.com/fzaninotto/Faker/pull/1374) ([jzonta](https://github.com/jzonta)) +- Remove obsolete currency codes [\#1373](https://github.com/fzaninotto/Faker/pull/1373) ([tpraxl](https://github.com/tpraxl)) +- \[ru\_RU\] Updated countries and added source link [\#1372](https://github.com/fzaninotto/Faker/pull/1372) ([ilyahoilik](https://github.com/ilyahoilik)) +- Test against PHP 7.2 [\#1371](https://github.com/fzaninotto/Faker/pull/1371) ([carusogabriel](https://github.com/carusogabriel)) +- Feature: nl\_BE text provider [\#1370](https://github.com/fzaninotto/Faker/pull/1370) ([rauwebieten](https://github.com/rauwebieten)) +- default value for Payment::iban\(\) country code [\#1369](https://github.com/fzaninotto/Faker/pull/1369) ([madmanmax](https://github.com/madmanmax)) +- skip test failing on bigendian [\#1365](https://github.com/fzaninotto/Faker/pull/1365) ([remicollet](https://github.com/remicollet)) +- Update Person.php [\#1364](https://github.com/fzaninotto/Faker/pull/1364) ([majamusan](https://github.com/majamusan)) +- Prevent errors on private methods [\#1363](https://github.com/fzaninotto/Faker/pull/1363) ([petecoop](https://github.com/petecoop)) +- adds rijksregisternummer [\#1361](https://github.com/fzaninotto/Faker/pull/1361) ([ppelgrims](https://github.com/ppelgrims)) +- Add secondary address to fr\_FR provider [\#1356](https://github.com/fzaninotto/Faker/pull/1356) ([nicodmf](https://github.com/nicodmf)) +- Add company provider for tr\_TR [\#1355](https://github.com/fzaninotto/Faker/pull/1355) ([yuks](https://github.com/yuks)) +- nb\_NO provider updates [\#1350](https://github.com/fzaninotto/Faker/pull/1350) ([alexqhj](https://github.com/alexqhj)) +- only test available date range on 32-bit [\#1348](https://github.com/fzaninotto/Faker/pull/1348) ([remicollet](https://github.com/remicollet)) +- Bump PHPUnit version for namespace compatibility [\#1345](https://github.com/fzaninotto/Faker/pull/1345) ([carusogabriel](https://github.com/carusogabriel)) +- Use PSR-1 for PHPUnit TestCase [\#1344](https://github.com/fzaninotto/Faker/pull/1344) ([carusogabriel](https://github.com/carusogabriel)) +- Fix FR\_fr 07 prefix mobile number generation [\#1343](https://github.com/fzaninotto/Faker/pull/1343) ([svanpoeck](https://github.com/svanpoeck)) +- Update Text.php [\#1339](https://github.com/fzaninotto/Faker/pull/1339) ([gulaandrij](https://github.com/gulaandrij)) +- Add two new company type in the Swiss Provider [\#1336](https://github.com/fzaninotto/Faker/pull/1336) ([pvullioud](https://github.com/pvullioud)) +- Change symbol 'minus' with code 226 to 'minus' with code 45 [\#1333](https://github.com/fzaninotto/Faker/pull/1333) ([Negasus](https://github.com/Negasus)) +- \[sl\_SI\] Created provider for Company [\#1331](https://github.com/fzaninotto/Faker/pull/1331) ([alesvaupotic](https://github.com/alesvaupotic)) +- Update city name [\#1328](https://github.com/fzaninotto/Faker/pull/1328) ([s9801077](https://github.com/s9801077)) +- Fix \#1305 realText in some cases breaks last character [\#1326](https://github.com/fzaninotto/Faker/pull/1326) ([iamraccoon](https://github.com/iamraccoon)) +- Real Dutch postal codes [\#1323](https://github.com/fzaninotto/Faker/pull/1323) ([ametad](https://github.com/ametad)) +- Added male and female titles for the en\_ZA locale [\#1321](https://github.com/fzaninotto/Faker/pull/1321) ([ViGouRCanberra](https://github.com/ViGouRCanberra)) +- Add German Email Providers [\#1320](https://github.com/fzaninotto/Faker/pull/1320) ([Stoffo](https://github.com/Stoffo)) +- Fix "Resource temporarily unavailable" [\#1319](https://github.com/fzaninotto/Faker/pull/1319) ([eberkund](https://github.com/eberkund)) +- Introduced the ability to specify a default timezone... [\#1316](https://github.com/fzaninotto/Faker/pull/1316) ([telkins](https://github.com/telkins)) +- South African licence codes [\#1315](https://github.com/fzaninotto/Faker/pull/1315) ([royalmitten](https://github.com/royalmitten)) +- Fix with incorrect name city. [\#1309](https://github.com/fzaninotto/Faker/pull/1309) ([zzenmate](https://github.com/zzenmate)) +- Fixed type-o in readme under section about Language specific formatters [\#1302](https://github.com/fzaninotto/Faker/pull/1302) ([espenkn](https://github.com/espenkn)) +- Update Person.php [\#1298](https://github.com/fzaninotto/Faker/pull/1298) ([yappkahowe](https://github.com/yappkahowe)) +- Allow children classes to access self::$suffix [\#1296](https://github.com/fzaninotto/Faker/pull/1296) ([greg0ire](https://github.com/greg0ire)) +- Fix with namespace payment provider for uk\_UA [\#1293](https://github.com/fzaninotto/Faker/pull/1293) ([zzenmate](https://github.com/zzenmate)) +- Update zh\_TW text provider [\#1292](https://github.com/fzaninotto/Faker/pull/1292) ([s9801077](https://github.com/s9801077)) +- Fix CURL status code in ImageTest.php [\#1290](https://github.com/fzaninotto/Faker/pull/1290) ([Sanfra1407](https://github.com/Sanfra1407)) +- Tax Id for companies and new formats for es\_VE [\#1287](https://github.com/fzaninotto/Faker/pull/1287) ([DIOHz0r](https://github.com/DIOHz0r)) +- Added idNumber for nl\_NL [\#1283](https://github.com/fzaninotto/Faker/pull/1283) ([artorozenga](https://github.com/artorozenga)) +- Feature/en us company ein [\#1273](https://github.com/fzaninotto/Faker/pull/1273) ([zachflower](https://github.com/zachflower)) + +## 2017-08-15, v1.7.0 + +- Added more Ukrainian banks [\#1271](https://github.com/fzaninotto/Faker/pull/1271) ([iamraccoon](https://github.com/iamraccoon)) +- Hotfix/failing unit tests [\#1269](https://github.com/fzaninotto/Faker/pull/1269) ([zachflower](https://github.com/zachflower)) +- Lock Travis-CI environment to Ubuntu Precise [\#1268](https://github.com/fzaninotto/Faker/pull/1268) ([zachflower](https://github.com/zachflower)) +- Added Ukrainian job title [\#1267](https://github.com/fzaninotto/Faker/pull/1267) ([iamraccoon](https://github.com/iamraccoon)) +- Add compliant en\_US SSN generator [\#1266](https://github.com/fzaninotto/Faker/pull/1266) ([zachflower](https://github.com/zachflower)) +- Added more Ukrainian streets and removed irrelevant names. Added more Ukrainian mobile formats [\#1265](https://github.com/fzaninotto/Faker/pull/1265) ([iamraccoon](https://github.com/iamraccoon)) +- Add Internet Format for ja\_JP. [\#1260](https://github.com/fzaninotto/Faker/pull/1260) ([itigoppo](https://github.com/itigoppo)) +- rectify ISO 4217 codes [\#1258](https://github.com/fzaninotto/Faker/pull/1258) ([eidng8](https://github.com/eidng8)) +- Corrected of grammar of Ukrainian middlenames and test added [\#1257](https://github.com/fzaninotto/Faker/pull/1257) ([vladbuk](https://github.com/vladbuk)) +- Update ISO 4217 active codes [\#1251](https://github.com/fzaninotto/Faker/pull/1251) ([eidng8](https://github.com/eidng8)) +- Update Composer File [\#1248](https://github.com/fzaninotto/Faker/pull/1248) ([vinkla](https://github.com/vinkla)) +- Set capitals to false [\#1243](https://github.com/fzaninotto/Faker/pull/1243) ([Stichoza](https://github.com/Stichoza)) +- Use static instead of self [\#1242](https://github.com/fzaninotto/Faker/pull/1242) ([Stichoza](https://github.com/Stichoza)) +- Add VAT french format [\#1241](https://github.com/fzaninotto/Faker/pull/1241) ([baptistedonaux](https://github.com/baptistedonaux)) +- Add swedish job titles [\#1234](https://github.com/fzaninotto/Faker/pull/1234) ([vinkla](https://github.com/vinkla)) +- Name Simo shouldn't have comma in it [\#1230](https://github.com/fzaninotto/Faker/pull/1230) ([simoheinonen](https://github.com/simoheinonen)) +- Fix: Add method annotation for ValidGenerator [\#1223](https://github.com/fzaninotto/Faker/pull/1223) ([localheinz](https://github.com/localheinz)) +- Add real text for es\_ES [\#1220](https://github.com/fzaninotto/Faker/pull/1220) ([driade](https://github.com/driade)) +- Fix spelling errors [\#1218](https://github.com/fzaninotto/Faker/pull/1218) ([driade](https://github.com/driade)) +- Fix spelling errors [\#1217](https://github.com/fzaninotto/Faker/pull/1217) ([driade](https://github.com/driade)) +- Fixes typo [\#1212](https://github.com/fzaninotto/Faker/pull/1212) ([skullboner](https://github.com/skullboner)) +- Add Person::middleName for ru\_RU provider [\#1209](https://github.com/fzaninotto/Faker/pull/1209) ([JustBlackBird](https://github.com/JustBlackBird)) +- Fix creditCardDetails type hint [\#1208](https://github.com/fzaninotto/Faker/pull/1208) ([jejung](https://github.com/jejung)) +- Expand dictionaries for ru\_RU locale [\#1206](https://github.com/fzaninotto/Faker/pull/1206) ([pwsdotru](https://github.com/pwsdotru)) +- Fix ng\_NG to en\_NG [\#1205](https://github.com/fzaninotto/Faker/pull/1205) ([raphaeldealmeida](https://github.com/raphaeldealmeida)) +- Add INN and KPP support for ru\_RU locale [\#1204](https://github.com/fzaninotto/Faker/pull/1204) ([pwsdotru](https://github.com/pwsdotru)) +- Remove break line on pt\_PT Address format [\#1203](https://github.com/fzaninotto/Faker/pull/1203) ([raphaeldealmeida](https://github.com/raphaeldealmeida)) +- Fix syntax of phpdoc boolean property [\#1198](https://github.com/fzaninotto/Faker/pull/1198) ([pavelkovar](https://github.com/pavelkovar)) +- add en\_HK provider [\#1196](https://github.com/fzaninotto/Faker/pull/1196) ([miklcct](https://github.com/miklcct)) +- use secure https [\#1186](https://github.com/fzaninotto/Faker/pull/1186) ([jpuck](https://github.com/jpuck)) +- Add PhoneNumberFormat for ja\_JP. [\#1185](https://github.com/fzaninotto/Faker/pull/1185) ([itigoppo](https://github.com/itigoppo)) +- Fix: Add class-level method annotations for DateTime provider [\#1183](https://github.com/fzaninotto/Faker/pull/1183) ([localheinz](https://github.com/localheinz)) +- Add ar\_SA Color Provider [\#1182](https://github.com/fzaninotto/Faker/pull/1182) ([alhoqbani](https://github.com/alhoqbani)) +- Added uk\_UA Payment provider with bank name generator [\#1181](https://github.com/fzaninotto/Faker/pull/1181) ([spaghettimaster](https://github.com/spaghettimaster)) +- Typos [\#1177](https://github.com/fzaninotto/Faker/pull/1177) ([ankitpokhrel](https://github.com/ankitpokhrel)) +- Fix XML document example [\#1176](https://github.com/fzaninotto/Faker/pull/1176) ([ankitpokhrel](https://github.com/ankitpokhrel)) +- Added Emoji to Miscellaneous [\#1175](https://github.com/fzaninotto/Faker/pull/1175) ([thomasfdm](https://github.com/thomasfdm)) +- Typos and doc block fixes [\#1170](https://github.com/fzaninotto/Faker/pull/1170) ([ankitpokhrel](https://github.com/ankitpokhrel)) +- Rewrote deprecated `each\(\)` usage [\#1168](https://github.com/fzaninotto/Faker/pull/1168) ([hboomsma](https://github.com/hboomsma)) +- Refactor text method to remove duplication [\#1163](https://github.com/fzaninotto/Faker/pull/1163) ([ankitpokhrel](https://github.com/ankitpokhrel)) +- Generate valid individual identification numbers kk\_KZ [\#1161](https://github.com/fzaninotto/Faker/pull/1161) ([YerlenZhubangaliyev](https://github.com/YerlenZhubangaliyev)) +- Added Address and Company \[fa\_IR\] [\#1160](https://github.com/fzaninotto/Faker/pull/1160) ([thisissorna](https://github.com/thisissorna)) +- Add Peruvian DNI generator [\#1158](https://github.com/fzaninotto/Faker/pull/1158) ([jgwong](https://github.com/jgwong)) +- Removed double semicolon [\#1154](https://github.com/fzaninotto/Faker/pull/1154) ([pjona](https://github.com/pjona)) +- Add prefixes for nl\_NL [\#1151](https://github.com/fzaninotto/Faker/pull/1151) ([hyperized](https://github.com/hyperized)) +- Separated male and female names for sr\_RS locale. [\#1144](https://github.com/fzaninotto/Faker/pull/1144) ([bogdanpet](https://github.com/bogdanpet)) +- Add personal ID, VAT for zh\_TW [\#1135](https://github.com/fzaninotto/Faker/pull/1135) ([Dagolin](https://github.com/Dagolin)) +- Updating ninth digit on whole country [\#1132](https://github.com/fzaninotto/Faker/pull/1132) ([gpressutto5](https://github.com/gpressutto5)) +- Indian states added to en\_IN locale [\#1131](https://github.com/fzaninotto/Faker/pull/1131) ([jiveshsg](https://github.com/jiveshsg)) +- Add Text provider for ro\_MD [\#1129](https://github.com/fzaninotto/Faker/pull/1129) ([wecerny](https://github.com/wecerny)) +- Add strict to randomNumber example [\#1124](https://github.com/fzaninotto/Faker/pull/1124) ([leepownall](https://github.com/leepownall)) +- Say Eloquent is supported [\#1123](https://github.com/fzaninotto/Faker/pull/1123) ([guidocella](https://github.com/guidocella)) +- Link Eloquent Populator [\#1120](https://github.com/fzaninotto/Faker/pull/1120) ([guidocella](https://github.com/guidocella)) +- Removed dead code from Luhn.php [\#1118](https://github.com/fzaninotto/Faker/pull/1118) ([Newman101](https://github.com/Newman101)) +- Improve Internet::transliterate performance [\#1112](https://github.com/fzaninotto/Faker/pull/1112) ([dunglas](https://github.com/dunglas)) +- fix typo [\#1109](https://github.com/fzaninotto/Faker/pull/1109) ([johannesnagl](https://github.com/johannesnagl)) +- \[cs\_CZ\] Fixed Czech phone numbers [\#1108](https://github.com/fzaninotto/Faker/pull/1108) ([tomasbedrich](https://github.com/tomasbedrich)) +- Update MasterCard BIN Range [\#1103](https://github.com/fzaninotto/Faker/pull/1103) ([andysnell](https://github.com/andysnell)) +- Add biggest german cities [\#1102](https://github.com/fzaninotto/Faker/pull/1102) ([Konafets](https://github.com/Konafets)) +- Change postal code format for ko\_KR [\#1094](https://github.com/fzaninotto/Faker/pull/1094) ([coozplz](https://github.com/coozplz)) +- Introduced the ability to specify the timezone for dateTimeThis\*\(\) methods [\#1090](https://github.com/fzaninotto/Faker/pull/1090) ([telkins](https://github.com/telkins)) +- Fixed Issue \#1086 [\#1088](https://github.com/fzaninotto/Faker/pull/1088) ([Newman101](https://github.com/Newman101)) +- \[ja\_JP\]kana of Japanese name by gender. [\#1087](https://github.com/fzaninotto/Faker/pull/1087) ([itigoppo](https://github.com/itigoppo)) +- Fix unused code [\#1083](https://github.com/fzaninotto/Faker/pull/1083) ([borgogelli](https://github.com/borgogelli)) +- Amended permissions for en\_GB AddressTest.php [\#1071](https://github.com/fzaninotto/Faker/pull/1071) ([Newman101](https://github.com/Newman101)) +- Ensure unique IDs in randomHtml [\#1068](https://github.com/fzaninotto/Faker/pull/1068) ([vlakoff](https://github.com/vlakoff)) +- Updated \[de\_DE\] city names [\#1067](https://github.com/fzaninotto/Faker/pull/1067) ([plxx](https://github.com/plxx)) +- Update method signature in Generator phpdoc [\#1066](https://github.com/fzaninotto/Faker/pull/1066) ([vlakoff](https://github.com/vlakoff)) +- Add Thai providers [\#1065](https://github.com/fzaninotto/Faker/pull/1065) ([tuwannu](https://github.com/tuwannu)) +- \(Minor\) Fixed the default locale stated in the readme [\#1064](https://github.com/fzaninotto/Faker/pull/1064) ([taylankasap](https://github.com/taylankasap)) +- \[nl\_NL\] Make person provider behave more realistically [\#1061](https://github.com/fzaninotto/Faker/pull/1061) ([curry684](https://github.com/curry684)) +- Add allowDuplicates option to randomElements\(\) [\#1060](https://github.com/fzaninotto/Faker/pull/1060) ([vlakoff](https://github.com/vlakoff)) +- Docblocks: Add some missing @method tags [\#1059](https://github.com/fzaninotto/Faker/pull/1059) ([Kurre](https://github.com/Kurre)) +- \[fi\_FI\] Improve phone number generator [\#1054](https://github.com/fzaninotto/Faker/pull/1054) ([Kurre](https://github.com/Kurre)) +- Add personalIdentityNumber\(\) to fi\_FI/Person.php [\#1053](https://github.com/fzaninotto/Faker/pull/1053) ([oittaa](https://github.com/oittaa)) +- Issue \#1041 [\#1052](https://github.com/fzaninotto/Faker/pull/1052) ([daleattree](https://github.com/daleattree)) +- Update Text.php [\#1051](https://github.com/fzaninotto/Faker/pull/1051) ([gulaandrij](https://github.com/gulaandrij)) +- Fix French phone numbers with 07 prefix [\#1046](https://github.com/fzaninotto/Faker/pull/1046) ([fzaninotto](https://github.com/fzaninotto)) +- \[Generator.php\] mt\_rand\(\) changed in PHP 7.1 [\#1045](https://github.com/fzaninotto/Faker/pull/1045) ([oittaa](https://github.com/oittaa)) +- Add 'FI' to Payment Provider [\#1044](https://github.com/fzaninotto/Faker/pull/1044) ([oittaa](https://github.com/oittaa)) +- Added id number generator to Person Provider for the en\_ZA locale [\#1039](https://github.com/fzaninotto/Faker/pull/1039) ([smithandre](https://github.com/smithandre)) +- \[Feature\] Add nigerian provider [\#1030](https://github.com/fzaninotto/Faker/pull/1030) ([elchroy](https://github.com/elchroy)) +- \[pl\_PL\] Handle state. [\#1029](https://github.com/fzaninotto/Faker/pull/1029) ([piotrooo](https://github.com/piotrooo)) +- Fixed polish text - change '--' into '-'. [\#1027](https://github.com/fzaninotto/Faker/pull/1027) ([piotrooo](https://github.com/piotrooo)) +- Update Text.php [\#1025](https://github.com/fzaninotto/Faker/pull/1025) ([gulaandrij](https://github.com/gulaandrij)) +- Adding Nationalized Citizens to DNI in Person.php [\#1021](https://github.com/fzaninotto/Faker/pull/1021) ([celisflen-bers](https://github.com/celisflen-bers)) +- Add nik to indonesia [\#1019](https://github.com/fzaninotto/Faker/pull/1019) ([Nuffic](https://github.com/Nuffic)) +- fix mb\_substr missing parameter error when generating japanese string with realText method [\#1018](https://github.com/fzaninotto/Faker/pull/1018) ([horan-geeker](https://github.com/horan-geeker)) +- IBAN Formatters for New Locales [\#1015](https://github.com/fzaninotto/Faker/pull/1015) ([okj579](https://github.com/okj579)) +- German Bank Names [\#1014](https://github.com/fzaninotto/Faker/pull/1014) ([okj579](https://github.com/okj579)) +- Adding countries for pl\_PL provider [\#1009](https://github.com/fzaninotto/Faker/pull/1009) ([mertcanesen](https://github.com/mertcanesen)) +- Adding Pattern Lab plugin to list of 3rd party libraries [\#1008](https://github.com/fzaninotto/Faker/pull/1008) ([EvanLovely](https://github.com/EvanLovely)) +- Korea top 100 lastName [\#1006](https://github.com/fzaninotto/Faker/pull/1006) ([tael](https://github.com/tael)) +- Use real Belgian postcodes instead of random number [\#1004](https://github.com/fzaninotto/Faker/pull/1004) ([toonevdb](https://github.com/toonevdb)) +- Add bankAccountNumber implementations [\#1000](https://github.com/fzaninotto/Faker/pull/1000) ([akramfares](https://github.com/akramfares)) +- Generates a random NIR number \(fr\_FR\) [\#997](https://github.com/fzaninotto/Faker/pull/997) ([Ultim4T0m](https://github.com/Ultim4T0m)) +- \#989 Fix country typo [\#996](https://github.com/fzaninotto/Faker/pull/996) ([adriantombu](https://github.com/adriantombu)) +- adding back CNP [\#988](https://github.com/fzaninotto/Faker/pull/988) ([the-noob](https://github.com/the-noob)) +- Fix phpunit tests fail on 64-bit systems \#982 [\#983](https://github.com/fzaninotto/Faker/pull/983) ([Powerhead13](https://github.com/Powerhead13)) +- Remove trailing dot in username if any [\#975](https://github.com/fzaninotto/Faker/pull/975) ([vlakoff](https://github.com/vlakoff)) +- HTML Lorem [\#971](https://github.com/fzaninotto/Faker/pull/971) ([rudkjobing](https://github.com/rudkjobing)) +- Fix a mixup between male and female last names in Icelandic. [\#970](https://github.com/fzaninotto/Faker/pull/970) ([arthur-olafsson](https://github.com/arthur-olafsson)) +- Remove duplicate [\#969](https://github.com/fzaninotto/Faker/pull/969) ([mijgame](https://github.com/mijgame)) +- fix \[zh\_CN\]PhoneNumber illegal operator prefix [\#966](https://github.com/fzaninotto/Faker/pull/966) ([zhwei](https://github.com/zhwei)) +- es\_ES: Generate VAT Number [\#964](https://github.com/fzaninotto/Faker/pull/964) ([miguelgf](https://github.com/miguelgf)) +- Update Image.php [\#963](https://github.com/fzaninotto/Faker/pull/963) ([gulaandrij](https://github.com/gulaandrij)) +- Remove cnp formatter from RO\_ro locale \(fails tests\) [\#962](https://github.com/fzaninotto/Faker/pull/962) ([fzaninotto](https://github.com/fzaninotto)) +- Adding valid en\_GB postcodes [\#961](https://github.com/fzaninotto/Faker/pull/961) ([the-noob](https://github.com/the-noob)) +- Adding Text for ro\_RO [\#959](https://github.com/fzaninotto/Faker/pull/959) ([the-noob](https://github.com/the-noob)) +- Minor: Fixed trailing space in DateTime provider [\#956](https://github.com/fzaninotto/Faker/pull/956) ([tifabien](https://github.com/tifabien)) +- Remove 'Stripper' from en\_US job titles [\#954](https://github.com/fzaninotto/Faker/pull/954) ([amcsi](https://github.com/amcsi)) +- fix 32bits issue [\#953](https://github.com/fzaninotto/Faker/pull/953) ([remicollet](https://github.com/remicollet)) +- Fix EAN8 checkSum generator [\#951](https://github.com/fzaninotto/Faker/pull/951) ([MatthieuMota](https://github.com/MatthieuMota)) +- Fixed description and the use of early undocumented parameters. [\#949](https://github.com/fzaninotto/Faker/pull/949) ([andrey-helldar](https://github.com/andrey-helldar)) +- Pushing new mobile prefixes in philippines [\#944](https://github.com/fzaninotto/Faker/pull/944) ([napoleon101392](https://github.com/napoleon101392)) +- Update Company.php [\#943](https://github.com/fzaninotto/Faker/pull/943) ([thiagotalma](https://github.com/thiagotalma)) +- Fix to Issue \#935 - German Locale [\#936](https://github.com/fzaninotto/Faker/pull/936) ([Newman101](https://github.com/Newman101)) +- el\_CY Locale [\#930](https://github.com/fzaninotto/Faker/pull/930) ([softius](https://github.com/softius)) +- Add phpdoc method dateTimeInInterval in Generator.php [\#926](https://github.com/fzaninotto/Faker/pull/926) ([KeithYeh](https://github.com/KeithYeh)) +- Harmonize fr\_\*\Company [\#918](https://github.com/fzaninotto/Faker/pull/918) ([Max13](https://github.com/Max13)) +- Fix: fix invalid parameter of mb\_substr\(\) [\#917](https://github.com/fzaninotto/Faker/pull/917) ([tkawaji](https://github.com/tkawaji)) +- kk\_KZ Company/person identification numbers unit tests [\#916](https://github.com/fzaninotto/Faker/pull/916) ([YerlenZhubangaliyev](https://github.com/YerlenZhubangaliyev)) +- ka\_GE: overall improvements to ka\_GE locale [\#913](https://github.com/fzaninotto/Faker/pull/913) ([hertzg](https://github.com/hertzg)) +- Fix: Do not pick a random float less than minimum [\#909](https://github.com/fzaninotto/Faker/pull/909) ([localheinz](https://github.com/localheinz)) +- Fix: Prefer dependencies installed from dist [\#908](https://github.com/fzaninotto/Faker/pull/908) ([localheinz](https://github.com/localheinz)) +- Add a building number with letter to German speaking locales. [\#903](https://github.com/fzaninotto/Faker/pull/903) ([markuspoerschke](https://github.com/markuspoerschke)) +- \[RFR\] Remove parts of the hu\_HU address formatters [\#902](https://github.com/fzaninotto/Faker/pull/902) ([fzaninotto](https://github.com/fzaninotto)) +- use Luhn to calculate ar\_SA id numbers. [\#875](https://github.com/fzaninotto/Faker/pull/875) ([FooBarQuaxx](https://github.com/FooBarQuaxx)) +- Fix Doctrine ODM Support [\#489](https://github.com/fzaninotto/Faker/pull/489) ([cbourgois](https://github.com/cbourgois)) + + +## 2016-04-29, v1.6.0 + +- Remove parts of the Hungarian (hu\_HU) address formatters [\#902](https://github.com/fzaninotto/Faker/pull/902) ([fzaninotto](https://github.com/fzaninotto)) +- Renamed norwegian (nb\_NO) locale [\#901](https://github.com/fzaninotto/Faker/pull/901) ([fzaninotto](https://github.com/fzaninotto)) +- Improveed German (de\_DE) titles [\#897](https://github.com/fzaninotto/Faker/pull/897) ([christianbartels](https://github.com/christianbartels)) +- Added VAT formatter to nl\_BE and fr\_BE providers [\#896](https://github.com/fzaninotto/Faker/pull/896) ([anvanza](https://github.com/anvanza)) +- Fixed provider namespace for Lithuanian (lt\_LT) [\#894](https://github.com/fzaninotto/Faker/pull/894) ([sanis](https://github.com/sanis)) +- Removed unnecessary (and incompatible) license from Russian and Ukrainian (uk\_UA & ru\_RU) Text providers [\#892](https://github.com/fzaninotto/Faker/pull/892) ([Newman101](https://github.com/Newman101)) +- Improved `languageCode` formatted to include all ISO-639-1 standard codes [\#889](https://github.com/fzaninotto/Faker/pull/889) ([andrewnicols](https://github.com/andrewnicols)) +- Improved Hungarian provider [\#883](https://github.com/fzaninotto/Faker/pull/883) ([balping](https://github.com/balping)) +- Fixed typo in Austrian Person provider [\#880](https://github.com/fzaninotto/Faker/pull/880) ([xelan](https://github.com/xelan)) +- Added Chines (zh\_CN) `catchPhrase` formatter [\#878](https://github.com/fzaninotto/Faker/pull/878) ([z-song](https://github.com/z-song)) +- Added mention of Brazilian (pt\_BR) providers in readme [\#877](https://github.com/fzaninotto/Faker/pull/877) ([iget-master](https://github.com/iget-master)) +- Updated composer `require` section to allow PHP 7 in safer way [\#874](https://github.com/fzaninotto/Faker/pull/874) ([TomasVotruba](https://github.com/TomasVotruba)) +- Added Greek (el\_GR) `mobilePhoneNumber` and `tollFreeNumber` formatters [\#869](https://github.com/fzaninotto/Faker/pull/869) ([sebdesign](https://github.com/sebdesign)) +- Added Lorempixel check for `ImageTest.php` to avoid test fails when the service is offline [\#866](https://github.com/fzaninotto/Faker/pull/866) ([Newman101](https://github.com/Newman101)) +- Added Chinese (zh\_CN) Providers [\#864](https://github.com/fzaninotto/Faker/pull/864) ([z-song](https://github.com/z-song)) +- Added unit tests for Canadian (en\_CA) provider [\#862](https://github.com/fzaninotto/Faker/pull/862) ([Newman101](https://github.com/Newman101)) +- Added Dutch BTW \(vat\) Number [\#861](https://github.com/fzaninotto/Faker/pull/861) ([LauLaman](https://github.com/LauLaman)) +- Improved Australian (en\_AU) provider [\#858](https://github.com/fzaninotto/Faker/pull/858) ([Newman101](https://github.com/Newman101)) +- Added Propel2 ORM support [\#852](https://github.com/fzaninotto/Faker/pull/852) ([iTechDhaval](https://github.com/iTechDhaval)) +- Added en\_IN unit test for `Address.php` [\#849](https://github.com/fzaninotto/Faker/pull/849) ([Newman101](https://github.com/Newman101)) +- Updated docs to clarify that `randomElements` does not repeat input elements [\#848](https://github.com/fzaninotto/Faker/pull/848) ([sustmi](https://github.com/sustmi)) +- Optimized Taiwanese (zh\_TW) `realText` provider [\#844](https://github.com/fzaninotto/Faker/pull/844) ([Newman101](https://github.com/Newman101)) +- Added more Iranian (fa\_IR) TLDs [\#843](https://github.com/fzaninotto/Faker/pull/843) ([VagrantStory](https://github.com/VagrantStory)) +- Added Hebrew (he\_IL) `country` formatter [\#841](https://github.com/fzaninotto/Faker/pull/841) ([yonirom](https://github.com/yonirom)) +- Documented `boolean` formatter [\#840](https://github.com/fzaninotto/Faker/pull/840) ([danieliancu](https://github.com/danieliancu)) +- Fixed modifiers anchor readme [\#838](https://github.com/fzaninotto/Faker/pull/838) ([danieliancu](https://github.com/danieliancu)) +- Added Dutch (nl\_NL) real text provider [\#837](https://github.com/fzaninotto/Faker/pull/837) ([endroid](https://github.com/endroid)) +- Added `valid` modifier [\#836](https://github.com/fzaninotto/Faker/pull/836) ([fzaninotto](https://github.com/fzaninotto)) +- Added Iranian (fa\_IR) `PhoneNumber` provider [\#833](https://github.com/fzaninotto/Faker/pull/833) ([ghost](https://github.com/ghost)) +- Add Brazilian (pt\_BR) `region` and `regionAbbr` formatters [\#828](https://github.com/fzaninotto/Faker/pull/828) ([francinaldo](https://github.com/francinaldo)) +- Improved Austrian (de\_AT) names, states, and realtext [\#826](https://github.com/fzaninotto/Faker/pull/826) ([Findus23](https://github.com/Findus23)) +- Improved German (de\_DE) names [\#825](https://github.com/fzaninotto/Faker/pull/825) ([Findus23](https://github.com/Findus23)) +- Improved Latvian (lv\_LV) first names [\#823](https://github.com/fzaninotto/Faker/pull/823) ([veisis](https://github.com/veisis)) +- Improved Latvian (lv\_LV) `phoneNumber` formatter [\#822](https://github.com/fzaninotto/Faker/pull/822) ([veisis](https://github.com/veisis)) +- Updated phpDoc link to IBAN format reference in `Payment` provider [\#821](https://github.com/fzaninotto/Faker/pull/821) ([god107](https://github.com/god107)) +- Updated Sport ORM populator to populate values for numeric fields [\#820](https://github.com/fzaninotto/Faker/pull/820) ([urisavka](https://github.com/urisavka)) +- Updated Chinese (zh\_CN) operators' phone number prefix. [\#819](https://github.com/fzaninotto/Faker/pull/819) ([vistart](https://github.com/vistart)) +- Optimized Spot ORM `EntityPopulator` [\#817](https://github.com/fzaninotto/Faker/pull/817) ([Newman101](https://github.com/Newman101)) +- Added Korean (ko\_KR) `realText` formatter [\#815](https://github.com/fzaninotto/Faker/pull/815) ([jdssem](https://github.com/jdssem)) +- Updated `imageUrl` formatter phpDoc [\#814](https://github.com/fzaninotto/Faker/pull/814) ([jonwurtzler](https://github.com/jonwurtzler)) +- Optimized Taiwanese (zh\_TW) text provider [\#809](https://github.com/fzaninotto/Faker/pull/809) ([BePsvPT](https://github.com/BePsvPT)) +- Added strict comparison to Czech (cs\_CS) `birthNumber` formatter [\#807](https://github.com/fzaninotto/Faker/pull/807) ([Newman101](https://github.com/Newman101)) +- Added Greek (el\_GR) `realText` formatter [\#805](https://github.com/fzaninotto/Faker/pull/805) ([hootlex](https://github.com/hootlex)) +- Added Simplified Chinese \(zh\_CN\) `state` and `stateAbbr` formatters [\#804](https://github.com/fzaninotto/Faker/pull/804) ([zhanghuanchong](https://github.com/zhanghuanchong)) +- Update `Image` provider to allow generation of grayscale images [\#801](https://github.com/fzaninotto/Faker/pull/801) ([neutralrockets](https://github.com/neutralrockets)) +- Fixed Taiwanese (zh_TW) incorrect `mb_substr()` arguments [\#799](https://github.com/fzaninotto/Faker/pull/799) ([BePsvPT](https://github.com/BePsvPT)) +- Added Spot ORM populator [\#796](https://github.com/fzaninotto/Faker/pull/796) ([urisavka](https://github.com/urisavka)) +- Added Italian (it\_IT) `vatId` and `taxId` formatters [\#790](https://github.com/fzaninotto/Faker/pull/790) ([brainrepo](https://github.com/brainrepo)) +- Added some fixes to Armenian (hy\_AM) locale [\#788](https://github.com/fzaninotto/Faker/pull/788) ([mhamlet](https://github.com/mhamlet)) +- Removed duplicate entries in `toAscii()` transliteration table, used in `Internet` provider [\#787](https://github.com/fzaninotto/Faker/pull/787) ([vlakoff](https://github.com/vlakoff)) +- Added Indian (en\_IN) providers [\#785](https://github.com/fzaninotto/Faker/pull/785) ([kartiksomani](https://github.com/kartiksomani)) +- Removed duplicate country names in various locales, removed non-random country arrays [\#784](https://github.com/fzaninotto/Faker/pull/784) ([fzaninotto](https://github.com/fzaninotto)) +- Improved Swiss (de\_CH) phone numbers [\#782](https://github.com/fzaninotto/Faker/pull/782) ([z38](https://github.com/z38)) +- Added Swiss (de\_CH) names [\#781](https://github.com/fzaninotto/Faker/pull/781) ([z38](https://github.com/z38)) +- Make capitalization of first word optional in Text Provider [\#778](https://github.com/fzaninotto/Faker/pull/778) ([LagunaJavier](https://github.com/LagunaJavier)) +- Added Georgian (ka\_GE) providers [\#777](https://github.com/fzaninotto/Faker/pull/777) ([akalongman](https://github.com/akalongman)) +- Fix CakePHP populator [\#776](https://github.com/fzaninotto/Faker/pull/776) ([daniel-mueller](https://github.com/daniel-mueller)) +- Added unit tests for `Address` provider in many locales [\#775](https://github.com/fzaninotto/Faker/pull/775) [\#773](https://github.com/fzaninotto/Faker/pull/773) [\#772](https://github.com/fzaninotto/Faker/pull/772) [\#767](https://github.com/fzaninotto/Faker/pull/767) [\#765](https://github.com/fzaninotto/Faker/pull/765) [\#764](https://github.com/fzaninotto/Faker/pull/764) [\#758](https://github.com/fzaninotto/Faker/pull/758) [\#756](https://github.com/fzaninotto/Faker/pull/756) [\#747](https://github.com/fzaninotto/Faker/pull/747) [\#741](https://github.com/fzaninotto/Faker/pull/741) ([Newman101](https://github.com/Newman101)) +- Added `dbi` formatter to Spanish (es\_ES) Person provider [\#763](https://github.com/fzaninotto/Faker/pull/763) ([mikk150](https://github.com/mikk150)) +- Added South Africa (en\_ZA) locale [\#761](https://github.com/fzaninotto/Faker/pull/761) ([smithandre](https://github.com/smithandre)) [\#760](https://github.com/fzaninotto/Faker/pull/760) ([smithandre](https://github.com/smithandre)) [\#759](https://github.com/fzaninotto/Faker/pull/759) ([smithandre](https://github.com/smithandre)) +- Added E.164 phone number generator [\#753](https://github.com/fzaninotto/Faker/pull/753) ([daleattree](https://github.com/daleattree)) +- Fixed serialization issue in `unique` modifier [\#749](https://github.com/fzaninotto/Faker/pull/749) ([EmanueleMinotto](https://github.com/EmanueleMinotto)) +- Added Switzerland (de\_CH, fr\_CH, it\_CH) providers [\#739](https://github.com/fzaninotto/Faker/pull/739) ([r3h6](https://github.com/r3h6)) +- Added PHPDocs, removed unused variable [\#738](https://github.com/fzaninotto/Faker/pull/738) ([daniel-mueller](https://github.com/daniel-mueller)) +- Fixed building numbers to have non-zero first bumber [\#737](https://github.com/fzaninotto/Faker/pull/737) ([jmauerhan](https://github.com/jmauerhan)) +- Updated ninth digit for Brazilian cell phone numbers [\#734](https://github.com/fzaninotto/Faker/pull/734) ([igorsantos07](https://github.com/igorsantos07)) +- Simplified Factory code [\#732](https://github.com/fzaninotto/Faker/pull/732) ([vlakoff](https://github.com/vlakoff)) +- Added mention of [images-generator](https://github.com/bruceheller/images-generator) in readme [\#731](https://github.com/fzaninotto/Faker/pull/731) ([bruceheller](https://github.com/bruceheller)) +- Optimize Internet::toAscii\(\) by using a static cache and translitteration [\#730](https://github.com/fzaninotto/Faker/pull/730) [\#729](https://github.com/fzaninotto/Faker/pull/729) +[\#725](https://github.com/fzaninotto/Faker/pull/725) [\#724](https://github.com/fzaninotto/Faker/pull/724) ([vlakoff](https://github.com/vlakoff)) +- Added more English (en\_GB) Phone Number formats [\#721](https://github.com/fzaninotto/Faker/pull/721) ([nickwebcouk](https://github.com/nickwebcouk)) +- Cleaned up `use` statements across the code [\#719](https://github.com/fzaninotto/Faker/pull/719) ([pomaxa](https://github.com/pomaxa)) +- Fixed CackePHP populator [\#718](https://github.com/fzaninotto/Faker/pull/718) ([sdustinh](https://github.com/sdustinh)) +- Cleaned up various phpmd notices [\#715](https://github.com/fzaninotto/Faker/pull/715) ([pomaxa](https://github.com/pomaxa)) +- Added `Color` provider to Latvian (lv_LV) locale [\#714](https://github.com/fzaninotto/Faker/pull/714) ([pomaxa](https://github.com/pomaxa)) +- Fixed bad randomization in Doctrine populator [\#713](https://github.com/fzaninotto/Faker/pull/713) ([pomaxa](https://github.com/pomaxa)) +- Added Mongolian (mn\_MN) providers [\#709](https://github.com/fzaninotto/Faker/pull/709) ([selmonal](https://github.com/selmonal)) +- Improved Australian (en\_AU) `postcode` formatter [\#703](https://github.com/fzaninotto/Faker/pull/703) ([xfxf](https://github.com/xfxf)) +- Added support for asterisks in `bothify` and `optimize` [\#701](https://github.com/fzaninotto/Faker/pull/701) ([nineinchnick](https://github.com/nineinchnick)) +- Fixed important distinction between ORM and database framework in README’s reference to an external Faker provider for POMM that I have never even tested. Anyway, POMM is highly recommended if you are a Postgres fan, or if you want to please Grégoire and help him finish his lifelong project of listening to music on a hi-fi audio equipment he built from his own hands [\#696](https://github.com/fzaninotto/Faker/pull/696) ([chanmix51](https://github.com/chanmix51)) +- Fixed example `text()` output in README [\#694](https://github.com/fzaninotto/Faker/pull/694) ([vlakoff](https://github.com/vlakoff)) +- Added mention of CakePHP 2.x Seeder Plugin to readme [\#691](https://github.com/fzaninotto/Faker/pull/691) ([ravage84](https://github.com/ravage84)) +- Fixed invalid email bug for Korean (ko\_KR) [\#690](https://github.com/fzaninotto/Faker/pull/690) ([pearlc](https://github.com/pearlc)) +- Removed an invalid Dutch (nl\_NL) lastname that breaks email generator [\#689](https://github.com/fzaninotto/Faker/pull/689) ([SpaceK33z](https://github.com/SpaceK33z)) +- Updated `numberBetween()` to be order agnostic [\#683](https://github.com/fzaninotto/Faker/pull/683) ([xfxf](https://github.com/xfxf)) +- Added several English (en\_US) bank-related formatters [\#682](https://github.com/fzaninotto/Faker/pull/682) ([okj579](https://github.com/okj579)) +- Fixed `ipv4` formatter to avoid generating special purpose addresses [\#681](https://github.com/fzaninotto/Faker/pull/681) ([ravage84](https://github.com/ravage84)) +- Moved `intl` extension to `require-dev` in `composer.json` file [\#680](https://github.com/fzaninotto/Faker/pull/680) ([jaschweder](https://github.com/jaschweder)) +- Added more Turkish (tr\_TR) phones number formats [\#678](https://github.com/fzaninotto/Faker/pull/678) ([Quanthir](https://github.com/Quanthir)) +- Fixed primary Key warning in CakePHP ORM populator [\#677](https://github.com/fzaninotto/Faker/pull/677) ([davidyell](https://github.com/davidyell)) +- Added time zone support for provider methods returning DateTime instance [\#675](https://github.com/fzaninotto/Faker/pull/675) ([bishopb](https://github.com/bishopb)) +- Removed trailing spaces from some Argentinian (es\_AR) female first names [\#674](https://github.com/fzaninotto/Faker/pull/674) ([ivanmirson](https://github.com/ivanmirson)) +- Added Lithuanian (lt\_LT) locale [\#673](https://github.com/fzaninotto/Faker/pull/673) ([ekateiva](https://github.com/ekateiva)) +- Added mention of Alice to readme [\#665](https://github.com/fzaninotto/Faker/pull/665) ([Seldaek](https://github.com/Seldaek)) +- Fixed namespace in tests [\#663](https://github.com/fzaninotto/Faker/pull/663) ([localheinz](https://github.com/localheinz)) +- Fixed trailing spaces in `Color` provider [\#662](https://github.com/fzaninotto/Faker/pull/662) ([apsylone](https://github.com/apsylone)) +- Removed duplicate country names in Russian (ru\_RU) `Address` provider [\#659](https://github.com/fzaninotto/Faker/pull/659) ([nurolopher](https://github.com/nurolopher)) +- Added `rgba` formatter to `Color` provider [\#653](https://github.com/fzaninotto/Faker/pull/653) ([apsylone](https://github.com/apsylone)) +- Fixed bad randomization in CakePHP populator [\#648](https://github.com/fzaninotto/Faker/pull/648) ([jadb](https://github.com/jadb)) +- Updated phpunit configuration to better use colors [\#643](https://github.com/fzaninotto/Faker/pull/643) ([localheinz](https://github.com/localheinz)) +- Updated `makefile` to install dev dependencies by default [\#642](https://github.com/fzaninotto/Faker/pull/642) ([localheinz](https://github.com/localheinz)) +- Updated Travis configuration to cache dependencies between builds [\#641](https://github.com/fzaninotto/Faker/pull/641) ([localheinz](https://github.com/localheinz)) +- Added SVG badge to readme for displaying Travis build status [\#640](https://github.com/fzaninotto/Faker/pull/640) ([localheinz](https://github.com/localheinz)) +- Added Croatian (hr\_HR) locale [\#638](https://github.com/fzaninotto/Faker/pull/638) ([toniperic](https://github.com/toniperic)) +- Updated `dateTimeBetween` PHPDoc [\#635](https://github.com/fzaninotto/Faker/pull/635) ([theofidry](https://github.com/theofidry)) +- Add mention of Symfony2 bundles in readme [\#634](https://github.com/fzaninotto/Faker/pull/634) ([theofidry](https://github.com/theofidry)) +- Added Hebrew (he\_IL) locale [\#633](https://github.com/fzaninotto/Faker/pull/633) ([yonirom](https://github.com/yonirom)) +- Updated `seed` to accept non-integer seeds [\#632](https://github.com/fzaninotto/Faker/pull/632) ([theofidry](https://github.com/theofidry)) +- Added DocBlock to `Factory::create()` [\#631](https://github.com/fzaninotto/Faker/pull/631) ([tonynelson19](https://github.com/tonynelson19)) +- Added `jobTitle` generator [\#630](https://github.com/fzaninotto/Faker/pull/630) ([gregoryduckworth](https://github.com/gregoryduckworth)) +- Updated Chinese (zh\_CN) `Person` provider to generate more correct names [\#628](https://github.com/fzaninotto/Faker/pull/628) ([phoenixgao](https://github.com/phoenixgao)) +- Updated Brazilian (pt\_BR) `cellphone` formatter to make it more flexible [\#623](https://github.com/fzaninotto/Faker/pull/623) ([igorsantos07](https://github.com/igorsantos07)) +- Add Arabic for Saudi Arabia (ar\_SA) locale [\#618](https://github.com/fzaninotto/Faker/pull/618) ([ibrasho](https://github.com/ibrasho)) +- Updated en\_US phone numbers [\#615](https://github.com/fzaninotto/Faker/pull/615) ([okj579](https://github.com/okj579)) +- Fixed typos in variable names and exceptions [\#614](https://github.com/fzaninotto/Faker/pull/614) ([pborreli](https://github.com/pborreli)) +- Added a table of contents to the readme file. [\#613](https://github.com/fzaninotto/Faker/pull/613) ([camilopayan](https://github.com/camilopayan)) +- Added Brazilian (es_BR) credit card formatters [\#608](https://github.com/fzaninotto/Faker/pull/608) ([igorsantos07](https://github.com/igorsantos07)) +- Updated `iban` formatter to be cross-locale [\#607](https://github.com/fzaninotto/Faker/pull/607) ([okj579](https://github.com/okj579)) +- Improved ORM name guesser logic [\#606](https://github.com/fzaninotto/Faker/pull/606) ([watermanio](https://github.com/watermanio)) +- Fixed doc typo [\#605](https://github.com/fzaninotto/Faker/pull/605) ([igorsantos07](https://github.com/igorsantos07)) +- Removed executable bits [\#593](https://github.com/fzaninotto/Faker/pull/593) ([siwinski](https://github.com/siwinski)) +- Fixed `iban` generator [\#590](https://github.com/fzaninotto/Faker/pull/590) ([okj579](https://github.com/okj579)) +- Added Philippines (en\_PH) `mobileNumber` formatter [\#589](https://github.com/fzaninotto/Faker/pull/589) ([lozadaOmr](https://github.com/lozadaOmr)) +- Added support for min / max params in `latitude` and `longitude` formatters [\#570](https://github.com/fzaninotto/Faker/pull/570) ([actuallymab](https://github.com/actuallymab)) +- Added Czech (cs_CZ) `birthNumber` formatter [\#535](https://github.com/fzaninotto/Faker/pull/535) ([tomasbedrich](https://github.com/tomasbedrich)) +- Added `dateTimeInInterval` formatter [\#526](https://github.com/fzaninotto/Faker/pull/526) ([nicodmf](https://github.com/nicodmf)) +- Updated `optional` and `boolean` apis to be more consistent [\#513](https://github.com/fzaninotto/Faker/pull/513) ([EmanueleMinotto](https://github.com/EmanueleMinotto)) +- Added Greek (el\_GR) `Address` provider [\#504](https://github.com/fzaninotto/Faker/pull/504) ([drakakisgeo](https://github.com/drakakisgeo)) + +## 2015-05-29, v1.5.0 * Added ability to print custom text on the images fetched by the Image provider [\#583](https://github.com/fzaninotto/Faker/pull/583) ([fzaninotto](https://github.com/fzaninotto)) -* Fixed typos in Preuvian (es\_PE) Person provider [\#581](https://github.com/fzaninotto/Faker/pull/581) [\#580](https://github.com/fzaninotto/Faker/pull/580) ([ysramirez](https://github.com/ysramirez)) +* Fixed typos in Peruvian (es\_PE) Person provider [\#581](https://github.com/fzaninotto/Faker/pull/581) [\#580](https://github.com/fzaninotto/Faker/pull/580) ([ysramirez](https://github.com/ysramirez)) * Added instructions for installing with composer to readme.md [\#572](https://github.com/fzaninotto/Faker/pull/572) ([totophe](https://github.com/totophe)) * Added Kazakh (kk\_KZ) locale [\#569](https://github.com/fzaninotto/Faker/pull/569) ([YerlenZhubangaliyev](https://github.com/YerlenZhubangaliyev)) * Added Korean (ko\_KR) locale [\#566](https://github.com/fzaninotto/Faker/pull/566) ([pearlc](https://github.com/pearlc)) @@ -112,8 +567,7 @@ CHANGELOG * Added English for New Zealand (en\_NZ) locale [\#283](https://github.com/fzaninotto/Faker/pull/283) ([JasonMortonNZ](https://github.com/JasonMortonNZ)) * Added mention of external Provider for cron expressions to readme[\#498](https://github.com/fzaninotto/Faker/pull/498) ([swekaj](https://github.com/swekaj)) -2014-06-04, v1.4.0 ------------------- +## 2014-06-04, v1.4.0 * Fixed typo in Slovak person names (cinan) * Added tests for uk_UA providers (serge-kuharev) @@ -176,8 +630,7 @@ CHANGELOG * Added 'kana' (ja_JP) name formatters (kzykhys) * Added allow_failure for hhvm to travis-ci and test against php 5.5 (toin0u) -2013-12-16, v1.3.0 ------------------- +## 2013-12-16, v1.3.0 * Fixed state generator in Australian (en_AU) provider (sebklaus) * Fixed IDE insights for locale specific providers (ulrikjohansson) @@ -224,9 +677,7 @@ CHANGELOG * Added Color provider with hexColor, rgbColor, rgbColorAsArray, rgbCssColor, safeColorName, and colorName formatters (lsv) * Added support for associative arrays in `randomElement` (aRn0D) - -2013-06-09, v1.2.0 ------------------- +## 2013-06-09, v1.2.0 * Added new provider for fr_BE locale (jflefebvre) * Updated locale provider to use a static locale list (spawn-guy) @@ -271,8 +722,7 @@ CHANGELOG * Fixed bug in Doctrine EntityPopulator (beberlei) * Added Finnish (fi_FI) provider (drodil) -2012-10-29, v1.1.0 ------------------- +## 2012-10-29, v1.1.0 * Updated text provider to return paragraphs as a string instead of array. Great for populating markdown textarea fields (Seldaek) * Updated dateTimeBetween to accept DateTime instances (Seldaek) @@ -289,7 +739,6 @@ CHANGELOG * Added latitude and longitude formatters to Address provider (fixe) * Added Serbian provider (umpirsky) -2012-07-10, v1.0.0 ------------------ +## 2012-07-10, v1.0.0 * Initial Version diff --git a/api/vendor/fzaninotto/faker/CONTRIBUTING.md b/api/vendor/fzaninotto/faker/CONTRIBUTING.md deleted file mode 100644 index 804bf79..0000000 --- a/api/vendor/fzaninotto/faker/CONTRIBUTING.md +++ /dev/null @@ -1,22 +0,0 @@ -Contributing -============ - -If you've written a new formatter, adapted Faker to a new locale, or fixed a bug, your contribution is welcome! - -Before proposing a pull request, check the following: - -* Your code should follow the [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). Run `make sniff` to check that the coding standards are followed, and use [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) to fix inconsistencies. -* Unit tests should still pass after your patch. Run the tests on your dev server (with `make test`) or check the continuous integration status for your pull request. -* As much as possible, add unit tests for your code -* Never use `rand()` in your providers. Faker uses the Mersenne Twister Randomizer, so use `mt_rand()` or any of the base generators (`randomNumber`, `randomElement`, etc.) instead. -* If you add new providers (or new locales) and that they embed a lot of data for random generation (e.g. first names in a new language), please add a `@link` to the reference you used for this list (example [in the ru_RU locale](https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/ru_RU/Person.php#L13)). This will ease future updates of the list and debates about the most relevant data for this provider. -* If you add long list of random data, please split the list into several lines. This makes diffs easier to read, and facilitates core review. -* If you add new formatters, please include documentation for it in the README. Don't forget to add a line about new formatters in the `@property` or `@method` phpDoc entries in [Generator.php](https://github.com/fzaninotto/Faker/blob/master/src/Faker/Generator.php#L6-L118) to help IDEs auto-complete your formatters. -* If your new formatters are specific to a certain locale, document them in the [Language-specific formatters](https://github.com/fzaninotto/Faker#language-specific-formatters) list instead. -* Avoid changing existing sets of data. Some developers use Faker with seeding for unit tests ; changing the data makes their tests fail. -* Speed is important in all Faker usages. Make sure your code is optimized to generate thousands of fake items in no time, without consuming too much memory or CPU. -* If you commit a new feature, be prepared to help maintaining it. Watch the project on GitHub, and please comment on issues or PRs regarding the feature you contributed. - -Once your code is merged, it is available for free to everybody under the MIT License. Publishing your Pull Request on the Faker GitHub repository means that you agree with this license for your contribution. - -Thank you for your contribution! Faker wouldn't be so great without you. diff --git a/api/vendor/fzaninotto/faker/Makefile b/api/vendor/fzaninotto/faker/Makefile deleted file mode 100644 index ad0bb40..0000000 --- a/api/vendor/fzaninotto/faker/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -vendor/autoload.php: - composer install --no-interaction --prefer-source - -.PHONY: sniff -sniff: vendor/autoload.php - vendor/bin/phpcs --standard=PSR2 src -n - -.PHONY: test -test: vendor/autoload.php - vendor/bin/phpunit --verbose diff --git a/api/vendor/fzaninotto/faker/composer.json b/api/vendor/fzaninotto/faker/composer.json index 1bf3497..acf673e 100644 --- a/api/vendor/fzaninotto/faker/composer.json +++ b/api/vendor/fzaninotto/faker/composer.json @@ -2,7 +2,11 @@ "name": "fzaninotto/faker", "type": "library", "description": "Faker is a PHP library that generates fake data for you.", - "keywords": ["faker", "fixtures", "data"], + "keywords": [ + "faker", + "fixtures", + "data" + ], "license": "MIT", "authors": [ { @@ -10,12 +14,12 @@ } ], "require": { - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5", - "ext-intl": "*" + "ext-intl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^2.9.2" }, "autoload": { "psr-4": { @@ -29,7 +33,10 @@ }, "extra": { "branch-alias": { - "dev-master": "1.6.0" + "dev-master": "1.9-dev" } + }, + "config": { + "sort-packages": true } } diff --git a/api/vendor/fzaninotto/faker/phpunit.xml.dist b/api/vendor/fzaninotto/faker/phpunit.xml.dist deleted file mode 100644 index 4ffa17f..0000000 --- a/api/vendor/fzaninotto/faker/phpunit.xml.dist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - ./test/Faker/ - - - diff --git a/api/vendor/fzaninotto/faker/readme.md b/api/vendor/fzaninotto/faker/readme.md index ccb47f4..1c0659c 100644 --- a/api/vendor/fzaninotto/faker/readme.md +++ b/api/vendor/fzaninotto/faker/readme.md @@ -1,5 +1,7 @@ # Faker +[![Code Coverage](https://codecov.io/gh/fzaninotto/Faker/branch/master/graph/badge.svg)](https://codecov.io/gh/fzaninotto/Faker) + Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. Faker is heavily inspired by Perl's [Data::Faker](http://search.cpan.org/~jasonk/Data-Faker-0.07/), and by ruby's [Faker](https://rubygems.org/gems/faker). @@ -31,6 +33,7 @@ Faker requires PHP >= 5.3.3. - [Barcode](#fakerproviderbarcode) - [Miscellaneous](#fakerprovidermiscellaneous) - [Biased](#fakerproviderbiased) + - [Html Lorem](#fakerproviderhtmllorem) - [Modifiers](#modifiers) - [Localization](#localization) - [Populating Entities Using an ORM or an ODM](#populating-entities-using-an-orm-or-an-odm) @@ -50,14 +53,29 @@ composer require fzaninotto/faker ## Basic Usage +### Autoloading + +Faker supports both `PSR-0` as `PSR-4` autoloaders. +```php +name` yields ```php name, "\n"; } // Adaline Reichel @@ -102,8 +120,9 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle ### `Faker\Provider\Base` randomDigit // 7 + randomDigitNot(5) // 0, 1, 2, 3, 4, 6, 7, 8, or 9 randomDigitNotNull // 5 - randomNumber($nbDigits = NULL) // 79907610 + randomNumber($nbDigits = NULL, $strict = false) // 79907610 randomFloat($nbMaxDecimals = NULL, $min = 0, $max = NULL) // 48.8932 numberBetween($min = 1000, $max = 9000) // 8567 randomLetter // 'b' @@ -179,17 +198,17 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle ### `Faker\Provider\DateTime` unixTime($max = 'now') // 58781813 - dateTime($max = 'now', $timezone = date_default_timezone_get()) // DateTime('2008-04-25 08:37:17', 'UTC') - dateTimeAD($max = 'now', $timezone = date_default_timezone_get()) // DateTime('1800-04-29 20:38:49', 'Europe/Paris') + dateTime($max = 'now', $timezone = null) // DateTime('2008-04-25 08:37:17', 'UTC') + dateTimeAD($max = 'now', $timezone = null) // DateTime('1800-04-29 20:38:49', 'Europe/Paris') iso8601($max = 'now') // '1978-12-09T10:10:29+0000' date($format = 'Y-m-d', $max = 'now') // '1979-06-09' time($format = 'H:i:s', $max = 'now') // '20:49:42' - dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = date_default_timezone_get()) // DateTime('2003-03-15 02:00:49', 'Africa/Lagos') - dateTimeInInterval($startDate = '-30 years', $interval = '+ 5 days', $timezone = date_default_timezone_get()) // DateTime('2003-03-15 02:00:49', 'Antartica/Vostok') - dateTimeThisCentury($max = 'now') // DateTime('1915-05-30 19:28:21') - dateTimeThisDecade($max = 'now') // DateTime('2007-05-29 22:30:48') - dateTimeThisYear($max = 'now') // DateTime('2011-02-27 20:52:14') - dateTimeThisMonth($max = 'now') // DateTime('2011-10-23 13:46:23') + dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null) // DateTime('2003-03-15 02:00:49', 'Africa/Lagos') + dateTimeInInterval($startDate = '-30 years', $interval = '+ 5 days', $timezone = null) // DateTime('2003-03-15 02:00:49', 'Antartica/Vostok') + dateTimeThisCentury($max = 'now', $timezone = null) // DateTime('1915-05-30 19:28:21', 'UTC') + dateTimeThisDecade($max = 'now', $timezone = null) // DateTime('2007-05-29 22:30:48', 'Europe/Paris') + dateTimeThisYear($max = 'now', $timezone = null) // DateTime('2011-02-27 20:52:14', 'Africa/Lagos') + dateTimeThisMonth($max = 'now', $timezone = null) // DateTime('2011-10-23 13:46:23', 'Antarctica/Vostok') amPm($max = 'now') // 'pm' dayOfMonth($max = 'now') // '04' dayOfWeek($max = 'now') // 'Friday' @@ -199,6 +218,8 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle century // 'VI' timezone // 'Europe/Paris' +Methods accepting a `$timezone` argument default to `date_default_timezone_get()`. You can pass a custom timezone string to each method, or define a custom timezone for all time methods at once using `$faker::setDefaultTimezone($timezone)`. + ### `Faker\Provider\Internet` email // 'tkshlerin@collins.com' @@ -247,6 +268,8 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle rgbCssColor // 'rgb(0,255,122)' safeColorName // 'fuchsia' colorName // 'Gainsbor' + hslColor // '340,50,20' + hslColorAsArray // array(340,50,20) ### `Faker\Provider\File` @@ -262,9 +285,12 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle imageUrl($width = 640, $height = 480) // 'http://lorempixel.com/640/480/' imageUrl($width, $height, 'cats') // 'http://lorempixel.com/800/600/cats/' imageUrl($width, $height, 'cats', true, 'Faker') // 'http://lorempixel.com/800/400/cats/Faker' + imageUrl($width, $height, 'cats', true, 'Faker', true) // 'http://lorempixel.com/gray/800/400/cats/Faker/' Monochrome image image($dir = '/tmp', $width = 640, $height = 480) // '/tmp/13b73edae8443990be1aa8f1a483bc27.jpg' image($dir, $width, $height, 'cats') // 'tmp/13b73edae8443990be1aa8f1a483bc27.jpg' it's a cat! - image($dir, $width, $height, 'cats', true, 'Faker') // 'tmp/13b73edae8443990be1aa8f1a483bc27.jpg' it's a cat with Faker text + image($dir, $width, $height, 'cats', false) // '13b73edae8443990be1aa8f1a483bc27.jpg' it's a filename without path + image($dir, $width, $height, 'cats', true, false) // it's a no randomize images (default: `true`) + image($dir, $width, $height, 'cats', true, true, 'Faker') // 'tmp/13b73edae8443990be1aa8f1a483bc27.jpg' it's a cat with 'Faker' text. Default, `null`. ### `Faker\Provider\Uuid` @@ -288,6 +314,7 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle countryCode // UK languageCode // en currencyCode // EUR + emoji // 😁 ### `Faker\Provider\Biased` @@ -295,6 +322,11 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle // with more chances to be close to 20 biasedNumberBetween($min = 10, $max = 20, $function = 'sqrt') +### `Faker\Provider\HtmlLorem` + + //Generate HTML document which is no more than 2 levels deep, and no more than 3 elements wide at any level. + randomHtml(2,3) // Aut illo dolorem et accusantium eum.
    Id aut saepe non mollitia voluptas voluptas.Non consequatur.Incidunt est.Aut voluptatem.Officia voluptas rerum quo.Asperiores similique.
    Sapiente dolorum dolorem sint laboriosam commodi qui.Commodi nihil nesciunt eveniet quo repudiandae.Voluptates explicabo numquam distinctio necessitatibus repellat.Provident ut doloremque nam eum modi aspernatur.Iusto inventore.
    Animi nihil ratione id mollitia libero ipsa quia tempore.Velit est officia et aut tenetur dolorem sed mollitia expedita.Modi modi repudiandae pariatur voluptas rerum ea incidunt non molestiae eligendi eos deleniti.Exercitationem voluptatibus dolor est iste quod molestiae.Quia reiciendis.
    Inventore impedit exercitationem voluptatibus rerum cupiditate.Qui.Aliquam.Autem nihil aut et.Dolor ut quia error.
    Enim facilis iusto earum et minus rerum assumenda quis quia.Reprehenderit ut sapiente occaecati voluptatum dolor voluptatem vitae qui velit.Quod fugiat non.Sunt nobis totam mollitia sed nesciunt est deleniti cumque.Repudiandae quo.
    Modi dicta libero quisquam doloremque qui autem.Voluptatem aliquid saepe laudantium facere eos sunt dolor.Est eos quis laboriosam officia expedita repellendus quia natus.Et neque delectus quod fugit enim repudiandae qui.Fugit soluta sit facilis facere repellat culpa magni voluptatem maiores tempora.
    Enim dolores doloremque.Assumenda voluptatem eum perferendis exercitationem.Quasi in fugit deserunt ea perferendis sunt nemo consequatur dolorum soluta.Maxime repellat qui numquam voluptatem est modi.Alias rerum rerum hic hic eveniet.
    Tempore voluptatem.Eaque.Et sit quas fugit iusto.Nemo nihil rerum dignissimos et esse.Repudiandae ipsum numquam.
    Nemo sunt quia.Sint tempore est neque ducimus harum sed.Dicta placeat atque libero nihil.Et qui aperiam temporibus facilis eum.Ut dolores qui enim et maiores nesciunt.
    Dolorum totam sint debitis saepe laborum.Quidem corrupti ea.Cum voluptas quod.Possimus consequatur quasi dolorem ut et.Et velit non hic labore repudiandae quis.
    + ## Modifiers Faker provides three special providers, `unique()`, `optional()`, and `valid()`, to be called before any provider. @@ -302,7 +334,7 @@ Faker provides three special providers, `unique()`, `optional()`, and `valid()`, ```php // unique() forces providers to return unique values $values = array(); -for ($i=0; $i < 10; $i++) { +for ($i = 0; $i < 10; $i++) { // get a random digit, but always a new one, to avoid duplicates $values []= $faker->unique()->randomDigit; } @@ -311,7 +343,7 @@ print_r($values); // [4, 1, 8, 5, 0, 2, 6, 9, 7, 3] // providers with a limited range will throw an exception when no new unique value can be generated $values = array(); try { - for ($i=0; $i < 10; $i++) { + for ($i = 0; $i < 10; $i++) { $values []= $faker->unique()->randomDigitNotNull; } } catch (\OverflowException $e) { @@ -324,7 +356,7 @@ $faker->unique($reset = true)->randomDigitNotNull; // will not throw OverflowExc // optional() sometimes bypasses the provider to return a default value instead (which defaults to NULL) $values = array(); -for ($i=0; $i < 10; $i++) { +for ($i = 0; $i < 10; $i++) { // get a random digit, but also null sometimes $values []= $faker->optional()->randomDigit; } @@ -345,7 +377,7 @@ $values = array(); $evenValidator = function($digit) { return $digit % 2 === 0; }; -for ($i=0; $i < 10; $i++) { +for ($i = 0; $i < 10; $i++) { $values []= $faker->valid($evenValidator)->randomDigit; } print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6] @@ -359,14 +391,20 @@ try { } ``` +If you would like to use a modifier with a value not generated by Faker, use the `passthrough()` method. `passthrough()` simply returns whatever value it was given. + +```php +$faker->optional()->passthrough(mt_rand(5, 15)); +``` + ## Localization -`Faker\Factory` can take a locale as an argument, to return localized data. If no localized provider is found, the factory fallbacks to the default locale (en_EN). +`Faker\Factory` can take a locale as an argument, to return localized data. If no localized provider is found, the factory fallbacks to the default locale (en_US). ```php name, "\n"; } // Luce du Coulon @@ -385,16 +423,19 @@ You can check available Faker locales in the source code, [under the `Provider` ## Populating Entities Using an ORM or an ODM -Faker provides adapters for Object-Relational and Object-Document Mappers (currently, [Propel](http://www.propelorm.org), [Doctrine2](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/), [CakePHP](http://cakephp.org), [Spot2](https://github.com/vlucas/spot2) and [Mandango](https://github.com/mandango/mandango) are supported). These adapters ease the population of databases through the Entity classes provided by an ORM library (or the population of document stores using Document classes provided by an ODM library). +Faker provides adapters for Object-Relational and Object-Document Mappers (currently, [Propel](http://www.propelorm.org), [Doctrine2](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/), [CakePHP](http://cakephp.org), [Spot2](https://github.com/vlucas/spot2), [Mandango](https://github.com/mandango/mandango) and [Eloquent](https://laravel.com/docs/master/eloquent) are supported). These adapters ease the population of databases through the Entity classes provided by an ORM library (or the population of document stores using Document classes provided by an ODM library). To populate entities, create a new populator class (using a generator instance as parameter), then list the class and number of all the entities that must be generated. To launch the actual data population, call the `execute()` method. +Note that some of the `populators` could require additional parameters. As example the `doctrine` populator has an option to specify +its batchSize on how often it will flush the UnitOfWork to the database. + Here is an example showing how to populate 5 `Author` and 10 `Book` objects: ```php addEntity('Author', 5); $populator->addEntity('Book', 10); $insertedPKs = $populator->execute(); @@ -432,6 +473,8 @@ print_r($insertedPKs); // ) ``` +**Note:** Due to the fact that `Faker` returns all the primary keys inserted, the memory consumption will go up drastically when you do batch inserts due to the big list of data. + In the previous example, the `Book` and `Author` models share a relationship. Since `Author` entities are populated first, Faker is smart enough to relate the populated `Book` entities to one of the populated `Author` entities. Lastly, if you want to execute an arbitrary function on an entity before insertion, use the fourth argument of the `addEntity()` method: @@ -549,8 +592,8 @@ $faker = Faker\Factory::create(); ?> - - + + boolean(25)): ?> @@ -586,7 +629,7 @@ Running this script produces a document looking like: ```xml - +
    182 Harrison Cove @@ -604,7 +647,7 @@ Illum commodi molestiae aut repellat id. Et sit consequuntur aut et ullam asperi ]]> - +
    90111 Hegmann Inlet @@ -615,7 +658,7 @@ Illum commodi molestiae aut repellat id. Et sit consequuntur aut et ullam asperi - +
    9791 Nona Corner @@ -626,7 +669,7 @@ Illum commodi molestiae aut repellat id. Et sit consequuntur aut et ullam asperi - +
    11161 Schultz Via @@ -645,7 +688,7 @@ Aut asperiores nihil eius repellendus. Vero nihil corporis voluptatem explicabo ]]> - +
    6106 Nader Village Suite 753 @@ -658,7 +701,7 @@ Aut asperiores nihil eius repellendus. Vero nihil corporis voluptatem explicabo - +
    7546 Kuvalis Plaza @@ -669,7 +712,7 @@ Aut asperiores nihil eius repellendus. Vero nihil corporis voluptatem explicabo - +
    @@ -690,7 +733,7 @@ Et similique qui non expedita quia dolorum. Ex rem incidunt ea accusantium tempo ]]> - +
    1251 Koelpin Mission @@ -701,7 +744,7 @@ Et similique qui non expedita quia dolorum. Ex rem incidunt ea accusantium tempo - +
    6396 Langworth Hills Apt. 446 @@ -713,7 +756,7 @@ Et similique qui non expedita quia dolorum. Ex rem incidunt ea accusantium tempo - +
    @@ -745,6 +788,15 @@ Fugiat non in itaque sunt nobis totam. Sed nesciunt est deleniti cumque alias. R echo $faker->idNumber; // ID number echo $faker->nationalIdNumber // Citizen ID number echo $faker->foreignerIdNumber // Foreigner ID number +echo $faker->companyIdNumber // Company ID number +``` + +### `Faker\Provider\ar_SA\Payment` + +```php +bankAccountNumber // "SA0218IBYZVZJSEC8536V4XC" ``` ### `Faker\Provider\at_AT\Payment` @@ -832,13 +884,82 @@ echo $faker->cvr; // "32458723" echo $faker->p; // "5398237590" ``` +### `Faker\Provider\de_CH\Person` +```php +avs13; // "756.1234.5678.97" OR +echo $faker->ahv13; // "756.1234.5678.97" +``` + +### `Faker\Provider\de_DE\Payment` + +```php +bankAccountNumber; // "DE41849025553661169313" +echo $faker->bank; // "Volksbank Stuttgart" + +``` + +### `Faker\Provider\en_HK\Address` + +```php +town; // "Yuen Long" + +// Generates a fake village name based on the words commonly found in Hong Kong +echo $faker->village; // "O Tau" + +// Generates a fake estate name based on the words commonly found in Hong Kong +echo $faker->estate; // "Ching Lai Court" + +``` + +### `Faker\Provider\en_HK\Phone` + +```php +mobileNumber; // "92150087" + +// Generates a Hong Kong landline number (starting with 2 or 3) +echo $faker->landlineNumber; // "32750132" + +// Generates a Hong Kong fax number (starting with 7) +echo $faker->faxNumber; // "71937729" + +``` + +### `Faker\Provider\en_NG\Address` + +```php +region; // 'Katsina' +``` + +### `Faker\Provider\en_NG\Person` + +```php +name; // 'Oluwunmi Mayowa' +``` + ### `Faker\Provider\en_NZ\Phone` ```php cellNumber; // "021 123 4567" +echo $faker->mobileNumber; // "021 123 4567" // Generates a toll free number echo $faker->tollFreeNumber; // "0800 123 456" @@ -847,6 +968,15 @@ echo $faker->tollFreeNumber; // "0800 123 456" echo $faker->areaCode; // "03" ``` +### `Faker\Provider\en_US\Company` + +```php +ein; // '12-3456789' +``` + ### `Faker\Provider\en_US\Payment` ```php @@ -856,6 +986,15 @@ echo $faker->bankAccountNumber; // '51915734310' echo $faker->bankRoutingNumber; // '212240302' ``` +### `Faker\Provider\en_US\Person` + +```php +ssn; // '123-45-6789' +``` + ### `Faker\Provider\en_ZA\Company` ```php @@ -865,6 +1004,18 @@ echo $faker->bankRoutingNumber; // '212240302' echo $faker->companyNumber; // 1999/789634/01 ``` +### `Faker\Provider\en_ZA\Person` + +```php +idNumber; // 6606192211041 + +// Generates a random valid licence code +echo $faker->licenceCode; // EB +``` + ### `Faker\Provider\en_ZA\PhoneNumber` ```php @@ -884,6 +1035,89 @@ echo $faker->mobileNumber; // 082 123 5555 // Generates a Documento Nacional de Identidad (DNI) number echo $faker->dni; // '77446565E' + +// Generates a random valid licence code +echo $faker->licenceCode; // B +``` + +### `Faker\Provider\es_ES\Payment` + +```php +vat; // "A35864370" +``` + +### `Faker\Provider\es_ES\PhoneNumber` + +```php +tollFreeNumber; // 900 123 456 + +// Generates a mobile phone number +echo $faker->mobileNumber; // +34 612 12 24 +``` + +### `Faker\Provider\es_PE\Person` + +```php +dni; // '83367512' +``` + +### `Faker\Provider\fa_IR\Person` + +```php +nationalCode; // "0078475759" +``` + +### `Faker\Provider\fa_IR\Address` + +```php +building; // "ساختمان آفتاب" + +// Returns a random city name +echo $faker->city // "استان زنجان" +``` + +### `Faker\Provider\fa_IR\Company` + +```php +contract; // "رسمی" +``` + +### `Faker\Provider\fi_FI\Payment` + +```php +bankAccountNumber; // "FI8350799879879616" +``` + +### `Faker\Provider\fi_FI\Person` + +```php +personalIdentityNumber() // '170974-007J' + +//Since the numbers are different for male and female persons, optionally you can specify gender. +echo $faker->personalIdentityNumber(\DateTime::createFromFormat('Y-m-d', '2015-12-14'), 'female') // '141215A520B' ``` ### `Faker\Provider\fr_BE\Payment` @@ -895,6 +1129,32 @@ echo $faker->vat; // "BE 0123456789" - Belgian Value Added Tax number echo $faker->vat(false); // "BE0123456789" - unspaced Belgian Value Added Tax number ``` +### `Faker\Provider\es_VE\Person` + +```php +nationalId; // 'V11223344' +``` + +### `Faker\Provider\es_VE\Company` + +```php +taxpayerIdentificationNumber; // 'J1234567891' +``` + +### `Faker\Provider\fr_CH\Person` +```php +avs13; // "756.1234.5678.97" +``` + ### `Faker\Provider\fr_FR\Address` ```php @@ -911,6 +1171,9 @@ $faker->department; // array('18' => 'Cher'); // Generates a random region echo $faker->region; // "Saint-Pierre-et-Miquelon" + +// Generates a random appartement,stair +echo $faker->secondaryAddress; // "Bat. 961" ``` ### `Faker\Provider\fr_FR\Company` @@ -925,6 +1188,52 @@ echo $faker->siren; // 082 250 104 echo $faker->siret; // 347 355 708 00224 ``` +### `Faker\Provider\fr_FR\Payment` + +```php +vat; // FR 12 123 456 789 +``` + +### `Faker\Provider\fr_FR\Person` + +```php +nir; // 1 88 07 35 127 571 - 19 +``` + +### `Faker\Provider\fr_FR\PhoneNumber` + +```php +phoneNumber; // +33 (0)1 67 97 01 31 +echo $faker->mobileNumber; // +33 6 21 12 72 84 +echo $faker->serviceNumber // 08 98 04 84 46 +``` + + +### `Faker\Provider\he_IL\Payment` + +```php +bankAccountNumber // "IL392237392219429527697" +``` + +### `Faker\Provider\hr_HR\Payment` + +```php +bankAccountNumber // "HR3789114847226078672" +``` + ### `Faker\Provider\hu_HU\Payment` ```php @@ -934,6 +1243,26 @@ echo $faker->siret; // 347 355 708 00224 echo $faker->bankAccountNumber; // "HU09904437680048220079300783" ``` +### `Faker\Provider\id_ID\Person` + +```php +nik(); // "8522246001570940" +``` + +### `Faker\Provider\it_CH\Person` +```php +avs13; // "756.1234.5678.97" +``` + ### `Faker\Provider\it_IT\Company` ```php @@ -958,10 +1287,16 @@ echo $faker->taxId(); // "DIXDPZ44E08F367A" kanaName; // "アオタ ミノル" +echo $faker->kanaName($gender = null|'male'|'female') // "アオタ ミノル" // Generates a 'kana' first name -echo $faker->firstKanaName; // "ハルカ" +echo $faker->firstKanaName($gender = null|'male'|'female') // "ヒデキ" + +// Generates a 'kana' first name on the male +echo $faker->firstKanaNameMale // "ヒデキ" + +// Generates a 'kana' first name on the female +echo $faker->firstKanaNameFemale // "マアヤ" // Generates a 'kana' last name echo $faker->lastKanaName; // "ナカジマ" @@ -1004,6 +1339,9 @@ echo $faker->bankAccountNumber; // "KZ1076321LO4H6X41I37" // Generates an individual identification number echo $faker->individualIdentificationNumber; // "780322300455" + +// Generates an individual identification number based on his/her birth date +echo $faker->individualIdentificationNumber(new \DateTime('1999-03-01')); // "990301300455" ``` ### `Faker\Provider\ko_KR\Address` @@ -1018,6 +1356,26 @@ echo $faker->metropolitanCity; // "서울특별시" echo $faker->borough; // "강남구" ``` +### `Faker\Provider\ko_KR\PhoneNumber` + +```php +localAreaPhoneNumber; // "02-1234-4567" + +// Generates a cell phone number +echo $faker->cellPhoneNumber; // "010-9876-5432" +``` + +### `Faker\Provider\lt_LT\Payment` + +```php +bankAccountNumber // "LT300848876740317118" +``` + ### `Faker\Provider\lv_LV\Person` ```php @@ -1027,6 +1385,69 @@ echo $faker->borough; // "강남구" echo $faker->personalIdentityNumber; // "140190-12301" ``` +### `Faker\Provider\ms_MY\Address` + +```php +township; // "Taman Bahagia" + +// Generates a random Malaysian town address with matching postcode and state +echo $faker->townState; // "55100 Bukit Bintang, Kuala Lumpur" +``` + +### `Faker\Provider\ms_MY\Miscellaneous` + +```php +jpjNumberPlate; // "WPL 5169" +``` + +### `Faker\Provider\ms_MY\Payment` + +```php +bank; // "Maybank" + +// Generates a random Malaysian bank account number (10-16 digits) +echo $faker->bankAccountNumber; // "1234567890123456" + +// Generates a random Malaysian insurance company +echo $faker->insurance; // "AIA Malaysia" + +// Generates a random Malaysian bank SWIFT Code +echo $faker->swiftCode; // "MBBEMYKLXXX" +``` + +### `Faker\Provider\ms_MY\Person` + +```php +myKadNumber($gender = null|'male'|'female', $hyphen = null|true|false); // "710703471796" +``` + +### `Faker\Provider\ms_MY\PhoneNumber` + +```php +mobileNumber($countryCodePrefix = null|true|false, $formatting = null|true|false); // "+6012-705 3767" + +// Generates a random Malaysian landline number +echo $faker->fixedLineNumber($countryCodePrefix = null|true|false, $formatting = null|true|false); // "03-7112 0455" + +// Generates a random Malaysian voip number +echo $faker->voipNumber($countryCodePrefix = null|true|false, $formatting = null|true|false); // "015-458 7099" +``` + ### `Faker\Provider\ne_NP\Address` ```php @@ -1048,16 +1469,45 @@ echo $faker->vat; // "BE 0123456789" - Belgian Value Added Tax number echo $faker->vat(false); // "BE0123456789" - unspaced Belgian Value Added Tax number ``` +### `Faker\Provider\nl_BE\Person` + +```php +rrn(); // "83051711784" - Belgian Rijksregisternummer +echo $faker->rrn('female'); // "50032089858" - Belgian Rijksregisternummer for a female +``` + ### `Faker\Provider\nl_NL\Company` ```php jobTitle; // "Houtbewerker" echo $faker->vat; // "NL123456789B01" - Dutch Value Added Tax number echo $faker->btw; // "NL123456789B01" - Dutch Value Added Tax number (alias) ``` -### `Faker\Provider\no_NO\Payment` +### `Faker\Provider\nl_NL\Person` + +```php +idNumber; // "111222333" - Dutch Personal identification number (BSN) +``` + +### `Faker\Provider\nb_NO\MobileNumber` + +```php +mobileNumber; // "+4799988777" +echo $faker->mobileNumber; // "999 88 777" +echo $faker->mobileNumber; // "99988777" +``` + +### `Faker\Provider\nb_NO\Payment` ```php cellphone(true, true); // 98983-3945 or 7343-1290 // Using the "Number" suffix adds area code to the phone echo $faker->cellphoneNumber; // (11) 98309-2935 echo $faker->landlineNumber(false); // 3522835934 -echo $faker->phoneNumber; // formatted, random landline or cellphone (obbeying the 9th digit rule) -echo $faker->phoneNumberCleared; // not formatted, random landline or cellphone (obbeying the 9th digit rule) +echo $faker->phoneNumber; // formatted, random landline or cellphone (obeying the 9th digit rule) +echo $faker->phoneNumberCleared; // not formatted, random landline or cellphone (obeying the 9th digit rule) ``` ### `Faker\Provider\pt_BR\Person` @@ -1157,6 +1607,7 @@ echo $faker->name; // 'Sr. Luis Adriano Sepúlveda Filho' echo $faker->cpf; // '145.343.345-76' echo $faker->cpf(false); // '45623467866' echo $faker->rg; // '84.405.736-3' +echo $faker->rg(false); // '844057363' ``` ### `Faker\Provider\pt_BR\Company` @@ -1164,7 +1615,7 @@ echo $faker->rg; // '84.405.736-3' ```php cnpj; // '23.663.478/0001-24' echo $faker->cnpj(false); // '23663478000124' ``` @@ -1196,19 +1647,22 @@ echo $faker->bankAccountNumber; // "RO55WRJE3OE8X3YQI7J26U1E" echo $faker->prefixMale; // "ing." // Generates a random female name prefix/title echo $faker->prefixFemale; // "d-na." -// Generates a random male fist name +// Generates a random male first name echo $faker->firstNameMale; // "Adrian" -// Generates a random female fist name +// Generates a random female first name echo $faker->firstNameFemale; // "Miruna" + // Generates a random Personal Numerical Code (CNP) echo $faker->cnp; // "2800523081231" -echo $faker->cnp($gender = NULL, $century = NULL, $county = NULL); - // Valid option values: -// $gender: m, f, 1, 2 -// $century: 1800, 1900, 2000, 1, 2, 3, 4, 5, 6 -// $county: 2 letter ISO 3166-2:RO county codes and B1-B6 for Bucharest's 6 sectors +// $gender: null (random), male, female +// $dateOfBirth (1800+): null (random), Y-m-d, Y-m (random day), Y (random month and day) +// i.e. '1981-06-16', '2015-03', '1900' +// $county: 2 letter ISO 3166-2:RO county codes and B1, B2, B3, B4, B5, B6 for Bucharest's 6 sectors +// $isResident true/false flag if the person resides in Romania +echo $faker->cnp($gender = null, $dateOfBirth = null, $county = null, $isResident = true); + ``` ### `Faker\Provider\ro_RO\PhoneNumber` @@ -1229,6 +1683,12 @@ echo $faker->premiumRatePhoneNumber; // "0900123456" // Generates a Russian bank name (based on list of real russian banks) echo $faker->bank; // "ОТП Банк" + +//Generate a Russian Tax Payment Number for Company +echo $faker->inn; // 7813540735 + +//Generate a Russian Tax Code for Company +echo $faker->kpp; // 781301001 ``` ### `Faker\Provider\sv_SE\Payment` @@ -1251,6 +1711,15 @@ echo $faker->personalIdentityNumber() // '950910-0799' //Since the numbers are different for male and female persons, optionally you can specify gender. echo $faker->personalIdentityNumber('female') // '950910-0781' ``` +### `Faker\Provider\tr_TR\Person` + +```php +tcNo // '55300634882' + +``` ### `Faker\Provider\zh_CN\Payment` @@ -1262,26 +1731,68 @@ echo $faker->personalIdentityNumber('female') // '950910-0781' echo $faker->bank; // '中国建设银行' ``` +### `Faker\Provider\uk_UA\Payment` + +```php +bank; // "Ощадбанк" +``` + +### `Faker\Provider\zh_TW\Person` + +```php +personalIdentityNumber; // A223456789 +``` + +### `Faker\Provider\zh_TW\Company` + +```php +VAT; //23456789 +``` + + ## Third-Party Libraries Extending/Based On Faker -* Symfony2 bundles: - * [BazingaFakerBundle](https://github.com/willdurand/BazingaFakerBundle): Put the awesome Faker library into the Symfony2 DIC and populate your database with fake data. - * [AliceBundle](https://github.com/hautelook/AliceBundle), [AliceFixturesBundle](https://github.com/h4cc/AliceFixturesBundle): Bundles for using [Alice](https://packagist.org/packages/nelmio/alice) and Faker with data fixtures. Able to use Doctrine ORM as well as Doctrine MongoDB ODM. -* [FakerServiceProvider](https://github.com/EmanueleMinotto/FakerServiceProvider): Faker Service Provider for Silex -* [faker-cli](https://github.com/bit3/faker-cli): Command Line Tool for the Faker PHP library -* [Factory Muffin](https://github.com/thephpleague/factory-muffin): enable the rapid creation of objects (PHP port of factory-girl) -* [CompanyNameGenerator](https://github.com/fzaninotto/CompanyNameGenerator): Generate names for English tech companies with class -* [PlaceholdItProvider](https://github.com/EmanueleMinotto/PlaceholdItProvider): Generate images using placehold.it -* [datalea](https://github.com/spyrit/datalea) A highly customizable random test data generator web app -* [newage-ipsum](https://github.com/frequenc1/newage-ipsum): A new aged ipsum provider for the faker library inspired by http://sebpearce.com/bullshit/ -* [xml-faker](https://github.com/prewk/xml-faker): Create fake XML with Faker -* [faker-context](https://github.com/denheck/faker-context): Behat context using Faker to generate testdata -* [CronExpressionGenerator](https://github.com/swekaj/CronExpressionGenerator): Faker provider for generating random, valid cron expressions. -* [pragmafabrik/Pomm2Faker](https://github.com/pragmafabrik/Pomm2Faker): Faker client for Pomm database framework (PostgreSQL) -* [nelmio/alice](https://packagist.org/packages/nelmio/alice): Fixtures/object generator with a yaml DSL that can use Faker as data generator. -* [CakePHP 2.x Fake Seeder Plugin](https://github.com/ravage84/cakephp-fake-seeder) A CakePHP 2.x shell to seed your database with fake and/or fixed data. -* [images-generator](https://github.com/bruceheller/images-generator): An image generator provider using GD for placeholder type pictures +* Symfony bundles: + * [`willdurand/faker-bundle`](https://github.com/willdurand/BazingaFakerBundle): Put the awesome Faker library into the Symfony2 DIC and populate your database with fake data. + * [`hautelook/alice-bundle`](https://github.com/hautelook/AliceBundle), [`h4cc/alice-fixtures-bundle`](https://github.com/h4cc/AliceFixturesBundle): Bundles for using [`nelmio/alice`](https://packagist.org/packages/nelmio/alice) and Faker with data fixtures. Able to use Doctrine ORM as well as Doctrine MongoDB ODM. +* [`emanueleminotto/faker-service-provider`](https://github.com/EmanueleMinotto/FakerServiceProvider): Faker Service Provider for Silex +* [`bit3/faker-cli`](https://github.com/bit3/faker-cli): Command Line Tool for the Faker PHP library +* [`league/factory-muffin`](https://github.com/thephpleague/factory-muffin): enable the rapid creation of objects (PHP port of factory-girl) +* [`fzaninotto/company-name-generator`](https://github.com/fzaninotto/CompanyNameGenerator): Generate names for English tech companies with class +* [`emanueleminotto/faker-placehold-it-provider`](https://github.com/EmanueleMinotto/PlaceholdItProvider): Generate images using placehold.it +* [`spyrit/datalea`](https://github.com/spyrit/datalea) A highly customizable random test data generator web app +* [`frequenc1/newage-ipsum`](https://github.com/frequenc1/newage-ipsum): A new aged ipsum provider for the faker library inspired by http://sebpearce.com/bullshit/ +* [`prewk/xml-faker`](https://github.com/prewk/xml-faker): Create fake XML with Faker +* [`denheck/faker-context`](https://github.com/denheck/faker-context): Behat context using Faker to generate testdata +* [`swekaj/cron-expression-generator`](https://github.com/swekaj/CronExpressionGenerator): Faker provider for generating random, valid cron expressions. +* [`pragmafabrik/pomm-faker`](https://github.com/pragmafabrik/Pomm2Faker): Faker client for Pomm database framework (PostgreSQL) +* [`nelmio/alice`](https://github.com/nelmio/alice): Fixtures/object generator with a yaml DSL that can use Faker as data generator. +* [`ravage84/cakephp-fake-seeder`](https://github.com/ravage84/cakephp-fake-seeder) A CakePHP 2.x shell to seed your database with fake and/or fixed data. +* [`bheller/images-generator`](https://github.com/bruceheller/images-generator): An image generator provider using GD for placeholder type pictures +* [`pattern-lab/plugin-faker`](https://github.com/pattern-lab/plugin-php-faker): Pattern Lab is a Styleguide, Component Library, and Prototyping tool. This creates unique content each time Pattern Lab is generated. +* [`guidocella/eloquent-populator`](https://github.com/guidocella/eloquent-populator): Adapter for Laravel's Eloquent ORM. +* [`tamperdata/exiges`](https://github.com/tamperdata/exiges): Faker provider for generating random temperatures +* [`jzonta/faker-restaurant`](https://github.com/jzonta/FakerRestaurant): Faker for Food and Beverage names generate +* [`aalaap/faker-youtube`](https://github.com/aalaap/faker-youtube): Faker for YouTube URLs in various formats +* [`pelmered/fake-car`](https://github.com/pelmered/fake-car): Faker for cars and car data +* [`bluemmb/faker-picsum-photos-provider`](https://github.com/bluemmb/Faker-PicsumPhotos): Generate images using [picsum.photos](http://picsum.photos/) +* [`er1z/fakemock`](https://github.com/er1z/fakemock): Generate mocks using class-configuration and detection via Faker's guesser and Symfony asserts +* [`xvladqt/faker-lorem-flickr`](https://github.com/xvladxtremal/Faker-LoremFlickr): Generate images using [loremflickr.com](http://loremflickr.com/) +* [`metrakit/faker-eddy-malou`](https://github.com/Metrakit/faker-eddy-malou): Generate French Eddy Malou sentences & paragraphs +* [`drupol/belgian-national-number-faker`](https://github.com/drupol/belgian-national-number-faker): Generate fake Belgian national numbers +* [`elgentos/masquerade`](https://github.com/elgentos/masquerade): Configuration-based, platform-agnostic, locale-compatible data faker tool (out-of-the-box support for Magento 2) +* [`ottaviano/faker-gravatar`](https://github.com/ottaviano/faker-gravatar): Generate avatars using [Gravatar](https://en.gravatar.com/site/implement/images/) +* [`finwe/phpstan-faker`](https://github.com/finwe/phpstan-faker): PHPStan extension for Faker methods ## License -Faker is released under the MIT Licence. See the bundled LICENSE file for details. +Faker is released under the MIT License. See the bundled LICENSE file for details. diff --git a/api/vendor/fzaninotto/faker/src/Faker/Calculator/Ean.php b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Ean.php new file mode 100644 index 0000000..a1e0c07 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Ean.php @@ -0,0 +1,55 @@ += 0; $i -= 2) { + $even += $digits[$i]; + } + + $odd = 0; + for ($i = $length - 2; $i >= 0; $i -= 2) { + $odd += $digits[$i]; + } + + return (10 - ((3 * $even + $odd) % 10)) % 10; + } + + /** + * Checks whether the provided number is an EAN compliant number and that + * the checksum is correct. + * + * @param string $ean An EAN number + * @return boolean + */ + public static function isValid($ean) + { + if (!preg_match(self::PATTERN, $ean)) { + return false; + } + + return self::checksum(substr($ean, 0, -1)) === intval(substr($ean, -1)); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php index ee2c459..8a58231 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php @@ -25,6 +25,8 @@ class Iban } /** + * @param string $match + * * @return int */ private static function alphaToNumberCallback($match) diff --git a/api/vendor/fzaninotto/faker/src/Faker/Calculator/Inn.php b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Inn.php new file mode 100644 index 0000000..b239ae1 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Inn.php @@ -0,0 +1,34 @@ + 2, 2 => 4, 3 => 10, 4 => 3, 5 => 5, 6 => 9, 7 => 4, 8 => 6, 9 => 8); + $sum = 0; + for ($i = 1; $i <= 9; $i++) { + $sum += intval(substr($inn, $i-1, 1)) * $multipliers[$i]; + } + return strval(($sum % 11) % 10); + } + + /** + * Checks whether an INN has a valid checksum + * + * @param string $inn + * @return boolean + */ + public static function isValid($inn) + { + return self::checksum(substr($inn, 0, -1)) === substr($inn, -1, 1); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Calculator/Luhn.php b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Luhn.php index f0a8602..1cb71a1 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Calculator/Luhn.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Calculator/Luhn.php @@ -2,8 +2,10 @@ namespace Faker\Calculator; +use InvalidArgumentException; + /** - * Utility class for generating Luhn checksum and validating a number + * Utility class for generating and validating Luhn numbers. * * Luhn algorithm is used to validate credit card numbers, IMEI numbers, and * National Provider Identifier numbers. @@ -22,10 +24,10 @@ class Luhn $length = strlen($number); $sum = 0; for ($i = $length - 1; $i >= 0; $i -= 2) { - $sum += $number{$i}; + $sum += $number[$i]; } for ($i = $length - 2; $i >= 0; $i -= 2) { - $sum += array_sum(str_split($number{$i} * 2)); + $sum += array_sum(str_split($number[$i] * 2)); } return $sum % 10; @@ -55,4 +57,19 @@ class Luhn { return self::checksum($number) === 0; } + + /** + * Generate a Luhn compliant number. + * + * @param string $partialValue + * + * @return string + */ + public static function generateLuhnNumber($partialValue) + { + if (!preg_match('/^\d+$/', $partialValue)) { + throw new InvalidArgumentException('Argument should be an integer.'); + } + return $partialValue . Luhn::computeCheckDigit($partialValue); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Calculator/TCNo.php b/api/vendor/fzaninotto/faker/src/Faker/Calculator/TCNo.php new file mode 100644 index 0000000..392d455 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Calculator/TCNo.php @@ -0,0 +1,52 @@ + $digit) { + if ($index % 2 == 0) { + $evenSum += $digit; + } else { + $oddSum += $digit; + } + } + + $tenthDigit = (7 * $evenSum - $oddSum) % 10; + $eleventhDigit = ($evenSum + $oddSum + $tenthDigit) % 10; + + return $tenthDigit . $eleventhDigit; + } + + /** + * Checks whether an TCNo has a valid checksum + * + * @param string $tcNo + * @return boolean + */ + public static function isValid($tcNo) + { + return self::checksum(substr($tcNo, 0, -2)) === substr($tcNo, -2, 2); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php b/api/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php index 4210f93..eafd2ec 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php @@ -17,6 +17,8 @@ class DefaultGenerator /** * @param string $attribute + * + * @return mixed */ public function __get($attribute) { @@ -26,6 +28,8 @@ class DefaultGenerator /** * @param string $method * @param array $attributes + * + * @return mixed */ public function __call($method, $attributes) { diff --git a/api/vendor/fzaninotto/faker/src/Faker/Factory.php b/api/vendor/fzaninotto/faker/src/Faker/Factory.php index e02bc7d..1d68781 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Factory.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Factory.php @@ -6,11 +6,11 @@ class Factory { const DEFAULT_LOCALE = 'en_US'; - protected static $defaultProviders = array('Address', 'Barcode', 'Biased', 'Color', 'Company', 'DateTime', 'File', 'Image', 'Internet', 'Lorem', 'Miscellaneous', 'Payment', 'Person', 'PhoneNumber', 'Text', 'UserAgent', 'Uuid'); + protected static $defaultProviders = array('Address', 'Barcode', 'Biased', 'Color', 'Company', 'DateTime', 'File', 'HtmlLorem', 'Image', 'Internet', 'Lorem', 'Miscellaneous', 'Payment', 'Person', 'PhoneNumber', 'Text', 'UserAgent', 'Uuid'); /** * Create a new generator - * + * * @param string $locale * @return Generator */ diff --git a/api/vendor/fzaninotto/faker/src/Faker/Generator.php b/api/vendor/fzaninotto/faker/src/Faker/Generator.php index 83736d7..1db2608 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Generator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Generator.php @@ -4,11 +4,14 @@ namespace Faker; /** * @property string $name + * @method string name(string $gender = null) * @property string $firstName + * @method string firstName(string $gender = null) * @property string $firstNameMale * @property string $firstNameFemale * @property string $lastName * @property string $title + * @method string title(string $gender = null) * @property string $titleMale * @property string $titleFemale * @@ -18,8 +21,10 @@ namespace Faker; * @property string $city * @property string $streetName * @property string $streetAddress + * @property string $secondaryAddress * @property string $postcode * @property string $address + * @property string $state * @property string $country * @property float $latitude * @property float $longitude @@ -30,6 +35,7 @@ namespace Faker; * @property string $isbn10 * * @property string $phoneNumber + * @property string $e164PhoneNumber * * @property string $company * @property string $companySuffix @@ -40,7 +46,7 @@ namespace Faker; * @method string creditCardNumber($type = null, $formatted = false, $separator = '-') * @property \DateTime $creditCardExpirationDate * @property string $creditCardExpirationDateString - * @property string $creditCardDetails + * @property array $creditCardDetails * @property string $bankAccountNumber * @method string iban($countryCode = null, $prefix = '', $length = null) * @property string $swiftBicNumber @@ -49,6 +55,7 @@ namespace Faker; * @property string $word * @property string|array $words * @method string|array words($nb = 3, $asText = false) + * @method string word() * @property string $sentence * @method string sentence($nbWords = 6, $variableNbWords = true) * @property string|array $sentences @@ -91,16 +98,31 @@ namespace Faker; * @property \DateTime $dateTimeThisYear * @property \DateTime $dateTimeThisMonth * @property string $amPm - * @property int $dayOfMonth - * @property int $dayOfWeek - * @property int $month + * @property string $dayOfMonth + * @property string $dayOfWeek + * @property string $month * @property string $monthName - * @property int $year - * @property int $century + * @property string $year + * @property string $century * @property string $timezone + * @method string amPm($max = 'now') * @method string date($format = 'Y-m-d', $max = 'now') + * @method string dayOfMonth($max = 'now') + * @method string dayOfWeek($max = 'now') + * @method string iso8601($max = 'now') + * @method string month($max = 'now') + * @method string monthName($max = 'now') * @method string time($format = 'H:i:s', $max = 'now') - * @method \DateTime dateTimeBetween($startDate = '-30 years', $endDate = 'now') + * @method int unixTime($max = 'now') + * @method string year($max = 'now') + * @method \DateTime dateTime($max = 'now', $timezone = null) + * @method \DateTime dateTimeAd($max = 'now', $timezone = null) + * @method \DateTime dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null) + * @method \DateTime dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null) + * @method \DateTime dateTimeThisCentury($max = 'now', $timezone = null) + * @method \DateTime dateTimeThisDecade($max = 'now', $timezone = null) + * @method \DateTime dateTimeThisYear($max = 'now', $timezone = null) + * @method \DateTime dateTimeThisMonth($max = 'now', $timezone = null) * * @property string $md5 * @property string $sha1 @@ -110,10 +132,11 @@ namespace Faker; * @property string $countryISOAlpha3 * @property string $languageCode * @property string $currencyCode - * @property boolean boolean + * @property boolean $boolean * @method boolean boolean($chanceOfGettingTrue = 50) * * @property int $randomDigit + * @property int $randomDigitNot * @property int $randomDigitNotNull * @property string $randomLetter * @property string $randomAscii @@ -122,7 +145,7 @@ namespace Faker; * @method int numberBetween($min = 0, $max = 2147483647) * @method float randomFloat($nbMaxDecimals = null, $min = 0, $max = null) * @method mixed randomElement(array $array = array('a', 'b', 'c')) - * @method array randomElements(array $array = array('a', 'b', 'c'), $count = 1) + * @method array randomElements(array $array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false) * @method array|string shuffle($arg = '') * @method array shuffleArray(array $array = array()) * @method string shuffleString($string = '', $encoding = 'UTF-8') @@ -135,6 +158,8 @@ namespace Faker; * @method string toUpper($string = '') * @method Generator optional($weight = 0.5, $default = null) * @method Generator unique($reset = false, $maxRetries = 10000) + * @method Generator valid($validator = null, $maxRetries = 10000) + * @method mixed passthrough($passthrough) * * @method integer biasedNumberBetween($min = 0, $max = 100, $function = 'sqrt') * @@ -156,8 +181,8 @@ namespace Faker; * @property string $fileExtension * @method string file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true) * - * @method string imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null) - * @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true) + * @method string imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false) + * @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null) * * @property string $hexColor * @property string $safeHexColor @@ -166,6 +191,9 @@ namespace Faker; * @property string $rgbCssColor * @property string $safeColorName * @property string $colorName + * + * @method string randomHtml($maxDepth = 4, $maxWidth = 4) + * */ class Generator { @@ -187,7 +215,11 @@ class Generator if ($seed === null) { mt_srand(); } else { - mt_srand((int) $seed); + if (PHP_VERSION_ID < 70100) { + mt_srand((int) $seed); + } else { + mt_srand((int) $seed, MT_RAND_PHP); + } } } @@ -197,6 +229,8 @@ class Generator } /** + * @param string $formatter + * * @return Callable */ public function getFormatter($formatter) @@ -232,6 +266,8 @@ class Generator /** * @param string $attribute + * + * @return mixed */ public function __get($attribute) { @@ -241,9 +277,21 @@ class Generator /** * @param string $method * @param array $attributes + * + * @return mixed */ public function __call($method, $attributes) { return $this->format($method, $attributes); } + + public function __destruct() + { + $this->seed(); + } + + public function __wakeup() + { + $this->formatters = []; + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php index 0b871ed..0aa3413 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php @@ -42,7 +42,11 @@ class ColumnTypeGuesser return $generator->uuid(); }; case 'string': - $columnData = $schema->column($column); + if (method_exists($schema, 'getColumn')) { + $columnData = $schema->getColumn($column); + } else { + $columnData = $schema->column($column); + } $length = $columnData['length']; return function () use ($generator, $length) { return $generator->text($length); diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php index 824f8c0..bd608f9 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php @@ -67,6 +67,12 @@ class ColumnTypeGuesser return function () use ($generator) { return $generator->datetime; }; + case 'datetime_immutable': + case 'date_immutable': + case 'time_immutable': + return function () use ($generator) { + return \DateTimeImmutable::createFromMutable($generator->datetime); + }; default: // no smart way to guess what the user expects here return null; diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php index a6e1fed..bc703e5 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -3,8 +3,7 @@ namespace Faker\ORM\Doctrine; use Doctrine\Common\Persistence\ObjectManager; -use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; /** * Service class for populating a table through a Doctrine Entity class. @@ -120,13 +119,26 @@ class EntityPopulator $relatedClass = $this->class->getAssociationTargetClass($assocName); $unique = $optional = false; - $mappings = $this->class->getAssociationMappings(); - foreach ($mappings as $mapping) { - if ($mapping['targetEntity'] == $relatedClass) { - if ($mapping['type'] == ClassMetadata::ONE_TO_ONE) { - $unique = true; - $optional = isset($mapping['joinColumns'][0]['nullable']) ? $mapping['joinColumns'][0]['nullable'] : false; - break; + if ($this->class instanceof \Doctrine\ORM\Mapping\ClassMetadata) { + $mappings = $this->class->getAssociationMappings(); + foreach ($mappings as $mapping) { + if ($mapping['targetEntity'] == $relatedClass) { + if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadata::ONE_TO_ONE) { + $unique = true; + $optional = isset($mapping['joinColumns'][0]['nullable']) ? $mapping['joinColumns'][0]['nullable'] : false; + break; + } + } + } + } elseif ($this->class instanceof \Doctrine\ODM\MongoDB\Mapping\ClassMetadata) { + $mappings = $this->class->associationMappings; + foreach ($mappings as $mapping) { + if ($mapping['targetDocument'] == $relatedClass) { + if ($mapping['type'] == \Doctrine\ODM\MongoDB\Mapping\ClassMetadata::ONE && $mapping['association'] == \Doctrine\ODM\MongoDB\Mapping\ClassMetadata::REFERENCE_ONE) { + $unique = true; + $optional = isset($mapping['nullable']) ? $mapping['nullable'] : false; + break; + } } } } @@ -199,7 +211,7 @@ class EntityPopulator } // Try a standard setter if it's available, otherwise fall back on reflection $setter = sprintf("set%s", ucfirst($field)); - if (method_exists($obj, $setter)) { + if (is_callable(array($obj, $setter))) { $obj->$setter($value); } else { $this->class->reflFields[$field]->setValue($obj, $value); @@ -216,18 +228,18 @@ class EntityPopulator } /** - * @param EntityManagerInterface $manager + * @param ObjectManager $manager * @return int|null */ - private function generateId($obj, $column, EntityManagerInterface $manager) + private function generateId($obj, $column, ObjectManager $manager) { - /* @var $repository \Doctrine\ORM\EntityRepository */ + /* @var $repository \Doctrine\Common\Persistence\ObjectRepository */ $repository = $manager->getRepository(get_class($obj)); $result = $repository->createQueryBuilder('e') ->select(sprintf('e.%s', $column)) ->getQuery() - ->getResult(); - $ids = array_map('current', $result); + ->execute(); + $ids = array_map('current', $result->toArray()); $id = null; do { diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php index d4fe897..d4c5dfb 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php @@ -3,6 +3,7 @@ namespace Faker\ORM\Doctrine; use Doctrine\Common\Persistence\ObjectManager; +use Faker\Generator; /** * Service class for populating a database using the Doctrine ORM or ODM. @@ -10,20 +11,35 @@ use Doctrine\Common\Persistence\ObjectManager; */ class Populator { + /** @var int */ + protected $batchSize; + + /** @var Generator */ protected $generator; + + /** @var ObjectManager|null */ protected $manager; + + /** @var array */ protected $entities = array(); + + /** @var array */ protected $quantities = array(); + + /** @var array */ protected $generateId = array(); /** - * @param \Faker\Generator $generator + * Populator constructor. + * @param Generator $generator * @param ObjectManager|null $manager + * @param int $batchSize */ - public function __construct(\Faker\Generator $generator, ObjectManager $manager = null) + public function __construct(Generator $generator, ObjectManager $manager = null, $batchSize = 1000) { $this->generator = $generator; $this->manager = $manager; + $this->batchSize = $batchSize; } /** @@ -55,6 +71,9 @@ class Populator /** * Populate the database using all the Entity classes previously added. * + * Please note that large amounts of data will result in more memory usage since the the Populator will return + * all newly created primary keys after executing. + * * @param null|EntityManager $entityManager A Doctrine connection object * * @return array A list of the inserted PKs @@ -72,9 +91,18 @@ class Populator foreach ($this->quantities as $class => $number) { $generateId = $this->generateId[$class]; for ($i=0; $i < $number; $i++) { - $insertedEntities[$class][]= $this->entities[$class]->execute($entityManager, $insertedEntities, $generateId); + $insertedEntities[$class][]= $this->entities[$class]->execute( + $entityManager, + $insertedEntities, + $generateId + ); + if (count($insertedEntities) % $this->batchSize === 0) { + $entityManager->flush(); + $entityManager->clear($class); + } } $entityManager->flush(); + $entityManager->clear($class); } return $insertedEntities; diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php index ac9cdb4..1df7049 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -29,11 +29,11 @@ class ColumnTypeGuesser return function () use ($generator) { return $generator->dateTime; }; - } else { - return function () use ($generator) { - return $generator->dateTimeAD; - }; } + + return function () use ($generator) { + return $generator->dateTimeAD; + }; } $type = $column->getType(); switch ($type) { diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php index 13e4ee4..024965a 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php @@ -29,11 +29,11 @@ class ColumnTypeGuesser return function () use ($generator) { return $generator->dateTime; }; - } else { - return function () use ($generator) { - return $generator->dateTimeAD; - }; } + + return function () use ($generator) { + return $generator->dateTimeAD; + }; } $type = $column->getType(); switch ($type) { diff --git a/api/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php b/api/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php index d59cf56..bc27e7b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php @@ -141,7 +141,6 @@ class EntityPopulator foreach ($relations as $relation) { // We don't need any other relation here. if ($relation instanceof BelongsTo) { - $fieldName = $relation->localKey(); $entityName = $relation->entityName(); $field = $fields[$fieldName]; @@ -151,25 +150,23 @@ class EntityPopulator $formatters[$fieldName] = function ($inserted) use ($required, $entityName, $locator) { if (!empty($inserted[$entityName])) { - return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->getId(); - } else { - if ($required && $this->useExistingData) { - // We did not add anything like this, but it's required, - // So let's find something existing in DB. - $mapper = $this->locator->mapper($entityName); - $records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray(); - if (empty($records)) { - return null; - } - $id = $records[mt_rand(0, count($records) - 1)]['id']; + return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->get('id'); + } - return $id; - } else { + if ($required && $this->useExistingData) { + // We did not add anything like this, but it's required, + // So let's find something existing in DB. + $mapper = $locator->mapper($entityName); + $records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray(); + if (empty($records)) { return null; } - } - }; + return $records[mt_rand(0, count($records) - 1)]['id']; + } + + return null; + }; } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php index 84f7158..05759a3 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php @@ -17,10 +17,14 @@ class Barcode extends Base /** * Utility function for computing EAN checksums + * + * @param string $input + * + * @return integer */ protected static function eanChecksum($input) { - $sequence = (strlen($input) - 1) === 8 ? array(3, 1) : array(1, 3); + $sequence = (strlen($input) + 1) === 8 ? array(3, 1) : array(1, 3); $sums = 0; foreach (str_split($input) as $n => $digit) { $sums += $digit * $sequence[$n % 2]; diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Base.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Base.php index 6d7a66e..6765c80 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Base.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Base.php @@ -110,6 +110,9 @@ class Base if (null === $max) { $max = static::randomNumber(); + if ($min > $max) { + $max = $min; + } } if ($min > $max) { @@ -136,6 +139,18 @@ class Base $max = $int1 < $int2 ? $int2 : $int1; return mt_rand($min, $max); } + + /** + * Returns the passed value + * + * @param mixed $value + * + * @return mixed + */ + public static function passthrough($value) + { + return $value; + } /** * Returns a random letter from a to z @@ -158,18 +173,29 @@ class Base /** * Returns randomly ordered subsequence of $count elements from a provided array * - * @param array $array Array to take elements from. Defaults to a-f - * @param integer $count Number of elements to take. + * @param array $array Array to take elements from. Defaults to a-c + * @param integer $count Number of elements to take. + * @param boolean $allowDuplicates Allow elements to be picked several times. Defaults to false * @throws \LengthException When requesting more elements than provided * * @return array New array with $count elements from $array */ - public static function randomElements(array $array = array('a', 'b', 'c'), $count = 1) + public static function randomElements($array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false) { - $allKeys = array_keys($array); + $traversables = array(); + + if ($array instanceof \Traversable) { + foreach ($array as $element) { + $traversables[] = $element; + } + } + + $arr = count($traversables) ? $traversables : $array; + + $allKeys = array_keys($arr); $numKeys = count($allKeys); - if ($numKeys < $count) { + if (!$allowDuplicates && $numKeys < $count) { throw new \LengthException(sprintf('Cannot get %d elements, only %d in array', $count, $numKeys)); } @@ -179,12 +205,15 @@ class Base while ($numElements < $count) { $num = mt_rand(0, $highKey); - if (isset($keys[$num])) { - continue; + + if (!$allowDuplicates) { + if (isset($keys[$num])) { + continue; + } + $keys[$num] = true; } - $keys[$num] = true; - $elements[] = $array[$allKeys[$num]]; + $elements[] = $arr[$allKeys[$num]]; $numElements++; } @@ -199,7 +228,7 @@ class Base */ public static function randomElement($array = array('a', 'b', 'c')) { - if (!$array) { + if (!$array || ($array instanceof \Traversable && !count($array))) { return null; } $elements = static::randomElements($array, 1); @@ -253,7 +282,7 @@ class Base * Returns a shuffled version of the array. * * This function does not mutate the original array. It uses the - * Fisher–Yates algorithm, which is unbiaised, together with a Mersenne + * Fisher–Yates algorithm, which is unbiased, together with a Mersenne * twister random generator. This function is therefore more random than * PHP's shuffle() function, and it is seedable. * @@ -269,7 +298,7 @@ class Base $shuffledArray = array(); $i = 0; reset($array); - while (list($key, $value) = each($array)) { + foreach ($array as $key => $value) { if ($i == 0) { $j = 0; } else { @@ -290,7 +319,7 @@ class Base * Returns a shuffled version of the string. * * This function does not mutate the original string. It uses the - * Fisher–Yates algorithm, which is unbiaised, together with a Mersenne + * Fisher–Yates algorithm, which is unbiased, together with a Mersenne * twister random generator. This function is therefore more random than * PHP's shuffle() function, and it is seedable. Additionally, it is * UTF8 safe if the mb extension is available. @@ -415,7 +444,7 @@ class Base * Regex delimiters '/.../' and begin/end markers '^...$' are ignored. * * Only supports a small subset of the regex syntax. For instance, - * unicode, negated classes, unbouned ranges, subpatterns, back references, + * unicode, negated classes, unbounded ranges, subpatterns, back references, * assertions, recursive patterns, and comments are not supported. Escaping * support is extremely fragile. * @@ -463,7 +492,7 @@ class Base // All A-F inside of [] become ABCDEF $regex = preg_replace_callback('/\[([^\]]+)\]/', function ($matches) { return '[' . preg_replace_callback('/(\w|\d)\-(\w|\d)/', function ($range) { - return implode(range($range[1], $range[2]), ''); + return implode('', range($range[1], $range[2])); }, $matches[1]) . ']'; }, $regex); // All [ABC] become B (or A or C) @@ -561,10 +590,10 @@ class Base * * $values = array(); * $evenValidator = function ($digit) { - * return $digit % 2 === 0; + * return $digit % 2 === 0; * }; * for ($i=0; $i < 10; $i++) { - * $values []= $faker->valid($evenValidator)->randomDigit; + * $values []= $faker->valid($evenValidator)->randomDigit; * } * print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6] * diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php index a9e98d9..d37dcef 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php @@ -25,8 +25,8 @@ class Biased extends Base $x = mt_rand() / mt_getrandmax(); $y = mt_rand() / (mt_getrandmax() + 1); } while (call_user_func($function, $x) < $y); - - return floor($x * ($max - $min + 1) + $min); + + return (int) floor($x * ($max - $min + 1) + $min); } /** @@ -35,7 +35,7 @@ class Biased extends Base * * @return integer */ - protected static function unbiased($x) + protected static function unbiased() { return 1; } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Color.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Color.php index 0eb5cb9..209d722 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Color.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Color.php @@ -113,4 +113,31 @@ class Color extends Base { return static::randomElement(static::$allColorNames); } + + /** + * @example '340,50,20' + * @return string + */ + public static function hslColor() + { + return sprintf( + '%s,%s,%s', + static::numberBetween(0, 360), + static::numberBetween(0, 100), + static::numberBetween(0, 100) + ); + } + + /** + * @example array(340, 50, 20) + * @return array + */ + public static function hslColorAsArray() + { + return array( + static::numberBetween(0, 360), + static::numberBetween(0, 100), + static::numberBetween(0, 100) + ); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Company.php index 2d11397..d536d48 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Company.php @@ -16,6 +16,8 @@ class Company extends Base /** * @example 'Acme Ltd' + * + * @return string */ public function company() { @@ -26,6 +28,8 @@ class Company extends Base /** * @example 'Ltd' + * + * @return string */ public static function companySuffix() { @@ -34,6 +38,8 @@ class Company extends Base /** * @example 'Job' + * + * @return string */ public function jobTitle() { diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php index 7baa7bc..bde7f25 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php @@ -6,6 +6,12 @@ class DateTime extends Base { protected static $century = array('I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII','XIV','XV','XVI','XVII','XVIII','XIX','XX','XXI'); + protected static $defaultTimezone = null; + + /** + * @param \DateTime|string|float|int $max + * @return int|false + */ protected static function getMaxTimestamp($max = 'now') { if (is_numeric($max)) { @@ -36,7 +42,7 @@ class DateTime extends Base * Get a datetime object for a date between January 1, 1970 and now * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2005-08-16 20:39:21') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -46,7 +52,7 @@ class DateTime extends Base { return static::setTimezone( new \DateTime('@' . static::unixTime($max)), - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } @@ -54,7 +60,7 @@ class DateTime extends Base * Get a datetime object for a date between January 1, 001 and now * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('1265-03-22 21:15:52') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -62,9 +68,10 @@ class DateTime extends Base */ public static function dateTimeAD($max = 'now', $timezone = null) { + $min = (PHP_INT_SIZE>4 ? -62135597361 : -PHP_INT_MAX); return static::setTimezone( - new \DateTime('@' . mt_rand(-62135597361, static::getMaxTimestamp($max))), - (null === $timezone ? date_default_timezone_get() : $timezone) + new \DateTime('@' . mt_rand($min, static::getMaxTimestamp($max))), + $timezone ); } @@ -112,7 +119,7 @@ class DateTime extends Base * * @param \DateTime|string $startDate Defaults to 30 years ago * @param \DateTime|string $endDate Defaults to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('1999-02-02 11:42:52') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -131,7 +138,7 @@ class DateTime extends Base return static::setTimezone( new \DateTime('@' . $timestamp), - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } @@ -140,9 +147,9 @@ class DateTime extends Base * an interval * Accepts date string that can be recognized by strtotime(). * - * @param string $date Defaults to 30 years ago + * @param \DateTime|string $date Defaults to 30 years ago * @param string $interval Defaults to 5 days after - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -154,55 +161,59 @@ class DateTime extends Base $datetime = $date instanceof \DateTime ? $date : new \DateTime($date); $otherDatetime = clone $datetime; $otherDatetime->add($intervalObject); - + $begin = $datetime > $otherDatetime ? $otherDatetime : $datetime; $end = $datetime===$begin ? $otherDatetime : $datetime; return static::dateTimeBetween( $begin, $end, - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('1964-04-04 11:02:02') * @return \DateTime */ - public static function dateTimeThisCentury($max = 'now') + public static function dateTimeThisCentury($max = 'now', $timezone = null) { - return static::dateTimeBetween('-100 year', $max); + return static::dateTimeBetween('-100 year', $max, $timezone); } /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2010-03-10 05:18:58') * @return \DateTime */ - public static function dateTimeThisDecade($max = 'now') + public static function dateTimeThisDecade($max = 'now', $timezone = null) { - return static::dateTimeBetween('-10 year', $max); + return static::dateTimeBetween('-10 year', $max, $timezone); } /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2011-09-19 09:24:37') * @return \DateTime */ - public static function dateTimeThisYear($max = 'now') + public static function dateTimeThisYear($max = 'now', $timezone = null) { - return static::dateTimeBetween('-1 year', $max); + return static::dateTimeBetween('-1 year', $max, $timezone); } /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2011-10-05 12:51:46') * @return \DateTime */ - public static function dateTimeThisMonth($max = 'now') + public static function dateTimeThisMonth($max = 'now', $timezone = null) { - return static::dateTimeBetween('-1 month', $max); + return static::dateTimeBetween('-1 month', $max, $timezone); } /** @@ -257,8 +268,8 @@ class DateTime extends Base /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @return int - * @example 1673 + * @return string + * @example '1673' */ public static function year($max = 'now') { @@ -285,9 +296,45 @@ class DateTime extends Base /** * Internal method to set the time zone on a DateTime. + * + * @param \DateTime $dt + * @param string|null $timezone + * + * @return \DateTime */ private static function setTimezone(\DateTime $dt, $timezone) { - return $dt->setTimezone(new \DateTimeZone($timezone)); + return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); + } + + /** + * Sets default time zone. + * + * @param string $timezone + * + * @return void + */ + public static function setDefaultTimezone($timezone = null) + { + static::$defaultTimezone = $timezone; + } + + /** + * Gets default time zone. + * + * @return string|null + */ + public static function getDefaultTimezone() + { + return static::$defaultTimezone; + } + + /** + * @param string|null $timezone + * @return null|string + */ + private static function resolveTimezone($timezone) + { + return ((null === $timezone) ? ((null === static::$defaultTimezone) ? date_default_timezone_get() : static::$defaultTimezone) : $timezone); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/HtmlLorem.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/HtmlLorem.php new file mode 100644 index 0000000..6219bc8 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/HtmlLorem.php @@ -0,0 +1,276 @@ +addProvider(new Lorem($generator)); + $generator->addProvider(new Internet($generator)); + } + + /** + * @param integer $maxDepth + * @param integer $maxWidth + * + * @return string + */ + public function randomHtml($maxDepth = 4, $maxWidth = 4) + { + $document = new \DOMDocument(); + $this->idGenerator = new UniqueGenerator($this->generator); + + $head = $document->createElement("head"); + $this->addRandomTitle($head); + + $body = $document->createElement("body"); + $this->addLoginForm($body); + $this->addRandomSubTree($body, $maxDepth, $maxWidth); + + $html = $document->createElement("html"); + $html->appendChild($head); + $html->appendChild($body); + + $document->appendChild($html); + return $document->saveHTML(); + } + + private function addRandomSubTree(\DOMElement $root, $maxDepth, $maxWidth) + { + $maxDepth--; + if ($maxDepth <= 0) { + return $root; + } + + $siblings = mt_rand(1, $maxWidth); + for ($i = 0; $i < $siblings; $i++) { + if ($maxDepth == 1) { + $this->addRandomLeaf($root); + } else { + $sibling = $root->ownerDocument->createElement("div"); + $root->appendChild($sibling); + $this->addRandomAttribute($sibling); + $this->addRandomSubTree($sibling, mt_rand(0, $maxDepth), $maxWidth); + } + } + return $root; + } + + private function addRandomLeaf(\DOMElement $node) + { + $rand = mt_rand(1, 10); + switch ($rand) { + case 1: + $this->addRandomP($node); + break; + case 2: + $this->addRandomA($node); + break; + case 3: + $this->addRandomSpan($node); + break; + case 4: + $this->addRandomUL($node); + break; + case 5: + $this->addRandomH($node); + break; + case 6: + $this->addRandomB($node); + break; + case 7: + $this->addRandomI($node); + break; + case 8: + $this->addRandomTable($node); + break; + default: + $this->addRandomText($node); + break; + } + } + + private function addRandomAttribute(\DOMElement $node) + { + $rand = mt_rand(1, 2); + switch ($rand) { + case 1: + $node->setAttribute("class", $this->generator->word); + break; + case 2: + $node->setAttribute("id", (string)$this->idGenerator->randomNumber(5)); + break; + } + } + + private function addRandomP(\DOMElement $element, $maxLength = 10) + { + + $node = $element->ownerDocument->createElement(static::P_TAG); + $node->textContent = $this->generator->sentence(mt_rand(1, $maxLength)); + $element->appendChild($node); + } + + private function addRandomText(\DOMElement $element, $maxLength = 10) + { + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $element->appendChild($text); + } + + private function addRandomA(\DOMElement $element, $maxLength = 10) + { + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $node = $element->ownerDocument->createElement(static::A_TAG); + $node->setAttribute("href", $this->generator->safeEmailDomain); + $node->appendChild($text); + $element->appendChild($node); + } + + private function addRandomTitle(\DOMElement $element, $maxLength = 10) + { + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $node = $element->ownerDocument->createElement(static::TITLE_TAG); + $node->appendChild($text); + $element->appendChild($node); + } + + private function addRandomH(\DOMElement $element, $maxLength = 10) + { + $h = static::H_TAG . (string)mt_rand(1, 3); + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $node = $element->ownerDocument->createElement($h); + $node->appendChild($text); + $element->appendChild($node); + } + + private function addRandomB(\DOMElement $element, $maxLength = 10) + { + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $node = $element->ownerDocument->createElement(static::B_TAG); + $node->appendChild($text); + $element->appendChild($node); + } + + private function addRandomI(\DOMElement $element, $maxLength = 10) + { + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $node = $element->ownerDocument->createElement(static::I_TAG); + $node->appendChild($text); + $element->appendChild($node); + } + + private function addRandomSpan(\DOMElement $element, $maxLength = 10) + { + $text = $element->ownerDocument->createTextNode($this->generator->sentence(mt_rand(1, $maxLength))); + $node = $element->ownerDocument->createElement(static::SPAN_TAG); + $node->appendChild($text); + $element->appendChild($node); + } + + private function addLoginForm(\DOMElement $element) + { + + $textInput = $element->ownerDocument->createElement(static::INPUT_TAG); + $textInput->setAttribute("type", "text"); + $textInput->setAttribute("id", "username"); + + $textLabel = $element->ownerDocument->createElement(static::LABEL_TAG); + $textLabel->setAttribute("for", "username"); + $textLabel->textContent = $this->generator->word; + + $passwordInput = $element->ownerDocument->createElement(static::INPUT_TAG); + $passwordInput->setAttribute("type", "password"); + $passwordInput->setAttribute("id", "password"); + + $passwordLabel = $element->ownerDocument->createElement(static::LABEL_TAG); + $passwordLabel->setAttribute("for", "password"); + $passwordLabel->textContent = $this->generator->word; + + $submit = $element->ownerDocument->createElement(static::INPUT_TAG); + $submit->setAttribute("type", "submit"); + $submit->setAttribute("value", $this->generator->word); + + $submit = $element->ownerDocument->createElement(static::FORM_TAG); + $submit->setAttribute("action", $this->generator->safeEmailDomain); + $submit->setAttribute("method", "POST"); + $submit->appendChild($textLabel); + $submit->appendChild($textInput); + $submit->appendChild($passwordLabel); + $submit->appendChild($passwordInput); + $element->appendChild($submit); + } + + private function addRandomTable(\DOMElement $element, $maxRows = 10, $maxCols = 6, $maxTitle = 4, $maxLength = 10) + { + $rows = mt_rand(1, $maxRows); + $cols = mt_rand(1, $maxCols); + + $table = $element->ownerDocument->createElement(static::TABLE_TAG); + $thead = $element->ownerDocument->createElement(static::THEAD_TAG); + $tbody = $element->ownerDocument->createElement(static::TBODY_TAG); + + $table->appendChild($thead); + $table->appendChild($tbody); + + $tr = $element->ownerDocument->createElement(static::TR_TAG); + $thead->appendChild($tr); + for ($i = 0; $i < $cols; $i++) { + $th = $element->ownerDocument->createElement(static::TH_TAG); + $th->textContent = $this->generator->sentence(mt_rand(1, $maxTitle)); + $tr->appendChild($th); + } + for ($i = 0; $i < $rows; $i++) { + $tr = $element->ownerDocument->createElement(static::TR_TAG); + $tbody->appendChild($tr); + for ($j = 0; $j < $cols; $j++) { + $th = $element->ownerDocument->createElement(static::TD_TAG); + $th->textContent = $this->generator->sentence(mt_rand(1, $maxLength)); + $tr->appendChild($th); + } + } + $element->appendChild($table); + } + + private function addRandomUL(\DOMElement $element, $maxItems = 11, $maxLength = 4) + { + $num = mt_rand(1, $maxItems); + $ul = $element->ownerDocument->createElement(static::UL_TAG); + for ($i = 0; $i < $num; $i++) { + $li = $element->ownerDocument->createElement(static::LI_TAG); + $li->textContent = $this->generator->sentence(mt_rand(1, $maxLength)); + $ul->appendChild($li); + } + $element->appendChild($ul); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Image.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Image.php index 0e31d50..14f1b39 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Image.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Image.php @@ -18,16 +18,25 @@ class Image extends Base * Set randomize to false to remove the random GET parameter at the end of the url. * * @example 'http://lorempixel.com/640/480/?12345' + * + * @param integer $width + * @param integer $height + * @param string|null $category + * @param bool $randomize + * @param string|null $word + * @param bool $gray + * + * @return string */ public static function imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false) { - $baseUrl = "http://lorempixel.com/"; + $baseUrl = "https://lorempixel.com/"; $url = "{$width}/{$height}/"; - + if ($gray) { $url = "gray/" . $url; } - + if ($category) { if (!in_array($category, static::$categories)) { throw new \InvalidArgumentException(sprintf('Unknown image category "%s"', $category)); @@ -52,7 +61,7 @@ class Image extends Base * * @example '/path/to/dir/13b73edae8443990be1aa8f1a483bc27.jpg' */ - public static function image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null) + public static function image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null, $gray = false) { $dir = is_null($dir) ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible // Validate directory path @@ -66,7 +75,7 @@ class Image extends Base $filename = $name .'.jpg'; $filepath = $dir . DIRECTORY_SEPARATOR . $filename; - $url = static::imageUrl($width, $height, $category, $randomize, $word); + $url = static::imageUrl($width, $height, $category, $randomize, $word, $gray); // save file if (function_exists('curl_exec')) { @@ -74,9 +83,16 @@ class Image extends Base $fp = fopen($filepath, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); - $success = curl_exec($ch); - curl_close($ch); + $success = curl_exec($ch) && curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200; fclose($fp); + curl_close($ch); + + if (!$success) { + unlink($filepath); + + // could not contact the distant URL or HTTP error - fail silently. + return false; + } } elseif (ini_get('allow_url_fopen')) { // use remote fopen() via copy() $success = copy($url, $filepath); @@ -84,11 +100,6 @@ class Image extends Base return new \RuntimeException('The image formatter downloads an image from a remote HTTP server. Therefore, it requires that PHP can request remote hosts, either via cURL or fopen()'); } - if (!$success) { - // could not contact the distant URL or HTTP error - fail silently. - return false; - } - return $fullPath ? $filepath : $filename; } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Internet.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Internet.php index 9ab5613..2eaa2f6 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Internet.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Internet.php @@ -2,7 +2,7 @@ namespace Faker\Provider; -class Internet extends \Faker\Provider\Base +class Internet extends Base { protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com'); protected static $tld = array('com', 'com', 'com', 'com', 'com', 'com', 'biz', 'info', 'net', 'org'); @@ -36,7 +36,7 @@ class Internet extends \Faker\Provider\Base public function email() { $format = static::randomElement(static::$emailFormats); - + return $this->generator->parse($format); } @@ -93,7 +93,18 @@ class Internet extends \Faker\Provider\Base $format = static::randomElement(static::$userNameFormats); $username = static::bothify($this->generator->parse($format)); - return strtolower(static::transliterate($username)); + $username = strtolower(static::transliterate($username)); + + // check if transliterate() didn't support the language and removed all letters + if (trim($username, '._') === '') { + throw new \Exception('userName failed with the selected locale. Try a different locale or activate the "intl" PHP extension.'); + } + + // clean possible trailing dots from first/last names + $username = str_replace('..', '.', $username); + $username = rtrim($username, '.'); + + return $username; } /** * @example 'fY4èHdZv68' @@ -120,7 +131,17 @@ class Internet extends \Faker\Provider\Base { $lastName = $this->generator->format('lastName'); - return strtolower(static::transliterate($lastName)); + $lastName = strtolower(static::transliterate($lastName)); + + // check if transliterate() didn't support the language and removed all letters + if (trim($lastName, '._') === '') { + throw new \Exception('domainWord failed with the selected locale. Try a different locale or activate the "intl" PHP extension.'); + } + + // clean possible trailing dot from last name + $lastName = rtrim($lastName, '.'); + + return $lastName; } /** @@ -154,7 +175,7 @@ class Internet extends \Faker\Provider\Base } $words = $this->generator->words($nbWords); - return join($words, '-'); + return join('-', $words); } /** @@ -185,13 +206,11 @@ class Internet extends \Faker\Provider\Base { if (static::numberBetween(0, 1) === 0) { // 10.x.x.x range - $ip = long2ip(static::numberBetween(167772160, 184549375)); - } else { - // 192.168.x.x range - $ip = long2ip(static::numberBetween(3232235520, 3232301055)); + return long2ip(static::numberBetween(ip2long("10.0.0.0"), ip2long("10.255.255.255"))); } - return $ip; + // 192.168.x.x range + return long2ip(static::numberBetween(ip2long("192.168.0.0"), ip2long("192.168.255.255"))); } /** @@ -209,8 +228,12 @@ class Internet extends \Faker\Provider\Base protected static function transliterate($string) { + if (0 === preg_match('/[^A-Za-z0-9_.]/', $string)) { + return $string; + } + $transId = 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;'; - if (function_exists('transliterator_transliterate') && $transliterator = \Transliterator::create($transId)) { + if (class_exists('Transliterator', false) && $transliterator = \Transliterator::create($transId)) { $transString = $transliterator->transliterate($string); } else { $transString = static::toAscii($string); diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php index 1c9356d..b8c6dac 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php @@ -92,7 +92,7 @@ class Lorem extends Base $words = static::words($nbWords); $words[0] = ucwords($words[0]); - return implode($words, ' ') . '.'; + return implode(' ', $words) . '.'; } /** @@ -131,7 +131,7 @@ class Lorem extends Base $nbSentences = self::randomizeNbElements($nbSentences); } - return implode(static::sentences($nbSentences), ' '); + return implode(' ', static::sentences($nbSentences)); } /** @@ -156,56 +156,44 @@ class Lorem extends Base * Generate a text string. * Depending on the $maxNbChars, returns a string made of words, sentences, or paragraphs. * - * @example 'Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.' + * @example 'Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.' + * * @param integer $maxNbChars Maximum number of characters the text should contain (minimum 5) + * * @return string */ public static function text($maxNbChars = 200) { - $text = array(); if ($maxNbChars < 5) { throw new \InvalidArgumentException('text() can only generate text of at least 5 characters'); - } elseif ($maxNbChars < 25) { - // join words - while (empty($text)) { - $size = 0; - // determine how many words are needed to reach the $maxNbChars once; - while ($size < $maxNbChars) { - $word = ($size ? ' ' : '') . static::word(); - $text []= $word; - $size += strlen($word); - } - array_pop($text); - } - $text[0][0] = static::toUpper($text[0][0]); - $text[count($text) - 1] .= '.'; - } elseif ($maxNbChars < 100) { - // join sentences - while (empty($text)) { - $size = 0; - // determine how many sentences are needed to reach the $maxNbChars once; - while ($size < $maxNbChars) { - $sentence = ($size ? ' ' : '') . static::sentence(); - $text []= $sentence; - $size += strlen($sentence); - } - array_pop($text); - } - } else { - // join paragraphs - while (empty($text)) { - $size = 0; - // determine how many paragraphs are needed to reach the $maxNbChars once; - while ($size < $maxNbChars) { - $paragraph = ($size ? "\n" : '') . static::paragraph(); - $text []= $paragraph; - $size += strlen($paragraph); - } - array_pop($text); - } } - return implode($text, ''); + $type = ($maxNbChars < 25) ? 'word' : (($maxNbChars < 100) ? 'sentence' : 'paragraph'); + + $text = array(); + while (empty($text)) { + $size = 0; + + // until $maxNbChars is reached + while ($size < $maxNbChars) { + $word = ($size ? ' ' : '') . static::$type(); + $text[] = $word; + + $size += strlen($word); + } + + array_pop($text); + } + + if ($type === 'word') { + // capitalize first letter + $text[0] = ucwords($text[0]); + + // end sentence with full stop + $text[count($text) - 1] .= '.'; + } + + return implode('', $text); } protected static function randomizeNbElements($nbElements) diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php index 4e05199..4f669c9 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php @@ -4,6 +4,29 @@ namespace Faker\Provider; class Miscellaneous extends Base { + /** + * @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks + * On date of 2017-03-26 + * + * U+1F600 - U+1F637 as their UTF-8 Pairings + */ + protected static $emoji = array( + '\uD83D\uDE00', '\uD83D\uDE01', '\uD83D\uDE02', '\uD83D\uDE03', + '\uD83D\uDE04', '\uD83D\uDE05', '\uD83D\uDE06', '\uD83D\uDE07', + '\uD83D\uDE08', '\uD83D\uDE09', '\uD83D\uDE0A', '\uD83D\uDE0B', + '\uD83D\uDE0C', '\uD83D\uDE0D', '\uD83D\uDE0E', '\uD83D\uDE0F', + '\uD83D\uDE10', '\uD83D\uDE11', '\uD83D\uDE12', '\uD83D\uDE13', + '\uD83D\uDE14', '\uD83D\uDE15', '\uD83D\uDE16', '\uD83D\uDE17', + '\uD83D\uDE18', '\uD83D\uDE19', '\uD83D\uDE1A', '\uD83D\uDE1B', + '\uD83D\uDE1C', '\uD83D\uDE1D', '\uD83D\uDE1E', '\uD83D\uDE1F', + '\uD83D\uDE20', '\uD83D\uDE21', '\uD83D\uDE22', '\uD83D\uDE23', + '\uD83D\uDE24', '\uD83D\uDE25', '\uD83D\uDE26', '\uD83D\uDE27', + '\uD83D\uDE28', '\uD83D\uDE29', '\uD83D\uDE2A', '\uD83D\uDE2B', + '\uD83D\uDE2C', '\uD83D\uDE2D', '\uD83D\uDE2E', '\uD83D\uDE2F', + '\uD83D\uDE30', '\uD83D\uDE31', '\uD83D\uDE32', '\uD83D\uDE33', + '\uD83D\uDE34', '\uD83D\uDE35', '\uD83D\uDE36', '\uD83D\uDE37', + ); + /** * @link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes * On date of 2016-04-22 @@ -38,28 +61,28 @@ class Miscellaneous extends Base 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', - 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', - 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', - 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', - 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', - 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', - 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', - 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', - 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', - 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', - 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', - 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', - 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', - 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', - 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', - 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', - 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', - 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', - 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', - 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', - 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', - 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', - 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW', + 'BR', 'BS', 'BT', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', + 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', + 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', + 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', + 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', + 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', + 'GU', 'GW', 'GY', 'HK', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', + 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', + 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', + 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', + 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', + 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', + 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', + 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', + 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', + 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', + 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', + 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', + 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', + 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', + 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', + 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW', ); /** @@ -178,34 +201,39 @@ class Miscellaneous extends Base ); /** - * @link http://en.wikipedia.org/wiki/ISO_4217 - * On date of 2015-01-10 + * @link https://en.wikipedia.org/wiki/ISO_4217 + * On date of 2019-09-27 + * + * With the following exceptions: + * SVC has been replaced by the USD in 2001: https://en.wikipedia.org/wiki/Salvadoran_col%C3%B3n + * ZWL has been suspended since 2009: https://en.wikipedia.org/wiki/Zimbabwean_dollar */ protected static $currencyCode = array( 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', - 'BSD', 'BTC', 'BTN', 'BWP', 'BYR', 'BZD', 'CAD', 'CDF', 'CHF', 'CLF', - 'CLP', 'CNY', 'COP', 'CRC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', - 'DZD', 'EEK', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', - 'GGP', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', - 'HTG', 'HUF', 'IDR', 'ILS', 'IMP', 'INR', 'IQD', 'IRR', 'ISK', 'JEP', - 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', - 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LVL', 'LYD', - 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MTL', 'MUR', - 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', - 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', - 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', - 'SHP', 'SLL', 'SOS', 'SRD', 'STD', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', - 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', - 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XCD', - 'XDR', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMK', 'ZMW', 'ZWL' + 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHF', 'CLP', 'CNY', + 'COP', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', + 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', + 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', + 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', + 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', + 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', + 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', + 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', + 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', + 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SYP', 'SZL', + 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', + 'UGX', 'USD', 'UYU', 'UZS', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XCD', + 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', ); /** - * Return a boolean, true or false + * Return a boolean, true or false. + * + * @param int $chanceOfGettingTrue Between 0 (always get false) and 100 (always get true) * - * @param integer $chanceOfGettingTrue Between 0 (always get false) and 100 (always get true). * @return bool + * * @example true */ public static function boolean($chanceOfGettingTrue = 50) @@ -247,6 +275,7 @@ class Miscellaneous extends Base /** * @example 'FR' + * * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ public static function countryCode() @@ -256,6 +285,7 @@ class Miscellaneous extends Base /** * @example 'FRA' + * * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 */ public static function countryISOAlpha3() @@ -273,10 +303,21 @@ class Miscellaneous extends Base /** * @example 'EUR' + * * @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ public static function currencyCode() { return static::randomElement(static::$currencyCode); } + + /** + * Returns an encoded Unicode Character between U+1F600 and U+1F637. + * + * @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks + */ + public static function emoji() + { + return json_decode('"' . static::randomElement(static::$emoji) . '"'); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php index 73dc506..c4c0858 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php @@ -12,32 +12,44 @@ class Payment extends Base protected static $cardVendors = array( 'Visa', 'Visa', 'Visa', 'Visa', 'Visa', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', - 'American Express', 'Discover Card' + 'American Express', 'Discover Card', 'Visa Retired' ); - // see http://en.wikipedia.org/wiki/Bank_card_number for a reference of existing prefixes + /** + * @var array List of card brand masks for generating valid credit card numbers + * @see https://en.wikipedia.org/wiki/Payment_card_number Reference for existing prefixes + * @see https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html MasterCard 2017 2-Series BIN Expansion + */ protected static $cardParams = array( 'Visa' => array( - "4539########", "4539###########", - "4556########", "4556###########", - "4916########", "4916###########", - "4532########", "4532###########", - "4929########", "4929###########", - "40240071####", "40240071#######", - "4485########", "4485###########", - "4716########", "4716###########", - "4###########", "4##############" ), + 'Visa Retired' => array( + "4539########", + "4556########", + "4916########", + "4532########", + "4929########", + "40240071####", + "4485########", + "4716########", + "4###########", + ), 'MasterCard' => array( + "2221###########", + "23#############", + "24#############", + "25#############", + "26#############", + "2720###########", "51#############", "52#############", "53#############", @@ -76,6 +88,7 @@ class Payment extends Base 'DO' => array(array('c', 4), array('n', 20)), 'EE' => array(array('n', 2), array('n', 2), array('n', 11), array('n', 1)), 'ES' => array(array('n', 4), array('n', 4), array('n', 1), array('n', 1), array('n', 10)), + 'FI' => array(array('n', 6), array('n', 7), array('n', 1)), 'FR' => array(array('n', 5), array('n', 5), array('c', 11), array('n', 2)), 'GB' => array(array('a', 4), array('n', 6), array('n', 8)), 'GE' => array(array('a', 2), array('n', 16)), @@ -211,7 +224,7 @@ class Payment extends Base * @param integer $length total length without country code and 2 check digits * @return string */ - public static function iban($countryCode, $prefix = '', $length = null) + public static function iban($countryCode = null, $prefix = '', $length = null) { $countryCode = is_null($countryCode) ? self::randomKey(self::$ibanFormats) : strtoupper($countryCode); @@ -254,25 +267,11 @@ class Payment extends Base } } - $result = static::addBankCodeChecksum($result, $countryCode); - $checksum = Iban::checksum($countryCode . '00' . $result); return $countryCode . $checksum . $result; } - /** - * Calculates a checksum for the national bank and branch code part in the IBAN. - * - * @param string $iban randomly generated $iban - * @param string $countryCode ISO 3166-1 alpha-2 country code - * @return string IBAN with one character altered to a proper checksum - */ - protected static function addBankCodeChecksum($iban, $countryCode = '') - { - return $iban; - } - /** * Return the String of a SWIFT/BIC number * diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php index 78f0fa1..d9d1f6b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php @@ -22,7 +22,7 @@ class PhoneNumber extends Base */ public function e164PhoneNumber() { - $formats = array('+#############'); + $formats = array('+%############'); return static::numerify($this->generator->parse(static::randomElement($formats))); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Text.php index 3aaded9..80aa02f 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Text.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Text.php @@ -21,7 +21,7 @@ abstract class Text extends Base * @example 'Alice, swallowing down her flamingo, and began by taking the little golden key' * @param integer $maxNbChars Maximum number of characters the text should contain (minimum: 10) * @param integer $indexSize Determines how many words are considered for the generation of the next word. - * The minimum is 1, and it produces the higher level of randomness, although the + * The minimum is 1, and it produces a higher level of randomness, although the * generated text usually doesn't make sense. Higher index sizes (up to 5) * produce more correct text, at the price of less randomness. * @return string @@ -40,7 +40,6 @@ abstract class Text extends Base throw new \InvalidArgumentException('indexSize must be at most 5'); } - $words = $this->getConsecutiveWords($indexSize); $result = array(); $resultLength = 0; @@ -129,7 +128,7 @@ abstract class Text extends Base protected static function validStart($word) { $isValid = true; - if (self::$textStartsWithUppercase) { + if (static::$textStartsWithUppercase) { $isValid = preg_match('/^\p{Lu}/u', $word); } return $isValid; @@ -137,6 +136,6 @@ abstract class Text extends Base protected static function appendEnd($text) { - return $text.'.'; + return preg_replace("/([ ,-:;\x{2013}\x{2014}]+$)/us", '', $text).'.'; } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php index 2aec239..d659f4b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php @@ -108,7 +108,7 @@ class UserAgent extends Base } else { $ver = mt_rand(4, 5) . '.0.' . mt_rand(1, 5); } - + $mobileDevices = array( 'iPhone; CPU iPhone OS', 'iPad; CPU OS' @@ -122,7 +122,6 @@ class UserAgent extends Base return "Mozilla/5.0 " . static::randomElement($platforms); } - /** * Generate Opera user agent diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/Uuid.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/Uuid.php index ea5ecf1..ae5fc86 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/Uuid.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/Uuid.php @@ -10,7 +10,8 @@ class Uuid extends Base */ public static function uuid() { - // fix for compatibility with 32bit architecture; seed range restricted to 62bit + // fix for compatibility with 32bit architecture; each mt_rand call is restricted to 32bit + // two such calls will cause 64bits of randomness regardless of architecture $seed = mt_rand(0, 2147483647) . '#' . mt_rand(0, 2147483647); // Hash the seed and convert to a byte array diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Company.php index fc10726..34a1e17 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Company.php @@ -45,7 +45,7 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } /** @@ -58,6 +58,6 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Color.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Color.php new file mode 100644 index 0000000..9044918 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Color.php @@ -0,0 +1,81 @@ +generator->parse(static::randomElement(static::$towns)); + } + + public function syllable() + { + return static::randomElement(static::$syllables); + } + + public function direction() + { + return static::randomElement(static::$directions); + } + + public function englishStreetName() + { + return static::randomElement(static::$englishStreetNames); + } + + public function villageSuffix() + { + return static::randomElement(static::$villageSuffixes); + } + + public function estateSuffix() + { + return static::randomElement(static::$estateSuffixes); + } + + public function village() + { + return $this->generator->parse(static::randomElement(static::$villageNameFormats)); + } + + public function estate() + { + return $this->generator->parse(static::randomElement(static::$estateNameFormats)); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/en_HK/Internet.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/en_HK/Internet.php new file mode 100644 index 0000000..4d82d93 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/en_HK/Internet.php @@ -0,0 +1,14 @@ +generator->dateTimeThisCentury(); + } + $birthDateString = $birthdate->format('ymd'); + switch (strtolower($gender)) { + case static::GENDER_FEMALE: + $genderDigit = self::numberBetween(0, 4); + break; + case static::GENDER_MALE: + $genderDigit = self::numberBetween(5, 9); + break; + default: + $genderDigit = self::numberBetween(0, 9); + } + $sequenceDigits = str_pad(self::randomNumber(3), 3, 0, STR_PAD_BOTH); + $citizenDigit = ($citizen === true) ? '0' : '1'; + $raceDigit = self::numberBetween(8, 9); + + $partialIdNumber = $birthDateString . $genderDigit . $sequenceDigits . $citizenDigit . $raceDigit; + + return $partialIdNumber . Luhn::computeCheckDigit($partialIdNumber); + } + + /** + * @see https://en.wikipedia.org/wiki/Driving_licence_in_South_Africa + * + * @return string + */ + public function licenceCode() + { + return static::randomElement(static::$licenceCodes); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Company.php index 8e33f57..b255ef6 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Company.php @@ -48,7 +48,7 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } /** @@ -61,6 +61,6 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php index 89f73b1..ee9f1e7 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php @@ -8,14 +8,14 @@ class Address extends \Faker\Provider\Address protected static $citySuffix = array('del Vallès', 'del Penedès', 'del Bages', 'de Ulla', 'de Lemos', 'del Mirador', 'de Arriba', 'de la Sierra', 'del Barco', 'de San Pedro', 'del Pozo', 'del Puerto', 'de las Torres', 'Alta', 'Baja', 'Medio'); protected static $buildingNumber = array('###', '##', '#'); protected static $streetPrefix = array( - 'Calle', 'Avenida', 'Plaza', 'Paseo', 'Ronda', 'Travesia', 'Camino', 'Carrer', 'Avinguda', 'Plaça', 'Passeig', 'Travessera', 'Rúa', 'Praza', 'Ruela', 'Camiño' + 'Calle', 'Avenida', 'Plaza', 'Paseo', 'Ronda', 'Travesía', 'Camino', 'Carrer', 'Avinguda', 'Plaça', 'Passeig', 'Travessera', 'Rúa', 'Praza', 'Ruela', 'Camiño' ); protected static $postcode = array('#####'); protected static $community = array( 'Andalucía', 'Aragón', 'Principado de Asturias', 'Illes Balears', 'Canarias', 'Cantabria', 'Castilla y León', 'Castilla - La Mancha', 'Cataluña', 'Comunitat Valenciana', 'Extremadura', 'Galicia', 'Comunidad de Madrid', 'Región de Murcia', 'Comunidad Foral de Navarra', 'País Vasco', 'La Rioja', 'Ceuta', 'Melilla' ); protected static $state = array( - 'A Coruña', 'Alava', 'Albacete', 'Alicante', 'Almería', 'Asturias', 'Avila', 'Badajoz', 'Barcelona', 'Burgos', 'Cáceres', 'Cádiz', 'Cantabria', 'Castellón', 'Ceuta', 'Ciudad Real', 'Cuenca', 'Córdoba', 'Girona', 'Granada', 'Guadalajara', 'Guipuzkoa', 'Huelva', 'Huesca', 'Illes Balears', 'Jaén', 'La Rioja', 'Las Palmas', 'León', 'Lleida', 'Lugo', 'Málaga', 'Madrid', 'Melilla', 'Murcia', 'Navarra', 'Ourense', 'Palencia', 'Pontevedra', 'Salamanca', 'Segovia', 'Sevilla', 'Soria', 'Sta Cruz De Tenerife', 'Tarragona', 'Teruel', 'Toledo', 'Valencia', 'Valladolid', 'Vizcaya', 'Zamora', 'Zaragoza' + 'A Coruña', 'Álava', 'Albacete', 'Alicante', 'Almería', 'Asturias', 'Ávila', 'Badajoz', 'Barcelona', 'Burgos', 'Cáceres', 'Cádiz', 'Cantabria', 'Castellón', 'Ceuta', 'Ciudad Real', 'Cuenca', 'Córdoba', 'Girona', 'Granada', 'Guadalajara', 'Guipuzkoa', 'Huelva', 'Huesca', 'Illes Balears', 'Jaén', 'La Rioja', 'Las Palmas', 'León', 'Lleida', 'Lugo', 'Málaga', 'Madrid', 'Melilla', 'Murcia', 'Navarra', 'Ourense', 'Palencia', 'Pontevedra', 'Salamanca', 'Segovia', 'Sevilla', 'Soria', 'Santa Cruz de Tenerife', 'Tarragona', 'Teruel', 'Toledo', 'Valencia', 'Valladolid', 'Vizcaya', 'Zamora', 'Zaragoza' ); protected static $country = array( 'Afganistán','Albania','Alemania','Andorra','Angola','Antigua y Barbuda','Arabia Saudí','Argelia','Argentina','Armenia','Australia','Austria','Azerbaiyán', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Color.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Color.php new file mode 100644 index 0000000..99f4332 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Color.php @@ -0,0 +1,24 @@ +numberBetween(10000, 100000000); + $id = static::randomElement(static::$nationalityId); + if ($id == 'V') { + return $id . $separator . $this->numberBetween(10000, 100000000); + } + + return $id . $separator . $this->numberBetween(80000000, 100000000); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/et_EE/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/et_EE/Person.php new file mode 100644 index 0000000..1589a4b --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/et_EE/Person.php @@ -0,0 +1,89 @@ + + */ +class Person extends \Faker\Provider\Person +{ + /** + * @link https://news.err.ee/114745/most-popular-baby-names-of-2014 + * @link https://www.stat.ee/public/apps/nimed/TOP + */ + protected static $firstNameMale = array( + "Andrei", "Aleksei", "Andres", "Alexander", "Aivar", "Aleksander", "Artur", "Andrus", "Ants", "Artjom", "Anatoli", "Anton", "Arvo", "Aare", "Ain", "Aleksandr", + "Dmitri", "Daniil", "Daniel", + "Eduard", "Erik", "Enn", + "Fjodorov", + "Gennadi", + "Heino", "Henri", "Hugo", + "Igor", "Indrek", "Ivan", "Ilja", + "Jüri", "Jaan", "Jevgeni", "Jaanus", "Janek", "Jaak", + "Kristjan", "Kalev", "Karl", "Kalle", "Kaido", "Kevin", "Konstantin", "Kaspar", "Kirill", "Kristo", "Kalju", "Kristofer", + "Lauri", "Lembit", "Laur", + "Martin", "Margus", "Maksim", "Marko", "Mati", "Meelis", "Mihhail", "Marek", "Mihkel", "Mart", "Madis", "Markus", "Mark", "Marten", + "Nikolai", "Nikita", "Nikolay", + "Oleg", "Oliver", "Oskar", + "Peeter", "Priit", "Pavel", + "Rein", "Roman", "Raivo", "Rasmus", "Raul", "Robert", "Riho", "Robin", "Romet", + "Sergei", "Sander", "Sergey", "Siim", "Silver", "Sebastian", + "Toomas", "Tarmo", "Tõnu", "Tiit", "Tanel", "Taavi", "Toivo", "Tõnis", + "Urmas", "Ülo", + "Vladimir", "Viktor", "Valeri", "Vello", "Vadim", "Vitali", "Vladislav", "Vjatšeslav", "Victor", + ); + + /** + * @link https://news.err.ee/114745/most-popular-baby-names-of-2014 + * @link https://www.stat.ee/public/apps/nimed/TOP + */ + protected static $firstNameFemale = array( + "Aino", "Aleksandra", "Alisa", "Anastasia", "Anna", "Anne", "Anneli", "Anu", "Arina", "Annika", "Anastassia", "Alla", "Aili", "Alina", "Aime", "Antonina", + "Darja", "Diana", + "Elena", "Eliise", "Elisabeth", "Emma", "Ene", "Eve", "Eha", "Evi", + "Galina", + "Hanna", "Helen", "Heli", "Helle", "Helgi", + "Irina", "Inna", "Ingrid", + "Jekaterina", "Jelena", "Julia", "Jana", + "Kadri", "Katrin", "Kristi", "Kristiina", "Kristina", "Karin", "Kersti", "Kristel", "Kaja", "Külli", "Kätlin", "Krista", + "Laura", "Lenna", "Liisa", "Linda", "Lisandra", "Ljubov", "Ljudmila", "Liina", "Ljudmilla", "Larissa", "Liis", "Lea", "Laine", "Liudmila", + "Maie", "Malle", "Mare", "Maria", "Marina", "Marleen", "Marta", "Merike", "Mia", "Milana", "Mirtel", "Marika", "Merle", "Margit", "Milvi", "Maire", "Margarita", "Mari", "Maarja", + "Natalia", "Niina", "Nora", "Natalja", "Nadežda", "Nina", + "Olga", "Oksana", + "Piret", "Polina", "Pille", + "Reet", "Riina", + "Sandra", "Sirje", "Sofia", "Svetlana", "Silvi", + "Tamara", "Tatiana", "Tiina", "Tiiu", "Triin", "Tatjana", "Tiia", + "Ülle", "Urve", + "Valentina", "Viktoria", "Veera", "Veronika", "Vaike", + "Zinaida", + ); + + /** + * @link https://en.wikipedia.org/wiki/Category:Estonian-language_surnames + * @link https://www.stat.ee/public/apps/nimed/pere/TOP + */ + protected static $lastName = array( + "Aleksejev", "Andrejev", "Allik", "Aas", "Aleksandrov", "Aare", "Aarma", "Aas", "Aasmäe", "Aav", "Aavik", "Allik", "Alver", "Andrejeva", "Aleksejeva", "Aleksandrova", "Allik", "Aas", + "Bogdanova", "Bogdanov", + "Eenpalu", "Eskola", + "Fjodorov", "Fjodorov", "Fjodorova", "Fjodorova", + "Grigorjev", "Grigorjeva", + "Hunt", "Hein", "Hein", "Härma", + "Ivanov", "Ilves", "Ilves", "Ivanov", "Ivanova", "Ivanova", "Ilves", + "Jõgi", "Jakobson", "Jakovlev", "Jürgenson", "Jegorov", "Järv", "Johanson", "Järve", "Jakobson", "Jänes", "Järve", "Järvis", "Jõgi", "Jõgi", "Johanson", "Jürgenson", "Järv", "Jakovleva", "Jegorova", "Järve", "Jakobson", + "Kuzmina", "Kalda", "Kozlova", "Kruus", "Kask", "Kukk", "Kuznetsov", "Koppel", "Kaasik", "Kuusk", "Karu", "Kütt", "Kallas", "Kivi", "Kangur", "Kuusik", "Kõiv", "Kozlov", "Kull", "Kuzmin", "Kalda", "Kaaleste", "Kaasik", "Käbin", "Kalda", "Kaljulaid", "Kaljurand", "Kallas", "Kallaste", "Kangro", "Kangur", "Kapp", "Kärner", "Karu", "Kask", "Käsper", "Kass", "Keres", "Keskküla", "Kesküla", "Kikkas", "Kingsepp", "Kirs", "Kirsipuu", "Kivi", "Klavan", "Kõiv", "Kokk", "Kontaveit", "Koppel", "Korjus", "Kotkas", "Kreek", "Kross", "Kruus", "Kukk", "Kull", "Kütt", "Kuusik", "Kuusk", "Kuznetsov", "Kuznetsova", "Kask", "Kukk", "Kuznetsova", "Koppel", "Kaasik", "Kuusk", "Karu", "Kütt", "Kallas", "Kivi", "Kuusik", "Kangur", "Kõiv", "Kull", + "Luik", "Lepik", "Lepp", "Lõhmus", "Liiv", "Laur", "Leppik", "Lebedev", "Laas", "Laar", "Laht", "Lass", "Laur", "Laurits", "Lemsalu", "Lepik", "Lepmets", "Lepp", "Leppik", "Levandi", "Liiv", "Lill", "Lindmaa", "Linna", "Lipp", "Lippmaa", "Lõhmus", "Loo", "Lõoke", "Luik", "Luts", "Luik", "Lepik", "Lepp", "Lõhmus", "Laur", "Liiv", "Leppik", "Lebedeva", "Laas", + "Männik", "Mänd", "Mitt", "Makarova", "Mägi", "Mets", "Mihhailov", "Mölder", "Morozov", "Mitt", "Männik", "Mõttus", "Mänd", "Makarov", "Mägi", "Mälk", "Mänd", "Männik", "Margiste", "Mark", "Masing", "Mets", "Mihhailov", "Mihhailova", "Mölder", "Must", "Mägi", "Mets", "Mihhailova", "Mölder", "Morozova", + "Nikolajev", "Nõmm", "Nikitin", "Novikov", "Nõmmik", "Nurme", "Nurmsalu", "Nõmm", "Nikitina", "Nikolajeva", + "Orlova", "Orav", "Oja", "Ots", "Orav", "Orlov", "Oja", "Olesk", "Öpik", "Orav", "Ots", "Oja", "Ots", + "Petrov", "Pärn", "Põder", "Pavlov", "Popov", "Peterson", "Puusepp", "Paju", "Põld", "Pukk", "Paas", "Palm", "Pääsuke", "Padar", "Pärn", "Pavlov", "Pavlova", "Peebo", "Peetre", "Peterson", "Petrov", "Petrova", "Pihlak", "Piho", "Piip", "Põder", "Põld", "Popov", "Popova", "Poska", "Puhvel", "Pütsep", "Puusepp", "Petrova", "Pärn", "Pavlova", "Põder", "Peterson", "Popova", "Puusepp", "Paas", "Paju", "Pukk", "Parts", "Palm", "Põld", + "Romanova", "Rand", "Roos", "Rebane", "Raudsepp", "Raud", "Rand", "Roos", "Rätsep", "Raag", "Raud", "Raudsepp", "Rebane", "Reek", "Reinsalu", "Rooba", "Roolaid", "Rootare", "Rummo", "Rüütel", "Rüütli", "Rebane", "Raudsepp", "Raud", + "Saar", "Sepp", "Smirnov", "Stepanov", "Semjonov", "Sokolov", "Sild", "Sarapuu", "Saks", "Saar", "Salumäe", "Semjonov", "Sepp", "Sibul", "Siimar", "Simm", "Sirel", "Sisask", "Smirnov", "Smirnova", "Sokk", "Sokolov", "Soosaar", "Stepanov", "Stepanova", "Susi", "Saar", "Sepp", "Smirnova", "Stepanova", "Sokolova", "Saks", "Sarapuu", "Sild", "Semjonova", + "Tamme", "Tomson", "Tamm", "Teder", "Toom", "Tomson", "Tamme", "Talts", "Tamm", "Tamme", "Tarvas", "Teder", "Toom", "Toome", "Toots", "Tamm", "Teder", "Toom", + "Uibo", "Uibo", + "Vassiljev", "Vaher", "Volkov", "Valk", "Vaher", "Vahtra", "Vaino", "Vainola", "Välbe", "Valdma", "Väljas", "Valk", "Vassiljev", "Vassiljeva", "Vesik", "Veski", "Viiding", "Vitsut", "Võigemast", "Volkov", "Volkova", "Võsu", "Vassiljeva", "Vaher", "Volkova", + ); +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Address.php new file mode 100644 index 0000000..f220913 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Address.php @@ -0,0 +1,100 @@ +generator->parse($format); + } + + /** + * @example 'کد پستی' + */ + public static function postcodePrefix() + { + return static::randomElement(static::$postcodePrefix); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Company.php new file mode 100644 index 0000000..0de47b3 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Company.php @@ -0,0 +1,57 @@ + 1; $i--) { + $sum += $subNationalCodeString[$count] * ($i); + $count++; + } + + if (($sum % 11) < 2) { + return $sum % 11; + } + return 11 - ($sum % 11); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php index 1355c45..fb80b1d 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php @@ -7,11 +7,40 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber /** * @link https://fa.wikipedia.org/wiki/%D8%B4%D9%85%D8%A7%D8%B1%D9%87%E2%80%8C%D9%87%D8%A7%DB%8C_%D8%AA%D9%84%D9%81%D9%86_%D8%AF%D8%B1_%D8%A7%DB%8C%D8%B1%D8%A7%D9%86#.D8.AA.D9.84.D9.81.D9.86.E2.80.8C.D9.87.D8.A7.DB.8C_.D9.87.D9.85.D8.B1.D8.A7.D9.87 */ - protected static $formats = array( - '021#######', - '026#######', - '031#######', + protected static $formats = array( // land line formts seprated by province + "011########", //Mazandaran + "013########", //Gilan + "017########", //Golestan + "021########", //Tehran + "023########", //Semnan + "024########", //Zanjan + "025########", //Qom + "026########", //Alborz + "028########", //Qazvin + "031########", //Isfahan + "034########", //Kerman + "035########", //Yazd + "038########", //Chaharmahal and Bakhtiari + "041########", //East Azerbaijan + "044########", //West Azerbaijan + "045########", //Ardabil + "051########", //Razavi Khorasan + "054########", //Sistan and Baluchestan + "056########", //South Khorasan + "058########", //North Khorasan + "061########", //Khuzestan + "066########", //Lorestan + "071########", //Fars + "074########", //Kohgiluyeh and Boyer-Ahmad + "076########", //Hormozgan + "077########", //Bushehr + "081########", //Hamadan + "083########", //Kermanshah + "084########", //Ilam + "086########", //Markazi + "087########", //Kurdistan ); + protected static $mobileNumberPrefixes = array( '0910#######',//mci '0911#######', @@ -37,7 +66,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '0920#######', '0921#######', '0937#######', - '0937#######', + '0990#######', // MCI ); public static function mobileNumber() { diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php index 2c2df52..9640c24 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php @@ -46,7 +46,7 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } /** @@ -59,6 +59,6 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Payment.php new file mode 100644 index 0000000..44afab6 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Payment.php @@ -0,0 +1,19 @@ +format('dmy'); + + switch ((int)($birthdate->format('Y')/100)) { + case 18: + $centurySign = '+'; + break; + case 19: + $centurySign = '-'; + break; + case 20: + $centurySign = 'A'; + break; + default: + throw new \InvalidArgumentException('Year must be between 1800 and 2099 inclusive.'); + } + + $randomDigits = self::numberBetween(0, 89); + if ($gender && $gender == static::GENDER_MALE) { + if ($randomDigits === 0) { + $randomDigits .= static::randomElement(array(3,5,7,9)); + } else { + $randomDigits .= static::randomElement(array(1,3,5,7,9)); + } + } elseif ($gender && $gender == static::GENDER_FEMALE) { + if ($randomDigits === 0) { + $randomDigits .= static::randomElement(array(2,4,6,8)); + } else { + $randomDigits .= static::randomElement(array(0,2,4,6,8)); + } + } else { + if ($randomDigits === 0) { + $randomDigits .= self::numberBetween(2, 9); + } else { + $randomDigits .= (string)static::numerify('#'); + } + } + $randomDigits = str_pad($randomDigits, 3, '0', STR_PAD_LEFT); + + $checksum = $checksumCharacters[(int)($datePart . $randomDigits) % strlen($checksumCharacters)]; + + return $datePart . $centurySign . $randomDigits . $checksum; + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/PhoneNumber.php index 39f0e78..a323074 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/PhoneNumber.php @@ -4,17 +4,96 @@ namespace Faker\Provider\fi_FI; class PhoneNumber extends \Faker\Provider\PhoneNumber { - protected static $formats = array( - '+358 (40) ### ####', - '+358 (50) ### ####', - '+358 40 ### ####', - '+358 50 ### ####', - '040 ### ####', - '050 ### ####', - '###-########', - '### #######', - '040-#######', - '050-#######', - '(###) #######' + /** + * @link https://www.viestintavirasto.fi/en/internettelephone/numberingoftelecommunicationsnetworks/localcallsandtelecommunicationsareas/mapoftelecommunicationsareas.html + * @var array + */ + protected static $landLineareaCodes = array( + '02', + '03', + '05', + '06', + '08', + '09', + '013', + '014', + '015', + '016', + '017', + '018', + '019', ); + + /** + * @link https://www.viestintavirasto.fi/en/internettelephone/numberingoftelecommunicationsnetworks/mobilenetworks/mobilenetworkareacodes.html + * @var array + */ + protected static $mobileNetworkAreaCodes = array( + '040', + '050', + '044', + '045', + ); + + protected static $numberFormats = array( + '### ####', + '#######', + ); + + protected static $formats = array( + '+358 ({{ e164MobileNetworkAreaCode }}) {{ numberFormat }}', + '+358 {{ e164MobileNetworkAreaCode }} {{ numberFormat }}', + '+358 ({{ e164landLineAreaCode }}) {{ numberFormat }}', + '+358 {{ e164landLineAreaCode }} {{ numberFormat }}', + '{{ mobileNetworkAreaCode }}{{ separator }}{{ numberFormat }}', + '{{ landLineAreaCode }}{{ separator }}{{ numberFormat }}', + ); + + /** + * @return string + */ + public function landLineAreaCode() + { + return static::randomElement(static::$landLineareaCodes); + } + + /** + * @return string + */ + public function e164landLineAreaCode() + { + return substr(static::randomElement(static::$landLineareaCodes), 1); + } + + /** + * @return string + */ + public function mobileNetworkAreaCode() + { + return static::randomElement(static::$mobileNetworkAreaCodes); + } + + /** + * @return string + */ + public function e164MobileNetworkAreaCode() + { + return substr(static::randomElement(static::$mobileNetworkAreaCodes), 1); + } + + /** + * @return string + */ + public function numberFormat() + { + return static::randomElement(static::$numberFormats); + } + + /** + * @return string + */ + public function separator() + { + return static::randomElement(array(' ', '-')); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Company.php index f196130..6b8c0c7 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Company.php @@ -2,7 +2,7 @@ namespace Faker\Provider\fr_BE; -class Company extends \Faker\Provider\Company +class Company extends \Faker\Provider\fr_FR\Company { protected static $formats = array( '{{lastName}} {{companySuffix}}', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Payment.php index da248da..21da5b5 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Payment.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_BE/Payment.php @@ -32,7 +32,7 @@ class Payment extends \Faker\Provider\Payment */ public static function vat($spacedNationalPrefix = true) { - $prefix = ($spacedNationalPrefix) ? "BE " : "BE"; + $prefix = $spacedNationalPrefix ? "BE " : "BE"; return sprintf("%s0%d", $prefix, self::randomNumber(9, true)); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php index 9dfe447..4930b54 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php @@ -76,7 +76,7 @@ class Address extends \Faker\Provider\fr_FR\Address protected static $secondaryAddressFormats = array('Apt. ###', 'Suite ###', 'Bureau ###'); protected static $state = array( - 'Alberta', 'Colombie-Brittanique', 'Manitoba', 'Nouveau-Brunswick', 'Terre-Neuve-et-Labrador', 'Nouvelle-Écosse', 'Ontario', 'Île-du-Prince-Édouard', 'Québec', 'Saskatchewan' + 'Alberta', 'Colombie-Britannique', 'Manitoba', 'Nouveau-Brunswick', 'Terre-Neuve-et-Labrador', 'Nouvelle-Écosse', 'Ontario', 'Île-du-Prince-Édouard', 'Québec', 'Saskatchewan' ); protected static $stateAbbr = array( diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Company.php new file mode 100644 index 0000000..b6ffefd --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Company.php @@ -0,0 +1,7 @@ + 'Guadeloupe'), array('972' => 'Martinique'), array('973' => 'Guyane'), array('974' => 'La Réunion'), array('976' => 'Mayotte') ); + protected static $secondaryAddressFormats = array('Apt. ###', 'Suite ###', 'Étage ###', "Bât. ###", "Chambre ###"); + + /** + * @example 'Appt. 350' + */ + public static function secondaryAddress() + { + return static::numerify(static::randomElement(static::$secondaryAddressFormats)); + } + /** * @example 'rue' */ diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php index 5f44066..9112802 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php @@ -51,7 +51,7 @@ class Company extends \Faker\Provider\Company /** * @var array Company suffixes. */ - protected static $companySuffix = array('SA', 'S.A.', 'SARL', 'S.A.R.L.', 'S.A.S.', 'et Fils'); + protected static $companySuffix = array('SA', 'S.A.', 'SARL', 'S.A.R.L.', 'SAS', 'S.A.S.', 'et Fils'); protected static $siretNicFormats = array('####', '0###', '00#%'); @@ -112,7 +112,7 @@ class Company extends \Faker\Provider\Company */ public function siret($formatted = true) { - $siret = $this->siren(false); + $siret = self::siren(false); $nicFormat = static::randomElement(static::$siretNicFormats); $siret .= $this->numerify($nicFormat); $siret .= Luhn::computeCheckDigit($siret); @@ -129,9 +129,9 @@ class Company extends \Faker\Provider\Company * @see http://fr.wikipedia.org/wiki/Syst%C3%A8me_d%27identification_du_r%C3%A9pertoire_des_entreprises * @return string */ - public function siren($formatted = true) + public static function siren($formatted = true) { - $siren = $this->numerify('%#######'); + $siren = self::numerify('%#######'); $siren .= Luhn::computeCheckDigit($siren); if ($formatted) { $siren = substr($siren, 0, 3) . ' ' . substr($siren, 3, 3) . ' ' . substr($siren, 6, 3); @@ -166,4 +166,311 @@ class Company extends \Faker\Provider\Company return true; } + + /** + * @link http://www.pole-emploi.fr/candidat/le-code-rome-et-les-fiches-metiers-@/article.jspz?id=60702 + * @note Randomly took 300 from this list + */ + protected static $jobTitleFormat = array( + 'Agent d\'accueil', + 'Agent d\'enquêtes', + 'Agent d\'entreposage', + 'Agent de curage', + 'Agro-économiste', + 'Aide couvreur', + 'Aide à domicile', + 'Aide-déménageur', + 'Ambassadeur', + 'Analyste télématique', + 'Animateur d\'écomusée', + 'Animateur web', + 'Appareilleur-gazier', + 'Archéologue', + 'Armurier d\'art', + 'Armurier spectacle', + 'Artificier spectacle', + 'Artiste dramatique', + 'Aspigiculteur', + 'Assistant de justice', + 'Assistant des ventes', + 'Assistant logistique', + 'Assistant styliste', + 'Assurance', + 'Auteur-adaptateur', + 'Billettiste voyages', + 'Brigadier', + 'Bruiteur', + 'Bâtonnier d\'art', + 'Bûcheron', + 'Cameraman', + 'Capitaine de pêche', + 'Carrier', + 'Caviste', + 'Chansonnier', + 'Chanteur', + 'Chargé de recherche', + 'Chasseur-bagagiste', + 'Chef de fabrication', + 'Chef de scierie', + 'Chef des ventes', + 'Chef du personnel', + 'Chef géographe', + 'Chef monteur son', + 'Chef porion', + 'Chiropraticien', + 'Choréologue', + 'Chromiste', + 'Cintrier-machiniste', + 'Clerc hors rang', + 'Coach sportif', + 'Coffreur béton armé', + 'Coffreur-ferrailleur', + 'Commandant de police', + 'Commandant marine', + 'Commis de coupe', + 'Comptable unique', + 'Conception et études', + 'Conducteur de jumbo', + 'Conseiller culinaire', + 'Conseiller funéraire', + 'Conseiller relooking', + 'Consultant ergonome', + 'Contrebassiste', + 'Convoyeur garde', + 'Copiste offset', + 'Corniste', + 'Costumier-habilleur', + 'Coutelier d\'art', + 'Cueilleur de cerises', + 'Céramiste concepteur', + 'Danse', + 'Danseur', + 'Data manager', + 'Dee-jay', + 'Designer produit', + 'Diététicien conseil', + 'Diététique', + 'Doreur sur métaux', + 'Décorateur-costumier', + 'Défloqueur d\'amiante', + 'Dégustateur', + 'Délégué vétérinaire', + 'Délégué à la tutelle', + 'Désamianteur', + 'Détective', + 'Développeur web', + 'Ecotoxicologue', + 'Elagueur-botteur', + 'Elagueur-grimpeur', + 'Elastiqueur', + 'Eleveur d\'insectes', + 'Eleveur de chats', + 'Eleveur de volailles', + 'Embouteilleur', + 'Employé d\'accueil', + 'Employé d\'étage', + 'Employé de snack-bar', + 'Endivier', + 'Endocrinologue', + 'Epithésiste', + 'Essayeur-retoucheur', + 'Etainier', + 'Etancheur', + 'Etancheur-bardeur', + 'Etiqueteur', + 'Expert back-office', + 'Exploitant de tennis', + 'Extraction', + 'Facteur', + 'Facteur de clavecins', + 'Facteur de secteur', + 'Fantaisiste', + 'Façadier-bardeur', + 'Façadier-ravaleur', + 'Feutier', + 'Finance', + 'Flaconneur', + 'Foreur pétrole', + 'Formateur d\'italien', + 'Fossoyeur', + 'Fraiseur', + 'Fraiseur mouliste', + 'Frigoriste maritime', + 'Fromager', + 'Galeriste', + 'Gardien de résidence', + 'Garçon de chenil', + 'Garçon de hall', + 'Gendarme mobile', + 'Guitariste', + 'Gynécologue', + 'Géodésien', + 'Géologue prospecteur', + 'Géomètre', + 'Géomètre du cadastre', + 'Gérant d\'hôtel', + 'Gérant de tutelle', + 'Gériatre', + 'Hydrothérapie', + 'Hématologue', + 'Hôte de caisse', + 'Ingénieur bâtiment', + 'Ingénieur du son', + 'Ingénieur géologue', + 'Ingénieur géomètre', + 'Ingénieur halieute', + 'Ingénieur logistique', + 'Instituteur', + 'Jointeur de placage', + 'Juge des enfants', + 'Juriste financier', + 'Kiwiculteur', + 'Lexicographe', + 'Liftier', + 'Litigeur transport', + 'Logistique', + 'Logopède', + 'Magicien', + 'Manager d\'artiste', + 'Mannequin détail', + 'Maquilleur spectacle', + 'Marbrier-poseur', + 'Marin grande pêche', + 'Matelassier', + 'Maçon', + 'Maçon-fumiste', + 'Maçonnerie', + 'Maître de ballet', + 'Maïeuticien', + 'Menuisier', + 'Miroitier', + 'Modéliste industriel', + 'Moellonneur', + 'Moniteur de sport', + 'Monteur audiovisuel', + 'Monteur de fermettes', + 'Monteur de palettes', + 'Monteur en siège', + 'Monteur prototypiste', + 'Monteur-frigoriste', + 'Monteur-truquiste', + 'Mouleur sable', + 'Mouliste drapeur', + 'Mécanicien-armurier', + 'Médecin du sport', + 'Médecin scolaire', + 'Médiateur judiciaire', + 'Médiathécaire', + 'Net surfeur surfeuse', + 'Oenologue', + 'Opérateur de plateau', + 'Opérateur du son', + 'Opérateur géomètre', + 'Opérateur piquage', + 'Opérateur vidéo', + 'Ouvrier d\'abattoir', + 'Ouvrier serriste', + 'Ouvrier sidérurgiste', + 'Palefrenier', + 'Paléontologue', + 'Pareur en abattoir', + 'Parfumeur', + 'Parqueteur', + 'Percepteur', + 'Photographe d\'art', + 'Pilote automobile', + 'Pilote de soutireuse', + 'Pilote fluvial', + 'Piqueur en ganterie', + 'Pisteur secouriste', + 'Pizzaïolo', + 'Plaquiste enduiseur', + 'Plasticien', + 'Plisseur', + 'Poissonnier-traiteur', + 'Pontonnier', + 'Porion', + 'Porteur de hottes', + 'Porteur de journaux', + 'Portier', + 'Poseur de granit', + 'Posticheur spectacle', + 'Potier', + 'Praticien dentaire', + 'Praticiens médicaux', + 'Premier clerc', + 'Preneur de son', + 'Primeuriste', + 'Professeur d\'italien', + 'Projeteur béton armé', + 'Promotion des ventes', + 'Présentateur radio', + 'Pyrotechnicien', + 'Pédicure pour bovin', + 'Pédologue', + 'Pédopsychiatre', + 'Quincaillier', + 'Radio chargeur', + 'Ramasseur d\'asperges', + 'Ramasseur d\'endives', + 'Ravaleur-ragréeur', + 'Recherche', + 'Recuiseur', + 'Relieur-doreur', + 'Responsable de salle', + 'Responsable télécoms', + 'Revenue Manager', + 'Rippeur spectacle', + 'Rogneur', + 'Récupérateur', + 'Rédacteur des débats', + 'Régleur funéraire', + 'Régleur sur tour', + 'Sapeur-pompier', + 'Scannériste', + 'Scripte télévision', + 'Sculpteur sur verre', + 'Scénariste', + 'Second de cuisine', + 'Secrétaire juridique', + 'Semencier', + 'Sertisseur', + 'Services funéraires', + 'Solier-moquettiste', + 'Sommelier', + 'Sophrologue', + 'Staffeur', + 'Story boarder', + 'Stratifieur', + 'Stucateur', + 'Styliste graphiste', + 'Surjeteur-raseur', + 'Séismologue', + 'Technicien agricole', + 'Technicien bovin', + 'Technicien géomètre', + 'Technicien plateau', + 'Technicien énergie', + 'Terminologue', + 'Testeur informatique', + 'Toiliste', + 'Topographe', + 'Toréro', + 'Traducteur d\'édition', + 'Traffic manager', + 'Trieur de métaux', + 'Turbinier', + 'Téléconseiller', + 'Tôlier-traceur', + 'Vendeur carreau', + 'Vendeur en lingerie', + 'Vendeur en meubles', + 'Vendeur en épicerie', + 'Verrier d\'art', + 'Verrier à la calotte', + 'Verrier à la main', + 'Verrier à main levée', + 'Vidéo-jockey', + 'Vitrier', + ); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php index 5316876..d436dfe 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php @@ -4,6 +4,31 @@ namespace Faker\Provider\fr_FR; class Payment extends \Faker\Provider\Payment { + /** + * Value Added Tax (VAT) + * + * @example 'FR12123456789', ('spaced') 'FR 12 123 456 789' + * + * @see http://ec.europa.eu/taxation_customs/vies/faq.html?locale=en#item_11 + * @see http://www.iecomputersystems.com/ordering/eu_vat_numbers.htm + * @see http://en.wikipedia.org/wiki/VAT_identification_number + * + * @param bool $spacedNationalPrefix + * + * @return string VAT Number + */ + public function vat($spacedNationalPrefix = true) + { + $siren = Company::siren(false); + $key = (12 + 3 * ($siren % 97)) % 97; + $pattern = "%s%'.02d%s"; + if ($spacedNationalPrefix) { + $siren = trim(chunk_split($siren, 3, ' ')); + $pattern = "%s %'.02d %s"; + } + return sprintf($pattern, 'FR', $key, $siren); + } + /** * International Bank Account Number (IBAN) * @link http://en.wikipedia.org/wiki/International_Bank_Account_Number diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Person.php index 1907f5f..5778a7c 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Person.php @@ -67,4 +67,63 @@ class Person extends \Faker\Provider\Person { return static::randomElement(static::$prefix); } + + /** + * Generates a NIR / Sécurité Sociale number (13 digits + 2 digits for the key) + * + * @see https://fr.wikipedia.org/wiki/Num%C3%A9ro_de_s%C3%A9curit%C3%A9_sociale_en_France + * @return string + */ + public function nir($gender = null, $formatted = false) + { + // Gender + if ($gender === static::GENDER_MALE) { + $nir = 1; + } elseif ($gender === static::GENDER_FEMALE) { + $nir = 2; + } else { + $nir = $this->numberBetween(1, 2); + } + + $nir .= + // Year of birth (aa) + $this->numerify('##') . + // Mont of birth (mm) + sprintf('%02d', $this->numberBetween(1, 12)); + + // Department + $department = key(Address::department()); + $nir .= $department; + + // Town number, depends on department length + if (strlen($department) === 2) { + $nir .= $this->numerify('###'); + } elseif (strlen($department) === 3) { + $nir .= $this->numerify('##'); + } + + // Born number (depending of town and month of birth) + $nir .= $this->numerify('###'); + + /** + * The key for a given NIR is `97 - 97 % NIR` + * NIR has to be an integer, so we have to do a little replacment + * for departments 2A and 2B + */ + if ($department === '2A') { + $nirInteger = str_replace('2A', '19', $nir); + } elseif ($department === '2B') { + $nirInteger = str_replace('2B', '18', $nir); + } else { + $nirInteger = $nir; + } + $nir .= sprintf('%02d', 97 - $nirInteger % 97); + + // Format is x xx xx xx xxx xxx xx + if ($formatted) { + $nir = substr($nir, 0, 1) . ' ' . substr($nir, 1, 2) . ' ' . substr($nir, 3, 2) . ' ' . substr($nir, 5, 2) . ' ' . substr($nir, 7, 3). ' ' . substr($nir, 10, 3). ' ' . substr($nir, 13, 2); + } + + return $nir; + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php index c7c9f9e..7c0bd9d 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php @@ -14,8 +14,8 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '+33 (0)4 ## ## ## ##', '+33 (0)5 ## ## ## ##', '+33 (0)6 ## ## ## ##', - '+33 (0)7 ## ## ## ##', - '+33 (0)8 ## ## ## ##', + '+33 (0)7 {{phoneNumber07WithSeparator}}', + '+33 (0)8 {{phoneNumber08WithSeparator}}', '+33 (0)9 ## ## ## ##', '+33 1 ## ## ## ##', '+33 1 ## ## ## ##', @@ -24,8 +24,8 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '+33 4 ## ## ## ##', '+33 5 ## ## ## ##', '+33 6 ## ## ## ##', - '+33 7 ## ## ## ##', - '+33 8 ## ## ## ##', + '+33 7 {{phoneNumber07WithSeparator}}', + '+33 8 {{phoneNumber08WithSeparator}}', '+33 9 ## ## ## ##', '01########', '01########', @@ -34,8 +34,8 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '04########', '05########', '06########', - '07########', - '08########', + '07{{phoneNumber07}}', + '08{{phoneNumber08}}', '09########', '01 ## ## ## ##', '01 ## ## ## ##', @@ -44,27 +44,98 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '04 ## ## ## ##', '05 ## ## ## ##', '06 ## ## ## ##', - '07 ## ## ## ##', - '08 ## ## ## ##', + '07 {{phoneNumber07WithSeparator}}', + '08 {{phoneNumber08WithSeparator}}', '09 ## ## ## ##', ); // Mobile phone numbers start by 06 and 07 // 06 is the most common prefix protected static $mobileFormats = array( + '+33 (0)6 ## ## ## ##', '+33 6 ## ## ## ##', - '+33 7 ## ## ## ##', + '+33 (0)7 {{phoneNumber07WithSeparator}}', + '+33 7 {{phoneNumber07WithSeparator}}', '06########', - '07########', + '07{{phoneNumber07}}', '06 ## ## ## ##', - '07 ## ## ## ##', + '07 {{phoneNumber07WithSeparator}}', ); + protected static $serviceFormats = array( + '+33 (0)8 {{phoneNumber08WithSeparator}}', + '+33 8 {{phoneNumber08WithSeparator}}', + '08 {{phoneNumber08WithSeparator}}', + '08{{phoneNumber08}}', + ); + + public function phoneNumber07() + { + $phoneNumber = $this->phoneNumber07WithSeparator(); + $phoneNumber = str_replace(' ', '', $phoneNumber); + return $phoneNumber; + } + + /** + * Only 073 to 079 are acceptable prefixes with 07 + * + * @see http://www.arcep.fr/index.php?id=8146 + */ + public function phoneNumber07WithSeparator() + { + $phoneNumber = $this->generator->numberBetween(3, 9); + $phoneNumber .= $this->numerify('# ## ## ##'); + return $phoneNumber; + } + + public function phoneNumber08() + { + $phoneNumber = $this->phoneNumber08WithSeparator(); + $phoneNumber = str_replace(' ', '', $phoneNumber); + return $phoneNumber; + } + + /** + * Valid formats for 08: + * + * 0# ## ## ## + * 1# ## ## ## + * 2# ## ## ## + * 91 ## ## ## + * 92 ## ## ## + * 93 ## ## ## + * 97 ## ## ## + * 98 ## ## ## + * 99 ## ## ## + * + * Formats 089(4|6)## ## ## are valid, but will be + * attributed when other 089 resource ranges are exhausted. + * + * @see https://www.arcep.fr/index.php?id=8146#c9625 + * @see https://issuetracker.google.com/u/1/issues/73269839 + */ + public function phoneNumber08WithSeparator() + { + $regex = '([012]{1}\d{1}|(9[1-357-9])( \d{2}){3}'; + return $this->regexify($regex); + } + /** * @example '0601020304' */ - public static function mobileNumber() + public function mobileNumber() { - return static::numerify(static::randomElement(static::$mobileFormats)); + $format = static::randomElement(static::$mobileFormats); + + return static::numerify($this->generator->parse($format)); + } + /** + * @example '0891951357' + */ + public function serviceNumber() + { + $format = static::randomElement(static::$serviceFormats); + + return static::numerify($this->generator->parse($format)); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/he_IL/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/he_IL/Payment.php new file mode 100644 index 0000000..aac85f2 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/he_IL/Payment.php @@ -0,0 +1,19 @@ +birthPlaceCode(); + $nik .= $this->generator->numerify('##'); + + if (!$birthDate) { + $birthDate = $this->generator->dateTimeBetween(); + } + + if (!$gender) { + $gender = $this->generator->randomElement(array(self::GENDER_MALE, self::GENDER_FEMALE)); + } + + # if gender is female, add 40 to days + if ($gender == self::GENDER_FEMALE) { + $nik .= $birthDate->format('d') + 40; + } else { + $nik .= $birthDate->format('d'); + } + + $nik .= $birthDate->format('my'); + + # add last random digits + $nik .= $this->generator->numerify('####'); + + return $nik; + } + + /** + * Generates birth place code for NIK + * + * @link https://id.wikipedia.org/wiki/Nomor_Induk_Kependudukan + * @link http://informasipedia.com/wilayah-indonesia/daftar-kabupaten-kota-di-indonesia/ + */ + protected function birthPlaceCode() + { + return static::randomElement(static::$birthPlaceCode); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Person.php index 1b4d564..0fdea68 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Person.php @@ -78,7 +78,7 @@ class Person extends \Faker\Provider\Person */ public function lastNameMale() { - return $this->lastName().'dóttir'; + return $this->lastName().'son'; } /** @@ -88,7 +88,7 @@ class Person extends \Faker\Provider\Person */ public function lastNameFemale() { - return $this->lastName().'son'; + return $this->lastName().'dóttir'; } /** diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Person.php index 5592fb5..12ef337 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Person.php @@ -85,4 +85,17 @@ class Person extends \Faker\Provider\it_IT\Person 'Weber', 'Widmer', 'Zanetti', 'Zanini', 'Zimmermann', ); + + /** + * Generates a valid random AVS13 (swiss social security) number + * + * This function acts as an alias for the function defined in the fr_CH provider. + * + * @see \Faker\Provider\fr_CH\Person::avs13() + * @return string + */ + public static function avs13() + { + return \Faker\Provider\fr_CH\Person::avs13(); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php index f27499a..e32a37b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php @@ -2,6 +2,8 @@ namespace Faker\Provider\it_IT; +use Faker\Calculator\Luhn; + class Company extends \Faker\Provider\Company { protected static $formats = array( @@ -46,7 +48,7 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } /** @@ -59,7 +61,7 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } /** @@ -69,6 +71,8 @@ class Company extends \Faker\Provider\Company */ public static function vatId() { - return static::numerify('IT###########'); + $code = sprintf('%s%03d', static::numerify('#######'), static::numberBetween(1, 121)); + + return sprintf('IT%s%d', $code, Luhn::computeCheckDigit($code)); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php index 2ef8d89..1071467 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php @@ -11,7 +11,7 @@ class Address extends \Faker\Provider\Address 'デンマーク', 'ジブチ共和国', 'ドミニカ国', 'ドミニカ共和国', 'エクアドル', 'エジプト', 'エルサルバドル', '赤道ギニア共和国', 'エリトリア', 'エストニア', 'エチオピア', 'フェロー諸島', 'フォークランド諸島', 'フィジー共和国', 'フィンランド', 'フランス', 'フランス領ギアナ', 'フランス領ポリネシア', 'フランス領極南諸島', - 'ガボン', 'ガンビア', 'グルジア', 'ドイツ', 'ガーナ', 'ジブラルタル', 'ギリシャ', 'グリーンランド', 'グレナダ', 'グアドループ', 'グアム', 'グアテマラ', 'ガーンジー', 'ギニア', 'ギニアビサウ', 'ガイアナ', + 'ガボン', 'ガンビア', 'ジョージア', 'ドイツ', 'ガーナ', 'ジブラルタル', 'ギリシャ', 'グリーンランド', 'グレナダ', 'グアドループ', 'グアム', 'グアテマラ', 'ガーンジー', 'ギニア', 'ギニアビサウ', 'ガイアナ', 'ハイチ', 'ハード島とマクドナルド諸島', 'バチカン市国', 'ホンジュラス', '香港', 'ハンガリー', 'アイスランド', 'インド', 'インドネシア', 'イラン', 'イラク', 'アイルランド共和国', 'マン島', 'イスラエル', 'イタリア', 'ジャマイカ', '日本', 'ジャージー島', 'ヨルダン', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Internet.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Internet.php index 62c14a9..5dfaaf1 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Internet.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Internet.php @@ -10,21 +10,57 @@ class Internet extends \Faker\Provider\Internet '{{firstNameAscii}}##', '?{{lastNameAscii}}', ); + protected static $safeEmailTld = array( 'org', 'com', 'net', 'jp', 'jp', 'jp', ); + protected static $freeEmailDomain = array( 'gmail.com', 'yahoo.co.jp', 'hotmail.co.jp', 'mail.goo.ne.jp' ); + protected static $tld = array( 'com', 'com', 'com', 'biz', 'info', 'net', 'org', 'jp', 'jp', 'jp', ); + /** + * {@link} http://dic.nicovideo.jp/a/%E6%97%A5%E6%9C%AC%E3%81%AE%E8%8B%97%E5%AD%97%28%E5%90%8D%E5%AD%97%29%E3%81%AE%E4%B8%80%E8%A6%A7 + */ protected static $lastNameAscii = array( - 'uno', 'kudo', 'suzuki', 'tanabe', 'nagisa', 'hirokawa', 'yoshimoto' + 'aota', 'aoyama', 'ishida', 'idaka', 'ito', 'uno', 'ekoda', 'ogaki', + 'kato', 'kanou', 'kijima', 'kimura', 'kiriyama', 'kudo', 'koizumi', 'kobayashi', 'kondo', + 'saito', 'sakamoto', 'sasaki', 'sato', 'sasada', 'suzuki', 'sugiyama', + 'takahashi', 'tanaka', 'tanabe', 'tsuda', + 'nakajima', 'nakamura', 'nagisa', 'nakatsugawa', 'nishinosono', 'nomura', + 'harada', 'hamada', 'hirokawa', 'fujimoto', + 'matsumoto', 'miyake', 'miyazawa', 'murayama', + 'yamagishi', 'yamaguchi', 'yamada', 'yamamoto', 'yoshida', 'yoshimoto', + 'wakamatsu', 'watanabe', ); + + /** + * {@link} http://dic.nicovideo.jp/a/%E6%97%A5%E6%9C%AC%E4%BA%BA%E3%81%AE%E5%90%8D%E5%89%8D%E4%B8%80%E8%A6%A7 + * {@link} http://www.meijiyasuda.co.jp/enjoy/ranking/ + */ protected static $firstNameAscii = array( - 'akira', 'kana', 'taro', 'naoko', 'hiroshi', 'momoko', 'rika' + 'akira', 'atsushi', 'osamu', + 'akemi', 'asuka', + 'kazuya', 'kyosuke', 'kenichi', + 'kaori', 'kana', 'kumiko', + 'shuhei', 'shota', 'jun', 'soutaro', + 'sayuri', 'satomi', + 'taichi', 'taro', 'takuma', 'tsubasa', 'tomoya', + 'chiyo', + 'naoki', 'naoto', + 'naoko', 'nanami', + 'hideki', 'hiroshi', + 'hanako', 'haruka', + 'manabu', 'mitsuru', 'minoru', + 'maaya', 'mai', 'mikako', 'miki', 'momoko', + 'yuki', 'yuta', 'yasuhiro', 'youichi', 'yosuke', + 'yui', 'yumiko', 'yoko', + 'ryosuke', 'ryohei', 'rei', + 'rika', ); public static function lastNameAscii() diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php index 20fb6cd..0db2db0 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php @@ -45,19 +45,28 @@ class Person extends \Faker\Provider\Person '若松', '渡辺', ); - protected static $kanaFormats = array( - '{{lastKanaName}} {{firstKanaName}}' + protected static $firstKanaNameFormat = array( + '{{firstKanaNameMale}}', + '{{firstKanaNameFemale}}', ); - protected static $firstKanaName = array( - 'アキラ', 'アケミ', 'アスカ', 'アツシ', 'オサム', - 'カオリ', 'カナ', 'キョウスケ', 'ケンイチ', 'クミコ', 'ケンイチ', - 'サユリ', 'ジュン', 'ソウタロウ', - 'タイチ', 'タロウ', 'チヨ', 'タクマ', 'ツバサ', 'トモミ', 'トモヤ', - 'ナオキ', 'ナオコ', 'ナオト', 'ナナカ', - 'ハナコ', 'ヒデキ', 'ハルカ', 'ヒロシ', - 'マアヤ', 'マイ', 'マナブ', 'ミキ', 'ミツル', 'ミノル', 'モモコ', 'ヒロキ', - 'ユイ', 'ユウタ', 'ヤスヒロ', 'ヨウイチ', 'ヨウコ', 'ヨウスケ', 'ユミコ', 'リョウスケ', 'リョウヘイ', 'レイ', 'リカ', + protected static $maleKanaNameFormats = array( + '{{lastKanaName}} {{firstKanaNameMale}}', + ); + + protected static $femaleKanaNameFormats = array( + '{{lastKanaName}} {{firstKanaNameFemale}}', + ); + + protected static $firstKanaNameMale = array( + 'アキラ', 'アツシ', 'オサム', 'カズヤ', 'キョウスケ', 'ケンイチ', 'シュウヘイ', 'ショウタ', 'ジュン', 'ソウタロウ', + 'タイチ', 'タロウ', 'タクマ', 'ツバサ', 'トモヤ', 'ナオキ', 'ナオト', 'ヒデキ', 'ヒロシ', 'マナブ', 'ミツル', 'ミノル', + 'ユウキ', 'ユウタ', 'ヤスヒロ', 'ヨウイチ', 'ヨウスケ', 'リョウスケ', 'リョウヘイ', 'レイ', + ); + + protected static $firstKanaNameFemale = array( + 'アケミ', 'アスカ', 'カオリ', 'カナ', 'クミコ', 'サユリ', 'サトミ', 'チヨ', + 'ナオコ', 'ナナミ', 'ハナコ', 'ハルカ', 'マアヤ', 'マイ', 'ミカコ', 'ミキ', 'モモコ', 'ユイ', 'ユミコ', 'ヨウコ', 'リカ', ); protected static $lastKanaName = array( @@ -73,26 +82,58 @@ class Person extends \Faker\Provider\Person ); /** + * @param string|null $gender 'male', 'female' or null for any + * @return string * @example 'アオタ アキラ' */ - public function kanaName() + public function kanaName($gender = null) { - $format = static::randomElement(static::$kanaFormats); + if ($gender === static::GENDER_MALE) { + $format = static::randomElement(static::$maleKanaNameFormats); + } elseif ($gender === static::GENDER_FEMALE) { + $format = static::randomElement(static::$femaleKanaNameFormats); + } else { + $format = static::randomElement(array_merge(static::$maleKanaNameFormats, static::$femaleKanaNameFormats)); + } return $this->generator->parse($format); } /** - * @example 'アオタ' + * @param string|null $gender 'male', 'female' or null for any + * @return string + * @example 'アキラ' */ - public static function firstKanaName() + public function firstKanaName($gender = null) { - return static::randomElement(static::$firstKanaName); + if ($gender === static::GENDER_MALE) { + return static::firstKanaNameMale(); + } elseif ($gender === static::GENDER_FEMALE) { + return static::firstKanaNameFemale(); + } + + return $this->generator->parse(static::randomElement(static::$firstKanaNameFormat)); } /** * @example 'アキラ' */ + public static function firstKanaNameMale() + { + return static::randomElement(static::$firstKanaNameMale); + } + + /** + * @example 'アケミ' + */ + public static function firstKanaNameFemale() + { + return static::randomElement(static::$firstKanaNameFemale); + } + + /** + * @example 'アオタ' + */ public static function lastKanaName() { return static::randomElement(static::$lastKanaName); diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php index f4230d1..9f03c56 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php @@ -4,9 +4,16 @@ namespace Faker\Provider\ja_JP; class PhoneNumber extends \Faker\Provider\PhoneNumber { + /** + * @link http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html#kotei-denwa + */ protected static $formats = array( '080-####-####', '090-####-####', - '##-####-####' + '0#-####-####', + '0####-#-####', + '0###-##-####', + '0##-###-####', + '0##0-###-###', ); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Text.php index b0a41c7..c8671cc 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Text.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Text.php @@ -598,7 +598,7 @@ EOT; protected static function explode($text) { $chars = array(); - foreach (preg_split('//u', preg_replace('/\s+/', '', $text)) as $char) { + foreach (preg_split('//u', preg_replace('/\s+/u', '', $text)) as $char) { if ($char !== '') { $chars[] = $char; } @@ -620,7 +620,7 @@ EOT; { // extract the last char of $text if (function_exists('mb_substr')) { - $last = mb_substr($text, mb_strlen($text)-1, 'UTF-8'); + $last = mb_substr($text, 0, mb_strlen($text) - 1, 'UTF-8'); } else { $chars = static::split($text); $last = end($chars); @@ -630,6 +630,6 @@ EOT; $text = preg_replace('/.$/u', '', $text); } // if the last char is not a valid punctuation, append a default one. - return in_array($last, static::$endPunct) ? $text : $text.'。'; + return in_array($last, static::$endPunct) ? $text : $text . '。'; } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Address.php index 9f2424f..31c278a 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Address.php @@ -4,17 +4,17 @@ namespace Faker\Provider\ka_GE; class Address extends \Faker\Provider\Address { - protected static $cityPrefix = array('ქალაქი'); + protected static $cityPrefix = array('ქალაქი', 'ქ.'); protected static $regionSuffix = array('რაიონი'); - protected static $streetPrefix = array( + protected static $streetSuffix = array( 'ჩიხი', 'ქ.', 'გამზირი', 'ქუჩა', 'გზატკეცილი', 'მოედანი', 'ბულვარი', - 'აღმართი', 'ხეივანი', + 'აღმართი', 'ხეივანი' ); protected static $buildingNumber = array('##'); - protected static $postcode = array('####'); - protected static $country = array( + protected static $postcode = array('####'); + protected static $country = array( 'ავსტრალია', 'ავსტრია', 'ავღანეთი', 'აზერბაიჯანი', 'ალანდის კუნძულები', 'ალბანეთი', 'ალჟირი', 'ამერიკის სამოა', 'ანგილია', 'ანგოლა', 'ანდორა', 'ანტარქტიდა', 'ანტიგუა და ბარბუდა', 'არაბთა გაერთიანებული საამიროები', 'არგენტინა', 'არუბა', 'აღმოსავლეთი ტიმორი', 'აშშ', @@ -54,12 +54,17 @@ class Address extends \Faker\Provider\Address 'შვედეთი', 'შვეიცარია', 'შობის კუნძული', 'შრი-ლანკა', 'ჩადი', 'ჩერნოგორია', 'ჩეხეთი', 'ჩილე', 'ჩინეთი', 'ჩრდილოეთი კორეა', 'ჩრდილოეთი მარიანას კუნძულები', 'ცენტრალური აფრიკის რესპუბლიკა', 'წმინდა ელენეს კუნძული', 'წმინდა მარტინი (საფრანგეთის ნაწილი)', 'ხორვატია', 'ჯერზი', 'ჯიბუტი', 'ჰაიტი', - 'ჰერდი და მაკდონალდის კუნძულები', 'ჰონგ-კონგი', 'ჰონდურასი', + 'ჰერდი და მაკდონალდის კუნძულები', 'ჰონგ-კონგი', 'ჰონდურასი' ); protected static $region = array( - 'აფხაზეთი', 'აჭარა ', 'იმერეთი', 'სამეგრელო-ზემო სვანეთი', 'მცხეთა-მთიანეთი', 'სამცხე-ჯავახეთი ', - 'შიდა ქართლი', 'კახეთი', 'რაჭა-ლეჩხუმი და ქვემო სვანეთი', 'გურია', 'ქვემო ქართლი', + 'აფხაზეთი', 'აჭარა', 'იმერეთი', 'სამეგრელო-ზემო სვანეთი', 'მცხეთა-მთიანეთი', 'სამცხე-ჯავახეთი', + 'შიდა ქართლი', 'კახეთი', 'რაჭა-ლეჩხუმი და ქვემო სვანეთი', 'გურია', 'ქვემო ქართლი' + ); + + protected static $regionGenitiveForm = array( + 'აფხაზეთის', 'აჭარის', 'იმერეთის', 'სამეგრელო-ზემო სვანეთის', 'მცხეთა-მთიანეთის', 'სამცხე-ჯავახეთის', + 'შიდა ქართლის', 'კახეთის', 'რაჭა-ლეჩხუმი და ქვემო სვანეთის', 'გურიის', 'ქვემო ქართლის' ); protected static $city = array( @@ -69,23 +74,35 @@ class Address extends \Faker\Provider\Address 'თერჯოლა', 'კასპი', 'ლაგოდეხი', 'ლანჩხუთი', 'მარნეული', 'მარტვილი', 'მცხეთა', 'ნინოწმინდა', 'ოზურგეთი', 'ონი', 'ოჩამჩირე', 'რუსთავი', 'საგარეჯო', 'სამტრედია', 'საჩხერე', 'სენაკი', 'სიღნაღი', 'სოხუმი', 'ტყვარჩელი', 'ტყიბული', 'ფოთი', 'ქარელი', 'ქობულეთი', 'ქუთაისი', 'ყვარელი', 'ცაგერი', 'ცხინვალი', - 'წალენჯიხა', 'წალკა', 'წნორი', 'წყალტუბო', 'ჭიათურა', 'ხაშური', 'ხობი', 'ხონი', 'ჯვარი', + 'წალენჯიხა', 'წალკა', 'წნორი', 'წყალტუბო', 'ჭიათურა', 'ხაშური', 'ხობი', 'ხონი', 'ჯვარი' ); protected static $street = array( 'რუსთაველის', 'ტაბიძის', 'აღმაშენებლის', 'ბარათაშვილის', 'თამარ მეფის', 'სააკაძის', 'ყაზბეგის', 'რობაქიძის', 'ვაჟა-ფშაველას', 'ნუცუბიძის', 'შეშელიძის', 'სააკაძის', 'სანაპიროს', 'გორგასლის', 'ელიავას', 'ჭონქაძის', - 'ფანასკერტელის', + 'ფანასკერტელის' ); protected static $addressFormats = array( - "{{region}} {{regionSuffix}}, {{cityPrefix}} {{city}}, {{street}} {{streetPrefix}} {{postcode}}, {{buildingNumber}}", + "საქართველო, {{regionGenitiveForm}} {{regionSuffix}}, {{city}}, {{streetAddress}}, {{postcode}}", + "{{regionGenitiveForm}} {{regionSuffix}}, {{city}}, {{streetAddress}}, {{postcode}}", + "{{streetAddress}}, {{postcode}}, {{city}}, {{regionGenitiveForm}} {{regionSuffix}}", + "{{streetAddress}}, {{postcode}}, {{city}}, {{regionGenitiveForm}} {{regionSuffix}}, საქართველო", + "{{city}}, {{streetAddress}}, {{postcode}}", + "საქართველო, {{city}}, {{streetAddress}}, {{postcode}}", + "{{streetAddress}}, {{postcode}}, {{city}}", + "{{streetAddress}}, {{postcode}}, {{city}}, საქართველო", ); protected static $streetAddressFormats = array( - "{{street}} {{streetPrefix}}, {{buildingNumber}}", + "{{street}} {{streetSuffix}} #{{buildingNumber}}" ); + protected static $cityFormats = array( + "{{cityPrefix}} {{cityName}}" + ); + + public static function regionSuffix() { return static::randomElement(static::$regionSuffix); @@ -96,14 +113,24 @@ class Address extends \Faker\Provider\Address return static::randomElement(static::$region); } + public static function regionGenitiveForm() + { + return static::randomElement(static::$regionGenitiveForm); + } + + public static function cityName() + { + return static::randomElement(static::$city); + } + public static function cityPrefix() { return static::randomElement(static::$cityPrefix); } - public static function streetPrefix() + public static function streetSuffix() { - return static::randomElement(static::$streetPrefix); + return static::randomElement(static::$streetSuffix); } public static function street() diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Company.php new file mode 100644 index 0000000..c2ccb40 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Company.php @@ -0,0 +1,54 @@ +generator->parse($format); + } + + public static function companyPrefix() + { + return static::randomElement(static::$companyPrefixes); + } + + public static function companyNameElement() + { + return static::randomElement(static::$companyElements); + } + + public static function companyNameSuffix() + { + return static::randomElement(static::$companyNameSuffixes); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php index f37c866..01b15c7 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php @@ -4,6 +4,12 @@ namespace Faker\Provider\ka_GE; class Internet extends \Faker\Provider\Internet { - protected static $freeEmailDomain = array('posta.ge', 'boom.ge', 'hotmail.com', 'gmail.com', 'yahoo.com', 'mail.ru'); - protected static $tld = array('ge', 'ge', 'ge', 'ge', 'com.ge', 'com', 'com', 'net', 'org'); + protected static $freeEmailDomain = array( + 'posta.ge', 'boom.ge', 'hotmail.com', 'gmail.com', 'yahoo.com', 'mail.ru', 'avoe.ge' + ); + + protected static $tld = array( + 'ge', 'ge', 'ge', 'ge', 'ge', 'com.ge', 'edu.ge', 'net.ge', 'org.ge', + 'pvt.ge', 'gov.ge', 'mil.ge', 'com', 'biz', 'info', 'net', 'org' + ); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Person.php index d24ff5c..5462014 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Person.php @@ -56,4 +56,8 @@ class Person extends \Faker\Provider\Person 'ჭელიძე', 'ჭიღლაძე', 'ჭკადუა', 'ჭუმბურიძე', 'ხარაიშვილი', 'ხაჩიძე', 'ხვედელიძე', 'ხურცილავა', 'ხურციძე', 'ხუციშვილი', 'ჯავახიშვილი', 'ჯალაღონია', 'ჯანაშია', 'ჯანელიძე', 'ჯაფარიძე', 'ჯინჭარაძე', 'ჯიქია', 'ჯოხაძე', 'ჯოჯუა', ); + + protected static $titleMale = array('ბნ.', 'დოქ.', 'პროფ.'); + + protected static $titleFemale = array('ქნ.', 'დოქ.', 'პროფ.'); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Text.php index 010c3c1..99b5e7b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Text.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Text.php @@ -4,6 +4,9 @@ namespace Faker\Provider\ka_GE; class Text extends \Faker\Provider\Text { + + protected static $textStartsWithUppercase = false; + /** * License: Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) * diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Company.php index 56b002a..f8f8d15 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Company.php @@ -52,7 +52,7 @@ class Company extends \Faker\Provider\Company /** * National Business Identification Numbers * - * @link http://egov.kz/wps/portal/!utWCM/p/b1/04_Sj9Q1MjAwsDQ1s9CP0I_KSyzLTE8syczPS8wB8aPM4oO8PE2cnAwdDSxMw4wMHE08nZ2CA0KDXcwMgQoikRUYWIY4gxS4hwU4mRkbGBgTp98AB3A0IKQ_XD8KVQkWF4AV4LHCzyM_N1U_uKhUPzcqx83SU9cRANth_Rk!/dl4/d5/L0lHSkovd0RNQU5rQUVnQSEhLzRKVUUvZW4!/ + * @link http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fbus_business%2Ffor_businessmen%2Farticle%2Fbusiness_identification_number&lang=en * @param \DateTime $registrationDate * @return string 12 digits, like 150140000019 */ diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php index 3eca4a5..4e1e681 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php @@ -2,9 +2,52 @@ namespace Faker\Provider\kk_KZ; +use \Faker\Provider\DateTime; + class Person extends \Faker\Provider\Person { + const GENDER_MALE = 0; + const GENDER_FEMALE = 1; + + const CENTURY_19TH = 0; + const CENTURY_20TH = 1; + const CENTURY_21ST = 2; + + const MALE_CENTURY_19TH = 1; + const MALE_CENTURY_20TH = 3; + const MALE_CENTURY_21ST = 5; + + const FEMALE_CENTURY_19TH = 2; + const FEMALE_CENTURY_20TH = 4; + const FEMALE_CENTURY_21ST = 6; + + /** + * @var array + */ + public static $firstSequenceBitWeights = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + + /** + * @var array + */ + public static $secondSequenceBitWeights = array(3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2); + + /** + * @var array + */ + public static $genderCenturyMap = array( + self::GENDER_MALE => array( + self::CENTURY_19TH => self::MALE_CENTURY_19TH, + self::CENTURY_20TH => self::MALE_CENTURY_20TH, + self::CENTURY_21ST => self::MALE_CENTURY_21ST, + ), + self::GENDER_FEMALE => array( + self::CENTURY_19TH => self::FEMALE_CENTURY_19TH, + self::CENTURY_20TH => self::FEMALE_CENTURY_20TH, + self::CENTURY_21ST => self::FEMALE_CENTURY_21ST, + ), + ); + /** * @see https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D0%B7%D0%B0%D1%85%D1%81%D0%BA%D0%B0%D1%8F_%D1%84%D0%B0%D0%BC%D0%B8%D0%BB%D0%B8%D1%8F * @@ -133,23 +176,82 @@ class Person extends \Faker\Provider\Person 'Ісмет', ); + /** + * @param integer $year + * + * @return integer|null + */ + private static function getCenturyByYear($year) + { + if ($year >= 2000 && $year <= DateTime::year()) { + return self::CENTURY_21ST; + } elseif ($year >= 1900) { + return self::CENTURY_20TH; + } elseif ($year >= 1800) { + return self::CENTURY_19TH; + } + } + /** * National Individual Identification Numbers * - * @link http://egov.kz/wps/portal/!utWCM/p/b1/04_Sj9S1tDAwMzY1NjLTj9CPykssy0xPLMnMz0vMAfGjzOKDvDxNnJwMHQ0sTMOMDBxNPJ2dggNCg13MDIEKIpEVGFiGOIMUuIcFOJkZGxgYE6ffAAdwNCCkP1w_ClUJFheAFeCxws8jPzdVPzcqx83SU9cRADxWbyg!/dl4/d5/L0lDUmlTUSEhL3dHa0FKRnNBLzRKVXFDQSEhL2Vu/ + * @link http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fcitizen_migration%2Fpassport_id_card%2Farticle%2Fiin_info&lang=en + * @link https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D0%B4%D0%B8%D0%B2%D0%B8%D0%B4%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9_%D0%B8%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80 + * * @param \DateTime $birthDate + * @param integer $gender + * * @return string 12 digits, like 780322300455 */ - public static function individualIdentificationNumber(\DateTime $birthDate = null) + public static function individualIdentificationNumber(\DateTime $birthDate = null, $gender = self::GENDER_MALE) { if (!$birthDate) { - $birthDate = \Faker\Provider\DateTime::dateTimeBetween(); + $birthDate = DateTime::dateTimeBetween(); } - $dateAsString = $birthDate->format('ymd'); - $genderAndCenturyId = (string) static::numberBetween(1, 6); - $randomDigits = (string) static::numerify('#####'); + do { + $population = mt_rand(1000, 2000); + $century = self::getCenturyByYear((int) $birthDate->format('Y')); - return $dateAsString . $genderAndCenturyId . $randomDigits; + $iin = $birthDate->format('ymd'); + $iin .= (string) self::$genderCenturyMap[$gender][$century]; + $iin .= (string) $population; + $checksum = self::checkSum($iin); + } while ($checksum === 10); + + return $iin . (string) $checksum; + } + + /** + * @param string $iinValue + * + * @return integer + */ + public static function checkSum($iinValue) + { + $controlDigit = self::getControlDigit($iinValue, self::$firstSequenceBitWeights); + + if ($controlDigit === 10) { + return self::getControlDigit($iinValue, self::$secondSequenceBitWeights); + } + + return $controlDigit; + } + + /** + * @param string $iinValue + * @param array $sequence + * + * @return integer + */ + protected static function getControlDigit($iinValue, $sequence) + { + $sum = 0; + + for ($i = 0; $i <= 10; $i++) { + $sum += (int) $iinValue[$i] * $sequence[$i]; + } + + return $sum % 11; } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php index 1c1b7e7..9b5398d 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php @@ -4,7 +4,7 @@ namespace Faker\Provider\ko_KR; class Address extends \Faker\Provider\Address { - protected static $postcode = array('###-###'); + protected static $postcode = array('#####'); protected static $buildingNumber = array('####', '###'); protected static $metropolitanCity = array( '서울특별시', '부산광역시', '대구광역시', '인천광역시', '광주광역시', '대전광역시', '울산광역시', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php index 21bc22c..92d858f 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php @@ -46,7 +46,10 @@ class Person extends \Faker\Provider\Person * {@link} http://ko.wikipedia.org/wiki/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EC%9D%98_%EC%9D%B8%EA%B5%AC%EC%88%9C_%EC%84%B1%EC%94%A8_%EB%AA%A9%EB%A1%9D */ protected static $lastName = array( - '강', '고', '곽', '권', '김', '남', '노', '류', '문', '박', '배', '백', '서', '손', '송', '신', '심', '안', '양', '오', - '유', '윤', '이', '임', '장', '전', '정', '조', '최', '하', '한', '허', '홍', '황', + '김', '이', '박', '최', '정', '강', '조', '윤', '장', '임', '오', '한', '신', '서', '권', '황', '안', '송', '류', '홍', + '전', '고', '문', '손', '양', '배', '조', '백', '허', '남', '심', '유', '노', '하', '전', '정', '곽', '성', '차', '유', + '구', '우', '주', '임', '나', '신', '민', '진', '지', '엄', '원', '채', '강', '천', '양', '공', '현', '방', '변', '함', + '노', '염', '여', '추', '변', '도', '석', '신', '소', '선', '주', '설', '방', '마', '정', '길', '위', '연', '표', '명', + '기', '금', '왕', '반', '옥', '육', '진', '인', '맹', '제', '탁', '모', '남궁', '여', '장', '어', '유', '국', '은', '편', ); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php index c1c0a2e..6008bbf 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php @@ -4,14 +4,39 @@ namespace Faker\Provider\ko_KR; class PhoneNumber extends \Faker\Provider\PhoneNumber { + //reference : https://ko.wikipedia.org/wiki/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EC%9D%98_%EC%A0%84%ED%99%94%EB%B2%88%ED%98%B8_%EC%B2%B4%EA%B3%84 + protected static $formats = array( - '010-####-####', + //local area phone format '070-####-####', '02-####-####', '03#-####-####', '04#-####-####', '05#-####-####', '06#-####-####', - '1588-####', + + //cell phone format + '010-####-####', + + //others: Intelligent Network(기간통신사업자) + '15##-####', + '16##-####', + '18##-####', ); + + public function localAreaPhoneNumber() + { + $format = self::randomElement(array_slice(static::$formats, 0, 6)); + + return self::numerify($this->generator->parse($format)); + } + + + + public function cellPhoneNumber() + { + $format = self::randomElement(array_slice(static::$formats, 6, 1)); + + return self::numerify($this->generator->parse($format)); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Payment.php new file mode 100644 index 0000000..a0ebe25 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Payment.php @@ -0,0 +1,19 @@ +generator->parse(static::randomElement(static::$lastNameFormat)); + } + /** * Return male last name * @return string @@ -302,11 +323,11 @@ class Person extends \Faker\Provider\Person $birthdate = \Faker\Provider\DateTime::dateTimeThisCentury(); } - $genderNumber = ($gender == 'male') ? (int) 1 : (int) 0; + $genderNumber = ($gender == 'male') ? 1 : 0; $firstNumber = (int) floor($birthdate->format('Y') / 100) * 2 - 34 - $genderNumber; $datePart = $birthdate->format('ymd'); - $randomDigits = (string) ( ! $randomNumber || strlen($randomNumber < 3)) ? static::numerify('###') : substr($randomNumber, 0, 3); + $randomDigits = (string) ( ! $randomNumber || strlen($randomNumber) < 3) ? static::numerify('###') : substr($randomNumber, 0, 3); $partOfPerosnalCode = $firstNumber . $datePart . $randomDigits; $sum = self::calculateSum($partOfPerosnalCode, 1); @@ -318,7 +339,7 @@ class Person extends \Faker\Provider\Person } $sum = self::calculateSum($partOfPerosnalCode, 2); - $liekana = (int) $sum % 11; + $liekana = $sum % 11; $lastNumber = ($liekana !== 10) ? $liekana : 0; return $firstNumber . $datePart . $randomDigits . $lastNumber; diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php index 21eb427..6f53770 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php @@ -13,32 +13,35 @@ class Address extends \Faker\Provider\Address protected static $buildingNumber = array('##'); protected static $postcode = array('LV ####'); + + /** + * @link https://lv.wikipedia.org/wiki/Suver%C4%93no_valstu_uzskait%C4%ABjums + */ protected static $country = array( - 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica (the territory South of 60 deg S)', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', - 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Bouvet Island (Bouvetoya)', 'Brazil', 'British Indian Ocean Territory (Chagos Archipelago)', 'British Virgin Islands', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', - 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote d\'Ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', - 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', - 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', - 'Faroe Islands', 'Falkland Islands (Malvinas)', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', - 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', - 'Haiti', 'Heard Island and McDonald Islands', 'Holy See (Vatican City State)', 'Honduras', 'Hong Kong', 'Hungary', - 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy', - 'Jamaica', 'Japan', 'Jersey', 'Jordan', - 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Korea', 'Kuwait', 'Kyrgyz Republic', - 'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lithuania', 'Luxembourg', - 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', - 'Namibia', 'Nauru', 'Nepal', 'Netherlands Antilles', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway', - 'Oman', - 'Pakistan', 'Palau', 'Palestinian Territory', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', - 'Qatar', - 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', - 'Saint Barthelemy', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia (Slovak Republic)', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia and the South Sandwich Islands', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', - 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', - 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States of America', 'United States Minor Outlying Islands', 'United States Virgin Islands', 'Uruguay', 'Uzbekistan', - 'Vanuatu', 'Venezuela', 'Vietnam', - 'Wallis and Futuna', 'Western Sahara', - 'Yemen', - 'Zambia', 'Zimbabwe' + 'Afganistāna', 'Albānija', 'Alžīrija', 'Amerikas Savienotās Valstis', 'Andora', 'Angola', 'Antigva un Barbuda', + 'Apvienotie Arābu Emirāti', 'Argentīna', 'Armēnija', 'Austrālija', 'Austrija', 'Austrumtimora', 'Azerbaidžāna', + 'Bahamas', 'Bahreina', 'Baltkrievija', 'Bangladeša', 'Barbadosa', 'Beliza', 'Beļģija', 'Benina', 'Bolīvija', + 'Bosnija un Hercegovina', 'Botsvana', 'Brazīlija', 'Bruneja', 'Bulgārija', 'Burkinafaso', 'Burundi', 'Butāna', + 'Centrālāfrikas Republika', 'Čada', 'Čehija', 'Čīle', 'Dānija', 'Dienvidāfrikas Republika', 'Dienvidkoreja', + 'Dienvidsudāna', 'Dominika', 'Dominikāna', 'Džibutija', 'Ekvadora', 'Ekvatoriālā Gvineja', 'Eritreja', + 'Etiopija', 'Ēģipte', 'Fidži', 'Filipīnas', 'Francija', 'Gabona', 'Gajāna', 'Gambija', 'Gana', 'Grenada', + 'Grieķija', 'Gruzija', 'Gvatemala', 'Gvineja', 'Gvineja-Bisava', 'Haiti', 'Hondurasa', 'Horvātija', 'Igaunija', + 'Indija', 'Indonēzija', 'Irāka', 'Irāna', 'Islande', 'Itālija', 'Izraēla', 'Īrija', 'Jamaika', 'Japāna', + 'Jaunzēlande', 'Jemena', 'Jordānija', 'Kaboverde', 'Kambodža', 'Kamerūna', 'Kanāda', 'Katara', 'Kazahstāna', + 'Kenija', 'Kipra', 'Kirgizstāna', 'Kiribati', 'Kolumbija', 'Komoru Salas', 'Kongo', 'Kongo DR', 'Kostarika', + 'Kotdivuāra', 'Krievija', 'Kuba', 'Kuveita', 'Ķīna', 'Laosa', 'Latvija', 'Lesoto', 'Libāna', 'Libērija', + 'Lībija', 'Lielbritānija', 'Lietuva', 'Lihtenšteina', 'Luksemburga', 'Madagaskara', 'Maķedonijas Republika', + 'Malaizija', 'Malāvija', 'Maldīvija', 'Mali', 'Malta', 'Maroka', 'Māršala Salas', 'Maurīcija', 'Mauritānija', + 'Meksika', 'Melnkalne', 'Mikronēzija', 'Mjanma', 'Moldova', 'Monako', 'Mongolija', 'Mozambika', 'Namībija', + 'Nauru', 'Nepāla', 'Nīderlande', 'Nigēra', 'Nigērija', 'Nikaragva', 'Norvēģija', 'Omāna', 'Pakistāna', 'Palau', + 'Panama', 'Papua-Jaungvineja', 'Paragvaja', 'Peru', 'Polija', 'Portugāle', 'Ruanda', 'Rumānija', 'Salvadora', + 'Samoa', 'Sanmarīno', 'Santome un Prinsipi', 'Saūda Arābija', 'Seišelu Salas', 'Senegāla', + 'Sentkitsa un Nevisa', 'Sentlūsija', 'Sentvinsenta un Grenadīnas', 'Serbija', 'Singapūra', 'Sīrija', + 'Sjerraleone', 'Slovākija', 'Slovēnija', 'Somālija', 'Somija', 'Spānija', 'Sudāna', 'Surinama', 'Svazilenda', + 'Šrilanka', 'Šveice', 'Tadžikistāna', 'Taizeme', 'Tanzānija', 'Togo', 'Tonga', 'Trinidāda un Tobāgo', + 'Tunisija', 'Turcija', 'Turkmenistāna', 'Tuvalu', 'Uganda', 'Ukraina', 'Ungārija', 'Urugvaja', 'Uzbekistāna', + 'Vācija', 'Vanuatu', 'Vatikāns', 'Venecuēla', 'Vjetnama', 'Zālamana Salas', 'Zambija', 'Ziemeļkoreja', + 'Zimbabve', 'Zviedrija', ); protected static $region = array( diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php index 8a0b820..3042b5b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php @@ -72,7 +72,7 @@ class Person extends \Faker\Provider\Person /** * Generate an identification number. - * + * * @example ИЙ92011412 */ public function idNumber() diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Address.php new file mode 100644 index 0000000..1ad7d44 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Address.php @@ -0,0 +1,708 @@ + Townships + * @link https://en.wikipedia.org/wiki/Template:Johor > Townships + * @link https://en.wikipedia.org/wiki/Template:Kedah > Townships + * @link https://en.wikipedia.org/wiki/Template:Kelantan > Townships + * @link https://en.wikipedia.org/wiki/Template:Melaka > Townships + * @link https://en.wikipedia.org/wiki/Template:Negeri_Sembilan > Townships + * @link https://en.wikipedia.org/wiki/Template:Perak > Townships + * @link https://en.wikipedia.org/wiki/Template:Penang > Townships + * @link https://en.wikipedia.org/wiki/Template:Selangor > Townships + * @link https://en.wikipedia.org/wiki/Template:Terengganu > Townships + */ + protected static $townshipPrefix = array( + 'Alam','Apartment','Ara', + 'Bandar','Bandar','Bandar','Bandar','Bandar','Bandar', + 'Bandar Bukit','Bandar Seri','Bandar Sri','Bandar Baru','Batu','Bukit', + 'Desa','Damansara', + 'Kampung','Kampung Baru','Kampung Baru','Kondominium','Kota', + 'Laman','Lembah', + 'Medan', + 'Pandan','Pangsapuri','Petaling','Puncak', + 'Seri','Sri', + 'Taman','Taman','Taman','Taman','Taman','Taman', + 'Taman Desa', + ); + protected static $townshipSuffix = array( + 'Aman','Amanjaya','Anggerik','Angkasa','Antarabangsa','Awan', + 'Bahagia','Bangsar','Baru','Belakong','Bendahara','Bestari','Bintang','Brickfields', + 'Casa','Changkat','Country Heights', + 'Damansara','Damai','Dato Harun','Delima','Duta', + 'Flora', + 'Gembira','Genting', + 'Harmoni','Hartamas', + 'Impian','Indah','Intan', + 'Jasa','Jaya', + 'Keramat','Kerinchi','Kiara','Kinrara','Kuchai', + 'Laksamana', + 'Mahkota','Maluri','Manggis','Maxwell','Medan','Melawati','Menjalara','Meru','Mulia','Mutiara', + 'Pahlawan','Perdana','Pertama','Permai','Pelangi','Petaling','Pinang','Puchong','Puteri','Putra', + 'Rahman','Rahmat','Raya','Razak','Ria', + 'Saujana','Segambut','Selamat','Selatan','Semarak','Sentosa','Seputeh','Setapak','Setia Jaya','Sinar','Sungai Besi','Sungai Buaya','Sungai Long','Suria', + 'Tasik Puteri','Tengah','Timur','Tinggi','Tropika','Tun Hussein Onn','Tun Perak','Tunku', + 'Ulu','Utama','Utara', + 'Wangi', + ); + + /** + * @link https://en.wikipedia.org/wiki/Template:Greater_Kuala_Lumpur + * @link https://en.wikipedia.org/wiki/Template:Johor + * @link https://en.wikipedia.org/wiki/Template:Kedah + * @link https://en.wikipedia.org/wiki/Template:Kelantan + * @link https://en.wikipedia.org/wiki/Template:Labuan + * @link https://en.wikipedia.org/wiki/Template:Melaka + * @link https://en.wikipedia.org/wiki/Template:Negeri_Sembilan + * @link https://en.wikipedia.org/wiki/Template:Pahang + * @link https://en.wikipedia.org/wiki/Template:Perak + * @link https://en.wikipedia.org/wiki/Template:Perlis + * @link https://en.wikipedia.org/wiki/Template:Penang + * @link https://en.wikipedia.org/wiki/Template:Sabah + * @link https://en.wikipedia.org/wiki/Template:Sarawak + * @link https://en.wikipedia.org/wiki/Template:Selangor + * @link https://en.wikipedia.org/wiki/Template:Terengganu + */ + protected static $towns = array( + 'johor' => array( + 'Ayer Hitam', + 'Batu Pahat','Bukit Gambir','Bukit Kepong','Bukit Naning', + 'Desaru', + 'Endau', + 'Gelang Patah','Gemas Baharu', + 'Iskandar Puteri', + 'Jementah','Johor Lama','Johor Bahru', + 'Kempas','Kluang','Kota Iskandar','Kota Tinggi','Kukup','Kulai', + 'Labis ','Larkin','Layang-Layang', + 'Mersing','Muar', + 'Pagoh','Paloh','Parit Jawa','Pasir Gudang','Pekan Nanas','Permas Jaya','Pontian Kechil', + 'Renggam', + 'Segamat','Senai','Simpang Renggam','Skudai','Sri Gading', + 'Tangkak','Tebrau', + 'Ulu Tiram', + 'Yong Peng', + ), + 'kedah' => array( + 'Alor Setar', + 'Baling','Bukit Kayu Hitam', + 'Changlun', + 'Durian Burung', + 'Gurun', + 'Jitra', + 'Kepala Batas','Kuah','Kuala Kedah','Kuala Ketil','Kulim', + 'Langgar','Lunas', + 'Merbok', + 'Padang Serai','Pendang', + 'Serdang','Sintok','Sungai Petani', + 'Tawar, Baling', + 'Yan', + ), + 'kelantan' => array( + 'Bachok','Bunut Payong', + 'Dabong', + 'Gua Musang', + 'Jeli', + 'Ketereh','Kota Bharu','Kuala Krai', + 'Lojing', + 'Machang', + 'Pasir Mas','Pasir Puteh', + 'Rantau Panjang', + 'Salor', + 'Tok Bali', + 'Wakaf Bharu','Wakaf Che Yeh', + ), + 'kl' => array( + 'Ampang', + 'Bandar Tasik Selatan','Bandar Tun Razak','Bangsar','Batu','Brickfields','Bukit Bintang','Bukit Jalil','Bukit Tunku', + 'Cheras','Chow Kit', + 'Damansara Town Centre','Dang Wangi','Desa Petaling','Desa Tun Hussein Onn', + 'Jinjang', + 'Kampung Baru','Kampung Kasipillay','Kampung Pandan','Kampung Sungai Penchala','Kepong','KLCC','Kuchai Lama', + 'Lake Gardens','Lembah Pantai', + 'Medan Tuanku','Mid Valley City','Mont Kiara', + 'Pantai Dalam','Pudu', + 'Salak South','Segambut','Semarak','Sentul','Setapak','Setiawangsa','Seputeh','Sri Hartamas','Sri Petaling','Sungai Besi', + 'Taman Desa','Taman Melawati','Taman OUG','Taman Tun Dr Ismail','Taman U-Thant','Taman Wahyu','Titiwangsa','Tun Razak Exchange', + 'Wangsa Maju', + ), + 'labuan' => array( + 'Batu Manikar', + 'Kiamsam', + 'Layang-Layang', + 'Rancha-Rancha' + ), + 'melaka' => array( + 'Alor Gajah', + 'Bandaraya Melaka','Batu Berendam','Bukit Beruang','Bukit Katil', + 'Cheng', + 'Durian Tunggal', + 'Hang Tuah Jaya', + 'Jasin', + 'Klebang', + 'Lubuk China', + 'Masjid Tanah', + 'Naning', + 'Pekan Asahan', + 'Ramuan China', + 'Simpang Ampat', + 'Tanjung Bidara','Telok Mas', + 'Umbai', + ), + 'nsembilan' => array( + 'Ayer Kuning','Ampangan', + 'Bahau','Batang Benar', + 'Chembong', + 'Dangi', + 'Gemas', + 'Juasseh', + 'Kuala Pilah', + 'Labu','Lenggeng','Linggi', + 'Mantin', + 'Nilai', + 'Pajam','Pedas','Pengkalan Kempas','Port Dickson', + 'Rantau','Rompin', + 'Senawang','Seremban','Sungai Gadut', + 'Tampin','Tiroi', + ), + 'pahang' => array( + 'Bandar Tun Razak','Bentong','Brinchang','Bukit Fraser','Bukit Tinggi', + 'Chendor', + 'Gambang','Genting Highlands','Genting Sempah', + 'Jerantut', + 'Karak','Kemayan','Kota Shahbandar','Kuala Lipis','Kuala Pahang','Kuala Rompin','Kuantan', + 'Lanchang','Lubuk Paku', + 'Maran','Mengkuang','Mentakab', + 'Nenasi', + 'Panching', + 'Pekan','Penor', + 'Raub', + 'Sebertak','Sungai Lembing', + 'Tanah Rata','Tanjung Sepat','Tasik Chini','Temerloh','Teriang','Tringkap', + ), + 'penang' => array( + 'Air Itam', + 'Balik Pulau','Batu Ferringhi','Batu Kawan','Bayan Lepas','Bukit Mertajam','Butterworth', + 'Gelugor','George Town', + 'Jelutong', + 'Kepala Batas', + 'Nibong Tebal', + 'Permatang Pauh','Pulau Tikus', + 'Simpang Ampat', + 'Tanjung Bungah','Tanjung Tokong', + ), + 'perak' => array( + 'Ayer Tawar', + 'Bagan Serai','Batu Gajah','Behrang','Bidor','Bukit Gantang','Bukit Merah', + 'Changkat Jering','Chemor','Chenderiang', + 'Damar Laut', + 'Gerik','Gopeng','Gua Tempurung', + 'Hutan Melintang', + 'Ipoh', + 'Jelapang', + 'Kamunting','Kampar','Kuala Kangsar', + 'Lekir','Lenggong','Lumut', + 'Malim Nawar','Manong','Menglembu', + 'Pantai Remis','Parit','Parit Buntar','Pasir Salak','Proton City', + 'Simpang Pulai','Sitiawan','Slim River','Sungai Siput','Sungkai', + 'Taiping','Tambun','Tanjung Malim','Tanjung Rambutan','Tapah','Teluk Intan', + 'Ulu Bernam', + ), + 'perlis' => array( + 'Arau', + 'Beseri', + 'Chuping', + 'Kaki Bukit','Kangar','Kuala Perlis', + 'Mata Ayer', + 'Padang Besar', + 'Sanglang','Simpang Empat', + 'Wang Kelian', + ), + 'putrajaya' => array( + 'Precinct 1','Precinct 4','Precinct 5', + 'Precinct 6','Precinct 8','Precinct 10', + 'Precinct 11','Precinct 12','Precinct 13', + 'Precinct 16','Precinct 18','Precinct 19', + ), + 'sabah' => array( + 'Beaufort','Bingkor', + 'Donggongon', + 'Inanam', + 'Kinabatangan','Kota Belud','Kota Kinabalu','Kuala Penyu','Kimanis','Kundasang', + 'Lahad Datu','Likas','Lok Kawi', + 'Manggatal', + 'Nabawan', + 'Papar','Pitas', + 'Ranau', + 'Sandakan','Sapulut','Semporna','Sepanggar', + 'Tambunan','Tanjung Aru','Tawau','Tenom','Tuaran', + 'Weston', + ), + 'sarawak' => array( + 'Asajaya', + 'Ba\'kelalan','Bario','Batu Kawa','Batu Niah','Betong','Bintulu', + 'Dalat','Daro', + 'Engkilili', + 'Julau', + 'Kapit','Kota Samarahan','Kuching', + 'Lawas','Limbang','Lubok Antu', + 'Marudi','Matu','Miri', + 'Oya', + 'Pakan', + 'Sadong Jaya','Sematan','Sibu','Siburan','Song','Sri Aman','Sungai Tujoh', + 'Tanjung Kidurong','Tanjung Manis','Tatau', + ), + 'selangor' => array( + 'Ampang','Assam Jawa', + 'Balakong','Bandar Baru Bangi','Bandar Baru Selayang','Bandar Sunway','Bangi','Banting','Batang Kali','Batu Caves','Bestari Jaya','Bukit Lanjan', + 'Cheras','Cyberjaya', + 'Damansara','Dengkil', + 'Ijok', + 'Jenjarom', + 'Kajang','Kelana Jaya','Klang','Kuala Kubu Bharu','Kuala Selangor','Kuang', + 'Lagong', + 'Morib', + 'Pandamaran','Paya Jaras','Petaling Jaya','Port Klang','Puchong', + 'Rasa','Rawang', + 'Salak Tinggi','Sekinchan','Selayang','Semenyih','Sepang','Serendah','Seri Kembangan','Shah Alam','Subang','Subang Jaya','Sungai Buloh', + 'Tanjung Karang','Tanjung Sepat', + 'Ulu Klang','Ulu Yam', + ), + 'terengganu' => array( + 'Ajil', + 'Bandar Ketengah Jaya','Bandar Permaisuri','Bukit Besi','Bukit Payong', + 'Chukai', + 'Jerteh', + 'Kampung Raja','Kerteh','Kijal','Kuala Besut','Kuala Berang','Kuala Dungun','Kuala Terengganu', + 'Marang','Merchang', + 'Pasir Raja', + 'Rantau Abang', + 'Teluk Kalung', + 'Wakaf Tapai', + ) + ); + + /** + * @link https://en.wikipedia.org/wiki/States_and_federal_territories_of_Malaysia + */ + protected static $states = array( + 'johor' => array( + 'Johor Darul Ta\'zim', + 'Johor' + ), + 'kedah' => array( + 'Kedah Darul Aman', + 'Kedah' + ), + 'kelantan' => array( + 'Kelantan Darul Naim', + 'Kelantan' + ), + 'kl' => array( + 'KL', + 'Kuala Lumpur', + 'WP Kuala Lumpur' + ), + 'labuan' => array( + 'Labuan' + ), + 'melaka' => array( + 'Malacca', + 'Melaka' + ), + 'nsembilan' => array( + 'Negeri Sembilan Darul Khusus', + 'Negeri Sembilan' + ), + 'pahang' => array( + 'Pahang Darul Makmur', + 'Pahang' + ), + 'penang' => array( + 'Penang', + 'Pulau Pinang' + ), + 'perak' => array( + 'Perak Darul Ridzuan', + 'Perak' + ), + 'perlis' => array( + 'Perlis Indera Kayangan', + 'Perlis' + ), + 'putrajaya' => array( + 'Putrajaya' + ), + 'sabah' => array( + 'Sabah' + ), + 'sarawak' => array( + 'Sarawak' + ), + 'selangor' => array( + 'Selangor Darul Ehsan', + 'Selangor' + ), + 'terengganu' => array( + 'Terengganu Darul Iman', + 'Terengganu' + ) + ); + + /** + * @link https://ms.wikipedia.org/wiki/Senarai_negara_berdaulat + */ + protected static $country = array( + 'Abkhazia','Afghanistan','Afrika Selatan','Republik Afrika Tengah','Akrotiri dan Dhekelia','Albania','Algeria','Amerika Syarikat','Andorra','Angola','Antigua dan Barbuda','Arab Saudi','Argentina','Armenia','Australia','Austria','Azerbaijan', + 'Bahamas','Bahrain','Bangladesh','Barbados','Belanda','Belarus','Belgium','Belize','Benin','Bhutan','Bolivia','Bonaire','Bosnia dan Herzegovina','Botswana','Brazil','Brunei Darussalam','Bulgaria','Burkina Faso','Burundi', + 'Cameroon','Chad','Chile','Republik Rakyat China','Republik China di Taiwan','Colombia','Comoros','Republik Demokratik Congo','Republik Congo','Kepulauan Cook','Costa Rica','Côte d\'Ivoire (Ivory Coast)','Croatia','Cuba','Curaçao','Cyprus','Republik Turki Cyprus Utara','Republik Czech', + 'Denmark','Djibouti','Dominika','Republik Dominika', + 'Ecuador','El Salvador','Emiriah Arab Bersatu','Eritrea','Estonia', + 'Kepulauan Faroe','Fiji','Filipina','Finland', + 'Gabon','Gambia','Georgia','Ghana','Grenada','Greece (Yunani)','Guatemala','Guinea','Guinea-Bissau','Guinea Khatulistiwa','Guiana Perancis','Guyana', + 'Habsyah (Etiopia)','Haiti','Honduras','Hungary', + 'Iceland','India','Indonesia','Iran','Iraq','Ireland','Israel','Itali', + 'Jamaika','Jepun','Jerman','Jordan', + 'Kanada','Kazakhstan','Kemboja','Kenya','Kiribati','Korea Selatan','Korea Utara','Kosovo','Kuwait','Kyrgyzstan', + 'Laos','Latvia','Lesotho','Liberia','Libya','Liechtenstein','Lithuania','Lubnan','Luxembourg', + 'Macedonia','Madagaskar','Maghribi','Malawi','Malaysia','Maldives','Mali','Malta','Kepulauan Marshall','Mauritania','Mauritius','Mesir','Mexico','Persekutuan Micronesia','Moldova','Monaco','Montenegro','Mongolia','Mozambique','Myanmar', + 'Namibia','Nauru','Nepal','New Zealand','Nicaragua','Niger','Nigeria','Niue','Norway', + 'Oman','Ossetia Selatan', + 'Pakistan','Palau','Palestin','Panama','Papua New Guinea','Paraguay','Perancis','Peru','Poland','Portugal', + 'Qatar', + 'Romania','Russia','Rwanda', + 'Sahara Barat','Saint Kitts dan Nevis','Saint Lucia','Saint Vincent dan Grenadines','Samoa','San Marino','São Tomé dan Príncipe','Scotland','Senegal','Sepanyol','Serbia','Seychelles','Sierra Leone','Singapura','Slovakia','Slovenia','Kepulauan Solomon','Somalia','Somaliland','Sri Lanka','Sudan','Sudan Selatan','Suriname','Swaziland','Sweden','Switzerland','Syria', + 'Tajikistan','Tanjung Verde','Tanzania','Thailand','Timor Leste','Togo','Tonga','Transnistria','Trinidad dan Tobago','Tunisia','Turki','Turkmenistan','Tuvalu', + 'Uganda','Ukraine','United Kingdom','Uruguay','Uzbekistan', + 'Vanuatu','Kota Vatican','Venezuela','Vietnam', + 'Yaman', + 'Zambia','Zimbabwe', + ); + + /** + * Return a building prefix + * + * @example 'No.' + * + * @return @string + */ + public static function buildingPrefix() + { + return static::randomElement(static::$buildingPrefix); + } + + /** + * Return a building number + * + * @example '123' + * + * @return @string + */ + public static function buildingNumber() + { + return static::toUpper(static::lexify(static::numerify(static::randomElement(static::$buildingNumber)))); + } + + /** + * Return a street prefix + * + * @example 'Jalan' + */ + public function streetPrefix() + { + $format = static::randomElement(static::$streetPrefix); + + return $this->generator->parse($format); + } + + /** + * Return a complete streename + * + * @example 'Jalan Utama 7' + * + * @return @string + */ + public function streetName() + { + $format = static::toUpper(static::lexify(static::numerify(static::randomElement(static::$streetNameFormats)))); + + return $this->generator->parse($format); + } + + /** + * Return a randown township + * + * @example Taman Bahagia + * + * @return @string + */ + public function township() + { + $format = static::toUpper(static::lexify(static::numerify(static::randomElement(static::$townshipFormats)))); + + return $this->generator->parse($format); + } + + /** + * Return a township prefix abbreviation + * + * @example 'USJ' + * + * @return @string + */ + public function townshipPrefixAbbr() + { + return static::randomElement(static::$townshipPrefixAbbr); + } + + /** + * Return a township prefix + * + * @example 'Taman' + * + * @return @string + */ + public function townshipPrefix() + { + return static::randomElement(static::$townshipPrefix); + } + + /** + * Return a township suffix + * + * @example 'Bahagia' + */ + public function townshipSuffix() + { + return static::randomElement(static::$townshipSuffix); + } + + /** + * Return a postcode based on state + * + * @example '55100' + * @link https://en.wikipedia.org/wiki/Postal_codes_in_Malaysia#States + * + * @param null|string $state 'state' or null + * + * @return @string + */ + public static function postcode($state = null) + { + $format = array( + 'perlis' => array( // (01000 - 02800) + '0' . mt_rand(1000, 2800) + ), + 'kedah' => array( // (05000 - 09810) + '0' . mt_rand(5000, 9810) + ), + 'penang' => array( // (10000 - 14400) + mt_rand(10000, 14400) + ), + 'kelantan' => array( // (15000 - 18500) + mt_rand(15000, 18500) + ), + 'terengganu' => array( // (20000 - 24300) + mt_rand(20000, 24300) + ), + 'pahang' => array( // (25000 - 28800 | 39000 - 39200 | 49000, 69000) + mt_rand(25000, 28800), + mt_rand(39000, 39200), + mt_rand(49000, 69000) + ), + 'perak' => array( // (30000 - 36810) + mt_rand(30000, 36810) + ), + 'selangor' => array( // (40000 - 48300 | 63000 - 68100) + mt_rand(40000, 48300), + mt_rand(63000, 68100) + ), + 'kl' => array( // (50000 - 60000) + mt_rand(50000, 60000), + ), + 'putrajaya' => array( // (62000 - 62988) + mt_rand(62000, 62988) + ), + 'nsembilan' => array( // (70000 - 73509) + mt_rand(70000, 73509) + ), + 'melaka' => array( // (75000 - 78309) + mt_rand(75000, 78309) + ), + 'johor' => array( // (79000 - 86900) + mt_rand(79000, 86900) + ), + 'labuan' => array( // (87000 - 87033) + mt_rand(87000, 87033) + ), + 'sabah' => array( // (88000 - 91309) + mt_rand(88000, 91309) + ), + 'sarawak' => array( // (93000 - 98859) + mt_rand(93000, 98859) + ) + ); + + $postcode = is_null($state) ? static::randomElement($format) : $format[$state]; + return (string)static::randomElement($postcode); + } + + /** + * Return the complete town address with matching postcode and state + * + * @example 55100 Bukit Bintang, Kuala Lumpur + * + * @return @string + */ + public function townState() + { + $state = static::randomElement(array_keys(static::$states)); + $postcode = static::postcode($state); + $town = static::randomElement(static::$towns[$state]); + $state = static::randomElement(static::$states[$state]); + + return $postcode . ' ' . $town . ', ' . $state; + } + + /** + * Return a random city (town) + * + * @example 'Ampang' + * + * @return @string + */ + public function city() + { + $state = static::randomElement(array_keys(static::$towns)); + return static::randomElement(static::$towns[$state]); + } + + /** + * Return a random state + * + * @example 'Johor' + * + * @return @string + */ + public function state() + { + $state = static::randomElement(array_keys(static::$states)); + return static::randomElement(static::$states[$state]); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Company.php new file mode 100644 index 0000000..0e68133 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Company.php @@ -0,0 +1,105 @@ +generator->parse($formats); + } + + /** + * Return Peninsular prefix alphabet + * + * @example 'W' + * + * @return @string + */ + public static function peninsularPrefix() + { + return static::randomElement(static::$peninsularPrefix); + } + + /** + * Return Sarawak state prefix alphabet + * + * @example 'QA' + * + * @return @string + */ + public static function sarawakPrefix() + { + return static::randomElement(static::$sarawakPrefix); + } + + /** + * Return Sabah state prefix alphabet + * + * @example 'SA' + * + * @return @string + */ + public static function sabahPrefix() + { + return static::randomElement(static::$sabahPrefix); + } + + /** + * Return specialty licence plate prefix + * + * @example 'G1M' + * + * @return @string + */ + public static function specialPrefix() + { + return static::randomElement(static::$specialPrefix); + } + + /** + * Return a valid license plate alphabet + * + * @example 'A' + * + * @return @string + */ + public static function validAlphabet() + { + return static::randomElement(static::$validAlphabets); + } + + /** + * Return a valid number sequence between 1 and 9999 + * + * @example '1234' + * + * @return @integer + */ + public static function numberSequence() + { + return mt_rand(1, 9999); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Payment.php new file mode 100644 index 0000000..4a46af1 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Payment.php @@ -0,0 +1,244 @@ +generator->parse($formats); + } + + /** + * Return a Malaysian Bank account number + * + * @example '1234567890123456' + * + * @return @string + */ + public function bankAccountNumber() + { + $formats = static::randomElement(static::$bankAccountNumberFormats); + + return static::numerify($formats); + } + + /** + * Return a Malaysian Local Bank + * + * @example 'Public Bank' + * + * @return @string + */ + public static function localBank() + { + return static::randomElement(static::$localBanks); + } + + /** + * Return a Malaysian Foreign Bank + * + * @example 'Citibank Berhad' + * + * @return @string + */ + public static function foreignBank() + { + return static::randomElement(static::$foreignBanks); + } + + /** + * Return a Malaysian Government Bank + * + * @example 'Bank Simpanan Nasional' + * + * @return @string + */ + public static function governmentBank() + { + return static::randomElement(static::$governmentBanks); + } + + /** + * Return a Malaysian insurance company + * + * @example 'AIA Malaysia' + * + * @return @string + */ + public static function insurance() + { + return static::randomElement(static::$insuranceCompanies); + } + + /** + * Return a Malaysian Bank SWIFT Code + * + * @example 'MBBEMYKLXXX' + * + * @return @string + */ + public static function swiftCode() + { + return static::toUpper(static::lexify(static::randomElement(static::$swiftCodes))); + } + + /** + * Return the Malaysian currency symbol + * + * @example 'RM' + * + * @return @string + */ + public static function currencySymbol() + { + return static::randomElement(static::$currencySymbol); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Person.php new file mode 100644 index 0000000..28d1092 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/Person.php @@ -0,0 +1,813 @@ +generator->parse(static::randomElement($formats)); + } + + /** + * Return a Malaysian I.C. No. + * + * @example '890123-45-6789' + * + * @link https://en.wikipedia.org/wiki/Malaysian_identity_card#Structure_of_the_National_Registration_Identity_Card_Number_(NRIC) + * + * @param string|null $gender 'male', 'female' or null for any + * @param bool|string|null $hyphen true, false, or any separator characters + * + * @return string + */ + public static function myKadNumber($gender = null, $hyphen = false) + { + // year of birth + $yy = mt_rand(0, 99); + + // month of birth + $mm = DateTime::month(); + + // day of birth + $dd = DateTime::dayOfMonth(); + + // place of birth (1-59 except 17-20) + while (in_array($pb = mt_rand(1, 59), array(17, 18, 19, 20))) { + } + + // random number + $nnn = mt_rand(0, 999); + + // gender digit. Odd = MALE, Even = FEMALE + $g = mt_rand(0, 9); + //Credit: https://gist.github.com/mauris/3629548 + if ($gender === static::GENDER_MALE) { + $g = $g | 1; + } elseif ($gender === static::GENDER_FEMALE) { + $g = $g & ~1; + } + + // formatting with hyphen + if ($hyphen === true) { + $hyphen = "-"; + } elseif ($hyphen === false) { + $hyphen = ""; + } + + return sprintf("%02d%02d%02d%s%02d%s%03d%01d", $yy, $mm, $dd, $hyphen, $pb, $hyphen, $nnn, $g); + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/PhoneNumber.php new file mode 100644 index 0000000..f89111d --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ms_MY/PhoneNumber.php @@ -0,0 +1,217 @@ +generator->parse($format)); + } else { + return static::numerify($this->generator->parse($format)); + } + } + + /** + * Return prefix digits for 011 numbers + * + * @example '10' + * + * @return string + */ + public static function zeroOneOnePrefix() + { + return static::numerify(static::randomElement(static::$zeroOneOnePrefix)); + } + + /** + * Return prefix digits for 014 numbers + * + * @example '2' + * + * @return string + */ + public static function zeroOneFourPrefix() + { + return static::numerify(static::randomElement(static::$zeroOneFourPrefix)); + } + + /** + * Return prefix digits for 015 numbers + * + * @example '1' + * + * @return string + */ + public static function zeroOneFivePrefix() + { + return static::numerify(static::randomElement(static::$zeroOneFivePrefix)); + } + + /** + * Return a Malaysian Fixed Line Phone Number. + * + * @example '+603-4567-8912' + * + * @param bool $countryCodePrefix true, false + * @param bool $formatting true, false + * + * @return string + */ + public function fixedLineNumber($countryCodePrefix = true, $formatting = true) + { + if ($formatting) { + $format = static::randomElement(static::$fixedLineNumberFormatsWithFormatting); + } else { + $format = static::randomElement(static::$fixedLineNumberFormats); + } + + if ($countryCodePrefix) { + return static::countryCodePrefix($formatting) . static::numerify($this->generator->parse($format)); + } else { + return static::numerify($this->generator->parse($format)); + } + } + + /** + * Return a Malaysian VoIP Phone Number. + * + * @example '+6015-678-9234' + * + * @param bool $countryCodePrefix true, false + * @param bool $formatting true, false + * + * @return string + */ + public function voipNumber($countryCodePrefix = true, $formatting = true) + { + if ($formatting) { + $format = static::randomElement(static::$voipNumberWithFormatting); + } else { + $format = static::randomElement(static::$voipNumber); + } + + if ($countryCodePrefix) { + return static::countryCodePrefix($formatting) . static::numerify($this->generator->parse($format)); + } else { + return static::numerify($this->generator->parse($format)); + } + } + + /** + * Return a Malaysian Country Code Prefix. + * + * @example '+6' + * + * @param bool $formatting true, false + * + * @return string + */ + public static function countryCodePrefix($formatting = true) + { + if ($formatting) { + return static::randomElement(static::$plusSymbol) . static::randomElement(static::$countryCodePrefix); + } else { + return static::randomElement(static::$countryCodePrefix); + } + } +} diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php index 027cc9b..ac9a2a0 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php @@ -15,5 +15,41 @@ class Company extends \Faker\Provider\Company '{{lastName}} og {{lastName}} {{companySuffix}}' ); - protected static $companySuffix = array('AS', 'DA', 'NUF'); + /** + * Common suffixes + * @link https://www.brreg.no/bedrift/organisasjonsformer/ + */ + protected static $companySuffix = array('ANS', 'AS', 'ASA', 'BA', 'DA', 'ENK', 'GFS', 'KTRF', 'NUF', 'PK', 'SA', 'SPA', 'STI', 'VIFE'); + + /** + * 1500 random job titles from Statistisk Sentralbyrå + * @link http://www.ssb.no/a/yrke/yrke.csv + */ + protected static $jobTitleFormat = array( + 'Administrasjonsdirektør', 'Administrasjonskonsulent', 'Administrasjonssekretær', 'Administrasjonssjef', 'Administrerende Overlege', 'Admiral', 'Advokatassistent', 'Aerobicinstruktør', 'Afis-Fullmektig', 'Agrotekniker', 'Ais-Fullmektig', 'Akrobat', 'Aktivitør', 'Akupunktør', 'Alarmoperatør', 'Allmenningbestyrer', 'Allmennpraktiserende Lege', 'Amanuensis', 'Ambassaderåd', 'Ambassadesekretær', 'Ambulansemedhjelper', 'Ambulansesjef', 'Ambulerende Vaktmester', 'Ammoniakkoker', 'Anestesilege', 'Animatør', 'Anleggsdykker', 'Anleggsgartnermester', 'Anleggsmaskinkjører', 'Anleggsmaskinmekaniker', 'Anleggsoperatør', 'Annenflyger', 'Annonseakkvisitør', 'Annonsebehandler', 'Annonsekonsulent', 'Annonseselger', 'Annonsesjef', 'Anretningshjelp', 'Apotekmedarbeider', 'Arbeidsmedisiner', 'Arbeidssjef', 'Arbeidsstudieingeniør', 'Arbeidsterapeut', 'Arbeidstilrettelegger', 'Arbeidstilsynskontrollør', 'Arbeidstilsynsrådgiver', 'Arkivassistent', 'Arkivmedarbeider', 'Arrestforvarer', 'Asfaltarbeider', 'Asfaltverkarbeider', 'Asfaltør', 'Assistentfotograf', 'Assisterende Administrerende Direktør', 'Assisterende Banksjef', 'Assisterende Bestyrer', 'Assisterende Borer', 'Assisterende Byfogd', 'Assisterende Fylkeshelsesjef', 'Assisterende Fylkeslege', 'Assisterende Fylkesmann', 'Assisterende Helsedirektør', 'Assisterende Kjøkkensjef', 'Assisterende Kommunegartner', 'Assisterende Sjefflygeleder', 'Assisterende Sjefspsykolog', 'Assisterende Sykepleiesjef', 'Assisterende Vaktmester', 'Astrofysiker', 'Astronom', 'Atomfysiker', 'Attache', 'Autoklavoperatør', 'Autoklavpasser', 'Automasjonsingeniør', 'Automatiker', 'Automatiseringsmontør', 'Avdelingsarkitekt', 'Avdelingsbanksjef', 'Avdelingsbetjent', 'Avdelingsdirektør', 'Avdelingsergoterapeut', 'Avdelingsingeniør', 'Avdelingsleder/fysioterapeut', 'Avdelingspsykolog', 'Avdelingssekretær', 'Avdelingssjef', 'Avdelingssjef Akvakultur Mv.', 'Avdelingssjef Restaurant', 'Avdelingssykepleier', 'Avlaster', 'Avlskonsulent', 'Avløser', + 'Babysvømmeinstruktør', 'Badeassistent', 'Badebetjent', 'Bakermester', 'Bakteriolog', 'Banearbeider', 'Bankassistent', 'Bankkonsulent', 'Banksjef', 'Barkeeper', 'Barmedarbeider', 'Barne- Og Ungdomssekretær', 'Barnehageassistent', 'Barnehjemsbestyrer', 'Barnepasser', 'Barnevernskonsulent', 'Bartender', 'Basketballtrener', 'Bedriftskonsulent', 'Bedriftspsykolog', 'Bedriftsrevisor', 'Bedriftsøkonom', 'Befrakter', 'Begravelsesbyråassistent', 'Begravelsesbyråmedarbeider', 'Begravelsesbyråsjåfør', 'Beleggskjærer', 'Bemanningskonsulent', 'Benkesnekker', 'Beregner', 'Bergmester', 'Bergverksarbeider', 'Beskjærer', 'Bestyrer Helsetjenester', 'Betjent', 'Betongindustriarbeider', 'Betongvarearbeider', 'Bibliotekleder', 'Biblioteksjef', 'Bilagskontrollør', 'Bilelektriker', 'Bilgummiarbeider', 'Bilinspektør', 'Bilklargjører', 'Billedkonsulent', 'Billedtekniker', 'Billettekspeditør', 'Billettkonsulent', 'Billettkontrollør', 'Billettselger', 'Billettør', 'Bilmegler', 'Bilmekaniker', 'Bilmottaker', 'Bilpleier', 'Bilrenser', 'Bilsakkyndig', 'Biltilsyninspektør', 'Biopat', 'Blandemaskinoperatør', 'Blander', 'Blogger', 'Blomsterdekoratør', 'Blåseinstrumentmaker', 'Bokbinder', 'Bokbinderassistent', 'Bokbussassistent', 'Bokbussfører', 'Bokhandlermedarbeider', 'Bokhandlermedhjelper', 'Bokholderassistent', 'Bokollektivmedarbeider', 'Boligleder', 'Boligsjef', 'Bomringvakt', 'Bomvakt', 'Bookingansvarlig', 'Bookingmedarbeider', 'Bookingsekretær', 'Borearbeider', 'Boredekksarbeider', 'Boreingeniør', 'Boreoperasjonsleder', 'Borer', 'Boresjef', 'Borevæskeingeniør', 'Botaniker', 'Boveileder', 'Bowlingvert', 'Branninspektør', 'Brannisolatør', 'Brannkonstabel', 'Brannmester', 'Brannvakt', 'Brannvarslerinstallatør', 'Brenner', 'Brolegger', 'Bromaler', 'Brooperatør', 'Brukskunstner', 'Brygger', 'Bryggeriformann', 'Bryggerimester', 'Brønnborer', 'Budsjåfør', 'Bukker', 'Bulldoserkjører', 'Bunadmedarbeider', 'Bunnlærstanser', 'Buntmaker', 'Business Controller', 'Bussfører', 'Butikkinnehaver', 'Butikkinspektør', 'Butikkmedarbeider', 'Butikkonsulent', 'Butikksjef', 'Butikkslakter', 'Byarkitekt', 'Bydelsdirektør', 'Byfogd', 'Byggekranfører', 'Byggesaksbehandler', 'Byggesjef', 'Byggtapetserer', 'Byggtapetsermester', 'Bygningsarbeider', 'Bygningskontrollør', 'Byplanlegger', 'Byplansjef', 'Byrettsdommer', 'Byråd', 'Byssegutt', 'Byssepike', 'Båndsager', 'Båtfører', 'Båtmekaniker', 'Bærplukker', 'Børsdirektør', 'Børsemakermester', 'Børstemaker', 'Bøter', + 'Cabin Chief', 'Cafemedarbeider', 'Campingplassmedarbeider', 'Cash Management Controller', 'Cellulosearbeider', 'Charge D\'affaires', 'Cirkustekniker', 'Cnc-Operatør', 'Coach', 'Controller', 'Croupier', 'Cruiseassistent', + 'Daglig Leder', 'Dagsenterleder', 'Damefrisør', 'Danselærer', 'Danser', 'Dataadministrator', 'Datamaskinoperatør', 'Dataservicetekniker', 'Datasjef', 'Datatekniker', 'Dekkbygger', 'Dekorkonsulent', 'Deleekspeditør', 'Delesjef', 'Departementsråd', 'Designer', 'Desksjef', 'Diakoniarbeider', 'Diettkokk', 'Direksjonssekretær', 'Dirigent', 'Discjockey', 'Distribusjonssjåfør', 'Distributør', 'Distriktsarbeidssjef', 'Distriktsbanksjef', 'Distriktsdirektør', 'Distriktsmusiker', 'Distriktsrevisor', 'Distriktstannlege', 'Divisjonsdirektør Akvakultur Mv.', 'Divisjonssjef Akavkultur Mv.', 'Dokumentarfilmfotograf', 'Dommer', 'Domorganist', 'Dp-Operatør', 'Dramalærer', 'Dramatiker', 'Driftsansvarlig Flyfrakt', 'Driftsfullmektig', 'Driftskonsulent', 'Driftskonsulent It', 'Driftskoordinator', 'Driftsplantekniker', 'Driftstekniker', 'Driftsøkonom', 'Droneoperatør', 'Drosjesjåfør', 'Dykkerleder', 'Dyrlege', 'Dørselger', 'Dørvert', 'Døvekapellan', 'Døveprest', + 'Edb-Leder', 'Ekspedent', 'Ekspedisjonssjef', 'Eksportagent', 'Eksportkonsulent', 'Eldreomsorgssjef', 'Elektriker', 'Elektrikerformann', 'Elektrisk Kabeloperasjonstekniker', 'Elektroautomasjonstekniker', 'Elektroingeniør', 'Elektromontør', 'Elkraftingeniør', 'Elverksmontør', 'Emaljebrenner', 'Emaljør', 'Energisjef', 'Engasjementssjef', 'Enhetsleder', 'Entomolog', 'Entreprenør', 'Ergoterapeut', 'Etatsjef', 'Etterforsker', + 'Fagbokforfatter', 'Faglaborant', 'Faglærer', 'Fagopplæringssjef', 'Fagsjef Skogbruk', 'Fagspesialist', 'Fagutdanningskonsulent', 'Faktureringssekretær', 'Familierådgiver', 'Fargekoker', 'Fargeriarbeider', 'Fasademontør', 'Fatter', 'Feierlærling', 'Feltarbeider', 'Feltassistent', 'Feltprest', 'Fengselsavdelingsbetjent', 'Fengselsbetjent', 'Fengselsinspektør', 'Fengselsoverbetjent', 'Fenrik', 'Ferdigstiller', 'Filetarbeider', 'Filialsjef', 'Filminspisient', 'Filmkontrollsjef', 'Filosof', 'Finansanalytiker', 'Finansråd', 'Finansrådgiver', 'Finanstilsynsdirektør', 'Fiolinbygger', 'Fiskehandler', 'Fiskeridirektør', 'Fiskerikonsulent', 'Fiskeriråd', 'Fiskeritekniker', 'Fiskerøkter', 'Fiskeskipper', 'Fiskeslakter', 'Fiskevraker', 'Fjøsmester', 'Flaskesorterer', 'Flekker', 'Flisarbeider', 'Fly-Radiotekniker', 'Flyattache', 'Flyeksportmedarbeider', 'Flyelektrotekniker', 'Flygeleder', 'Flygelederassistent', 'Flyinstruktør', 'Flymekaniker', 'Flyplassekspeditør', 'Flysystemavioniker', 'Flyteknisk Inspektør', 'Flytrafikkassistent', 'Flyvertinne', 'Fms-Operatør', 'Folklorist', 'Forbundssekretær', 'Forhandlingssjef', 'Forkynner', 'Forlagsmedarbeider', 'Formgiver', 'Formstøper', 'Formuesforvalter', 'Forsikringsassistent', 'Forsikringsrådgiver', 'Forsikringsselger', 'Forskalingsbas', 'Forsker', 'Forskjærer', 'Forskningsassistent', 'Forskningssjef', 'Forskningstekniker', 'Forstander', 'Forstkandidat', 'Forsvarsråd', 'Forsøksleder', 'Forvaltningsassistent', 'Forvaltningsingeniør', 'Forvaltningssjef', 'Fosterfar', 'Fotograf', 'Fotolaboratorieassistent', 'Fraktsjef', 'Freelancejournalist', 'Frisørlærling', 'Fritidsassistent', 'Fritidssjef', 'Frivillighetssentralleder', 'Fruktpressearbeider', 'Fruktprodusent', 'Fryseriarbeider', 'Fugearbeider', 'Fylkesagronom', 'Fylkesarkitekt', 'Fylkesbarnevernsjef', 'Fylkesbyggesjef', 'Fylkesingeniør', 'Fylkeskartsjef', 'Fylkeskontorsjef', 'Fylkeskoordinator I Fylkesarbeidskontoret', 'Fylkesmann', 'Fylkespersonalsjef', 'Fylkesstyrerepresentant', 'Fyrmester', 'Fyrtjenestermann', 'Fysiker', 'Fysiokjemiker', 'Fører', 'Førsteamanuensis', 'Førstefarmasøyt', 'Førstefotograf', 'Førstekonservator', 'Førstelagmann', 'Førstelektor', 'Førstemaskinist', 'Førstemeteorologifullmektig', 'Førstepasser', 'Førstepostbetjent', 'Førstepostfullmektig', 'Førstepreparant', 'Førsteprovisor', 'Førsterevisor', 'Førstesekretær', 'Førstestatsadvokat', 'Førstestyrmann', 'Førstetollinspektør', + 'Gallerivakt', 'Garderobebetjening', 'Garnfisker', 'Garnisonstannlege', 'Gartnerassistent', 'Gartnerformann', 'Gassverksjef', 'Gateselger', 'General', 'Generalinspektør For Heimevernet', 'Generalinspektør For Hæren', 'Geodet', 'Geolog', 'Geomatiker', 'Geotekniker', 'Gjærhusarbeider', 'Glasiolog', 'Glassarbeider', 'Glassblåser', 'Glassblåsermester', 'Glasshåndverker', 'Glasurarbeider', 'Godstrafikkleder', 'Grafikerlærling', 'Grafisk Formgiver', 'Grafisk Ingeniør', 'Grafisk Trykkermester', 'Granitthogger', 'Grensekontrollør', 'Grovsliper', 'Gruppeleder I Arbeidsmarkedsetaten', 'Gruvemåler', 'Guide', 'Gullarbeider', 'Gullsmedmester', 'Gummivarearbeider', 'Gynekolog', 'Gårdbruker', 'Gårdsarbeider', 'Gårdshjelp', + 'Hammerarbeider', 'Handelsagent', 'Handelsråd', 'Handlevognrydder', 'Hanskesyer', 'Hartskoker', 'Hattemaker', 'Havarisekretær', 'Havneassistent', 'Havnefogd', 'Havnekontrollør', 'Havnesjef', 'Havnetrafikkleder', 'Heisinstallatør', 'Heismontør', 'Heismontørlærling', 'Helse- Og Miljørådgiver', 'Helseinformatiker', 'Helseinspektør', 'Helsesøster', 'Herrefrisør', 'Hjelpekokk', 'Hjelpepleier', 'Hjelpepleiermedarbeider', 'Hjemmehjelper', 'Hjemmehjelpsleder', 'Hjemmekonsulent', 'Hjemmesykepleier', 'Hjullastersjåfør', 'Hms-Leder', 'Hoffmarskalk', 'Hollenderifører', 'Hostess', 'Hotellarbeider', 'Hotellmedarbeider', 'Hotellsjef', 'Hovedforvalter', 'Hovmester', 'Hr-Direktør', 'Hudarbeider', 'Hudterapeut', 'Hundefører', 'Husdyrkonsulent', 'Husholdsassistent', 'Husmorvikar', 'Hustrykker', 'Hvalfanger', 'Hydrograf', 'Hydrolog', 'Hylsemaker', 'Håndballtrener', 'Håndvever', 'Hørselsassistent', 'Høvelmester', + 'Idrettsinstruktør', 'Idrettsseksjonsleder', 'Idrettstrener', 'Ikt-Lærling', 'Illustratør', 'Importsjef', 'Impregnerer', 'Industribokbinder', 'Industrimontør', 'Industripsykolog', 'Industrirørlegger', 'Industrisnekker', 'Industrisyer', 'Informasjonskonsulent', 'Informasjonsleder', 'Informasjonsmedarbeider', 'Informasjonsskrankemedarbeider', 'Inkassoassistent', 'Inkassokonsulent', 'Inkassoleder', 'Inkassosjef', 'Inneselger', 'Innkjøpsansvarlig', 'Innkjøpsingeniør', 'Innkjøpskonsulent', 'Innreder', 'Innredningskonsulent', 'Innredningsmontør', 'Innsjekkingsmedarbeider', 'Innspillingsleder', 'Inspeksjonsingeniør', 'Inspisient', 'Installasjonsingeniør', 'Instituttsjef', 'Instruktør', 'Instruktørtannlege', 'Instrumentavioniker', 'Instrumentmaker', 'Instrumentrørlegger', 'Interiørarkitekt', 'Internatgruppeassistent', 'Internatgruppeleder', 'Internatleder', 'Iskremarbeider', 'It-Ansvarlig', 'It-Konsulent', 'It-Koordinator', 'It-Leder', 'It-Medarbeider', 'It-Prosjektleder', 'It-Selger/account Manager', 'It-Sjef', 'It-Systemingeniør', 'It-Teknisk Konsulent', + 'Jernbaneekspeditør', 'Jernbinderbas', 'Jordbrukssjef', 'Jordmor', 'Jordregistertekniker', 'Jordskifteassistent', 'Jordskiftedommer', 'Jordskifteingeniør', 'Jordskifteoverdommer', 'Jordskifterettsleder', 'Journalist', 'Juksafisker', 'Juridisk Rådgiver', 'Jurist', 'Juvelèr', + 'Kabelarbeider', 'Kabelbanefører', 'Kabinettsekretær', 'Kafemedarbeider', 'Kaiarbeider', 'Kaibetjent', 'Kalanderarbeider', 'Kammeroperatørleder', 'Kanselist', 'Kapitalforvalter', 'Kapsler', 'Kaptein', 'Kapteinløytnant', 'Kardiolog', 'Karosserimekaniker', 'Kartsjef', 'Kasseleder', 'Kennelleder', 'Keramiker', 'Keramisk Former', 'Kinokontrollør', 'Kinomaskinist', 'Kinosjef', 'Kirkegårdsarbeider', 'Kiropraktor', 'Kjellermester', 'Kjemikaliedykker', 'Kjemiker', 'Kjevekirurg', 'Kjeveortoped', 'Kjole- Og Draktsyermester', 'Kjøkkenbestyrer', 'Kjølemaskinist', 'Kjølemaskinkjører', 'Kjørelærer', 'Kjøreskolelærer', 'Kjøttskjærer', 'Klinikkassistent', 'Klinisk Ernærinsfysiolog', 'Klinisk Sosionom', 'Klinisk Vernepleier', 'Klokkedykker', 'Klokker', 'Klubbarbeider', 'Klubbleder', 'Klubbtillitsmann', 'Koder', 'Kokillestøper', 'Koksbrenner', 'Koldkjøkkenassistent', 'Kolonialhandler', 'Komiker', 'Kommunaldirektør', 'Kommunalsjef', 'Kommuneadvokat', 'Kommuneergoterapeut', 'Kommunekasserer', 'Kommuneplansjef', 'Kommunestyrerepresentant', 'Kommunikasjonsrådgiver', 'Kommunikasjonsrådmann', 'Kommunikatør', 'Kompressoroperatør', 'Konditor', 'Konduktør', 'Konfektmaker', 'Konferansevert', 'Konferansevertinne', 'Konkurransedirektør', 'Konserndirektør', 'Konsernregnskapssjef', 'Konservator', 'Konstruksjonstegner', 'Kontaktmann', 'Kontoraspirant', 'Kontormedarbeider', 'Kontorrengjører', 'Kontraktsleder', 'Kontrollflyger', 'Kontrolloperatør', 'Kontrollromsassistent', 'Kontrollsjef', 'Kontrollveterinær', 'Kontrollør', 'Kopperslager', 'Koranlærer', 'Koreolog', 'Korrespondent', 'Korrosjonsbehandler', 'Kostholdskonsulent', 'Kostnadsingeniør', 'Kostymeformann', 'Kraftmegler', 'Kraftverksdirektør', 'Kraftverksoperatør', 'Kredittleder', 'Kreftsykepleier', 'Krematoriebetjent', 'Kretskortmontør', 'Kringkastingssjef', 'Kulturhussjef', 'Kulturkonsulent', 'Kulturminnekonsulent', 'Kundemegler', 'Kundesuppertleder', 'Kunststopper', 'Kurator', 'Kursmedarbeider', 'Kursveileder', 'Kurvfletter', 'Kurvmaker', 'Kurvmakermester', 'Kusk', 'Kvalitetsbedømmer', 'Kvalitetsmedarbeider', 'Kvalitetssikringsassistent', 'Kvalitetssikringsinspektør', 'Kvalitetssikringskoordinator', 'Kvalitetssikringsleder', 'Kybernetiker', 'Kystdirektør', + 'Laboratorieleder', 'Laboratorierådgiver', 'Laboratorietekniker', 'Lagerformann', 'Lagerforvalter', 'Lagerfunksjonær', 'Lagerleder', 'Lagersjef', 'Lakkerer', 'Lakkoker', 'Landbruksdirektør', 'Landbruksmaskinmekaniker', 'Landbruksveileder', 'Landskapsarkitekt', 'Landssekretær', 'Landsstyremedlem', 'Ledende Aktivitør', 'Ledende Legesekretær', 'Leder', 'Leder It Brukerstøtte', 'Lege I Spesialisering', 'Legemiddelinspektør', 'Legesekretær', 'Legpredikant', 'Leigeskjærer', 'Lekotekleder', 'Lektor', 'Lensmannsbetjent', 'Lensmannsfullmektig', 'Leveransekoordinator', 'Ligningsrevisor', 'Ligningssekretær', 'Limarbeider', 'Limnolog', 'Lineegner', 'Linjeleder', 'Linjemontør', 'Litteraturagent', 'Litteraturkritiker', 'Location Scout', 'Locationassistent', 'Loddselger', 'Logistikkdirektør', 'Logistikkkoordinator', 'Logistikkleder', 'Logistikkmedarbeider', 'Logistikkonsulent', 'Logistikksjef', 'Logoped', 'Lokomotivfører', 'Lokomotivkontrollør', 'Losbåtfører', 'Losbåtsmann', 'Losinspektør', 'Lufthavnbetjent', 'Lufttrafikksjef', 'Lugarpike', 'Lydingeniør', 'Lydmester', 'Lydtekniker', 'Lysrigger', 'Lystekniker', 'Låsemontør', 'Lærervikar', 'Lærling', 'Lønningssekretær', 'Lønningssjef', 'Løypekjører', 'Løytnant', + 'Malerlærling', 'Manikyrist', 'Mannekeng', 'Marinamedarbeider', 'Mariningeniør', 'Maritim Sjef', 'Markedsassistent', 'Markedsfører', 'Markedskoordinator', 'Markedsmedarbeider', 'Markedsovervåker', 'Markedssjef', 'Marketingsekretær', 'Marketingsjef', 'Marketingsplanlegger', 'Markisemontør', 'Maskinassistent', 'Maskinfører', 'Maskiningeniør', 'Maskininnbinder', 'Maskinmekaniker', 'Maskinoffiser', 'Maskinpakker', 'Maskinpasser', 'Maskintegner', 'Maskør', 'Masseoppløser', 'Matematikkinstruktør', 'Materialadministrasjonssjef', 'Materialforvalter', 'Medhjelper', 'Medisinalråd', 'Meglerassistent', 'Meierikonsulent', 'Mekaniker', 'Mekanisk Kabeloperasjonstekniker', 'Mengeblander', 'Menger', 'Menig', 'Menighetsarbeider', 'Menighetssekretær', 'Mensendiecker', 'Merkevaresjef', 'Messepike', 'Messeplanlegger', 'Metalliserer', 'Metallpusser', 'Meteorologikonsulent', 'Mikrofilmfotograf', 'Mikseoperatør', 'Militærattache', 'Militærpsykolog', 'Miljøsaneringsarbeider', 'Miljøvernsjef', 'Miljøvernsjef På Svalbard', 'Mineralvannarbeider', 'Minerer', 'Minerydder', 'Minigraverfører', 'Misjonsprest', 'Misjonssekretær', 'Mobilkranfører', 'Modellsnekker', 'Modellør', 'Molekylærbiolog', 'Montasjeingeniør', 'Montasjesjef', 'Moseplukker', 'Motormann', 'Motormannlærling', 'Motormekaniker', 'Motorsykkelbud', 'Motorsykkelreparatør', 'Mub Ingeniør', 'Multimediedesigner', 'Museumsdirektør', 'Museumstekniker', 'Musikkinstrumentreparatør', 'Musikkpedagog', 'Musikkprodusent', 'Musikkterapeut', 'Mykolog', 'Myntarbeider', 'Møbelmontør', 'Møbelsnekker', 'Møbeltapetserer', 'Møllemester', 'Mølleoperatør', 'Møller', 'Mønsteroperatør', 'Mønstersliper', + 'Namsfullmektig', 'Natler', 'Nattportier', 'Nautisk Instrumentmaker', 'Ndt-Kontrollør', 'Neglskulptør', 'Nemndleder', 'Nestleder', 'Nettmann', 'Nettverksanalytiker', 'Nettverkstekniker', 'Notfisker', 'Nupper', 'Nyhetsredaktør', 'Nyhetsreporter', 'Nyhetssjef', 'Næringsmiddelkandidat', 'Næringsmiddelkontrollør', 'Næringsmiddelteknolog', 'Næringssjef', + 'Odontolog', 'Odontologisk Forsker', 'Offentlig Godkjent Sykepleier', 'Offisersaspirant', 'Offshore Installation Manager', 'Oldfrue', 'Oljeanalytiker', 'Oljedestillatør', 'Oljedirektør', 'Oljekontraktkjøper', 'Oljekontraktmegler', 'Oljepressearbeider', 'Oljeraffinerer', 'Oljeseparatør', 'Ombud', 'Ombudsmann For Forsvaret', 'Områdebanksjef', 'Områdesjef', 'Omsorgsarbeider', 'Onkolog', 'Onkologisykepleier', 'Operatør', 'Operatør Av Pakkemaskiner', 'Opplæringsfarmasøyt', 'Opplæringskonsulent', 'Opplæringsleder', 'Opplæringssjef', 'Oppmålingstekniker', 'Oppredningsarbeider', 'Oppsynssjef', 'Oppvekstsjef', 'Opsjonsmegler', 'Optikermedarbeider', 'Ordensvakt', 'Ordreplukker', 'Organisasjonskonsulent', 'Organisasjonsleder', 'Organisasjonssekretær', 'Orgelbygger', 'Ortoped', 'Ortopeditekniker', 'Ortopediteknisk Sjef', 'Ortoptist', 'Oseanograf', 'Ostemaker', 'Overgartner', 'Overingeniør', 'Overinspektør', 'Overjordmor', 'Overkokk', 'Overlærskjærer', 'Overpleier', 'Overpostbetjent', 'Overpostmester', 'Overradiograf', 'Oversetter', 'Overstiger', 'Oversykepleier', + 'Pantelåner', 'Pappsalarbeider', 'Paraplymaker', 'Parkettlegger', 'Parkettsliper', 'Parksjef', 'Parlamentarisk Leder', 'Partisekretær', 'Parykkmaker', 'Parykkmakermester', 'Passkontrollør', 'Pater', 'Patolog', 'Pedagog', 'Pedagogisk Psykolog', 'Pelsbereder', 'Pelsdyroppdretter', 'Pelsmaker', 'Pengeutlåner', 'Perforerer', 'Perfusjonist', 'Personal-Og Økonomidirektør', 'Personalassistent', 'Personalleder', 'Petrofysiker', 'Petroleumsarkitekt', 'Phytoterapeut', 'Pianoreparatør', 'Pianostemmer', 'Piping Ingeniør', 'Pizzabaker', 'Pizzasjåfør', 'Planlegger', 'Planleggingssjef', 'Planner', 'Plasseringsrådgiver', 'Pleiemedarbeider', 'Pleier', 'Poet', 'Polaritetsterapeut', 'Poliklinikksykepleier', 'Poliseprodusent', 'Politiadvokat', 'Politiavdelingssjef', 'Politiførstebetjent', 'Politimester', 'Politioverkonstabel', 'Politisk Sekretær', 'Popmusiker', 'Porteføljeforvalter', 'Porteføljeselger', 'Post Doc.', 'Postdoktor', 'Postfortoller', 'Postfullmektig', 'Postinspektør', 'Postmester', 'Poståpner', 'Preparantassistent', 'Preserveringstekniker', 'Pressebas', 'Pressefotograf', 'Presser', 'Privatassurandør', 'Prodekan', 'Production Supervisor', 'Produksjonsingeniør', 'Produksjonskoordinator', 'Produksjonsmedarbeider', 'Produksjonsoperatør', 'Produksjonsteknisk Leder', 'Produktsekretær', 'Produkttester', 'Produktutviklingskoordinator', 'Programleder', 'Programmerer', 'Programmeringssjef', 'Programsjef', 'Programvaretester', 'Programvareutvikler', 'Promotionkonsulent', 'Promotionmedarbeider', 'Prorektor', 'Prosjektmegler', 'Prosjektoppfølger', 'Prosjektstyringssjef', 'Prosjektøkonom', 'Protesetekniker', 'Protokollfører', 'Protokollsekretær', 'Pubvert', 'Purserassistent', 'Påkleder', 'Pølsemaker', + 'Rabbiner', 'Radarreparatør', 'Radioingeniør', 'Radioleder', 'Radiosondeleder', 'Radiotekniker', 'Radiotelefonist', 'Raffinerer', 'Rammemaker', 'Redaksjonssekretær', 'Redaktør', 'Regionsekretær', 'Regionsjef', 'Regissør', 'Registrert Legemiddelkonsulent', 'Regningsinnkrever', 'Regnskapsansvarlig', 'Rehabiliteringsterapeut', 'Reineier', 'Reklamefotograf', 'Reklamekonsulent', 'Reklamesekretær', 'Rekrutteringskonsulent', 'Rektor', 'Rekvisitamaker', 'Rekvisittleder', 'Rembursjef', 'Renholdsbetjent', 'Renholdsinspektør', 'Renholdskonsulent', 'Renholdsleder', 'Renovasjonskjører', 'Renseriarbeider', 'Renseribestyrer', 'Renserimaskinarbeider', 'Reparatør', 'Resepsjonsfullmektig', 'Resepsjonsleder', 'Reservedelsekspeditør', 'Reservedykker', 'Reservesjåfør', 'Ressurskoordinator', 'Restaurantinspektør', 'Restaureringsassistent', 'Restaureringstekniker', 'Rettsgenetiker', 'Rettsskriver', 'Revisjonsleder', 'Revisjonsrådgiver', 'Revisjonssjef', 'Revisor', 'Revisormedarbeider', 'Ridelærer', 'Rigger', 'Riksantikvar', 'Riksarkivar', 'Riksbibliotekar', 'Risiko Controller', 'Rockemusiker', 'Rockesanger', 'Rodeleder', 'Romanforfatter', 'Rosenterapeut', 'Roughneck', 'Rullestolreparatør', 'Ryddehjelp', 'Rådgivende Overlege', 'Røkter', 'Røntgenassistent', 'Røringeniør', 'Rørsveiser', + 'Sagbladstiller', 'Sagbruks- Og Høvleriarbeider', 'Sagsliper', 'Salatbarmedarbeider', 'Salgsanalytiker', 'Salgsassistent', 'Salgsingeniør', 'Salgskontrollør', 'Salgsrådgiver', 'Salgssekretær', 'Sambandsoffiser', 'Sametingspresident', 'Samfunnsgeograf', 'Saneringsarbeider', 'Scanner', 'Sceneinstruktør', 'Scenemester', 'Seismisk Personell', 'Sekretær', 'Seksjonsoverlege', 'Sektorsjef/assisterende Leder Av Politistyrke', 'Selfanger', 'Selger', 'Sementarbeider', 'Sementeringstekniker', 'Seminarholder', 'Senior Ingeniør', 'Senior Maskiningeniør', 'Senior Operatør', 'Senior Planleggsingsingeniør', 'Senior Økonomikonsulent', 'Senioranalytiker', 'Seniorinnkjøper', 'Seniorinspektør', 'Seniormetallurg', 'Seniorserviceingeniør', 'Senterleder', 'Sentralbanksjef', 'Sentralbordleder', 'Serigraf', 'Service Manager', 'Servicemontør', 'Servitør', 'Shopper', 'Shoveldoserkjører', 'Signalmann', 'Sikkerhetsansvarlig', 'Sikkerhetsdirektør', 'Sikkerhetsleder', 'Silketrykker', 'Sivilforsvarsinspektør', 'Sivilombud', 'Siviløkonom', 'Sjefbioingeniør', 'Sjeflege', 'Sjefsfysioterapeut', 'Sjefsingeniør', 'Sjefskokk', 'Sjefslandskapsarkitekt', 'Sjefssykepleier', 'Sjefsøkonom', 'Sjåfør Klasse B', 'Skadedyrkontrollør', 'Skadekonsulent', 'Skademedarbeider', 'Skaderegulerer', 'Skadesjef', 'Skatteregnskapssjef', 'Skatterevisor', 'Skiftekontrollør', 'Skiftingeniør', 'Skiftleder', 'Skilærer', 'Skimaker', 'Skinnsorterer', 'Skippingmedarbeider', 'Skipsradiomontør', 'Skipsreperatør', 'Skipsrørlegger', 'Skipssmed', 'Skjenkekontrollør', 'Skogbestyrer', 'Skogbruksplanlegger', 'Skogdirektør', 'Skogformann', 'Skogforvalter', 'Skogfullmektig', 'Skogsmaskinfører', 'Skogtaksator', 'Skoleassistent', 'Skoledirektør', 'Skolefritidsleder', 'Skoleinspektør', 'Skolepsykolog', 'Skolerådgiver', 'Skomakerlærling', 'Skopusser', 'Skoreparatør', 'Skrankeekspeditør', 'Skrankemedarbeider', 'Skredder', 'Skribent', 'Skript', 'Skuespiller', 'Skummer', 'Skøyteinstruktør', 'Slaktermester', 'Slankekonsulent', 'Sminkeassistent', 'Småbruker', 'Smører', 'Snekkermester', 'Snurrevadfisker', 'Snømåker', 'Snørelager', 'Soknediakon', 'Soneterapeut', 'Sortbytter', 'Sorterer', 'Sorteringsleder', 'Sortersalarbeider', 'Sosialfaglig Leder', 'Sosialinspektør', 'Sosialrådmann', 'Sosialsekretær', 'Sparklingsarbeider', 'Speditør', 'Spesialbioingeniør', 'Spesialergoterapeut', 'Spesialfysioterapeut', 'Spesiallærer', 'Spesialpedagog', 'Spesialpsykolog', 'Spesialrevisor', 'Spesialrådgiver', 'Spesialsykepleier', 'Spesialtannlege', 'Spoler', 'Sporveisdirektør', 'Spregningsarbeider', 'Spritdestillatør', 'Sprøytelakkerer', 'Spåkone/-Mann', 'Stabssjef', 'Staffcaptain', 'Stallkar', 'Stallmann', 'Stallpike', 'Stasjonsbetjent', 'Stasjonssjef', 'Statslosaspirant', 'Statsmeteorolog', 'Statsmykolog', 'Statssekretær', 'Statsskogsjef', 'Steinbruddsarbeider', 'Steinfagmester', 'Steward', 'Stillasbygger', 'Stipendiat', 'Stopper', 'Store Manager', 'Storkundeansvarlig', 'Stortingspresident', 'Storurmaker', 'Strategirådgiver', 'Stråleterapeut', 'Studieinspektør', 'Studieleder', 'Studiobetjent', 'Studioformann', 'Stuert', 'Styreleder', 'Styremedlem', 'Støttekontakt', 'Surveyer', 'Svakstrømsmontør', 'Sveiseinspektør', 'Sveiserlærling', 'Sykehusdirektør', 'Sykehusfarmasøyt', 'Sykehuslaborant', 'Sykehusprest', 'Sykehussjef', 'Sysselmann', 'Systemanalytiker', 'Systemarkitekt', 'Systemerer', 'Systemingeniør', 'Systemsjef', 'Systemtekniker', 'Systemtester', 'Systemutvikler', 'Sølvsiselør', 'Sølvsmed', 'Sølvtrykker', 'Søppelkjører', + 'Taksteinlegger', 'Takstmann', 'Takstøkonom', 'Taktekker', 'Tallmagiker', 'Tannhelsesekretær', 'Tannhygieniker', 'Tannlegeassistent', 'Tannteknikermester', 'Tapper', 'Tapperiformann', 'Taubanefører', 'Taxisjåfør', 'Teglsorterer', 'Tegneassistent', 'Teknisk Ansvarlig', 'Teknisk Direktør', 'Teknisk Rådmann', 'Tekstilkonservator', 'Tekstilkunstner', 'Tekstiloperatør', 'Tekstiltrykker', 'Teleekspeditør', 'Telefonsentralmontør', 'Telefullmektig', 'Telegrafbetjent', 'Telekommunikasjonsingeniør', 'Telesjef', 'Teolog', 'Teppelegger', 'Terminalansvarlig', 'Terminalarbeider', 'Terminalleder', 'Termisk Sprøyter', 'Tilrettelegger', 'Tilsynslege', 'Tilsynsveterinær', 'Tiltakssjef', 'Tivoliarbeider', 'Togelektriker', 'Togkontrollør', 'Togsjef', 'Tolldistriktssjef', 'Tollkasserer', 'Tollstedsjef', 'Topograf', 'Torghandler', 'Total Service Manager', 'Totalisatorfunksjonær', 'Trafikkflyger', 'Trafikklærer', 'Trafikksjef', 'Trailersjåfør', 'Transformatormontør', 'Transportformann', 'Transportleder', 'Transportmedarbeider', 'Transportsjef', 'Transportør', 'Tredreier', 'Trepleier', 'Trikkefører', 'Truckfører', 'Trygdedirektør', 'Trygderevisor', 'Trygdesjef', 'Trykker', 'Trykktester', 'Trålbas', 'Turistvert', 'Turoperatør', 'Tvisteløseleder', 'Tvisteløser', 'Tårnarbeider', 'Tårnkranfører', 'Tårnmann', 'Tømmerberegner', 'Tømmerfløter', 'Tømmerhogger', 'Tømmermåler', 'Tømmermålingsinspektør', 'Tømmersjef', 'Tømmersorterer', 'Tørkepasser', 'Tørker', 'Tørrfisktilvirker', 'Tørrstoffkoker', + 'Ullklassifisør', 'Undervisningsassistent', 'Underwriter', 'Utbyggingssjef', 'Utenrikskorrespondent', 'Utenriksredaktør', 'Utenriksråd', 'Utmarkstekniker', 'Utreder', 'Utredningsingeniør', 'Utrykningsleder', 'Utstyrsoperatør', 'Utviklingsdirektør', 'Utviklingssjef', + 'Va-Ingeniør', 'Vakt', 'Vaktbetjent', 'Vaktmann', 'Vaktmesterassistent', 'Valutakoordinator', 'Valutasjef', 'Vannverkssjef', 'Varabrannmester', 'Vareautomatoperatør', 'Varemegler', 'Varmebehandler', 'Vaskeriassistent', 'Vedlikeholdsingeniør', 'Vedlikeholdstekniker', 'Vegvalsekjører', 'Vekterlærling', 'Vektkontrollør', 'Velferdssekretær', 'Velferdssjef', 'Verftssjef', 'Verkstedansvarlig', 'Verkstedarbeider', 'Verkstedformann', 'Verkstedingeniør', 'Verkstedmedarbeider', 'Verkstedsjef', 'Verktøyinnstiller', 'Verktøykonstruktør', 'Verktøymaker', 'Verktøysliper', 'Verneingeniør', 'Verneombud', 'Vervet', 'Veterinærinspektør', 'Vever', 'Vikarbyråkonsulent', 'Viltforvalter', 'Viltkonsulent', 'Vinduspusser', 'Viseadmiral', 'Visekonsernsjef', 'Visekonsul', 'Visesanger', 'Voksenopplæringssjef', 'Vraker', 'Vytnesjæjja', 'Værelsesbetjent', 'Værvarslingssjef', + 'Web-Publisher', 'Webdesigner', 'Webmaster', 'Webredaktør', + 'Yrkesfaglærer', 'Yrkesopplæringsleder', 'Yster', + 'Økonom', 'Økonomiarbeider', + 'Øre-Nese-Hals-Spesialist', + ); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Person.php index c95410b..56d6883 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Person.php @@ -300,7 +300,7 @@ class Person extends \Faker\Provider\Person */ $randomDigits = (string)static::numerify('##'); - switch($gender) { + switch ($gender) { case static::GENDER_MALE: $genderDigit = static::randomElement(array(1,3,5,7,9)); break; diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php index 9be2993..c97e720 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php @@ -19,4 +19,23 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '9#######', '4#######', ); + + /** + * @var array Norweign mobile number formats + */ + protected static $mobileFormats = array( + '+474#######', + '+479#######', + '9## ## ###', + '4## ## ###', + '9#######', + '4#######', + ); + + public function mobileNumber() + { + $format = static::randomElement(static::$mobileFormats); + + return self::numerify($this->generator->parse($format)); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Address.php index 7f69a5b..ee81af2 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Address.php @@ -78,7 +78,7 @@ class Address extends \Faker\Provider\Address 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands Antilles', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway', 'Oman', - 'Pakistan', 'Palau', 'Palestinian Territory', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', + 'Pakistan', 'Palau', 'Palestinian Territories', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Barthelemy', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia (Slovak Republic)', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia and the South Sandwich Islands', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Person.php index 0a88375..706cd33 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ne_NP/Person.php @@ -45,11 +45,11 @@ class Person extends \Faker\Provider\Person 'Kabindra', 'Kailash', 'Kalyan', 'Kamal', 'Kamod', 'Kapil', 'Karan', 'Karna', 'Khagendra', 'Kishor', 'Kris', 'Krishna', 'Krisus', 'Kuber', 'Lakshman', 'Lalit', 'Lava', 'Lochan', 'Lokesh', 'Madhav', 'Madhukar', 'Madhur', 'Mandeep', 'Manish', 'Manjul', 'Manoj', 'Milan', 'Mohit', 'Mridul', - 'Nabin', 'Nakul', 'Narayan', 'Narendra', 'Naresh', 'Neil', 'Nerain', 'Nirajan', 'Nirajan', 'Nirmal', 'Nirupam', 'Nischal', 'Nishad', 'Nishant', 'Nutan', + 'Nabin', 'Nakul', 'Narayan', 'Narendra', 'Naresh', 'Neil', 'Nerain', 'Nirajan', 'Nirmal', 'Nirupam', 'Nischal', 'Nishad', 'Nishant', 'Nutan', 'Om', 'Paras', 'Parikshit', 'Parimal', 'Pawan', 'Piyush', 'Prabal', 'Prabesh', 'Prabhat', 'Prabin', 'Prajwal', 'Prakash', 'Pramesh', 'Pramod', 'Pranaya', 'Pranil', 'Prasanna', 'Prashant', 'Prasun', 'Pratap', 'Pratik', 'Prayag', 'Prianshu', 'Prithivi', 'Purna', 'Pushkar', 'Raghab', 'Rahul', 'Rajan', 'Rajesh', 'Rakesh', 'Ramesh', 'Ranjan', 'Ranjit', 'Ricky', 'Rijan', 'Rishab', 'Rishikesh', 'Rohan', 'Rohit', 'Roshan', - 'Sabin', 'Sachit', 'Safal', 'Sahaj', 'Sahan', 'Sajal', 'Sakar', 'Samir', 'Sanchit', 'Sandesh', 'Sanjay', 'Sanjeev', 'Sankalpa', 'Santosh', 'Sarad', 'Saroj', 'Sashi', 'Saumya', 'Sevak', 'Shailesh', 'Shakti', 'Shamundra', 'Shantanu', 'Shashank', 'Shashwat', 'Shekar', 'Shyam', 'Siddhartha', 'Sitaram', 'Sohan', 'Sohil', 'Soviet', 'Spandan', 'Subal', 'Subham', 'Subodh', 'Sudan', 'Sudhir', 'Sudin', 'Sudip', 'Sujan', 'Sujit', 'Sukanta', 'Sumel', 'Sunil', 'Suraj', 'Suraj', 'Surendra', 'Surya', 'Sushant', 'Sushil', 'Suyash', 'Suyog', 'Swagat', 'Swapnil', 'Swarup', + 'Sabin', 'Sachit', 'Safal', 'Sahaj', 'Sahan', 'Sajal', 'Sakar', 'Samir', 'Sanchit', 'Sandesh', 'Sanjay', 'Sanjeev', 'Sankalpa', 'Santosh', 'Sarad', 'Saroj', 'Sashi', 'Saumya', 'Sevak', 'Shailesh', 'Shakti', 'Shamundra', 'Shantanu', 'Shashank', 'Shashwat', 'Shekar', 'Shyam', 'Siddhartha', 'Sitaram', 'Sohan', 'Sohil', 'Soviet', 'Spandan', 'Subal', 'Subham', 'Subodh', 'Sudan', 'Sudhir', 'Sudin', 'Sudip', 'Sujan', 'Sujit', 'Sukanta', 'Sumel', 'Sunil', 'Suraj', 'Surendra', 'Surya', 'Sushant', 'Sushil', 'Suyash', 'Suyog', 'Swagat', 'Swapnil', 'Swarup', 'Tej', 'Tilak', 'Tirtha', 'Trailokya', 'Trilochan', 'Udit', 'Ujjwal', 'Umesh', 'Uttam', 'Yogendra', 'Yogesh', 'Yuvaraj', @@ -80,7 +80,7 @@ class Person extends \Faker\Provider\Person protected static $lastName = array( 'Acharya', 'Adhikari', 'Agarwal', 'Amatya', 'Aryal', 'Baidya', 'Bajracharya', 'Balami', 'Banepali', 'Baniya', 'Banjade', 'Baral', 'Basnet', 'Bastakoti', 'Bastola', 'Basyal', 'Belbase', 'Bhandari', 'Bhatta', 'Bhattarai', 'Bhusal', 'Bijukchhe', 'Bisht', 'Bohara', 'Budathoki', 'Byanjankar', - 'Chalise', 'Chamling', 'Chapagain', 'Chaudhary', 'Chhetri', 'Chhetri', + 'Chalise', 'Chamling', 'Chapagain', 'Chaudhary', 'Chhetri', 'Dahal', 'Dangol', 'Dawadi', 'Devkota', 'Dhakal', 'Dhamla', 'Dhaubhadel', 'Dhungel', 'Gauchan', 'Gautam', 'Ghale', 'Ghimire', 'Giri', 'Golchha', 'Gurung', 'Gyalzen', 'Gyawali', 'Hamal', 'Himanshu', 'Humagain', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Address.php index 8b69964..d0f6d36 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Address.php @@ -4,7 +4,20 @@ namespace Faker\Provider\nl_BE; class Address extends \Faker\Provider\Address { - protected static $postcode = array('####'); + protected static $postcodes = array( + '2970', '3700', '7510', '9420', '8511', '3800', '9300', '9880', '3200', '8700', '8211', '2630', '4557', + '4280', '3930', '5590', '5362', '4219', '6280', '9991', '8660', '1790', '9051', '5544', '4317', '5310', + '6250', '5070', '3570', '5550', '4432', '1652', '8690', '4540', '6680', '6953', '4770', '6997', '7750', + '5300', '1070', '6150', '4821', '4031', '7387', '5537', '6721', '6890', '4430', '5500', '5520', '4520', + '4160', '7640', '2000', '2018', '2020', '2030', '2040', '2050', '2060', '2099', '7910', '8570', '9200', + '9400', '5170', '7811', '4990', '1390', '8850', '2370', '4601', '6700', '7181', '5060', '6870', '3665', + '9404', '9890', '7040', '1730', '8310', '1007', '9960', '6860', '3460', '5330', '9800', '7800', '6791', + '3404', '3384', '6717', '7941', '6790', '7972', '4880', '5660', '6880', '7382', '6706', '1367', '5580', + '8630', '8580', '4260', '3271', '4340', '4400', '6900', '4630', '4920', '3128', '9310', '2387', '4837', + '6464', '6460', '5555', '7730', '5377', '7380', '1470', '5190', '9860', '2490', '6951', '6500', '4671', + '5570', '7534', '5370', '6940', '7971', '4983', '4690', '9968', '7830', '6600', '3870', '4651', '7130', + '7331', '7870', '7604', '1401', '9520', '8531', '9150', '4052', '6980', '1320', '6594', '7532', '3960', + ); protected static $streetAddressFormats = array( '{{streetName}} {{buildingNumber}}' @@ -88,6 +101,11 @@ class Address extends \Faker\Provider\Address 'Wit-Rusland', 'Zambia', 'Zuid-Afrika', 'Zuid-Georgia en de Zuidelijke Sandwicheilanden', 'Zimbabwe' ); + public static function postcode() + { + return static::randomElement(static::$postcodes); + } + /** * @example 'Gelderland' */ diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php index 9e1a3b9..f8eb233 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php @@ -32,7 +32,7 @@ class Payment extends \Faker\Provider\Payment */ public static function vat($spacedNationalPrefix = true) { - $prefix = ($spacedNationalPrefix) ? "BE " : "BE"; + $prefix = $spacedNationalPrefix ? "BE " : "BE"; return sprintf("%s0%d", $prefix, self::randomNumber(9, true)); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php index c9ac865..bde3bf6 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php @@ -2,6 +2,8 @@ namespace Faker\Provider\nl_BE; +use Faker\Provider\DateTime; + class Person extends \Faker\Provider\Person { protected static $firstNameMale = array( @@ -69,4 +71,36 @@ class Person extends \Faker\Provider\Person 'Vermeersch', 'Vermeiren', 'Vermeulen', 'Verschueren', 'Verstraete', 'Verstraeten', 'Vervoort', 'Wauters', 'Willems', 'Wouters', 'Wuyts', 'Yildirim', 'Yilmaz' ); + + /** + * Belgian Rijksregister numbers are used to identify each citizen, + * it consists of three parts, the person's day of birth, in the + * format 'ymd', followed by a number between 1 and 997, odd for + * males, even for females. The last part is used to check if it's + * a valid number. + * + * @link https://nl.wikipedia.org/wiki/Rijksregisternummer + * + * @param string|null $gender 'male', 'female' or null for any + * @return string + */ + public static function rrn($gender = null) + { + $middle = self::numberBetween(1, 997); + if ($gender === static::GENDER_MALE) { + $middle = $middle %2 === 1 ? $middle : $middle+1; + } elseif ($gender === static::GENDER_FEMALE) { + $middle = $middle %2 === 0 ? $middle : $middle+1; + } + $middle = sprintf('%03d', $middle); + + $date = DateTime::dateTimeThisCentury(); + $dob = sprintf('%06d', $date->format('ymd')); + $help = $date->format('Y') >= 2000 ? 2 : null; + + $check = intval($help.$dob.$middle); + $rest = sprintf('%02d', 97 - ($check % 97)); + + return $dob.$middle.$rest; + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php new file mode 100644 index 0000000..d41104d --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php @@ -0,0 +1,25347 @@ +generator->lastName; + break; + } + + if (0 !== static::numberBetween(0, 1)) { + return $companyName . ' ' . static::randomElement(static::$companySuffix); + } + + return $companyName; + } /** * Belasting Toegevoegde Waarde (BTW) = VAT * * @example 'NL123456789B01' * - * @see (dutch) http://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/btw/administratie_bijhouden/btw_nummers_controleren/uw_btw_nummer - * + * @see http://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/btw/administratie_bijhouden/btw_nummers_controleren/uw_btw_nummer * * @return string VAT Number */ public static function vat() { return sprintf("%s%d%s%d", 'NL', self::randomNumber(9, true), 'B', self::randomNumber(2, true)); - } /** * Alias dutch vat number format + * + * @return string */ public static function btw() { diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php index 9abccb6..a3d7dc8 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php @@ -26,10 +26,26 @@ class Person extends \Faker\Provider\Person 'mr.', 'dr.', 'ir.', 'drs', 'bacc.', 'kand.', 'dr.h.c.', 'prof.', 'ds.', 'ing.', 'bc.' ); - private static $suffix = array( + protected static $suffix = array( 'BA', 'Bsc', 'LLB', 'LLM', 'MA', 'Msc', 'MPhil', 'D', 'PhD', 'AD', 'B', 'M' ); + protected static $prefix = array("'s", "'t", 'a', 'aan', "aan 't", 'aan de', 'aan den', 'aan der', 'aan het', + "aan t", 'af', 'al', 'am', 'am de', 'auf', 'auf dem', 'auf den', 'auf der', 'auf ter', 'aus', "aus 'm", + 'aus dem', 'aus den', 'aus der', 'aus m', 'ben', 'bij', "bij 't", 'bij de', 'bij den', 'bij het', 'bij t', + 'bin', 'boven d', "boven d'", 'd', "d'", 'da', 'dal', 'dal’', 'dalla', 'das', 'de', 'de die', 'de die le', + 'de l', 'de l’', 'de la', 'de las', 'de le', 'de van der', 'deca', 'degli', 'dei', 'del', 'della', 'den', + 'der', 'des', 'di', 'die le', 'do', 'don', 'dos', 'du', 'el', 'het', 'i', 'im', 'in', "in 't", 'in de', 'in den', + 'in der', 'in het', 'in t', 'l', 'l’', 'la', 'las', 'le', 'les', 'lo', 'los', 'of', 'onder', "onder 't", + 'onder de', 'onder den', 'onder het', 'onder t', 'op', "op 't", 'op de', 'op den', 'op der', 'op gen', 'op het', + 'op t', 'op ten', 'over', "over 't", 'over de', 'over den', 'over het', 'over t', 's', "s'", 't', 'te', 'ten', + 'ter', 'tho', 'thoe', 'thor', 'to', 'toe', 'tot', 'uijt', "uijt 't", 'uijt de', 'uijt den', 'uijt te de', + 'uijt ten', 'uit', "uit 't", 'uit de', 'uit den', 'uit het', 'uit t', 'uit te de', 'uit ten', 'unter', 'van', + "van 't", 'van De', 'van de', 'van de l', "van de l'", 'van den', 'van der', 'van gen', 'van het', 'van la', + 'van t', 'van ter', 'van van de', 'ver', 'vom', 'von', "von 't", 'von dem', 'von den', 'von der', 'von t', 'voor', + "voor 't", 'voor de', 'voor den', "voor in 't", 'voor in t', 'vor', 'vor der', 'zu', 'zum', 'zur' + ); + protected static $commonDutchLastNames = array( 'de Jong', 'Jansen', 'de Vries', 'van de Berg', 'van den Berg', 'van der Berg', 'van Dijk', 'Bakker', 'Janssen', 'Visser', 'Smit', 'Meijer', 'Meyer', 'de Boer', 'Mulder', 'de Groot', 'Bos', 'Vos', 'Peters', 'Hendriks', @@ -70,7 +86,7 @@ class Person extends \Faker\Provider\Person 'Coreth von und zu Coredo und Starkenberg', 'Cornelisse', 'Cornelissen', 'Cornelisz', 'van den Corput', 'Corstiaens', 'Cosman', 'van de Coterlet', 'Courtier', 'van Cuijck', 'van Daal', 'Dachgelder', 'Dachgeldt', 'Dachgelt', 'van Dagsburg', 'van Dalem', 'van Dam', 'van de Darnau', 'David', 'Dekker', 'Demmendaal', - 'Dennenberg', 'Die Bont', 'Diesbergen', 'van Dijk', 'Dijkman', 'van Dillen', 'Dircken', 'Dirksen', 'Dirven', + 'Dennenberg', 'die Bont', 'Diesbergen', 'van Dijk', 'Dijkman', 'van Dillen', 'Dircken', 'Dirksen', 'Dirven', 'Doesburg', 'van Dokkum', 'van Dommelen', 'van Dongen', 'van Dooren', 'Doorhof', 'Doornhem', 'Dorsman', 'Doyle', 'Draaisma', 'van Drenthe', 'Dries', 'Drysdale', 'Dubois', 'van Duivenvoorde', 'Duivenvoorden', 'van Duvenvoirde', 'van Duyvenvoorde', 'die Bont', 'die Pelser', 'die Witte', 'van Eck', 'Eckhardt', 'Eelman', @@ -89,18 +105,18 @@ class Person extends \Faker\Provider\Person 'Groote', 'de Grote', 'Gruijl', 'de Gruijl', 'de Gruijter', 'de Gruil', 'de Grunt', 'de Gruson', 'le Guellec', 'Guit', 'le Gulcher', 'Höning', 'Haack', 'den Haag', 'van Haarlem', 'de Haas', 'van Haeften', 'Haengreve', 'van Hagen', 'Hagendoorn', 'Hak', 'Hakker', 'van Ham', 'van Hamaland', 'Haneberg', 'Hanegraaff', 'Haring', - 'Haselaar', 'van Haspengouw Hesbaye', 'van Haspengouw', 'Hazenveld', 'de Heer', 'Heere', 'Heerkens', + 'Haselaar', 'van Haspengouw', 'Hazenveld', 'de Heer', 'Heere', 'Heerkens', 'Heerschop', 'Hehl', 'van der Heiden', 'van der Heijden', 'Heijman', 'Heijmans', 'Heijmen', 'Heinrichs', - 'Hekker', 'Hellevoort', 'Helmerhorst', 'van Hemert', 'Hemma van Allemanië', 'Hendricks', 'Hendriks', - 'Hendrikse', 'van Henegouwen', 'Henric van den Nuwenhuse', 'van den Henst', 'Heribert van Laon', 'd\' Heripon', + 'Hekker', 'Hellevoort', 'Helmerhorst', 'van Hemert', 'Hemma', 'Hendricks', 'Hendriks', + 'Hendrikse', 'van Henegouwen', 'van den Henst', 'Heribert van Laon', "d' Heripon", 'Hermans', 'van Herstal', 'van Heusden', 'Hexspoor', 'Heymans', 'Heyne', 'Hoedemakers', 'van den Hoek', 'Hoeks', 'Hoelen', 'Hoes', 'van Hoevel en van Zwindrecht', 'van der Hoeven', 'van Holland', 'Hollander', 'Holthuis', 'Hondeveld', 'Honing', 'de Hoog', 'Hoogers', 'de Hoogh', 'Hoppenbrouwer', 'Horrocks', 'van der Horst', - 'van Hostaden', 'Houdijk', 'van \'t Houteveen', 'Huberts', 'Huel', 'Huijben', 'Huijbrechts', 'Huijs', + 'van Hostaden', 'Houdijk', "van 't Houteveen", 'Huberts', 'Huel', 'Huijben', 'Huijbrechts', 'Huijs', 'Huijzing', 'Huisman', 'Huls', 'Hulshouts', 'Hulskes', 'Hulst', 'van Hulten', 'Huurdeman', 'van het Heerenveen', 'Jaceps', 'Jacobi', 'Jacobs', 'Jacquot', 'de Jager', 'Jans', 'Jansdr', 'Janse', 'Jansen', 'Jansen', 'Jansse', - 'Janssen', 'Janssens', 'Jasper dr', 'Jdotte', 'Jeggij', 'Jekel', 'Jerusalem', 'Jochems', 'de Jode Vastraedsd', - 'Jones', 'de Jong', 'Jonkman', 'Joosten', 'Jorlink', 'Jorrisen', 'van Jumiège', 'Jurrijens', 'Köster', + 'Janssen', 'Janssens', 'Jasper dr', 'Jdotte', 'Jeggij', 'Jekel', 'Jerusalem', 'Jochems', + 'Jones', 'de Jong', 'Jonkman', 'Joosten', 'Jorlink', 'Jorissen', 'van Jumiège', 'Jurrijens', 'Köster', 'van der Kaay', 'de Kale', 'Kallen', 'Kalman', 'Kamp', 'Kamper', 'Karels', 'Kas', 'van Kasteelen', 'Kathagen', 'Keijser', 'de Keijser', 'Keijzer', 'de Keijzer', 'Keltenie', 'van Kempen', 'Kerkhof', 'Ketel', 'Ketting', 'der Kijnder', 'van der Kint', 'Kirpenstein', 'Kisman', 'van Klaarwater', 'van de Klashorst', 'Kleibrink', @@ -135,7 +151,7 @@ class Person extends \Faker\Provider\Person 'van de Plas', 'van der Plas', 'van der Ploeg', 'van der Pluijm', 'Poncelet', 'Ponci', 'Pons', 'van Poppel', 'Post', 'Potters', 'van der Pouw', 'van Praagh', 'Pratt', 'Prinsen', 'Puig', 'Rackham', 'Rademaker', 'Ramaker', 'Recer', 'Recers', 'de Reede', 'Rehorst', 'Reijers', 'Reimes', 'Rek', 'Remmers', 'van Rheineck', 'Ridder', - 'Riem', 'van Riet', 'van \'t Riet', 'Rietveld', 'Rijcken', 'Rijks', 'Rijn', 'van Rijnsbergen', 'Rijntjes', + 'Riem', 'van Riet', "van 't Riet", 'Rietveld', 'Rijcken', 'Rijks', 'Rijn', 'van Rijnsbergen', 'Rijntjes', 'van Rijthoven', 'Rippey', 'Risma', 'Robbrechts Bruijne', 'Roessink', 'van Roijen', 'Romijn', 'de Roo', 'Roodesteijn', 'van Rooij', 'Room', 'de Roos', 'Roose', 'Roosenboom', 'van Rossum', 'Rotteveel', 'Roukes', 'Rousselet', 'Rouwenhorst', 'Rouwhorst', 'Rubben', 'Ruijs', 'Rutten', 'van Saksen', 'Salet', 'van Salm', @@ -152,20 +168,20 @@ class Person extends \Faker\Provider\Person 'van Stralen', 'van der Strigt', 'de Strigter', 'Strijker', 'Strik', 'Stuivenberg', 'Suijker', 'van Suinvorde', 'van Susa', 'de Swart', 'Symons', 'Takkelenburg', 'Tammerijn', 'Tamsma', 'Terry', 'den Teuling', 'Teunissen', 'Texier', 'Thatcher', 'The Elder', 'Thomas', 'Thout', 'Tielemans', 'Tillmanno', 'Timmerman', 'Timmermans', - 'Tins', 'Tirie', 'Totwiller', 'van Tours', 'van Tuijl', 'Tuithof', 'Uit de Willigen', 'Uittenbosch', 'Ulrich', - 'Unruoch Hunerik', 'Uphaus', 'Uphuis', 'Uphus', 'VI', 'Vaessen', 'Vallenduuk', 'Van Bragt', 'Vandenbergh', + 'Tins', 'Tirie', 'Totwiller', 'van Tours', 'van Tuijl', 'Tuithof', 'Uittenbosch', 'Ulrich', + 'Uphaus', 'Uphuis', 'Uphus', 'VI', 'Vaessen', 'Vallenduuk', 'Van Bragt', 'Vandenbergh', 'Vastenhouw', 'Veenendaal', 'Vegt', 'van der Veiver', 'Velderman', 'van Velthoven', 'Veltman', 'van Velzen', 'van de Ven', 'van Venrooy', 'Verbeeck', 'Verbeek', 'Verboom', 'Verbruggen', 'Verda', 'van Verdun', 'Vergeer', 'Verhaar', 'Verhagen', 'Verharen', 'Verheij', 'Verheuvel', 'Verhoeven', 'Verkade', 'van Vermandois', 'Vermeulen', 'Verschuere', 'Verschut', 'Versluijs', 'Vertoor', 'Vertooren', 'Vervoort', 'Verwoert', 'Vial', 'Vierdag', 'Vignon', 'van Vlaanderen', 'Volcke', 'van Voorhout', 'van Voorst', 'Voortman', 'Vos', 'Vrancken', 'de Vries', 'de Vroege', 'de Vrome', 'ter Waarbeek', 'Waardeloo', 'van Waas', 'Wagenvoort', 'van Wallaert', - 'Walsteijn', 'Walter', 'Waltrade Walderade', 'van Wassenaar', 'van de Water', 'Weeldenburg', 'Weerdenburg', - 'Weijland', 'Weijters', 'van Wel', 'van \'t Wel', 'Welf', 'Wendt', 'Wensen', 'de Werd', 'Werdes', - 'Werl-Arnsberg, van', 'van Wessex', 'West-Francië, van', 'Westerbeek', 'Westerburg', 'Westermann', + 'Walsteijn', 'Walter', 'van Wassenaar', 'van de Water', 'Weeldenburg', 'Weerdenburg', + 'Weijland', 'Weijters', 'van Wel', "van 't Wel", 'Welf', 'Wendt', 'Wensen', 'de Werd', 'Werdes', + 'van Wessex', 'Westerbeek', 'Westerburg', 'Westermann', 'van Westfalen', 'van de Weterink', 'Wever', 'Weyland', 'Weylant', 'van Wickerode', 'van de Wiel', 'Wigman', 'Wijland', 'van Wijland', 'Wilcken', 'Wildschut', 'Willems', 'Willems van Lier', 'Willemsen', 'Wilmont', - 'Wilson', 'Winnrich', 'Winters', 'Wipstrik', 'de Wit', 'van den Wittenboer', 'Wolffel', 'Wolfsdr', + 'Wilson', 'Winnrich', 'Winters', 'Wipstrik', 'de Wit', 'van den Wittenboer', 'Wolffel', 'Wolfswinkel', 'Wolters', 'Wolzak', 'Wooning', 'Woudenberg', 'Wouters', 'Wouters van Eijndhoven', 'Woutersz', 'Wright', 'Wunderink', 'Wutke', 'Zaal', 'Zeemans', 'Zeldenrust', 'Zevenboom', 'van der Zijl', 'Zijlemans', 'Zijlmans', 'Zuidweg', 'Zuijdveld', 'van Zwaben', 'Zwart', 'Zwijsen' @@ -248,14 +264,14 @@ class Person extends \Faker\Provider\Person */ public function lastName() { - $determinator = static::numberBetween(0, 3); + $determinator = static::numberBetween(0, 25); if ($determinator === 0) { $lastName = static::randomElement(static::$longLastNames); - } elseif ($determinator === 1) { + } elseif ($determinator <= 10) { $lastName = static::randomElement(static::$commonDutchLastNames); - } elseif ($determinator === 2) { + } elseif ($determinator <= 15) { $lastName = static::randomElement(static::$commonForeignLastNames); - } elseif ($determinator === 3) { + } else { $lastName = static::randomElement(static::$dutchLastNames); } @@ -272,7 +288,7 @@ class Person extends \Faker\Provider\Person */ public static function titleMale() { - return static::title(); + return static::randomElement(static::$title); } /** @@ -280,7 +296,7 @@ class Person extends \Faker\Provider\Person */ public static function titleFemale() { - return static::title(); + return static::randomElement(static::$title); } /** @@ -290,4 +306,44 @@ class Person extends \Faker\Provider\Person { return static::randomElement(static::$suffix); } + + /* + * @example 'van der' + */ + public static function prefix() + { + return static::randomElement(static::$prefix); + } + + /** + * @link https://nl.wikipedia.org/wiki/Burgerservicenummer#11-proef + * + * @return string + */ + public function idNumber() + { + $return = ''; + $nr = array(); + $nr[] = 0; + while (count($nr) < 8) { + $nr[] = static::randomDigit(); + } + $nr[] = mt_rand(0, 6); + if ($nr[7] == 0 && $nr[8] == 0) { + $nr[7] = 0; + } + + $bsn = (9 * $nr[8]) + (8 * $nr[7]) + (7 * $nr[6]) + (6 * $nr[5]) + (5 * $nr[4]) + (4 * $nr[3]) + (3 * $nr[2]) + (2 * $nr[1]); + $nr[0] = floor($bsn - floor($bsn / 11) * 11); + if ($nr[0] > 9) { + if ($nr[1] > 0) { + $nr[0] = 8; + $nr[1]--; + } else { + $nr[0] = 1; + $nr[1]++; + } + } + return implode('', array_reverse($nr)); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Address.php index 6e96213..8a2dd03 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Address.php @@ -17,84 +17,180 @@ class Address extends \Faker\Provider\Address * @var array full list of Polish voivodeship */ protected static $state = array( - 'dolnośląskie','kujawsko-pomorskie','lubelskie','lubuskie','łódzkie','małopolskie','mazowieckie','opolskie','podkarpackie', - 'podlaskie','pomorskie','śląskie','świętokrzyskie','warmińsko-mazurskie','wielkopolskie','zachodniopomorskie' - ); - // TODO list all country names in the world - protected static $country = array( - 'Polska', + 'dolnośląskie','kujawsko-pomorskie','lubelskie','lubuskie','łódzkie','małopolskie','mazowieckie', + 'opolskie','podkarpackie','podlaskie','pomorskie','śląskie','świętokrzyskie','warmińsko-mazurskie', + 'wielkopolskie','zachodniopomorskie' ); /** - * @var array 250 Polish cities with biggest number of streets. Extracted from data issued by the official public postal service of Poland. @link http://www.poczta-polska.pl/ + * @var array Countries in Polish + * @link http://ksng.gugik.gov.pl/english/files/dictionary.pdf + */ + protected static $country = array( + 'Afganistan', 'Albania', 'Algieria', 'Andora', 'Angola', 'Antigua i Barbuda', 'Arabia Saudyjska', 'Argentyna', + 'Armenia', 'Australia', 'Austria', 'Azerbejdżan', 'Bahamy', 'Bahrajn', 'Bangladesz', 'Barbados', 'Belgia', + 'Belize', 'Benin', 'Bhutan', 'Białoruś', 'Birma', 'Boliwia', 'Bośnia i Hercegowina', 'Botswana', 'Brazylia', + 'Brunei', 'Bułgaria', 'Burkina Faso', 'Burundi', 'Chile', 'Chiny', 'Chorwacja', 'Cypr', 'Czad', 'Czarnogóra', + 'Czechy', 'Dania', 'Demokratyczna Republika Konga', 'Dominika', 'Dominikana', 'Dżibuti', 'Egipt', 'Ekwador', + 'Erytrea', 'Estonia', 'Etiopia', 'Fidżi', 'Filipiny', 'Finlandia', 'Francja', 'Gabon', 'Gambia', 'Ghana', + 'Grecja', 'Grenada', 'Gruzja', 'Gujana', 'Gwatemala', 'Gwinea', 'Gwinea Bissau', 'Gwinea Równikowa', 'Haiti', + 'Hiszpania', 'Holandia', 'Honduras', 'Indie', 'Indonezja', 'Irak', 'Iran', 'Irlandia', 'Islandia', 'Izrael', + 'Jamajka', 'Japonia', 'Jemen', 'Jordania', 'Kambodża', 'Kamerun', 'Kanada', 'Katar', 'Kazachstan', 'Kenia', + 'Kirgistan', 'Kiribati', 'Kolumbia', 'Komory', 'Kongo', 'Korea Południowa', 'Korea Północna', 'Kostaryka', + 'Kuba', 'Kuwejt', 'Laos', 'Lesotho', 'Liban', 'Liberia', 'Libia', 'Liechtenstein', 'Litwa', 'Luksemburg', + 'Łotwa', 'Macedonia', 'Madagaskar', 'Malawi', 'Malediwy', 'Malezja', 'Mali', 'Malta', 'Maroko', 'Mauretania', + 'Mauritius', 'Meksyk', 'Mikronezja', 'Mołdawia', 'Monako', 'Mongolia', 'Mozambik', 'Namibia', 'Nauru', 'Nepal', + 'Niemcy', 'Niger', 'Nigeria', 'Nikaragua', 'Norwegia', 'Nowa Zelandia', 'Oman', 'Pakistan', 'Palau', 'Panama', + 'Papua-Nowa Gwinea', 'Paragwaj', 'Peru', 'Polska', 'Portugalia', 'Republika Południowej Afryki', + 'Republika Środkowoafrykańska', 'Republika Zielonego Przylądka', 'Rosja', 'Rumunia', 'Rwanda', + 'Saint Kitts i Nevis', 'Saint Lucia', 'Saint Vincent i Grenadyny', 'Salwador', 'Samoa', 'San Marino', 'Senegal', + 'Serbia', 'Seszele', 'Sierra Leone', 'Singapur', 'Słowacja', 'Słowenia', 'Somalia', 'Sri Lanka', + 'Stany Zjednoczone', 'Suazi', 'Sudan', 'Surinam', 'Syria', 'Szwajcaria', 'Szwecja', 'Tadżykistan', 'Tajlandia', + 'Tanzania', 'Timor Wschodni', 'Togo', 'Tonga', 'Trynidad i Tobago', 'Tunezja', 'Turcja', 'Turkmenistan', + 'Tuvalu', 'Uganda', 'Ukraina', 'Urugwaj', 'Uzbekistan', 'Vanuatu', 'Watykan', 'Wenezuela', 'Węgry', + 'Wielka Brytania', 'Wietnam', 'Włochy', 'Wybrzeże Kości Słoniowej', 'Wyspy Marshalla', 'Wyspy Salomona', + 'Wyspy Świętego Tomasza i Książęca', 'Zambia', 'Zimbabwe', 'Zjednoczone Emiraty Arabskie' + ); + /** + * @var array 250 Polish cities with biggest number of streets. Extracted from data issued by the official + * public postal service of Poland. + * @link http://www.poczta-polska.pl/ */ protected static $city = array( - 'Warszawa','Kraków','Łódź','Poznań','Wrocław','Gdańsk','Szczecin','Bydgoszcz','Lublin','Bielsko-Biała','Częstochowa','Katowice','Białystok','Gdynia','Radom', - 'Rzeszów','Gliwice','Kielce','Opole','Rybnik','Sosnowiec','Zabrze','Ruda Śląska','Jaworzno','Olsztyn','Zielona Góra','Bytom','Koszalin','Dąbrowa Górnicza', - 'Płock','Zawiercie','Wałbrzych','Tarnowskie Góry','Konin','Jelenia Góra','Tychy','Ostrołęka','Pruszków','Kędzierzyn-Koźle','Siedlce','Chorzów','Otwock','Piekary Śląskie', - 'Sochaczew','Piaseczno','Ciechanów','Grodzisk Mazowiecki','Jastrzębie-Zdrój','Świdnica','Władysławowo','Mysłowice','Ostrów Mazowiecka','Żory','Nysa','Mikołów','Chojnice', - 'Stargard Szczeciński','Będzin','Orzesze','Głogów','Siemianowice Śląskie','Sulejówek','Tarnobrzeg','Józefów','Konstancin-Jeziorna','Wodzisław Śląski','Legionowo','Świnoujście', - 'Brzeg','Kraśnik','Wyszków','Czeladź','Darłowo','Bieruń','Świętochłowice','Pułtusk','Kłobuck','Olkusz','Iława','Sopot','Czerwionka-Leszczyny','Łaziska Górne','Nowy Dwór Mazowiecki', - 'Police','Knurów','Lędziny','Nowa Ruda','Bogatynia','Krapkowice','Kluczbork','Boguszów-Gorce','Trzebiatów','Czaplinek','Pieszyce','Jastarnia','Bezrzecze','Kamieniec Ząbkowicki', - 'Jemielnica','Magdalenka','Czarna Woda','Kolonowskie','Wilkowice','Pawłowice','Dębogórze','Gołubie','Mokrzyska','Toruń','Łoś','Jadowniki','Szówsko','Krępiec','Gorzów Wielkopolski', - 'Kamień','Słupsk','Rynarzewo','Włocławek','Franciszków','Kalisz','Legnica','Pilchowo','Tarnów','Elbląg','Skalbmierz','Bogaczów','Jeziorna','Osówiec','Przemyśl', - 'Ostrowiec Świętokrzyski','Nowe Kramsko','Ostrów Wielkopolski','Zborowskie','Zamość','Grudziądz','Piła','Leszno','Koszwały','Kamienica Królewska','Jastrzębie','Inowrocław', - 'Lubin','Nowy Sącz','Ławy','Chełm','Tomaszów Mazowiecki','Stalowa Wola','Starachowice','Skarżysko-Kamienna','Biała Podlaska','Racibórz','Babienica','Puławy','Piotrków Trybunalski', - 'Suwałki','Szczawin','Bolesławiec','Jaroszowa Wola','Skierniewice','Gniezno','Łomża','Bełchatów','Przędzel','Postęp','Płazów','Szczecinek','Krosno','Zakopane','Ilkowice','Kutno','Ełk', - 'Dębica','Mielec','Szwecja','Lębork','Szteklin','Kołobrzeg','Kłodzko','Starogard Gdański','Jarosław','Sieradz','Zduńska Wola','Nowa Sól','Malbork','Tczew','Zgierz','Ustka','Śrem', - 'Kuźnica Masłońska','Kwidzyn','Krotoszyn','Żyrardów','Kościan','Swarzędz','Pęcice','Pabianice','Zgorzelec','Żary','Oświęcim','Jawor','Jasło','Wola Kiedrzyńska','Gorlice','Wejherowo', - 'Rumia','Bartoszyce','Sandomierz','Łęczna','Cieszyn','Chrzanów','Radomsko','Sanok','Pszczyna','Wągrowiec','Turek','Busko-Zdrój','Pruszcz Gdański','Luboń','Żywiec','Studzienice','Ostrzeszów', - 'Kętrzyn','Ostróda','Bochnia','Jelcz-Laskowice','Ząbki','Września','Bielawa','Nowy Targ','Giżycko','Dzierżoniów','Myszków','Marylka','Czechowice-Dziedzice','Łowicz','Łomianki','Świebodzice', - 'Świebodzin','Lubojenka','Lubliniec','Świecie','Lubartów','Lidzbark Warmiński','Świdnik','Pisz','Szczytno','Świdwin','Kozienice','Brodnica','Kościerzyna','Braniewo','Koło' + 'Babienica','Bartoszyce','Bełchatów','Bezrzecze','Będzin','Biała Podlaska','Białystok', + 'Bielawa','Bielsko-Biała','Bieruń','Bochnia','Bogaczów','Bogatynia','Boguszów-Gorce','Bolesławiec', + 'Braniewo','Brodnica','Brzeg','Busko-Zdrój','Bydgoszcz','Bytom','Chełm','Chojnice','Chorzów', + 'Chrzanów','Ciechanów','Cieszyn','Czaplinek','Czarna Woda','Czechowice-Dziedzice','Czeladź', + 'Czerwionka-Leszczyny','Częstochowa','Darłowo','Dąbrowa Górnicza','Dębica','Dębogórze', + 'Dzierżoniów','Elbląg','Ełk','Franciszków','Gdańsk','Gdynia','Giżycko','Gliwice','Głogów', + 'Gniezno','Gołubie','Gorlice','Gorzów Wielkopolski','Grodzisk Mazowiecki','Grudziądz','Ilkowice', + 'Iława','Inowrocław','Jadowniki','Jarosław','Jaroszowa Wola','Jasło','Jastarnia','Jastrzębie', + 'Jastrzębie-Zdrój','Jawor','Jaworzno','Jelcz-Laskowice','Jelenia Góra','Jemielnica','Jeziorna', + 'Józefów','Kalisz','Kamienica Królewska','Kamieniec Ząbkowicki','Kamień','Katowice','Kędzierzyn-Koźle', + 'Kętrzyn','Kielce','Kluczbork','Kłobuck','Kłodzko','Knurów','Kolonowskie','Koło','Kołobrzeg', + 'Konin','Konstancin-Jeziorna','Koszalin','Koszwały','Kościan','Kościerzyna','Kozienice', + 'Kraków','Krapkowice','Kraśnik','Krępiec','Krosno','Krotoszyn','Kutno','Kuźnica Masłońska', + 'Kwidzyn','Legionowo','Legnica','Leszno','Lębork','Lędziny','Lidzbark Warmiński','Lubartów', + 'Lubin','Lublin','Lubliniec','Lubojenka','Luboń','Ławy','Łaziska Górne','Łęczna','Łomianki', + 'Łomża','Łoś','Łowicz','Łódź','Magdalenka','Malbork','Marylka','Mielec','Mikołów', + 'Mokrzyska','Mysłowice','Myszków','Nowa Ruda','Nowa Sól','Nowe Kramsko','Nowy Dwór Mazowiecki', + 'Nowy Sącz','Nowy Targ','Nysa','Olkusz','Olsztyn','Opole','Orzesze','Osówiec','Ostrołęka', + 'Ostrowiec Świętokrzyski','Ostróda','Ostrów Mazowiecka','Ostrów Wielkopolski','Ostrzeszów', + 'Oświęcim','Otwock','Pabianice','Pawłowice','Pęcice','Piaseczno','Piekary Śląskie','Pieszyce', + 'Pilchowo','Piła','Piotrków Trybunalski','Pisz','Płazów','Płock','Police','Postęp','Poznań', + 'Pruszcz Gdański','Pruszków','Przemyśl','Przędzel','Pszczyna','Puławy','Pułtusk','Racibórz', + 'Radom','Radomsko','Ruda Śląska','Rumia','Rybnik','Rynarzewo','Rzeszów','Sandomierz','Sanok', + 'Siedlce','Siemianowice Śląskie','Sieradz','Skalbmierz','Skarżysko-Kamienna','Skierniewice', + 'Słupsk','Sochaczew','Sopot','Sosnowiec','Stalowa Wola','Starachowice','Stargard Szczeciński', + 'Starogard Gdański','Studzienice','Sulejówek','Suwałki','Swarzędz','Szczawin','Szczecin', + 'Szczecinek','Szczytno','Szówsko','Szteklin','Szwecja','Śrem','Świdnica','Świdnik','Świdwin', + 'Świebodzice','Świebodzin','Świecie','Świętochłowice','Świnoujście','Tarnobrzeg','Tarnowskie Góry', + 'Tarnów','Tczew','Tomaszów Mazowiecki','Toruń','Trzebiatów','Turek','Tychy','Ustka','Wałbrzych', + 'Warszawa','Wągrowiec','Wejherowo','Wilkowice','Władysławowo','Włocławek','Wodzisław Śląski', + 'Wola Kiedrzyńska','Wrocław','Września','Wyszków','Zabrze','Zakopane','Zamość','Zawiercie', + 'Ząbki','Zborowskie','Zduńska Wola','Zgierz','Zgorzelec','Zielona Góra','Żary','Żory', + 'Żyrardów','Żywiec', ); /** - * @var array 549 most common Polish street names. Extracted from data issued by the official public postal service of Poland. @link http://www.poczta-polska.pl/ + * @var array 549 most common Polish street names. Extracted from data issued by the official public + * postal service of Poland. + * @link http://www.poczta-polska.pl/ */ protected static $street = array( - 'Kościuszki Tadeusza','Mickiewicza Adama','Szkolna','Dworcowa','Kolejowa','Sienkiewicza Henryka','Rynek','Warszawska','Wojska Polskiego','Żeromskiego Stefana', - 'Polna','1 Maja','Ogrodowa','Pocztowa','Grunwaldzka','Kopernika Mikołaja','Leśna','Lipowa','Słowackiego Juliusza','Parkowa','Kościelna','Jagiellońska','Słoneczna', - 'Długa','Główna','Kilińskiego Jana','3 Maja','Krótka','Zielona','Konopnickiej Marii','Chopina Fryderyka','Armii Krajowej','Moniuszki Stanisława','Wiejska','Kwiatowa', - 'Dębowa','11 Listopada','Piaskowa','Cicha','Spokojna','Graniczna','Krakowska','Broniewskiego Władysława','Kasztanowa','Piłsudskiego Józefa','Poznańska','Reja Mikołaja', - 'Prusa Bolesława','Partyzantów','Wyspiańskiego Stanisława','Pomorska','Brzozowa','Kochanowskiego Jana','Zwycięstwa','Sportowa','Staszica Stanisława','Tuwima Juliana', - 'Matejki Jana','Akacjowa','Wiśniowa','Sosnowa','Piastowska','Łąkowa','Klonowa','Wesoła','Orzeszkowej Elizy','Świerkowa','Traugutta Romualda','Przemysłowa','Gdańska', - 'Nowa','Wolności','Wierzbowa','Fabryczna','Różana','Jasna','Sikorskiego Władysława','Spacerowa','Topolowa','Mieszka I','Pogodna','Wyzwolenia','Wrzosowa','Jana Pawła II Al.', - 'Wspólna','Młyńska','Paderewskiego Ignacego','Wąska','Okrzei Stefana','Targowa','Wrocławska','Królowej Jadwigi','Jana Pawła II','Jodłowa','Górna','Miła','Wojska Polskiego Al.', - 'Niepodległości Al.','Asnyka Adama','Boczna','Poprzeczna','Skłodowskiej-Curie Marii','Szpitalna','Prosta','Zamkowa','Kasprowicza Jana','Wiosenna','Batorego Stefana','Krucza', - 'Jesionowa','Sadowa','Reymonta Władysława','Modrzewiowa','Plater Emilii','Norwida Cypriana Kamila','Mazowiecka','Bukowa','Spółdzielcza','Malinowa','Jaśminowa','Śląska', - 'Szymanowskiego Karola','Wolności Pl.','Witosa Wincentego','Korczaka Janusza','Krasińskiego Zygmunta','Opolska','Towarowa','Powstańców Śląskich','Batalionów Chłopskich','Krzywa', - 'Bema Józefa','Miodowa','Piotrkowska','Mała','Lubelska','Żytnia','Chełmońskiego Józefa','Stawowa','Nałkowskiej Zofii','Narutowicza Gabriela','Harcerska','Wodna','Waryńskiego Ludwika', - 'Grzybowa','Jaworowa','Cmentarna','Strażacka','Kręta','Dolna','Złota','Kamienna','Górnicza','Robotnicza','Głowackiego Bartosza','Pułaskiego Kazimierza','Gałczyńskiego Konstantego Ildefonsa', - 'Limanowskiego Bolesława','Podgórna','Piękna','Chrobrego Bolesława','Wschodnia','Mazurska','Gajowa','Żelazna','Okrężna','Piłsudskiego Józefa Al.','Głogowska','Jagodowa','Zachodnia','Słowiańska', - 'Wieniawskiego Henryka','Grabowa','Bałtycka','Żwirki i Wigury','Jagiełły Władysława','Mostowa','Fredry Aleksandra','Katowicka','Długosza Jana','Żurawia','Morska','Grottgera Artura','Tęczowa', - 'Morcinka Gustawa','Letnia','Wilcza','Lelewela Joachima','Dobra','Orzechowa','Legionów','Kosynierów','Kaszubska','Południowa','Szarych Szeregów','Jarzębinowa','Łużycka','Racławicka','Andersa Władysława', - 'Północna','Strzelecka','Czarnieckiego Stefana','Zacisze','Poziomkowa','Staffa Leopolda','Źródlana','Wyszyńskiego Stefana','Rycerska','Czereśniowa','Toruńska','Zapolskiej Gabrieli','Ludowa','Sobieskiego Jana III', - 'Struga Andrzeja','Częstochowska','Rolna','Łokietka Władysława','Świętojańska','Kraszewskiego Józefa Ignacego','Baczyńskiego Krzysztofa Kamila','Szczecińska','Orkana Władysława','Franciszkańska','Bursztynowa', - 'Kołłątaja Hugona','Działkowa','Brzechwy Jana','Dworska','Składowa','Daszyńskiego Ignacego','Zamenhofa Ludwika','Bydgoska','Niemcewicza Juliana Ursyna','Chmielna','Radosna', - 'Piłsudskiego Józefa','Kalinowa','Owocowa','Gliwicka','Kujawska','Orla','Płocka','Gołębia','Łączna','Powstańców Wielkopolskich','Leszczynowa','Miarki Karola','Lwowska','Tatrzańska', - 'Solskiego Ludwika','Hutnicza','Stwosza Wita','Ptasia','Rzemieślnicza','Ściegiennego Piotra','Rumiankowa','Starowiejska','Jaracza Stefana','Grochowska','Morelowa','Myśliwska', - 'Krasickiego Ignacego','Podleśna','Turystyczna','Jałowcowa','Fałata Juliana','Zbożowa','Beskidzka','Bolesława Krzywoustego','Malczewskiego Jacka','Świętokrzyska','Grodzka', - 'Makowa','Stalowa','Chabrowa','Pawia','Osiedlowa','Jaskółcza','Kruczkowskiego Leona','Wileńska','Cisowa','Widok','Rzeczna','Zdrojowa','Jesienna','Błękitna','Wróblewskiego Walerego', - 'Rejtana Tadeusza','Marszałkowska','Krańcowa','Puławska','Bolesława Chrobrego','Daleka','Legnicka','Niepodległości','Kusocińskiego Janusza','Hetmańska','Dąbrowskiego Jarosława', - 'Skrajna','Srebrna','Żwirowa','Rolnicza','Astrów','Karłowicza Mieczysława','Sobieskiego Jana','Korfantego Wojciecha','Popiełuszki Jerzego','Kossaka Juliusza','Olsztyńska','Wysoka', - 'Podmiejska','Makuszyńskiego Kornela','Królewska','Słowicza','Sucharskiego Henryka','Kielecka','Kaliska','Nowowiejska','Władysława IV','Kołobrzeska','Środkowa','Jastrzębia', - 'Hallera Józefa','Szeroka','Kasprzaka Marcina','Pola Wincentego','Zakopiańska','Nowy Świat','Radomska','Mokra','Borowa','Średnia','Reymonta Władysława Stanisława','Ciasna','Niecała', - 'Diamentowa','Szewska','Modrzejewskiej Heleny','Stroma','Żeglarska','Lompy Józefa','Łanowa','Bogusławskiego Wojciecha','Rynek Rynek','Jagiellońskie Os.','Torowa','Drzymały Michała', - 'Francuska','Zielna','Sandomierska','Rataja Macieja','Przechodnia','Wybickiego Józefa','Konwaliowa','Wronia','Ułańska','Rybnicka','Nadrzeczna','Cieszyńska','Wczasowa', - 'Obrońców Westerplatte','Dąbrowskiego Jana Henryka','Willowa','Łukasiewicza Ignacego','Powstańców','Sienna','Podchorążych','Sokola','Nadbrzeżna','Przybyszewskiego Stanisława', - 'Wałowa','Poniatowskiego Józefa','Białostocka','Piwna','Żniwna','Tysiąclecia','Miedziana','Agrestowa','Okulickiego Leopolda','Chłodna','Żwirki Franciszka i Wigury Stanisława', - 'Urocza','Bytomska','Hoża','Bracka','Leśmiana Bolesława','Lazurowa','Pułaskiego Kazimierza','Kowalska','Liliowa','Stolarska','Młynarska','Poniatowskiego Józefa','Dąbrowszczaków', - 'Żabia','Rybacka','Turkusowa','Sowia','Bielska','Studzienna','Łagiewnicka','Koszalińska','Łowicka','Małopolska','Siewna','Zwierzyniecka','Okopowa','Bema Józefa','Kopalniana', - 'Węglowa','Konarskiego Stanisława','Plebiscytowa','Łabędzia','Wańkowicza Melchiora','Oświęcimska','Przyjaźni','Kazimierza Wielkiego','Solidarności Al.','Rybna','Dąbrówki','Karpacka', - 'Dąbrowskiej Marii','Zgierska','Handlowa','Czwartaków','Wapienna','Podwale','Litewska','Księżycowa','Żołnierska','Jerozolimskie Al.','Fiołkowa','Konstytucji 3 Maja', - 'Curie-Skłodowskiej Marii','Bohaterów Westerplatte','Wielkopolska','Porzeczkowa','Dożynkowa','Jeżynowa','Szmaragdowa','Modlińska','Koralowa','Skośna','Puszkina Aleksandra', - 'Grota-Roweckiego Stefana','Kartuska','Pszenna','Głogowa','Szafirowa','Modra','Górnośląska','Skargi Piotra','Wyzwolenia Al.','Brzoskwiniowa','Energetyków','Szczęśliwa','Gościnna', - 'Niska','Świdnicka','Patriotów','Okólna','Chłopska','Botaniczna','Gagarina Jurija','Sawickiej Hanki','Bieszczadzka','Małachowskiego Stanisława','Rubinowa','Olchowa','Cedrowa', - 'Ceglana','Lawendowa','Gdyńska','Lechicka','Warmińska','Koszykowa','Portowa','Kosmonautów','Lotnicza','Cegielniana','Majowa','Kłosowa','Równa','Kolberga Oskara','Sąsiedzka', - 'Podhalańska','Lotników','Budowlanych','Dubois Stanisława','Azaliowa','Kwiatkowskiego Eugeniusza','Senatorska','Sucha','Tylna','Chorzowska','Kościuszki Tadeusza Pl.', - 'Piekarska','Magazynowa','Wołodyjowskiego Michała','Dmowskiego Romana','Zajęcza','Wolska','Nowowiejskiego Feliksa','Promienna','Niedziałkowskiego Mieczysława','Piastowskie Os.', - 'Iwaszkiewicza Jarosława','Skargi Piotra','Żółkiewskiego Stanisława','Kleeberga Franciszka','Kolorowa','Sowińskiego Józefa','Zakątek','Olimpijska','Dąbrowskiego Jarosława', - 'Truskawkowa','Odrodzenia','Maczka Stanisława','Rodzinna','Bratków','Pokoju','Perłowa','Staromiejska','Solna','Grójecka','Łomżyńska','Folwarczna','Sądowa','Gminna','Sikorskiego Władysława', - 'Słonecznikowa','Barlickiego Norberta','Wandy','Łódzka','Kresowa','Strumykowa','Odrzańska','Kołłątaja Hugo','Ligonia Juliusza','Siemiradzkiego Henryka','Tulipanowa','Saperów','Inżynierska', - 'Gojawiczyńskiej Poli','Gnieźnieńska','Lisia','Husarska','Granitowa','Tulipanów' + '1 Maja','3 Maja','11 Listopada','Agrestowa','Akacjowa','Andersa Władysława','Armii Krajowej', + 'Asnyka Adama','Astrów','Azaliowa','Baczyńskiego Krzysztofa Kamila','Bałtycka', + 'Barlickiego Norberta','Batalionów Chłopskich','Batorego Stefana','Bema Józefa', + 'Bema Józefa','Beskidzka','Białostocka','Bielska','Bieszczadzka','Błękitna', + 'Boczna','Bogusławskiego Wojciecha','Bohaterów Westerplatte','Bolesława Chrobrego', + 'Bolesława Krzywoustego','Borowa','Botaniczna','Bracka','Bratków','Broniewskiego Władysława', + 'Brzechwy Jana','Brzoskwiniowa','Brzozowa','Budowlanych','Bukowa','Bursztynowa', + 'Bydgoska','Bytomska','Cedrowa','Cegielniana','Ceglana','Chabrowa','Chełmońskiego Józefa', + 'Chłodna','Chłopska','Chmielna','Chopina Fryderyka','Chorzowska','Chrobrego Bolesława', + 'Ciasna','Cicha','Cieszyńska','Cisowa','Cmentarna','Curie-Skłodowskiej Marii', + 'Czarnieckiego Stefana','Czereśniowa','Częstochowska','Czwartaków','Daleka','Daszyńskiego Ignacego', + 'Dąbrowskiego Jana Henryka','Dąbrowskiego Jarosława','Dąbrowskiego Jarosława', + 'Dąbrowskiej Marii','Dąbrowszczaków','Dąbrówki','Dębowa','Diamentowa','Długa', + 'Długosza Jana','Dmowskiego Romana','Dobra','Dolna','Dożynkowa','Drzymały Michała', + 'Dubois Stanisława','Dworcowa','Dworska','Działkowa','Energetyków','Fabryczna', + 'Fałata Juliana','Fiołkowa','Folwarczna','Franciszkańska','Francuska','Fredry Aleksandra', + 'Gagarina Jurija','Gajowa','Gałczyńskiego Konstantego Ildefonsa','Gdańska','Gdyńska', + 'Gliwicka','Głogowa','Głogowska','Głowackiego Bartosza','Główna','Gminna','Gnieźnieńska', + 'Gojawiczyńskiej Poli','Gołębia','Gościnna','Górna','Górnicza','Górnośląska', + 'Grabowa','Graniczna','Granitowa','Grochowska','Grodzka','Grota-Roweckiego Stefana', + 'Grottgera Artura','Grójecka','Grunwaldzka','Grzybowa','Hallera Józefa','Handlowa', + 'Harcerska','Hetmańska','Hoża','Husarska','Hutnicza','Inżynierska','Iwaszkiewicza Jarosława', + 'Jagiellońska','Jagiellońskie Os.','Jagiełły Władysława','Jagodowa','Jałowcowa', + 'Jana Pawła II','Jana Pawła II Al.','Jaracza Stefana','Jarzębinowa','Jaskółcza', + 'Jasna','Jastrzębia','Jaśminowa','Jaworowa','Jerozolimskie Al.','Jesienna','Jesionowa', + 'Jeżynowa','Jodłowa','Kalinowa','Kaliska','Kamienna','Karłowicza Mieczysława', + 'Karpacka','Kartuska','Kasprowicza Jana','Kasprzaka Marcina','Kasztanowa','Kaszubska', + 'Katowicka','Kazimierza Wielkiego','Kielecka','Kilińskiego Jana','Kleeberga Franciszka', + 'Klonowa','Kłosowa','Kochanowskiego Jana','Kolberga Oskara','Kolejowa','Kolorowa', + 'Kołłątaja Hugo','Kołłątaja Hugona','Kołobrzeska','Konarskiego Stanisława', + 'Konopnickiej Marii','Konstytucji 3 Maja','Konwaliowa','Kopalniana','Kopernika Mikołaja', + 'Koralowa','Korczaka Janusza','Korfantego Wojciecha','Kosmonautów','Kossaka Juliusza', + 'Kosynierów','Koszalińska','Koszykowa','Kościelna','Kościuszki Tadeusza','Kościuszki Tadeusza Pl.', + 'Kowalska','Krakowska','Krańcowa','Krasickiego Ignacego','Krasińskiego Zygmunta', + 'Kraszewskiego Józefa Ignacego','Kresowa','Kręta','Królewska','Królowej Jadwigi', + 'Krótka','Krucza','Kruczkowskiego Leona','Krzywa','Księżycowa','Kujawska','Kusocińskiego Janusza', + 'Kwiatkowskiego Eugeniusza','Kwiatowa','Lawendowa','Lazurowa','Lechicka','Legionów', + 'Legnicka','Lelewela Joachima','Leszczynowa','Leśmiana Bolesława','Leśna','Letnia', + 'Ligonia Juliusza','Liliowa','Limanowskiego Bolesława','Lipowa','Lisia','Litewska', + 'Lompy Józefa','Lotnicza','Lotników','Lubelska','Ludowa','Lwowska','Łabędzia', + 'Łagiewnicka','Łanowa','Łączna','Łąkowa','Łokietka Władysława','Łomżyńska', + 'Łowicka','Łódzka','Łukasiewicza Ignacego','Łużycka','Maczka Stanisława', + 'Magazynowa','Majowa','Makowa','Makuszyńskiego Kornela','Malczewskiego Jacka','Malinowa', + 'Mała','Małachowskiego Stanisława','Małopolska','Marszałkowska','Matejki Jana', + 'Mazowiecka','Mazurska','Miarki Karola','Mickiewicza Adama','Miedziana','Mieszka I', + 'Miła','Miodowa','Młynarska','Młyńska','Modlińska','Modra','Modrzejewskiej Heleny', + 'Modrzewiowa','Mokra','Moniuszki Stanisława','Morcinka Gustawa','Morelowa','Morska', + 'Mostowa','Myśliwska','Nadbrzeżna','Nadrzeczna','Nałkowskiej Zofii','Narutowicza Gabriela', + 'Niecała','Niedziałkowskiego Mieczysława','Niemcewicza Juliana Ursyna','Niepodległości', + 'Niepodległości Al.','Niska','Norwida Cypriana Kamila','Nowa','Nowowiejska','Nowowiejskiego Feliksa', + 'Nowy Świat','Obrońców Westerplatte','Odrodzenia','Odrzańska','Ogrodowa','Okopowa', + 'Okólna','Okrężna','Okrzei Stefana','Okulickiego Leopolda','Olchowa','Olimpijska', + 'Olsztyńska','Opolska','Orkana Władysława','Orla','Orzechowa','Orzeszkowej Elizy', + 'Osiedlowa','Oświęcimska','Owocowa','Paderewskiego Ignacego','Parkowa','Partyzantów', + 'Patriotów','Pawia','Perłowa','Piaskowa','Piastowska','Piastowskie Os.','Piekarska', + 'Piękna','Piłsudskiego Józefa','Piłsudskiego Józefa','Piłsudskiego Józefa Al.', + 'Piotrkowska','Piwna','Plater Emilii','Plebiscytowa','Płocka','Pocztowa','Podchorążych', + 'Podgórna','Podhalańska','Podleśna','Podmiejska','Podwale','Pogodna','Pokoju', + 'Pola Wincentego','Polna','Południowa','Pomorska','Poniatowskiego Józefa','Poniatowskiego Józefa', + 'Popiełuszki Jerzego','Poprzeczna','Portowa','Porzeczkowa','Powstańców','Powstańców Śląskich', + 'Powstańców Wielkopolskich','Poziomkowa','Poznańska','Północna','Promienna', + 'Prosta','Prusa Bolesława','Przechodnia','Przemysłowa','Przybyszewskiego Stanisława', + 'Przyjaźni','Pszenna','Ptasia','Pułaskiego Kazimierza','Pułaskiego Kazimierza', + 'Puławska','Puszkina Aleksandra','Racławicka','Radomska','Radosna','Rataja Macieja', + 'Reja Mikołaja','Rejtana Tadeusza','Reymonta Władysława','Reymonta Władysława Stanisława', + 'Robotnicza','Rodzinna','Rolna','Rolnicza','Równa','Różana','Rubinowa','Rumiankowa', + 'Rybacka','Rybna','Rybnicka','Rycerska','Rynek','Rynek Rynek','Rzeczna','Rzemieślnicza', + 'Sadowa','Sandomierska','Saperów','Sawickiej Hanki','Sądowa','Sąsiedzka','Senatorska', + 'Siemiradzkiego Henryka','Sienkiewicza Henryka','Sienna','Siewna','Sikorskiego Władysława', + 'Sikorskiego Władysława','Skargi Piotra','Skargi Piotra','Składowa','Skłodowskiej-Curie Marii', + 'Skośna','Skrajna','Słoneczna','Słonecznikowa','Słowackiego Juliusza','Słowiańska', + 'Słowicza','Sobieskiego Jana','Sobieskiego Jana III','Sokola','Solidarności Al.', + 'Solna','Solskiego Ludwika','Sosnowa','Sowia','Sowińskiego Józefa','Spacerowa', + 'Spokojna','Sportowa','Spółdzielcza','Srebrna','Staffa Leopolda','Stalowa','Staromiejska', + 'Starowiejska','Staszica Stanisława','Stawowa','Stolarska','Strażacka','Stroma', + 'Struga Andrzeja','Strumykowa','Strzelecka','Studzienna','Stwosza Wita','Sucha', + 'Sucharskiego Henryka','Szafirowa','Szarych Szeregów','Szczecińska','Szczęśliwa', + 'Szeroka','Szewska','Szkolna','Szmaragdowa','Szpitalna','Szymanowskiego Karola', + 'Ściegiennego Piotra','Śląska','Średnia','Środkowa','Świdnicka','Świerkowa', + 'Świętojańska','Świętokrzyska','Targowa','Tatrzańska','Tęczowa','Topolowa', + 'Torowa','Toruńska','Towarowa','Traugutta Romualda','Truskawkowa','Tulipanowa', + 'Tulipanów','Turkusowa','Turystyczna','Tuwima Juliana','Tylna','Tysiąclecia','Ułańska', + 'Urocza','Wałowa','Wandy','Wańkowicza Melchiora','Wapienna','Warmińska','Warszawska', + 'Waryńskiego Ludwika','Wąska','Wczasowa','Wesoła','Węglowa','Widok','Wiejska', + 'Wielkopolska','Wieniawskiego Henryka','Wierzbowa','Wilcza','Wileńska','Willowa', + 'Wiosenna','Wiśniowa','Witosa Wincentego','Władysława IV','Wodna','Wojska Polskiego', + 'Wojska Polskiego Al.','Wolności','Wolności Pl.','Wolska','Wołodyjowskiego Michała', + 'Wrocławska','Wronia','Wróblewskiego Walerego','Wrzosowa','Wschodnia','Wspólna', + 'Wybickiego Józefa','Wysoka','Wyspiańskiego Stanisława','Wyszyńskiego Stefana', + 'Wyzwolenia','Wyzwolenia Al.','Zachodnia','Zacisze','Zajęcza','Zakątek','Zakopiańska', + 'Zamenhofa Ludwika','Zamkowa','Zapolskiej Gabrieli','Zbożowa','Zdrojowa','Zgierska', + 'Zielna','Zielona','Złota','Zwierzyniecka','Zwycięstwa','Źródlana','Żabia', + 'Żeglarska','Żelazna','Żeromskiego Stefana','Żniwna','Żołnierska','Żółkiewskiego Stanisława', + 'Żurawia','Żwirki Franciszka i Wigury Stanisława','Żwirki i Wigury','Żwirowa', + 'Żytnia', ); public function city() @@ -106,4 +202,9 @@ class Address extends \Faker\Provider\Address { return static::randomElement(static::$street); } + + public function state() + { + return static::randomElement(static::$state); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php index cc5f958..ffd0cb6 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php @@ -5,81 +5,76 @@ namespace Faker\Provider\pl_PL; class Payment extends \Faker\Provider\Payment { /** - * @var array list of Polish banks, source: http://www.nbp.pl/banki_w_polsce/ewidencja/ewidencja.html + * @var array list of Polish banks, source: https://ewib.nbp.pl/ */ protected static $banks = array( - '251' => 'Aareal Bank Aktiengesellschaft (Spółka Akcyjna) - Oddział w Polsce', - '249' => 'Alior Bank SA', - '247' => 'Banco Espirito Santo de Investimento, S.A. Spółka Akcyjna Oddział w Polsce', - '238' => 'Banco Mais S.A. (SA) Oddział w Polsce', - '106' => 'Bank BPH SA', - '219' => 'Bank DnB NORD Polska SA', - '203' => 'Bank Gospodarki Żywnościowej SA', - '113' => 'Bank Gospodarstwa Krajowego', - '122' => 'Bank Handlowo - Kredytowy SA (w likwidacji 31.03.92)', - '103' => 'Bank Handlowy w Warszawie SA', - '116' => 'Bank Millennium SA', - '154' => 'Bank Ochrony Środowiska SA', - '260' => 'Bank of China (Luxembourg)S.A. Spółka Akcyjna Oddział w Polsce', - '221' => 'Bank of Tokyo-Mitsubishi UFJ (Polska) SA', - '132' => 'Bank Pocztowy SA', - '124' => 'Bank Polska Kasa Opieki SA', - '193' => 'BANK POLSKIEJ SPÓŁDZIELCZOŚCI SA', - '109' => 'Bank Zachodni WBK SA', - '224' => 'Banque PSA Finance SA Oddział w Polsce', - '160' => 'BNP PARIBAS BANK POLSKA SA', - '235' => 'BNP PARIBAS SA Oddział w Polsce', - '243' => 'BNP Paribas Securities Services SKAOddział w Polsce', - '229' => 'BPI Bank Polskich Inwestycji SA', - '215' => 'BRE Bank Hipoteczny SA', - '114' => 'BRE Bank SA', - '239' => 'CAIXABANK, S.A. (SPÓŁKA AKCYJNA)ODDZIAŁ W POLSCE', - '254' => 'Citibank Europe plc (Publiczna Spółka Akcyjna) Oddział w Polsce', - '194' => 'Credit Agricole Bank Polska SA', - '252' => 'CREDIT SUISSE (LUXEMBOURG) S.A. Spółka Akcyjna, Oddział w Polsce', - '236' => 'Danske Bank A/S SA Oddział w Polsce', - '191' => 'Deutsche Bank PBC SA', - '188' => 'Deutsche Bank Polska SA', - '174' => 'DZ BANK Polska SA', - '241' => 'Elavon Financial Services Limited (Spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', - '147' => 'Euro Bank SA', - '265' => 'EUROCLEAR Bank SA/NV (Spółka Akcyjna) - Oddział w Polsce', - '207' => 'FCE Bank Polska SA', - '214' => 'Fiat Bank Polska SA', - '253' => 'FM Bank SA', - '248' => 'Getin Noble Bank SA', - '128' => 'HSBC Bank Polska SA', - '195' => 'Idea Bank SA', - '255' => 'Ikano Bank GmbH (Sp. z o.o.) Oddział w Polsce', - '262' => 'Industrial and Commercial Bank of China (Europe) S.A. (Spółka Akcyjna) Oddział w Polsce', - '105' => 'ING Bank Śląski SA', - '266' => 'Intesa Sanpaolo S.p.A. Spółka Akcyjna Oddział w Polsce', - '168' => 'INVEST - BANK SA', - '258' => 'J.P. Morgan Europe Limited Sp. z o.o. Oddział w Polsce', - '158' => 'Mercedes-Benz Bank Polska SA', - '130' => 'Meritum Bank ICB SA', '101' => 'Narodowy Bank Polski', - '256' => 'Nordea Bank AB SA Oddział w Polsce', - '144' => 'NORDEA BANK POLSKA SA', - '232' => 'Nykredit Realkredit A/S SA - Oddział w Polsce', - '189' => 'Pekao Bank Hipoteczny SA', - '187' => 'Polski Bank Przedsiębiorczości SA', '102' => 'Powszechna Kasa Oszczędności Bank Polski SA', - '200' => 'Rabobank Polska SA', - '175' => 'Raiffeisen Bank Polska SA', - '167' => 'RBS Bank (Polska) SA', - '264' => 'RCI Banque Spółka Akcyjna Oddział w Polsce', - '212' => 'Santander Consumer Bank SA', - '263' => 'Saxo Bank A/S Spółka Akcyjna Oddział w Polsce', + '103' => 'Bank Handlowy w Warszawie SA', + '105' => 'ING Bank Śląski SA', + '106' => 'Bank BPH SA', + '109' => 'Bank Zachodni WBK SA', + '113' => 'Bank Gospodarstwa Krajowego', + '114' => 'mBank SA', + '116' => 'Bank Millennium SA', + '122' => 'Bank Handlowo-Kredytowy Spółka Akcyjna w Katowicach w likwidacji', + '124' => 'Bank Polska Kasa Opieki SA', + '128' => 'HSBC Bank Polska SA', + '132' => 'Bank Pocztowy SA', + '147' => 'Euro Bank SA', + '154' => 'Bank Ochrony Środowiska SA', + '158' => 'Mercedes-Benz Bank Polska SA', '161' => 'SGB-Bank SA', - '237' => 'Skandinaviska Enskilda Banken AB (SA) - Oddział w Polsce', + '167' => 'RBS Bank (Polska) SA', + '168' => 'PLUS BANK SA', + '175' => 'Raiffeisen Bank Polska SA', '184' => 'Societe Generale SA Oddział w Polsce', - '225' => 'Svenska Handelsbanken AB SA Oddział w Polsce', - '227' => 'Sygma Banque Societe Anonyme (SA) Oddział w Polsce', - '216' => 'Toyota Bank Polska SA', - '257' => 'UBS Limited (spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', - '261' => 'Vanquis Bank Limited (spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', + '187' => 'Nest Bank S.A.', + '189' => 'Pekao Bank Hipoteczny SA', + '191' => 'Deutsche Bank Polska SA', + '193' => 'BANK POLSKIEJ SPÓŁDZIELCZOŚCI SA', + '194' => 'Credit Agricole Bank Polska SA', + '195' => 'Idea Bank SA', + '203' => 'Bank BGŻ BNP Paribas SA', + '212' => 'Santander Consumer Bank SA', '213' => 'VOLKSWAGEN BANK POLSKA SA', + '214' => 'FCA-Group Bank Polska SA', + '215' => 'mBank Hipoteczny SA', + '216' => 'Toyota Bank Polska SA', + '219' => 'DNB Bank Polska SA', + '224' => 'Banque PSA Finance SA Oddział w Polsce', + '225' => 'Svenska Handelsbanken AB SA Oddział w Polsce', + '229' => 'BPI Bank Polskich Inwestycji SA', + '232' => 'Nykredit Realkredit A/S SA - Oddział w Polsce', + '235' => 'BNP PARIBAS SA Oddział w Polsce', + '236' => 'Danske Bank A/S SA Oddział w Polsce', + '237' => 'Skandinaviska Enskilda Banken AB (SA) - Oddział w Polsce', + '239' => 'CAIXABANK, S.A. (SPÓŁKA AKCYJNA)ODDZIAŁ W POLSCE', + '241' => 'Elavon Financial Services Designated Activity Company (spółka z o.o. o wyznaczonym przedmiocie działalności) Oddział w Polsce', + '243' => 'BNP Paribas Securities Services SKA Oddział w Polsce', + '247' => 'HAITONG BANK, S.A. Spółka Akcyjna Oddział w Polsce', + '248' => 'Getin Noble Bank SA', + '249' => 'Alior Bank SA', + '251' => 'Aareal Bank Aktiengesellschaft (Spółka Akcyjna) - Oddział w Polsce', + '254' => 'Citibank Europe plc (Publiczna Spółka Akcyjna) Oddział w Polsce', + '255' => 'Ikano Bank AB (publ) Spółka Akcyjna Oddział w Polsce', + '256' => 'Nordea Bank AB SA Oddział w Polsce', + '257' => 'UBS Limited (spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', + '258' => 'J.P. Morgan Europe Limited Sp. z o.o. Oddział w Polsce', + '260' => 'Bank of China (Luxembourg) S.A. Spółka Akcyjna Oddział w Polsce', + '262' => 'Industrial and Commercial Bank of China (Europe) S.A. (Spółka Akcyjna) Oddział w Polsce', + '263' => 'Saxo Bank A/S Spółka Akcyjna Oddział w Polsce w likwidacji', + '264' => 'RCI Banque Spółka Akcyjna Oddział w Polsce', + '265' => 'EUROCLEAR Bank SA/NV (Spółka Akcyjna) - Oddział w Polsce', + '266' => 'Intesa Sanpaolo S.p.A. Spółka Akcyjna Oddział w Polsce', + '267' => 'Western Union International Bank GmbH, Sp. z o.o. Oddział w Polsce', + '269' => 'PKO Bank Hipoteczny SA', + '270' => 'TF BANK AB (Spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', + '271' => 'FCE Bank Spółka Akcyjna Oddział w Polsce', + '272' => 'AS Inbank Spółka Akcyjna - Oddział w Polsce', + '273' => 'China Construction Bank (Europe) S.A. (Spółka Akcyjna) Oddział w Polsce', + '274' => 'MUFG Bank (Europe) N.V. S.A. Oddział w Polsce', + '275' => 'John Deere Bank S.A. Spółka Akcyjna Oddział w Polsce', ); /** @@ -105,7 +100,7 @@ class Payment extends \Faker\Provider\Payment protected static function addBankCodeChecksum($iban, $countryCode = 'PL') { - if ($countryCode != "PL" || strlen($iban) <= 8) { + if ($countryCode != 'PL' || strlen($iban) <= 8) { return $iban; } $checksum = 0; diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php index c6b2402..380f4d9 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php @@ -159,11 +159,12 @@ class Person extends \Faker\Provider\Person for ($i = 6; $i < $length; $i++) { $result[$i] = static::randomDigit(); } - if ($sex == "M") { - $result[$length - 1] |= 1; - } elseif ($sex == "F") { - $result[$length - 1] ^= 1; + + $result[$length - 1] |= 1; + if ($sex == "F") { + $result[$length - 1] -= 1; } + $checksum = 0; for ($i = 0; $i < $length; $i++) { $checksum += $weights[$i] * $result[$i]; diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Text.php index 0f24210..9739b83 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Text.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Text.php @@ -48,7 +48,7 @@ class Text extends \Faker\Provider\Text * * * - * Produced by Pawel Sobkowiak--Scanned and proofread by + * Produced by Pawel Sobkowiak - Scanned and proofread by * Polska Biblioteka Internetowa * * @@ -75,13 +75,13 @@ starszym bratem na pastwę białych od żaru i oszołamiających dni letnich. Wertowaliśmy, odurzeni światłem, w tej wielkiej księdze wakacji, której wszystkie karty pałały od blasku i miały na dnie słodki do omdlenia miąższ złotych gruszek. Adela wracała w świetliste poranki, jak Pomona z -ognia dnia rozżagwionego, wysypując z koszyka barwną urodę słońca-- +ognia dnia rozżagwionego, wysypując z koszyka barwną urodę słońca - lśniące, pełne wody pod przejrzystą skórką czereśnie, tajemnicze, czarne wiśnie, których woń przekraczała to, co ziszczało się w smaku; morele, w których miąższu złotym był rdzeń długich popołudni; a obok tej czystej poezji owoców wyładowywała nabrzmiałe siłą i pożywnością płaty mięsa z klawiaturą żeber cielęcych, wodorosty jarzyn, niby zabite głowonogi i -meduzy--surowy materiał obiadu o smaku jeszcze nie uformowanym i +meduzy - surowy materiał obiadu o smaku jeszcze nie uformowanym i jałowym, wegetatywne i telluryczne ingrediencje obiadu o zapachu dzikim i polnym. Przez ciemne mieszkanie na pierwszym piętrze kamienicy w rynku przechodziło co dzień na wskroś całe wielkie lato: cisza drgających @@ -99,10 +99,10 @@ słoneczną kąpiel dnia. Przechodnie, brodząc w złocie, mieli oczy zmrużone od żaru, jakby zalepione miodem, a podciągnięta górna warga odsłaniała im dziąsła i zęby. I wszyscy brodzący w tym dniu złocistym mieli ów grymas skwaru, jak gdyby słońce nałożyło swym wyznawcom jedną i -tę samą maskę--złotą maskę bractwa słonecznego; i wszyscy, którzy szli +tę samą maskę - złotą maskę bractwa słonecznego; i wszyscy, którzy szli dziś ulicami, spotykali się, mijali, starcy i młodzi, dzieci i kobiety, pozdrawiali się w przejściu tą maską, namalowaną grubą, złotą farbą na -twarzy, szczerzyli do siebie ten grymas bakchiczny--barbarzyńską maskę +twarzy, szczerzyli do siebie ten grymas bakchiczny - barbarzyńską maskę kultu pogańskiego. Rynek był pusty i żółty od żaru, wymieciony z kurzu gorącymi wiatrami, jak biblijna pustynia. Cierniste akacje, wyrosłe z pustki żółtego placu, kipiały nad nim jasnym listowiem, bukietami @@ -129,7 +129,7 @@ troskliwie chorego męża z rozpalonego siodła, ażeby go po chłodnych schodach wnieść ostrożnie na pachnące szabasem piętro. Tak wędrowaliśmy z matką przez dwie słoneczne strony rynku, wodząc nasze załamane cienie po wszystkich domach, jak po klawiszach. Kwadraty bruku mijały powoli -pod naszymi miękkimi i płaskimi krokami--jedne bladoróżowe jak skóra +pod naszymi miękkimi i płaskimi krokami - jedne bladoróżowe jak skóra ludzka, inne złote i sine, wszystkie płaskie, ciepłe, aksamitne na słońcu, jak jakieś twarze słoneczne, zadeptane stopami aż do niepoznaki, do błogiej nicości. Aż wreszcie na rogu ulicy Stryjskiej weszliśmy w @@ -227,9 +227,9 @@ w dziwnie prostej syntezie życie tych ludzi, alembik rasy, gatunek krwi i sekret ich losu, zawarty niedostrzegalnie w codziennym mijaniu ich własnego, odrębnego czasu. Stare, mądre drzwi, których ciemne westchnienia wpuszczały i wypuszczały tych ludzi, milczący świadkowie -wchodzenia i wychodzenia matki, córek i synów--otworzyły się bezgłośnie +wchodzenia i wychodzenia matki, córek i synów - otworzyły się bezgłośnie jak odrzwia szafy i weszliśmy w ich życie. Siedzieli jakby w cieniu -swego losu i nie bronili się--w pierwszych niezręcznych gestach +swego losu i nie bronili się - w pierwszych niezręcznych gestach wydalinam swoją tajemnicę. Czyż nie byliśmy krwią i losem spokrewnieni z nimi? Pokój był ciemny i aksamitny od granatowych obić ze złotym deseniem, lecz echo dnia płomiennego drgało i tutaj jeszcze mosiądzem na @@ -288,7 +288,7 @@ oczyma, wychodząc do drugiego pokoju. Podążyłem za nim. Siedział nisko na małej kozetce, z kolanami krzyżującymi się niemal na wysokości głowy, łysej jak kula bilardowa. Zdawało się, że to ubranie samo leży, fałdziste, zmięte, przerzucone przez fotel. Twarz jego była jak -tchnienie twarzy--smuga, którą nieznany przechodzień zostawił w +tchnienie twarzy - smuga, którą nieznany przechodzień zostawił w powietrzu. Trzymał w bladych, emaliowanych błękitnie dłoniach portfel, w którym coś oglądał. Z mgły twarzy wyłoniło się z trudem wypukłe bielmo bladego oka, wabiąc mnie figlarnym mruganiem. Czułem doń nieprzepartą @@ -301,13 +301,13 @@ i zbiegł mię dreszczem niepokoju, falą nagłego zrozumienia. Ale tymczasem ta mgiełka uśmiechu, która się zarysowała pod miękkim i pięknym jego wąsem, zawiązek pożądania, który napiął się na jego skroniach pulsującą żyłą, natężenie trzymające przez chwilę jego rysy w -skupieniu--upadły z powrotem w nicość i twarz odeszła w nieobecność, +skupieniu - upadły z powrotem w nicość i twarz odeszła w nieobecność, zapomniała o sobie, rozwiała się, NAWIEDZENIE 1 Już wówczas miasto nasze popadało coraz bardziej w chroniczną szarość zmierzchu, porastało na krawędziach liszajem cienia, puszystą pleśnią i mchem koloru żelaza. Ledwo rozpowity z brunatnych -dymów i mgieł poranka--przechylał się dzień od razu w niskie +dymów i mgieł poranka - przechylał się dzień od razu w niskie bursztynowe popołudnie, stawał się przez chwilę przezroczysty i złoty jak ciemne piwo, ażeby potem zejść pod wielokrotnie rozczłonkowane, fantastyczne sklepienia kolorowych i rozległych nocy. Mieszkaliśmy w @@ -337,7 +337,7 @@ bokami po podłodze i ścianach; szedł budzić ciężko chrapiących z twardego jak kamień snu. W świetle pozostawionej przezeń świecy wywijali się leniwie z brudnej pościeli, wystawiali, siadając na łóżkach, bose i brzydkie nogi i z skarpetką w ręce oddawali się jeszcze przez chwilę -rozkoszy ziewania--ziewania przeciągniętego aż do lubieżności, do +rozkoszy ziewania - ziewania przeciągniętego aż do lubieżności, do bolesnego skurczu podniebienia, jak przy tęgich wymiotach. W kątach siedziały nieruchomo wielkie karakony, wyogromnione własnym cieniem, którym obarczała każdego płonąca świeca i który nie odłączał się od nich @@ -365,7 +365,7 @@ bezradnie, jakby czegoś szukając. Wówczas bywało, że zbiegał po cichu z to rodzaj klepsydry wodnej albo wielkiej fioli szklanej, podzielonej na uncje i napełnionej ciemnym fluidem. Mój ojciec łączył się z tym instrumentem długą kiszką gumową, jakby krętą, bolesną pępowiną, i tak -połączony z żałosnym przyrządem--nieruchomiał w skupieniu, a oczy jego +połączony z żałosnym przyrządem - nieruchomiał w skupieniu, a oczy jego ciemniały, zaś na twarz przybladłą występował wyraz cierpienia czy jakiejś występnej rozkoszy. Potem znów przychodziły dni cichej skupionej pracy, przeplatanej samotnymi monologami. Gdy tak siedział w świetle @@ -386,7 +386,7 @@ nocy tapety więdły, zwijały się, gubiły liście i kwiaty i przerzedzały się jesiennie, przepuszczając dalekie świtanie. Wtedy wśród świergotu tapetowych ptaków, w żółtym zimowym świcie zasypiał na parę godzin gęstym, czarnym snem. Od dni, od tygodni, gdy zdawał się być pogrążonym -w zawiłych konto-korrentach--myśl jego zapuszczała się tajnie w +w zawiłych konto-korrentach - myśl jego zapuszczała się tajnie w labirynty własnych wnętrzności. Wstrzymywał oddech i nasłuchiwał. I gdy wzrok jego wracał zbielały i mętny z tamtych głębin, uspokajał go uśmiechem. Nie wierzył jeszcze i odrzucał jak absurd te uroszczenia, te @@ -405,7 +405,7 @@ który jeszcze urąga. Nie widziałem nigdy proroków Starego Testamentu, ale na widok tego męża, którego gniew boży obalił, rozkraczonego szeroko na ogromnym porcelanowym urynale, zakrytego wichrem ramion, chmurą rozpaczliwych łamańców, nad którymi wyżej jeszcze unosił się głos jego, -obcy i twardy--zrozumiałem gniew boży świętych mężów. Był to dialog +obcy i twardy - zrozumiałem gniew boży świętych mężów. Był to dialog groźny jak mowa piorunów. Łamańce rak jego rozrywały niebo na sztuki, a w szczelinach ukazywała się twarz Jehowy, wzdęta gniewem i plująca przekleństwa. Nie patrząc widziałem go, groźnego Demiurga, jak leżąc na @@ -491,14 +491,14 @@ pozostało, to trochę cielesnej powłoki i ta garść bezsensownych dziwactw PTAKI Nadeszły żółte, pełne nudy dni zimowe. Zrudziałą ziemię pokrywał dziurawy, przetarty, za krótki obrus śniegu. Na wiele dachów nie starczyło go i stały czarne lub rdzawe, gontowe strzechy i arki kryjące -w sobie zakopcone przestrzenie strychów--czarne, zwęglone katedry, -najeżone żebrami krokwi, płatwi i bantów--ciemne płuca wichrów +w sobie zakopcone przestrzenie strychów - czarne, zwęglone katedry, +najeżone żebrami krokwi, płatwi i bantów - ciemne płuca wichrów zimowych. Każdy świt odkrywał nowe kominy i dymniki, wyrosłe w nocy, wydęte przez wicher nocny, czarne piszczałki organów diabelskich. Kominiarze nie mogli opędzić się od wron, które na kształt żywych czarnych liści obsiadały wieczorem gałęzie drzew pod kościołem, odrywały się znów, trzepocąc, by wreszcie przylgnąć, każda do właściwego miejsca -na właściwej gałęzi, a o świcie ulatywały wielkimi stadami--tumany +na właściwej gałęzi, a o świcie ulatywały wielkimi stadami - tumany sadzy, płatki kopciu, falujące i fantastyczne, plamiąc migotliwym krakaniem mętnożółte smugi świtu. Dni stwardniały od zimna i nudy, jak zeszłoroczne bochenki chleba. Napoczynano je tępymi nożami, bez apetytu, @@ -507,8 +507,8 @@ studiował nigdy niezgłębioną istotę ognia, wyczuwał słony, metaliczny posmak i wędzony zapach zimowych płomieni, chłodną pieszczotę salamander, liżących błyszczącą sadzę w gardzieli komina. Z zamiłowaniem wykonywał w owych dniach wszystkie reparatury w górnych regionach -pokoju. O każdej porze dnia można go było widzieć, jak--przykucnięty na -szczycie drabiny--majstrował coś przy suficie, przy kamiszach wysokich +pokoju. O każdej porze dnia można go było widzieć, jak - przykucnięty na +szczycie drabiny - majstrował coś przy suficie, przy kamiszach wysokich okien, przy kulach i łańcuchach lamp wiszących. Zwyczajem malarzy posługiwał się drabiną jak ogromnymi szczudłami i czuł się dobrze w tej ptasiej perspektywie, w pobliżu malowanego nieba, arabesek i ptaków @@ -519,7 +519,7 @@ słuchał jej z roztargnieniem, pełen niepokoju, z drgawkami w nieobecnej twarzy. I bywało, że przerywał jej nagle zaklinającym gestem ręki, ażeby pobiec w kąt pokoju, przylgnąć uchem do szpary w podłodze i z podniesionymi palcami wskazującymi obu rąk, wyrażającymi najwyższą -ważność badania--nasłuchiwać. Nie rozumieliśmy wówczas jeszcze smutnego +ważność badania - nasłuchiwać. Nie rozumieliśmy wówczas jeszcze smutnego tła tych ekstrawagancji, opłakanego kompleksu, który dojrzewał w głębi. Matka nie miała nań żadnego wpływu, natomiast wielką czcią i uwagą darzył Adelę. Sprzątanie pokoju było dlań wielką i ważną ceremonią, @@ -546,11 +546,11 @@ na światło dzienne. Zaczęło się to od wylęgania jaj ptasich. Z wielkim nakładem trudu i pieniędzy sprowadzał ojciec z Hamburga, z Holandii, z afrykańskich stacji zoologicznych zapłodnione jaja ptasie, które dawał do wylęgania ogromnym kurom belgijskim. Był to proceder nader zajmujący -i dla mnie--to wykluwanie się piskląt, prawdziwych dziwotworów w +i dla mnie - to wykluwanie się piskląt, prawdziwych dziwotworów w kształcie i ubarwieniu. Nie podobna było dopatrzyć się w tych monstrach o ogromnych, fantastycznych dziobach, które natychmiast po urodzeniu rozdzierały się szeroko, sycząc żarłocznie czeluściami gardła, w tych -jaszczurach o wątłym, nagim ciele garbusów--przyszłych pawi, bażantów, +jaszczurach o wątłym, nagim ciele garbusów - przyszłych pawi, bażantów, głuszców i kondorów. Umieszczony w koszykach, w wacie, smoczy ten pomiot podnosił na cienkich szyjach ślepe, bielmem zarosle głowy, kwacząc bezgłośnie z niemych gardzieli. Mój ojciec chodził wzdłuż półek w @@ -575,13 +575,13 @@ godności w całym zachowaniu, kierujący się żelaznym ceremoniałem swego wielkiego rodu. Gdy siedział naprzeciw ojca, nieruchomy w swej monumentalnej pozycji odwiecznych bóstw egipskich, z okiem zawleczonym białawym bielmem, które zasuwał z boku na źrenice, ażeby zamknąć się -zupełnie w kontemplacji swej dostojnej samotności--wydawał się ze swym +zupełnie w kontemplacji swej dostojnej samotności - wydawał się ze swym kamiennym profilem starszym bratem mego ojca. Ta sama materia ciała, ścięgien i pomarszczonej twardej skóry, ta sama twarz wyschła i koścista, te same zrogowaciałe, głębokie oczodoły. Nawet ręce, silne w węzłach, długie, chude dłonie ojca, z wypukłymi paznokciami, miały swój analogon w szponach kondora. Nie mogłem się oprzeć wrażeniu, widząc go -tak uśpionego, że mam przed sobą mumię--wyschłą i dlatego pomniejszoną +tak uśpionego, że mam przed sobą mumię - wyschłą i dlatego pomniejszoną mumię mego ojca. Sądzę, że i uwagi matki nie uszło to przedziwne podobieństwo, chociaż nigdy nie poruszaliśmy tego tematu. Charakterystyczne jest, że kondor używał wspólnego z moim ojcem naczynia @@ -594,7 +594,7 @@ wszelkiego rodzaju skrzydlacze z dalekich stron. Nawet długo po zlikwidowaniu ptasiego gospodarstwa utrzymywała się w świecie ptasim ta tradycja naszego domu i w okresie wiosennych wędrówek spadały nieraz na nasz dach całe chmary żurawi, pelikanów, pawi i wszelkiego ptactwa. -Impreza ta wzięła jednak niebawem--po krótkiej świetności--smutny +Impreza ta wzięła jednak niebawem - po krótkiej świetności - smutny obrót. Wkrótce okazała się bowiem konieczna translokacja ojca do dwóch pokojów na poddaszu, które służyły za rupieciarnie. Stamtąd dochodził już o wczesnym świcie zmieszany klangor głosów ptasich. Drewniane pudła @@ -618,7 +618,7 @@ przerażeniu próbował wznieść się w powietrze. Zwolna przerzedzał się tuman skrzydlaty, aż w końcu na pobojowisku została sama Adela, wyczerpana, dysząca, oraz mój ojciec z miną zafrasowaną i zawstydzoną, gotów do przyjęcia każdej kapitulacji. W chwilę później schodził mój -ojciec ze schodów swojego dominium--człowiek złamany, król-banita, +ojciec ze schodów swojego dominium - człowiek złamany, król-banita, który stracił tron i królowanie. MANEKINY Ta ptasia impreza mego ojca była ostatnim wybuchem kolorowości, @@ -698,7 +698,7 @@ fizjonomię. Subiekci spożywali go z namaszczeniem, z powagą kalendarzowej ceremonii. Zapach pieprzu rozchodził się po pokoju. A gdy wytarli bułką ostatek galarety ze swych talerzy, rozważając w myśli heraldykę następnych dni tygodnia, i na półmisku zostawały tylko głowy z -wygotowanymi oczyma--czuliśmy wszyscy, że dzień został wspólnymi siłami +wygotowanymi oczyma - czuliśmy wszyscy, że dzień został wspólnymi siłami pokonany i że reszta nie wchodziła już w rachubę. W samej rzeczy z resztą tą, wydaną na jej łaskę, Adela nie robiła sobie długich ceregieli. Wśród brzęku garnków i chlustów zimnej wody likwidowała z @@ -732,7 +732,7 @@ lekkomyślnych i płochych, którymi zasypać mogły cale miasto, jak kolorową fantastyczną śnieżycą. Nagle było im gorąco i otwierały okno, ażeby w niecierpliwości swej samotni, w głodzie obcych twarzy, przynajmniej bezimienną twarz zobaczyć, do okna przyciśniętą. Wachlowały -rozpalone swe policzki przed wzbierającą firankami nocą zimową-- +rozpalone swe policzki przed wzbierającą firankami nocą zimową - odsłaniały płonące dekolty, pełne nienawiści do siebie i rywalizacji, gotowe stanąć do walki o tego pierrota, którego by ciemny powiew nocy przywiał na okno. Ach! jak mało wymagały one od rzeczywistości. Miały @@ -753,26 +753,26 @@ drzwi podniósł firanki u okna, panienki dawały się oglądać, kręcąc się biodrach, polśniewając emalią oczu, lakiem skrzypiących pantofelków, sprzączkami podwiązek pod wzdętą od wiatru sukienką; szmatki jęły umykać po podłodze, jak szczury, ku uchylonym drzwiom ciemnego pokoju, a ojciec -mój przyglądał się uważnie prychającym osóbkom, szepcąc półgłosem:-- +mój przyglądał się uważnie prychającym osóbkom, szepcąc półgłosem: - Genus avium... jeśli się nie mylę, scansores albo pistacci... w najwyższym stopniu godne uwagi. Przypadkowe to spotkanie stało się początkiem całej serii seansów, podczas których ojciec mój zdołał rychło oczarować obie panienki urokiem swej przedziwnej osobistości. Odpłacając się za pełną galanterii i dowcipu konwersację, którą zapełniał im pustkę -wieczorów--dziewczęta pozwalały zapalonemu badaczowi studiować +wieczorów - dziewczęta pozwalały zapalonemu badaczowi studiować strukturę swych szczupłych i tandetnych ciałek. Działo się to w toku konwersacji, z powagą i wytwornością, która najryzykowniejszym punktom tych badań odbierała dwuznaczny ich pozór. Odsuwając pończoszkę z kolana Pauliny i studiując rozmiłowanymi oczyma zwięzłą i szlachetną -konstrukcję przegubu, ojciec mój mówił:--Jakże pełna uroku i jak +konstrukcję przegubu, ojciec mój mówił: - Jakże pełna uroku i jak szczęśliwa jest forma bytu, którą panie obrały. Jakże piękna i prosta jest teza, którą dano wam swym życiem ujawnić. Lecz za to z jakim mistrzostwem, z jaką finezją wywiązują się panie z tego zadania. Gdybym odrzucając respekt przed Stwórcą, chciał się zabawić w krytykę -stworzenia, wołałbym:--mniej treści, więcej formy! Ach, jakby ulżył +stworzenia, wołałbym: - mniej treści, więcej formy! Ach, jakby ulżył światu ten ubytek treści. Więcej skromności w zamierzeniach, więcej -wstrzemięźliwości w pretensjach--panowie demiurdzy--a świat byłby -doskonalszy!--wołał mój ojciec akurat w momencie, gdy dłoń jego +wstrzemięźliwości w pretensjach - panowie demiurdzy - a świat byłby +doskonalszy! - wołał mój ojciec akurat w momencie, gdy dłoń jego wyłuskiwała białą łydkę Pauliny z uwięzi pończoszki. W tej chwili Adela stanęła w otwartych drzwiach jadalni, niosąc tacę z podwieczorkiem. Było to pierwsze spotkanie dwu tych wrogich potęg od czasu wielkiej rozprawy. @@ -802,8 +802,8 @@ należytą ostrożnością, i unikając zgorszenia, tę nader kacerską doktrynę, która opętała wówczas na długie miesiące mego ojca i opanowała wszystkie jego poczynania. -TRAKTAT O MANEKINACH ALBO WTÓRA KSIĘGA RODZAJU Demiurgos--mówił mój -ojciec--nie posiadł monopolu na tworzenie--tworzenie jest przywilejem +TRAKTAT O MANEKINACH ALBO WTÓRA KSIĘGA RODZAJU Demiurgos - mówił mój +ojciec - nie posiadł monopolu na tworzenie - tworzenie jest przywilejem wszystkich duchów. Materii dana jest nieskończona płodność, niewyczerpana moc życiowa i zarazem uwodna siła pokusy, która nas nęci do formowania. W głębi materii kształtują się niewyraźne uśmiechy, @@ -813,7 +813,7 @@ dreszczami. Czekając na ożywcze tchnienie ducha, przelewa się ona w sobie bez końca, kusi tysiącem słodkich okrąglizn i miękkości, które z siebie w ślepych rojeniach wymajacza. Pozbawiona własnej inicjatywy, lubieżnie podatna, po kobiecemu plastyczna, uległa wobec wszystkich -impulsów--stanowi ona teren wyjęty spod prawa, otwarty dla wszelkiego +impulsów - stanowi ona teren wyjęty spod prawa, otwarty dla wszelkiego rodzaju szarlatanerii i dyletantyzmów, domenę wszelkich nadużyć i wątpliwych manipulacji demiurgicznych. Materia jest najbierniejszą i najbezbronniejszą istotą w kosmosie. Każdy może ją ugniatać, formować, @@ -824,8 +824,8 @@ Jest ono nieraz koniecznym gwałtem wobec opornych i skostniałych form bytu, które przestały być zajmujące. W interesie ciekawego i ważnego eksperymentu może ono nawet stanowić zasługę. Tu jest punkt wyjścia dla nowej apologii sadyzmu. Mój ojciec był niewyczerpany w gloryfikacji tego -przedziwnego elementu, jakim była materia.--Nie ma materii martwej-- -nauczał--martwota jest jedynie pozorem, za którym ukrywają się nieznane +przedziwnego elementu, jakim była materia. - Nie ma materii martwej - +nauczał - martwota jest jedynie pozorem, za którym ukrywają się nieznane formy życia. Skala tych form jest nieskończona, a odcienie i niuanse niewyczerpane. Demiurgos był w posiadaniu ważnych i ciekawych recept twórczych. Dzięki nim stworzył on mnogość rodzajów, odnawiających się @@ -848,20 +848,20 @@ ironicznym palcem, póki nie dołaskotał się błysku zrozumienia i śmiechu, kapitulować. Dziewczęta siedziały nieruchomo, lampa kopciła, sukno pod igłą maszyny dawno się zsunęło, a maszyna stukotała pusto, stębnując czarne, bezgwiezdne sukno, odwijające się z postawu nocy zimowej za -oknem.--Zbyt długo żyliśmy pod terrorem niedościgłej doskonałości -Demiurga--mówił mój ojciec--zbyt długo doskonałość jego tworu +oknem. - Zbyt długo żyliśmy pod terrorem niedościgłej doskonałości +Demiurga - mówił mój ojciec - zbyt długo doskonałość jego tworu paraliżowała naszą własną twórczość. Nie chcemy z nim konkurować. Nie mamy ambicji mu dorównać. Chcemy być twórcami we własnej, niższej sferze, pragniemy dla siebie twórczości, pragniemy rozkoszy twórczej, -pragniemy--jednym słowem--demiurgii.--Nie wiem, w czyim imieniu +pragniemy - jednym słowem - demiurgii. - Nie wiem, w czyim imieniu proklamował mój ojciec te postulaty, jaka zbiorowość, jaka korporacja, sekta czy zakon, nadawała swą solidarnością patos jego słowom. Co do nas, to byliśmy dalecy od wszelkich zakusów demłurgicznych. Lecz ojciec mój rozwinął tymczasem program tej wtórej demiurgii, obraz tej drugiej generacji stworzeń, która stanąć miała w otwartej opozycji do panującej -epoki.--Nie zależy nam--mówił on--na tworach o długim oddechu, na +epoki. - Nie zależy nam - mówił on - na tworach o długim oddechu, na istotach na daleką metę. Nasze kreatury nie będą bohaterami romansów w -wielu tomach. Ich role będą krótkie, lapidarne, ich charaktery--bez +wielu tomach. Ich role będą krótkie, lapidarne, ich charaktery - bez dalszych planów. Często dla jednego gestu, dla jednego słowa podejmiemy się trudu powołania ich do życia na tę jedną chwilę. Przyznajemy otwarcie: nie będziemy kładli nacisku na trwałość ani solidność @@ -876,9 +876,9 @@ powołamy do życia innego człowieka. Taki jest nasz smak, to będzie świat według naszego gustu. Demiurgos kochał się w wytrawnych, doskonałych i skomplikowanych materiałach, my dajemy pierwszeństwo tandecie. Po prostu porywa nas, zachwyca taniość, lichota, tandetność materiału. Czy -rozumiecie--pytał mój ojciec--głęboki sens tej słabości, tej pasji do +rozumiecie - pytał mój ojciec - głęboki sens tej słabości, tej pasji do pstrej bibułki, do papier mâ ché , do lakowej farby, do kłaków i -trociny? To jest--mówił z bolesnym uśmiechem--nasza miłość do materii +trociny? To jest - mówił z bolesnym uśmiechem - nasza miłość do materii jako takiej, do jej puszystości i porowatości, do jej jedynej, mistycznej konsystencji. Demiurgos, ten wielki mistrz i artysta, czyni ją niewidzialną, każe jej zniknąć pod grą życia. My, przeciwnie, kochamy @@ -887,8 +887,8 @@ gestem, pod każdym ruchem widzieć jej ociężały wysiłek, jej bezwład, jej słodką niedźwiedziowatość. Dziewczęta siedziały nieruchomo z szklanymi oczyma. Twarze ich były wyciągnięte i zgłupiałe zasłuchaniem, policzki podmalowane wypiekami, trudno było w tej chwili ocenić, czy należą do -pierwszej, czy do drugiej generacji stworzenia.--Słowem--konkludował -mój ojciec--chcemy stworzyć po raz wtóry człowieka, na obraz i +pierwszej, czy do drugiej generacji stworzenia. - Słowem - konkludował +mój ojciec - chcemy stworzyć po raz wtóry człowieka, na obraz i podobieństwo manekinu. Tu musimy dla wierności sprawozdawczej opisać pewien drobny i błahy incydent, który zaszedł w tym punkcie prelekcji i do którego nie przywiązujemy żadnej wagi. Incydent ten, całkowicie @@ -907,11 +907,11 @@ po obu bokach. Wszystkie trzy patrzyły rozszerzonymi oczami na ojca. Mój ojciec chrząknął, zamilkł, pochylił się i stał się nagle bardzo czerwony. W jednej chwili lineatura jego twarzy, dopiero co tak rozwichrzona i pełna wibracji, zamknęła się na spokorniałych rysach. On -- herezjarcha natchniony, ledwo wypuszczony z wichru uniesienia--złożył +- herezjarcha natchniony, ledwo wypuszczony z wichru uniesienia - złożył się nagle w sobie, zapadł i zwinął. A może wymieniono go na innego. Ten inny siedział sztywny, bardzo czerwony, ze spuszczonymi oczyma. Panna Polda podeszła i pochyliła się nad nim. Klepiąc go lekko po plecach, -mówiła tonem łagodnej zachęty:--Jakub będzie rozsądny, Jakub posłucha, +mówiła tonem łagodnej zachęty: - Jakub będzie rozsądny, Jakub posłucha, Jakub nie będzie uparty. No, proszę... Jakub, Jakub... Wypięty pantofelek Adeli drżał lekko i błyszczał jak języczek węża. Mój ojciec podniósł się powoli ze spuszczonymi oczyma, postąpił krok naprzód, jak @@ -924,8 +924,8 @@ odnowioną swadą ciemny i zawiły swój temat. Lineatura jego zmarszczek rozwijała się i zawijała z wyrafinowaną chytrością. W każdej spirali ukryty był pocisk ironii. Ale czasami inspiracja rozszerzała kręgi jego zmarszczek, które rosły jakąś ogromną wirującą grozą, uchodząc w -milczących wolutach w głąb nocy zimowej.--Figury panopticum, moje panie -- zaczął on--kalwaryjskie parodie manekinów, ale nawet w tej postaci +milczących wolutach w głąb nocy zimowej. - Figury panopticum, moje panie +- zaczął on - kalwaryjskie parodie manekinów, ale nawet w tej postaci strzeżcie się lekko je traktować. Materia nie zna żartów. Jest ona zawsze pełna tragicznej powagi. Kto ośmiela się myśleć, że można igrać z materią, że kształtować ją można dla żartu, że żart nie wrasta w nią, @@ -971,9 +971,9 @@ zażądała bardzo dobitnie... Panienki siedziały sztywno, ze spuszczonymi oczyma, w dziwnej drętwości... TRAKTAT O MANEKINACH Dokończenie Któregoś z następnych wieczorów ojciec -mój w te słowa ciągnął dalej swą prelekcję:--Nie o tych +mój w te słowa ciągnął dalej swą prelekcję: - Nie o tych nieporozumieniach ucieleśnionych, nie o tych smutnych parodiach, moje -panie, owocach prostackiej i wulgarnej niepowściągliwości--chciałem +panie, owocach prostackiej i wulgarnej niepowściągliwości - chciałem mówić zapowiadając mą rzecz o manekinach. Miałem na myśli coś innego. Tu ojciec mój zaczął budować przed naszymi oczyma obraz tej wymarzonej przez niego „generaiio aequivoca”, jakiegoś pokolenia istot na wpół @@ -984,8 +984,8 @@ mylił. Były to w istocie istoty amorfne, bez wewnętrznej struktury, płody imitatywnej tendencji materii, która obdarzona pamięcią, powtarza z przyzwyczajenia raz przyjęte kształty. Skala morfologii, której podlega materia, jest w ogóle ograniczona i pewien zasób form powtarza -się wciąż na różnych kondygnacjach bytu. Istoty te--ruchliwe, wrażliwe -na bodźce, a jednak dalekie od prawdziwego życia--można było otrzymać +się wciąż na różnych kondygnacjach bytu. Istoty te - ruchliwe, wrażliwe +na bodźce, a jednak dalekie od prawdziwego życia - można było otrzymać zawieszając pewne skomplikowane koloidy w roztworach soli kuchennej. Koloidy te po kilku dniach formowały się, organizowały w pewne zagęszczenia substancji przypominającej niższe formy fauny. U istot tak @@ -995,8 +995,8 @@ białkowych ani w ogóle związków węgla. Wszelako prymitywne te formy były niczym w porównaniu z bogactwem kształtów i wspaniałości pseudofauny i flory, która pojawia się niekiedy w pewnych ściśle określonych środowiskach. Środowiskami tymi są stare mieszkania, przesycone -emanacjami wielu żywotów i zdarzeń--zużyte atmosfery, bogate w -specyficzne ingrediencje marzeń ludzkich--rumowiska, obfitujące w humus +emanacjami wielu żywotów i zdarzeń - zużyte atmosfery, bogate w +specyficzne ingrediencje marzeń ludzkich - rumowiska, obfitujące w humus wspomnień, tęsknot, jałowej nudy. Na takiej glebie owa pseudowegetacja kiełkowała szybko i powierzchownie, pasożytowała obficie i efemerycznie, pędziła krótkotrwałe generacje, które rozkwitały raptownie i świetnie, @@ -1006,15 +1006,15 @@ kadencjach rytmów; nic dziwnego, że schodzą na manowce dalekich, ryzykownych rojeń. Rdzeń mebli, ich substancja musi już być rozluźniona, zdegenerowana i podległa występnym pokusom: wtedy na tej chorej, zmęczonej i zdziczałej glebie wykwita, jak piękna wysypka, nalot -fantastyczny, kolorowa, bujająca pleśń.--Wiedzą panie--mówił ojciec -mój--że w starych mieszkaniach bywają pokoje, o których się zapomina. +fantastyczny, kolorowa, bujająca pleśń. - Wiedzą panie - mówił ojciec +mój - że w starych mieszkaniach bywają pokoje, o których się zapomina. Nie odwiedzane miesiącami, więdną w opuszczeniu między starymi murami i zdarza się, że zasklepiają się w sobie, zarastają cegłą i, raz na zawsze stracone dla naszej pamięci, powoli tracą też swą egzystencję. Drzwi, prowadzące do nich z jakiegoś podestu tylnych schodów, mogą być tak dhigo przeoczane przez domowników, aż wrastają, wchodzą w ścianę, która -zaciera ich ślad w fantastycznym rysunku pęknięć i rys.--Wszedłem raz-- -mówił ojciec mój--wczesnym rankiem na schyłku zimy, po wielu miesiącach +zaciera ich ślad w fantastycznym rysunku pęknięć i rys. - Wszedłem raz - +mówił ojciec mój - wczesnym rankiem na schyłku zimy, po wielu miesiącach nieobecności, do takiego na wpół zapomnianego traktu i zdumiony byłem wyglądem tych pokojów. Z wszystkich szpar w podłodze, z wszystkich gzymsów i framug wystrzelały cienkie pędy i napełniały szare powietrze @@ -1026,14 +1026,14 @@ fontanny koronkowego listowia, bijące aż pod malowane niebo sufitu rozpylonym chlorofilem. W przyspieszonym procesie kwitnienia kiełkowały w tym listowiu ogromne, białe i różowe kwiaty, pączkowały w oczach, bujały od środka różowym miąższem i przelewały się przez brzegi, gubiąc -płatki i rozpadając się w prędkim przekwitaniu.--Byłem szczęśliwy-- -mówił mój ojciec--z tego niespodzianego rozkwitu, który napełnił +płatki i rozpadając się w prędkim przekwitaniu. - Byłem szczęśliwy - +mówił mój ojciec - z tego niespodzianego rozkwitu, który napełnił powietrze migotliwym szelestem, łagodnym szumem, przesypującym się jak kolorowe confetti przez cienkie rózgi gałązek. Widziałem, jak z drgania powietrza, z fermentacji zbyt bogatej aury wydziela się i materializuje to pospieszne kwitnienie, przelewanie się i rozpadanie fantastycznych oleandrów, które napełniły pokój rzadką, leniwą śnieżycą wielkich, -różowych kiści kwietnych.--Nim zapadł wieczór--kończył ojciec--nie +różowych kiści kwietnych. - Nim zapadł wieczór - kończył ojciec - nie było już śladu tego świetnego rozkwitu. Cała złudna ta fatamorgana była tylko mistyfikacją, wypadkiem dziwnej symulacji materii, która podszywa się pod pozór życia. Ojciec mój był dnia tego dziwnie ożywiony, @@ -1043,8 +1043,8 @@ odcieni, jakie przybierała wielokształtna materia. Fascynowały go formy graniczne, wątpliwe i problematyczne, jak ektoplazma somnambulików, pseudomateria, emanacja kataleptyczna mózgu, która w pewnych wypadkach rozrastała się z ust uśpionego na cały stół, napełniała cały pokój, jako -bujająca, rzadka tkanka, astralne ciasto, na pograniczu ciała i ducha.-- -Kto wie--mówił--ile jest cierpiących, okaleczonych, fragmentarycznych +bujająca, rzadka tkanka, astralne ciasto, na pograniczu ciała i ducha. - +Kto wie - mówił - ile jest cierpiących, okaleczonych, fragmentarycznych postaci życia, jak sztucznie sklecone, gwoździami na gwałt zbite życie szaf i stołów, ukrzyżowanego drzewa, cichych męczenników okrutnej pomysłowości ludzkiej. Straszliwe transplantacje obcych i nienawidzących @@ -1056,9 +1056,9 @@ gdy to mówił, rozeszła się zamyśloną lineaturą zmarszczek, stała się podobna do sęków i słojów starej deski, z której zheblowano wszystkie wspomnienia. Przez chwilę myśleliśmy, że ojciec popadnie w stan drętwoty, który nawiedzał go czasem, ale ocknął się nagle, opamiętał i -tak ciągnął dalej:--Dawne, mistyczne plemiona balsamowały swych +tak ciągnął dalej: - Dawne, mistyczne plemiona balsamowały swych umarłych. W ściany ich mieszkań były wprawione, wmurowane ciała, twarze: -w salonie stał ojciec--wypchany, wygarbowana żona-nieboszczka była +w salonie stał ojciec - wypchany, wygarbowana żona-nieboszczka była dywanem pod stołem. Znałem pewnego kapitana, który miał w swej kajucie lampę-meluzynę, zrobioną przez malajskich balsamistów z jego zamordowanej kochanki. Na głowie miała ogromne rogi jelenie. W ciszy @@ -1068,8 +1068,8 @@ pękająca od cichego szeptu. Głowonogi, żółwie i ogromne kraby, zawieszone na belkach sufitu jako kandelabry i pająki, przebierały w tej ciszy bez końca nogami, szły i szły na miejscu... Twarz mojego ojca przybrała naraz wyraz troski i smutku, gdy myśli jego na drogach nie -wiedzieć jakich asocjacji przeszły do nowych przykładów:--Czy mam -przemilczeć--mówił przyciszonym głosem--że brat mój na skutek długiej +wiedzieć jakich asocjacji przeszły do nowych przykładów: - Czy mam +przemilczeć - mówił przyciszonym głosem - że brat mój na skutek długiej i nieuleczalnej choroby zamienił się stopniowo w zwój kiszek gumowych, że biedna moja kuzynka dniem i nocą nosiła go w poduszkach, nucąc nieszczęśliwemu stworzeniu nieskończone kołysanki nocy zimowych? Czy @@ -1077,8 +1077,8 @@ może być coś smutniejszego niż człowiek zamieniony w kiszkę hegarową? Co za rozczarowanie dla rodziców, co za dezorientacja dla ich uczuć, co za rozwianie wszystkich nadziei, wiązanych z obiecującym młodzieńcem! A jednak wierna miłość biednej kuzynki towarzyszyła mu i w tej przemianie. -- Ach! nie mogę już dłużej, nie mogę tego słuchać!--jęknęła Polda -przechylając się na krześle.--Ucisz go, Adelo... Dziewczęta wstały, +- Ach! nie mogę już dłużej, nie mogę tego słuchać! - jęknęła Polda +przechylając się na krześle. - Ucisz go, Adelo... Dziewczęta wstały, Adela podeszła do ojca i wyciągniętym palcem uczyniła ruch zaznaczający łaskotanie. Ojciec stropił się, zamilkł i zaczął, pełen przerażenia, cofać się tyłem przed kiwającym się palcem Adeli. Ta szła za nim ciągle, @@ -1095,9 +1095,9 @@ pierwszego wejrzenia zdobyła sobie ta kruszynka życia cały zachwyt, cały entuzjazm chłopięcej duszy. Z jakiego nieba spadł tak niespodzianie ten ulubieniec bogów, milszy sercu od najpiękniejszych zabawek? Że też stare, zgoła nieinteresujące pomywaczki wpadają niekiedy na tak świetne -pomysły i przynoszą z przedmieścia--o całkiem wczesnej, -transcendentalnej porannej godzinie--takiego oto pieska do naszej -kuchni! Ach! było się jeszcze--niestety--nieobecnym, nieurodzonym z +pomysły i przynoszą z przedmieścia - o całkiem wczesnej, +transcendentalnej porannej godzinie - takiego oto pieska do naszej +kuchni! Ach! było się jeszcze - niestety - nieobecnym, nieurodzonym z ciemnego łona snu, a już to szczęście ziściło się, już czekało na nas, niedołężnie leżące na chłodnej podłodze kuchni, nie docenione przez Adelę i domowników. Dlaczego nie obudzono mnie wcześniej! Talerzyk mleka @@ -1131,16 +1131,16 @@ mordkę z kroplą mleka na brodzie i wycofać się niedołężnie z kąpieli mlecznej. Chód jego był niezgrabnym toczeniem się, bokiem na ukos w niezdecydowanym kierunku, po linii trochę pijanej i chwiejnej. Dominantą jego nastroju była jakaś nieokreślona i zasadnicza żałość, sieroctwo i -bezradność--niezdolność do zapełnienia czymś pustki życia pomiędzy +bezradność - niezdolność do zapełnienia czymś pustki życia pomiędzy sensacjami posiłków. Objawiało się to bezplanowością i niekonsekwencją ruchów, irracjonalnymi napadami nostalgii z żałosnym skomleniem i niemożnością znalezienia sobie miejsca. Nawet jeszcze w głębi snu, w którym potrzebę oparcia się i przytulenia zaspokajać musiał używając do -tego własnej swej osoby, zwiniętej w kłębek drżący--towarzyszyło mu -poczucie osamotnienia i bezdomności. Ach, życie--młode i wątłe życie, +tego własnej swej osoby, zwiniętej w kłębek drżący - towarzyszyło mu +poczucie osamotnienia i bezdomności. Ach, życie - młode i wątłe życie, wypuszczone z zaufanej ciemności, z przytulnego ciepła łona macierzystego w wielki i obcy, świetlany świat, jakże kurczy się ono i -cofa, jak wzdraga się zaakceptować tę imprezę, którą mu proponują-- +cofa, jak wzdraga się zaakceptować tę imprezę, którą mu proponują - pełne awersji i zniechęcenia! Lecz zwolna mały Nemrod (otrzymał był to dumne i wojownicze imię) zaczyna smakować w życiu. Wyłączne opanowanie obrazem macierzystej prajedni ustępuje urokowi wielości. Świat zaczyna @@ -1149,23 +1149,23 @@ czworobok porannego słońca na podłodze, na którym tak dobrze jest położyć się, ruchy własnych członków, własne łapki, ogonek, figlarnie wyzywający do zabawy z samym sobą, pieszczoty ręki ludzkiej, pod którymi zwolna dojrzewa pewna swawolność, wesołość rozpierająca ciało i rodząca -potrzebę zgoła nowych, gwałtownych i ryzykownych ruchów--wszystko to +potrzebę zgoła nowych, gwałtownych i ryzykownych ruchów - wszystko to przekupuje, przekonywa i zachęca do przyjęcia, do pogodzenia się z eksperymentem życia. I jeszcze jedno. Nemrod zaczyna rozumieć, że to, co mu się tu podsuwa, mimo pozorów nowości jest w gruncie rzeczy czymś, co -już było--było wiele razy--nieskończenie wiele razy. Jego ciało +już było - było wiele razy - nieskończenie wiele razy. Jego ciało poznaje sytuacje, wrażenia i przedmioty. W gruncie rzeczy to wszystko nie dziwi go zbytnio. W obliczu każdej nowej sytuacji daje nura w swoją -pamięć, w głęboką pamięć ciała, i szuka omackiem, gorączkowo--i bywa, +pamięć, w głęboką pamięć ciała, i szuka omackiem, gorączkowo - i bywa, że znajduje w sobie odpowiednią reakcję już gotową: mądrość pokoleń, złożoną w jego plazmie, w jego nerwach. Znajduje jakieś czyny, decyzje, o których sam nie wiedział, że już w nim dojrzały, że czekały na to, by wyskoczyć. Sceneria jego młodego życia, kuchnia z wonnymi cebrami, ze ścierkami o skomplikowanej i intrygującej woni, z kłapaniem pantofli -Adeli, z jej hałaśliwym krzątaniem się--nie straszy go więcej. Przywykł +Adeli, z jej hałaśliwym krzątaniem się - nie straszy go więcej. Przywykł uważać ją za swoją domenę, zadomowił się w niej i począł rozwijać w stosunku do niej niejasne poczucie przynależności, ojczyzny. Chyba że -niespodzianie spadał nań kataklizm w postaci szorowania podłogi-- +niespodzianie spadał nań kataklizm w postaci szorowania podłogi - obalenie praw natury, chlusty ciepłego ługu, podmywające wszystkie meble, i groźny szurgot szczotek Adeli. Ale niebezpieczeństwo mija, szczotka uspokojona i nieruchoma leży cicho w kącie, schnąca podłoga @@ -1191,13 +1191,13 @@ odwiecznym karakonim rytuałem. Wszelako uczucia nienawiści nie mają jeszcze trwałości i mocy w duszy pieska. Nowoobudzona radość życia przeistacza każde uczucie w wesołość. Nemrod szczeka jeszcze, lecz sens tego szczekania zmienił się niepostrzeżenie, stało się ono swoją własną -parodią--pragnąc w gruncie rzeczy wysłowić niewymowną udatność tej +parodią - pragnąc w gruncie rzeczy wysłowić niewymowną udatność tej świetnej imprezy życia, pełnej pikanterii, niespodzianych dreszczyków i point. PAN W kącie między tylnymi ścianami szop i przybudówek był zaułek podwórza, najdalsza, ostatnia odnoga, zamknięta między komorę, wychodek -i tylną ścianę kurnika--głucha zatoka, poza którą nie było już wyjścia. +i tylną ścianę kurnika - głucha zatoka, poza którą nie było już wyjścia. Był to najdalszy przylądek, Gibraltar tego podwórza, bijący rozpaczliwie głową w ślepy parkan z poziomych desek, zamykającą i ostateczną ścianę tego świata. Spod jego omszonych dyli wyciekała strużka czarnej, @@ -1241,7 +1241,7 @@ chwastem wszelkim, aż w samym końcu między ścianami, w szerokiej prostokątnej zatoce tracił wszelką miarę i wpadał w szał. Tam to nie był już sad, tylko paroksyzm szaleństwa, wybuch wściekłości, cyniczny bezwstyd i rozpusta. Tam, rozbestwione, dając upust swej pasji, -panoszyły się puste, zdziczałe kapusty łopuchów--ogromne wiedźmy, +panoszyły się puste, zdziczałe kapusty łopuchów - ogromne wiedźmy, rozdziewające się w biały dzień ze swych szerokich spódnic, zrzucając je z siebie, spódnica za spódnicą, aż ich wzdęte, szelestne, dziurawe łachmany oszalałymi płatami grzebały pod sobą kłótliwe to plemię @@ -1258,13 +1258,13 @@ w obłęd. O tej godzinie opanowywał mnie szał łowienia motyli, pasja ścigania tych migocących plamek, tych błędnych, białych płatków, trzęsących się w rozognionym powietrzu niedołężnym gzygzakiem. I zdarzyło się wówczas, że któraś z tych jaskrawych plamek rozpadła się w -locie na dwie, potem na trzy--i ten drgający, oślepiająco biały +locie na dwie, potem na trzy - i ten drgający, oślepiająco biały trójpunkt wiódł mnie, jak błędny ognik, przez szał bodiaków, palących się w słońcu. Dopiero na granicy łopuchów zatrzymałem się, nie śmiejąc się pogrążyć w to głuche zapadlisko. Wtedy nagle ujrzałem go. Zanurzony po pachy w łopuchach, kucał przede mną. Widziałem jego grube bary w brudnej koszuli i niechlujny strzęp surduta. Przyczajony jak do skoku, -siedział tak--z barami jakby wielkim ciężarem zgarbionymi. Ciało jego +siedział tak - z barami jakby wielkim ciężarem zgarbionymi. Ciało jego dyszało z natężenia, a z miedzianej, błyszczącej w słońcu twarzy lał się pot. Nieruchomy, zdawał się ciężko pracować, mocować się bez ruchu z jakimś ogromnym brzemieniem. Stałem, przygwożdżony jego wzrokiem, który @@ -1283,7 +1283,7 @@ wybaczał się coraz bardziej, aż wyłamał się ryczącym, charczącym kaszlem śmiechu. Do głębi wstrząśnięty, widziałem, jak hucząc śmiechem z potężnych piersi, dźwignął się powoli z kucek i zgarbiony jak goryl, z rękoma w opadających łachmanach spodni, uciekał, człapiąc przez łopocące -blachy łopuchów, wielkimi skokami--Pan bez fletu, cofający się w +blachy łopuchów, wielkimi skokami - Pan bez fletu, cofający się w popłochu do swych ojczystych kniei. PAN KAROL Po południu w sobotę mój wuj, Karol, wdowiec słomiany, @@ -1305,17 +1305,17 @@ się o szarym świcie zdyszany, oblany potem, wyrzucony na brzeg tego stosu pościeli, którego zmóc nie mógł w ciężkich zapasach nocnych. Tak na wpół wyrzucony z toni snu, wisiał przez chwilę nieprzytomny na krawędzi nocy, chwytając piersiami powietrze, a pościel rosła dokoła -niego, puchła i nakisała--i zarastała go znowu zwałem ciężkiego, +niego, puchła i nakisała - i zarastała go znowu zwałem ciężkiego, białawego ciasta. Spał tak do późnego przedpołudnia, podczas gdy poduszki układały się w wielką, białą, płaską równinę, po której wędrował uspokojony sen jego. Tymi białymi gościńcami powracał powoli do -siebie, do dnia, do jawy--i wreszcie otwierał oczy, jak śpiący pasażer, +siebie, do dnia, do jawy - i wreszcie otwierał oczy, jak śpiący pasażer, gdy pociąg zatrzymuje się na stacji. W pokoju panował odstały półmrok z osadem wielu dni samotności i ciszy. Tylko okno kipiało od rannego rojowiska much i story płonęły jaskrawo. Pan Karol wyziewał ze swego ciała, z głębi jam cielesnych, resztki dnia wczorajszego. To ziewanie chwytało go tak konwulsyjnie, jak gdyby chciało go odwrócić na nice. Tak -wyrzucał z siebie ten piasek, te ciężary--nie strawione restancje dnia +wyrzucał z siebie ten piasek, te ciężary - nie strawione restancje dnia wczorajszego. Ulżywszy sobie w ten sposób, i swobodniejszy, wciągał do notesu wydatki, kalkulował, obliczał i marzył. Potem leżał długo nieruchomy, z szklanymi oczyma, które były koloru wody, wypukłe i @@ -1346,7 +1346,7 @@ otumanieni z tych zatraconych dali powracał znów do siebie i do chwili; widział swe stopy na dywanie, tłuste i delikatne jak u kobiety, i powoli wyjmował złote spinki z mankietów dziennej koszuli. Potem szedł do kuchni i znajdował tam w cienistym kącie wiaderko z wodą, krążek -cichego, czujnego zwierciadła, które nań tam czekało--jedyna żywa i +cichego, czujnego zwierciadła, które nań tam czekało - jedyna żywa i wiedząca istota w tym pustym mieszkaniu. Nalewał do miednicy wody i kosztował skórą jej młodej i odstałej, słodkawej mokrości. Długo i starannie robił toaletę, nie spiesząc się i włączając pauzy między @@ -1362,19 +1362,19 @@ toaletę wśród tych mebli, które tolerowały go w milczeniu, z nieobecną miną, i wreszcie był gotów, to stojąc na odejściu z kapeluszem w ręku, czuł się zażenowany, że i w ostatniej chwili nie mógł znaleźć słowa, które by rozwiązało to wrogie milczenie, i odchodził ku drzwiom -zrezygnowany, zwolna, ze spuszczoną głową--gdy w przeciwną stronę -oddalał się tymczasem bez pośpiechu--w głąb zwierciadła--ktoś -odwrócony na zawsze plecami--przez pustą amfiladę pokojów, które nie +zrezygnowany, zwolna, ze spuszczoną głową - gdy w przeciwną stronę +oddalał się tymczasem bez pośpiechu - w głąb zwierciadła - ktoś +odwrócony na zawsze plecami - przez pustą amfiladę pokojów, które nie istniały. SKLEPY CYNAMONOWE W okresie najkrótszych, sennych dni zimowych, ujętych z obu stron, od poranku i od wieczora, w futrzane krawędzie zmierzchów, gdy miasto rozgałęziało się coraz głębiej w labirynty zimowych nocy, z -trudem przywoływane przez krótki świt do opamiętania, do powrotu-- +trudem przywoływane przez krótki świt do opamiętania, do powrotu - ojciec mój był już zatracony, zaprzedany, zaprzysiężony tamtej sferze. Twarz jego i głowa zarastały wówczas bujnie i dziko siwym włosem, sterczącym nieregularnie wiechciami, szczecinami, długimi pędzlami, -strzelającymi z brodawek, z brwi, z dziurek od nosa--co nadawało jego +strzelającymi z brodawek, z brwi, z dziurek od nosa - co nadawało jego fizjonomii wygląd starego, nastroszonego lisa. Węch jego i słuch zaostrzał się niepomiernie i znać było po grze jego milczącej i napiętej twarzy, że za pośrednictwem tych zmysłów pozostaje on w ciągłym @@ -1470,7 +1470,7 @@ spuszczonymi oczyma, w dyskretnym milczeniu, i pełni byli mądrości i wyrozumienia dla ich najtajniejszych życzeń. Ale nade wszystko była tam jedna księgarnia, w której raz oglądałem rzadkie i zakazane druki, publikacje tajnych klubów, zdejmując zasłonę z tajemnic dręczących i -upojnych. Tak rzadko zdarzała się sposobność odwiedzania tych sklepów-- +upojnych. Tak rzadko zdarzała się sposobność odwiedzania tych sklepów - i w dodatku z małą, lecz wystarczającą sumą pieniędzy w kieszeni. Nie można było pominąć tej okazji mimo ważności misji powierzonej naszej gorliwości. Trzeba się było zapuścić według mego obliczenia w boczną @@ -1484,7 +1484,7 @@ konfiguracja ulic nie odpowiadała oczekiwanemu obrazowi. Sklepów ani śladu. Szedłem ulicą, której domy nie miały nigdzie bramy wchodowej, tylko okna szczelnie zamknięte, ślepe odblaskiem księżyca. Po drugiej stronie tych domów musi prowadzić właściwa ulica, od której te domy są -dostępne--myślałem sobie. Z niepokojem przyspieszałem kroku, rezygnując +dostępne - myślałem sobie. Z niepokojem przyspieszałem kroku, rezygnując w duchu z myśli zwiedzenia sklepów. Byle tylko wydostać się stąd prędko w znane okolice miasta. Zbliżałem się do wylotu, pełen niepokoju, gdzie też ona mnie wyprowadzi. Wyszedłem na szeroki, rzadko zabudowany @@ -1494,7 +1494,7 @@ ozdobne budynki bogaczy. W przerwach między nimi widniały parki i mury sadów. Obraz przypominał z daleka ulicę Leszniańską w jej dolnych i rzadko zwiedzanych okolicach. Światło księżyca, rozpuszczone w tysiącznych barankach, w łuskach srebrnych na niebie, było blade i tak -jasne jak w dzień--tylko parki i ogrody czerniały w tym srebrnym +jasne jak w dzień - tylko parki i ogrody czerniały w tym srebrnym krajobrazie. Przyjrzawszy się bacznie jednemu z budynków, doszedłem do przekonania, że mam przed sobą tylną i nigdy nie widzianą stronę gmachu gimnazjalnego. Właśnie dochodziłem do bramy, która ku memu zdziwieniu @@ -1513,7 +1513,7 @@ stawiał zbyt ścisłych wymagań. Niektórzy przynosili sobie z domu poduszki i układali się na ławkach do powierzchownej drzemki. I tylko najpilniejsi rysowali pod samą świecą, w złotym kręgu jej blasku. Czekaliśmy zazwyczaj długo na przyjście profesora, nudząc się wśród -sennych rozmów. Wreszcie otwierały się drzwi jego pokoju i wchodził-- +sennych rozmów. Wreszcie otwierały się drzwi jego pokoju i wchodził - mały, z piękną brodą, pełen ezoterycznych uśmiechów, dyskretnych przemilczeń i aromatu tajemnicy. Szybko zaciskał za sobą drzwi gabinetu, przez które w momencie otworzenia tłoczyła się za jego głową ciżba @@ -1521,7 +1521,7 @@ gipsowych cieni, fragmentów klasycznych, bolesnych Niobid, Danaid i Tantalidów, cały smutny i jałowy Olimp, więdnący od lat w tym muzeum gipsów. Zmierzch tego pokoju mętniał i za dnia i przelewał się sennie od gipsowych marzeń, pustych spojrzeń, blednących owali i zamyśleń -odchodzących w nicość. Lubiliśmy nieraz podsłuchiwać pod drzwiami-- +odchodzących w nicość. Lubiliśmy nieraz podsłuchiwać pod drzwiami - ciszy, pełnej westchnień i szeptów tego kruszejącego w pajęczynach rumowiska, tego rozkładającego się w nudzie i monotonii zmierzchu bogów. Profesor przechadzał się dostojnie, pełen namaszczenia, wzdłuż pustych @@ -1587,7 +1587,7 @@ bijącym sercem, gotów do ucieczki za najlżejszym szmerem. Jakże mógłbym, przyłapany, usprawiedliwić to moje nocne szpiegowanie, moje zuchwałe wścibstwo? W którymś z głębokich pluszowych foteli mogła, nie dostrzeżona i cicha, siedzieć córeczka dyrektora i podnieść nagle na -mnie oczy znad książki--czarne, sybilińskie, spokojne oczy, których +mnie oczy znad książki - czarne, sybilińskie, spokojne oczy, których spojrzenia nikt z nas wytrzymać nie umiał. Ale cofnąć się w połowie drogi, nie dokonawszy powziętego planu, poczytałbym był sobie za tchórzostwo. Zresztą głęboka cisza panowała dookoła w pełnych przepychu @@ -1611,7 +1611,7 @@ jeszcze nieskończoną drogę i, zatopiony w swych zawiłych procederach niebieskich, nie myślał o świcie. Na ulicy czerniało kilka dorożek, rozjechanych i rozklekotanych jak kalekie, drzemiące kraby czy karakony. Woźnica nachylił się z wysokiego kozła. Miał twarz drobną, czerwoną i -dobroduszną.--Pojedziemy, paniczu?--zapytał. Powóz zadygotał we +dobroduszną. - Pojedziemy, paniczu? - zapytał. Powóz zadygotał we wszystkich stawach i przegubach swego wieloczłonkowego ciała i ruszył na lekkich obręczach. Ale kto w taką noc powierza się kaprysom nieobliczalnego dorożkarza? Wśród klekotu szprych, wśród dudnienia pudła @@ -1622,8 +1622,8 @@ kiwając nań przyjaźnie rękami. Odpowiedział im coś radośnie, po czym nie zatrzymując pojazdu, rzucił mi lejce na kolana, spuścił się z kozła i przyłączył do gromady kolegów. Koń, stary mądry koń dorożkarski, oglądnął się pobieżnie i pojechał dalej jednostajnym, dorożkarskim -kłusem. Właściwie koń ten budził zaufanie--wydawał się mądrzejszy od -woźnicy. Ale powozić nie umiałem--trzeba się było zdać na jego wolę. +kłusem. Właściwie koń ten budził zaufanie - wydawał się mądrzejszy od +woźnicy. Ale powozić nie umiałem - trzeba się było zdać na jego wolę. Wjechaliśmy na podmiejską ulicę ujętą z obu stron w ogrody. Ogrody te przechodziły zwolna, w miarę posuwania się, w parki wielkodrzewne, a te w lasy. Nie zapomnę nigdy tej jazdy świetlistej w najjaśniejszą noc @@ -1647,8 +1647,8 @@ zbierał się wał białej piany śnieżnej, coraz wyższy i wyższy. Z trudem przekopywał się koń przez czystą i świeżą jego masę. Wreszcie ustał. Wyszedłem z dorożki. Dyszał ciężko ze zwieszoną głową. Przytuliłem jego łeb do piersi, w jego wielkich czarnych oczach lśniły łzy. Wtedy -ujrzałem na jego brzuchu okrągłą czarną ranę.---Dlaczego mi nie -powiedziałeś?--szepnąłem ze łzami.--Drogi mój--to dla ciebie--rzekł +ujrzałem na jego brzuchu okrągłą czarną ranę. - -Dlaczego mi nie +powiedziałeś? - szepnąłem ze łzami. - Drogi mój - to dla ciebie - rzekł i stał się bardzo mały, jak konik z drzewa. Opuściłem go. Czułem się dziwnie lekki i szczęśliwy. Zastanawiałem się, czy czekać na małą kolejkę lokalną, która tu zajeżdżała, czy też pieszo wrócić do miasta. @@ -1741,7 +1741,7 @@ intymności, brudnego zmieszania. Dzielnica ta była eldoradem takich dezerterów moralnych, takich zbiegów spod sztandaru godności własnej. Wszystko zdawało się tam podejrzane i dwuznaczne, wszystko zapraszało sekretnym mrugnięciem, cynicznie artykułowanym gestem, wyraźnie -przymrużonym perskim okiem--do nieczystych nadziei, wszystko wyzwalało +przymrużonym perskim okiem - do nieczystych nadziei, wszystko wyzwalało z pęt niską naturę. Mało kto, nie uprzedzony, spostrzegał dziwną osobliwość tej dzielnicy: brak barw, jak gdyby w tym tandetnym, w pośpiechu wyrosłym mieście nie można było sobie pozwolić na luksus @@ -1753,11 +1753,11 @@ rubrykach komercjalnych ogłoszeń, wśród których zagnieździły się pasożytniczo podejrzane anonse, drażliwe notatki, wątpliwe ilustracje; i wędrówki te były równie jałowe i bez rezultatu jak ekscytacje fantazji, pędzonej przez szpalty i kolumny pornograficznych druków. Wchodziło się -do jakiegoś krawca, żeby zamówić ubranie--ubranie o taniej elegancji, +do jakiegoś krawca, żeby zamówić ubranie - ubranie o taniej elegancji, tak charakterystycznej dla tej dzielnicy. Lokal był wielki i pusty, bardzo wysoki i bezbarwny. Ogromne wielopiętrowe półki wznoszą się jedne nad drugimi w nie określoną wysokość tej hali. Kondygnacje pustych półek -wyprowadzają wzrok w górę aż pod sufit, który może być niebem--lichym, +wyprowadzają wzrok w górę aż pod sufit, który może być niebem - lichym, bezbarwnym, odrapanym niebem tej dzielnicy. Natomiast dalsze magazyny, które widać przez otwarte drzwi, pełne są aż pod sufit pudeł i kartonów, piętrzących się ogromną kartoteką, która rozpada się w górze, pod @@ -1888,7 +1888,7 @@ pertraktacje z przekupnymi urzędnikami linii żelaznej. Zanim te negocjacje się kończą, pociąg rusza, odprowadzany przez wolno sunący, rozczarowany tłum, który odprowadza go daleko, ażeby się wreszcie rozproszyć. Ulica, zacieśniona na chwilę do tego zaimprowizowanego -dworca, pełnego zmierzchu i tchnienia dalekich dróg--rozwidnia się +dworca, pełnego zmierzchu i tchnienia dalekich dróg - rozwidnia się znowu, rozszerza i przepuszcza znów swym korytem beztroski monotonny tłum spacerowiczów, który wędruje wśród gwaru rozmów wzdłuż wystaw sklepowych, tych brudnych, szarych czworoboków, pełnych tandetnych @@ -1899,14 +1899,14 @@ drapieżnym, posuwistym krokiem i mają w niedobrych, zepsutych twarzach nieznaczną skazę, która je przekreśla: zezują czarnym, krzywym zezem lub mają usta rozdarte, lub brak im koniuszka nosa. Mieszkańcy miasta dumni są z tego odoru zepsucia, którym tchnie Ulica Krokodyli. Nie mamy -potrzeby niczego sobie odmawiać--myślą z dumą--stać nas i na prawdziwą +potrzeby niczego sobie odmawiać - myślą z dumą - stać nas i na prawdziwą wielkomiejską rozpustę. Twierdzą oni, że każda kobieta w tej dzielnicy -jest kokotą. W istocie wystarczy zwrócić uwagę na którąś--a natychmiast +jest kokotą. W istocie wystarczy zwrócić uwagę na którąś - a natychmiast spotyka się to uporczywe, lepkie spojrzenie, które nas zmraża rozkoszną pewnością. Nawet dziewczęta szkolne noszą tu w pewien charakterystyczny sposób kokardy, stawiają swoistą manierą smukłe nogi i mają tę nieczystą skazę w spojrzeniu, w której leży preformowane przyszłe zepsucie. A -jednak--a jednak czy mamy zdradzić ostatnią tajemnicę tej dzielnicy, +jednak - a jednak czy mamy zdradzić ostatnią tajemnicę tej dzielnicy, troskliwie ukrywany sekret Ulicy Krokodyli? Kilkakrotnie w trakcie naszego sprawozdania stawialiśmy pewne znaki ostrzegawcze, dawaliśmy w delikatny sposób wyraz naszym zastrzeżeniom. Uważny czytelnik nie będzie @@ -1919,7 +1919,7 @@ giętkość. Powiedzmy bez ogródek: fatalnością tej dzielnicy jest, że nic w niej nie dochodzi do skutku, nic nie odbiega od swego definitivum, wszystkie ruchy rozpoczęte zawisają w powietrzu, wszystkie gesty wyczerpują się przedwcześnie i nie mogą przekroczyć pewnego martwego -punktu. Mogliśmy już zauważyć wielką bujność i rozrzutność--w +punktu. Mogliśmy już zauważyć wielką bujność i rozrzutność - w intencjach, w projektach i antycypacjach, która cechuje tę dzielnicę. Cała ona nie jest niczym innym jak fermentacją pragnień, przedwcześnie wybujałą i dlatego bezsilną i pustą. W atmosferze nadmiernej łatwości @@ -1973,11 +1973,11 @@ pierze, które Adela raz w tygodniu wymiatała wraz z bezimiennym kurzem pokoju. W wyłysiałych miejscach widać było workowe, grube płótno, z którego wyłaziły kłaki konopne. Miałem ukryty żal do matki za łatwość, z jaką przeszła do porządku dziennego nad stratą ojca. Nigdy go nie -kochała--myślałem--a ponieważ ojciec nie był zakorzeniony w sercu +kochała - myślałem - a ponieważ ojciec nie był zakorzeniony w sercu żadnej kobiety, przeto nie mógł też wróść w żadną realność i unosił się wiecznie na peryferii życia, w półrealnych regionach, na krawędziach -rzeczywistosci. Nawet na uczciwą obywatelską śmierć nie zasłużył sobie-- -myślałem--wszystko u niego musiało, być dziwaczne i wątpliwe. +rzeczywistosci. Nawet na uczciwą obywatelską śmierć nie zasłużył sobie - +myślałem - wszystko u niego musiało, być dziwaczne i wątpliwe. Postanowiłem w stosownej chwili zaskoczyć matkę otwartą rozmową. Owego dnia (był ciężki dzień zimowy i od rana już sypał się miękki puch zmierzchu) matka miała migrenę i leżała na sofie samotnie w salonie. W @@ -1998,21 +1998,21 @@ nie mogły się powstrzymać, robiły perskie oczko, dawały sobie znaki, mówiły niemym, kolorowym alfabetem, pełnym sekretnych znaczeń. Irytowało mnie to szydercze porozumienie, ta migotliwa zmowa poza mymi plecami. Z kolanami przyciśniętymi do sofy matki, badając dwoma palcami, jakby w -zamyśleniu, delikatną materię jej szlafroka, rzekłem niby mimochodem:-- -Chciałem cię już od dawna zapytać: prawda, że to jest on?--I chociaż +zamyśleniu, delikatną materię jej szlafroka, rzekłem niby mimochodem: - +Chciałem cię już od dawna zapytać: prawda, że to jest on? - I chociaż nie wskazałem nawet spojrzeniem na kondora, matka odgadła od razu, zmieszała się bardzo i spuściła oczy. Dałem umyślnie upłynąć chwili, żeby wykosztować jej zmieszanie, po czym z całym spokojem, opanowując -wzbierający gniew, spytałem:--Jaki sens mają w takim razie te wszystkie +wzbierający gniew, spytałem: - Jaki sens mają w takim razie te wszystkie plotki i kłamstwa, które rozsiewasz o ojcu? Lecz jej rysy, które w pierwszej chwili rozpadły się były w panice, zaczęły się znowu -porządkować.--Jakie kłamstwa?--spytała mrugając oczyma, które były -puste, nalane ciemnym błękitem, bez białka.--Znam je od Adeli--rzekłem +porządkować. - Jakie kłamstwa? - spytała mrugając oczyma, które były +puste, nalane ciemnym błękitem, bez białka. - Znam je od Adeli - rzekłem - ale wiem, że pochodzą od ciebie; chcę wiedzieć prawdę. Usta jej drżały -lekko, źrenice, unikając mego wzroku, powędrowały w kąt oka.--Nie -kłamałam--rzekła, a usta- jej napęczniały i stały się małe zarazem. -Uczułem, że mnie kokietuje jak kobieta mężczyznę.--Z tymi karakonami to -prawda--sam przecież pamiętasz...--Zmieszałem się. Pamiętałem w +lekko, źrenice, unikając mego wzroku, powędrowały w kąt oka. - Nie +kłamałam - rzekła, a usta- jej napęczniały i stały się małe zarazem. +Uczułem, że mnie kokietuje jak kobieta mężczyznę. - Z tymi karakonami to +prawda - sam przecież pamiętasz... - Zmieszałem się. Pamiętałem w istocie tę inwazję karakonów, ten zalew czarnego rojowiska, które napełniało ciemność nocną, pajęczą bieganiną. Wszystkie szpary pełne były drgających wąsów, każda szczelina mogła wystrzelić z nagła @@ -2052,18 +2052,18 @@ opętany fascynacją awersji, która go wciągała w głąb swych zawiłych dróg. Mój ojciec poruszał się wieloczłonkowym, skomplikowanym ruchem dziwnego rytuału, w którym ze zgrozą poznałem imitację ceremoniału karakoniego. Od tego czasu wyrzekliśmy się ojca. Podobieństwo do -karakona występowało z dniem każdym wyraźniej--mój ojciec zamieniał się +karakona występowało z dniem każdym wyraźniej - mój ojciec zamieniał się w karakona. Zaczęliśmy się przyzwyczajać do tego. Widywaliśmy go coraz -rzadziej, całymi tygodniami znikał gdzieś na swych karakonich drogach-- +rzadziej, całymi tygodniami znikał gdzieś na swych karakonich drogach - przestaliśmy go odróżniać, zlał się w zupełności z tym czarnym niesamowitym plemieniem. Kto mógł powiedzieć, czy żył gdzieś jeszcze w jakiejś szparze podłogi, czy przebiegał nocami pokoje, zaplątany w afery karakonie, czy też był może między tymi martwymi owadami, które Adela co rana znaj-dowała brzuchem do góry leżące i najeżone nogami i które ze -wstrętem brała na śmietniczkę i wyrzucała?--A jednak--powiedziałem -zdetonowany--jestem pewny, że ten kondor to on.--Matka spojrzała na -mnie spod rzęs:--Nie dręcz mnie, drogi--mówiłam ci już przecież, że -ojciec podróżuje jako komiwojażer po kraju--przecież wiesz, że czasem w +wstrętem brała na śmietniczkę i wyrzucała? - A jednak - powiedziałem +zdetonowany - jestem pewny, że ten kondor to on. - Matka spojrzała na +mnie spod rzęs: - Nie dręcz mnie, drogi - mówiłam ci już przecież, że +ojciec podróżuje jako komiwojażer po kraju - przecież wiesz, że czasem w nocy przyjeżdża do domu, ażeby przed świtem jeszcze dalej odjechać. WICHURA Tej długiej i pustej zimy obrodziła ciemność w naszym mieście @@ -2094,9 +2094,9 @@ doklęły swego. Przywołane rechotem naczyń, rozplotkowanym od brzegu do brzegu, nadeszły wreszcie karawany, nadciągnęły potężne tabory wichru i stanęły nad nocą. Ogromne obozowisko, czarny ruchomy amfiteatr zstępować zaczął w potężnych kręgach ku miastu. I wybuchła ciemność ogromną -wzburzoną wichurą i szalała przez trzy dni i trzy noce...--Nie -pójdziesz dziś do szkoły--rzekła rano matka--jest straszna wichura na -dworze.--W pokoju unosił się delikatny welon dymu, pachnący żywicą. Piec +wzburzoną wichurą i szalała przez trzy dni i trzy noce... - Nie +pójdziesz dziś do szkoły - rzekła rano matka - jest straszna wichura na +dworze. - W pokoju unosił się delikatny welon dymu, pachnący żywicą. Piec wył i gwizdał, jak gdyby uwiązana w nim była cała sfora psów czy demonów. Wielki bohomaz, wymalowany na jego pękatym brzuchu, wykrzywiał się kolorowym grymasem i fantastyczniał wzdętymi policzkami. Pobiegłem @@ -2141,8 +2141,8 @@ Pokój drżał z lekka, obrazy na ścianach brzęczały. Szyby lśniły się tłustym odblaskiem lampy. Firanki na oknie wisiały wzdęte i pełne tchnienia tej burzliwej nocy. Przypomnieliśmy sobie, że ojca od rana nie widziano. Wczesnym rankiem, domyślaliśmy się, musiał udać się do sklepu, -gdzie go zaskóczyła wichura, odcinając mu powrót.--Cały dzień nic nie -jadł--biadała matka. Starszy subiekt Teodor podjął się wyprawić w noc i +gdzie go zaskóczyła wichura, odcinając mu powrót. - Cały dzień nic nie +jadł - biadała matka. Starszy subiekt Teodor podjął się wyprawić w noc i wichurę, żeby zanieść mu posiłek. Brat mój przyłączył się do wyprawy. Okutani w wielkie niedźwiedzie futra, obciążyli kieszenie żelazkami i moździerzami, balastem, który miał zapobiec porwaniu ich przez wichurę. @@ -2227,7 +2227,7 @@ grymasy, podnosił wysoko brwi i śmiał się do siebie. NOC WIELKIEGO SEZONU Każdy wie, że w szeregu zwykłych, normalnych lat rodzi niekiedy zdziwaczały czas ze swego łona lata inne, lata osobliwe, -lata wyrodne, którym--jak szósty, mały palec u ręki--wyrasta kędyś +lata wyrodne, którym - jak szósty, mały palec u ręki - wyrasta kędyś trzynasty, fałszywy miesiąc. Mówimy fałszywy, gdyż rzadko dochodzi on do pełnego rozwoju. Jak dzieci późno spłodzone, pozostaje on w tyle ze wzrostem, miesiąc garbusek, odrośl w połowie uwiędła i raczej domyślna @@ -2235,7 +2235,7 @@ niż rzeczywista. Winna jest temu starcza niepowściągliwość lata, jego rozpustna i późna żywotność. Bywa czasem, że sierpień minie, a stary gruby pień lata rodzi z przyzwyczajenia jeszcze dalej, pędzi ze swego próchna te dni-dziczki, dni-chwasty, jałowe i idiotyczne, dorzuca na -dokładkę, za darmo, dni-kaczany, puste i niejadalne--dni białe, +dokładkę, za darmo, dni-kaczany, puste i niejadalne - dni białe, zdziwione i niepotrzebne. Wyrastają one, nieregularne i nierówne, nie wykształcone i zrośnięte z sobą, jak palce potworkowatej ręki, pączkujące i zwinięte w figę. Inni porównywają te dni do apokryfów, @@ -2316,7 +2316,7 @@ jaskrawo w wielkie, gulgocące, rozpluskane narośle albo wykogucić się w głupią kogucią maskę, czerwoną i piejącą, w kolorowe jesienne maszkary fantastyczne i absurdalne. Zdawało się, że tak nadęte i piejące wzniosą się w powietrze długimi kolorowymi łańcuchami i jak jesienne klucze -ptaków przeciągać będą nad miastem--fantastyczne flotylle z bibułki i +ptaków przeciągać będą nad miastem - fantastyczne flotylle z bibułki i pogody jesiennej. Albo woziły się wśród krzyków na małych zgiełkliwych wózkach, grających kolorowym turkotem kółek, szprych i dyszli. Wózki zjeżdżały naładowane ich krzykiem i staczały się w dół ulicy aż do nisko @@ -2339,9 +2339,9 @@ cichej zamieszce, w panice prędkiego rozkładu, w górze utrzymywał się i rósł coraz wyżej milczący alarm zorzy, drgający świergotem miliona cichych dzwonków, wzbierających wzlotem miliona cichych skowronków lecących razem w jedną wielką, srebrną nieskończoność. Potem była już -nagle noc--wielka noc, rosnąca jeszcze podmuchami wiatru, które ją +nagle noc - wielka noc, rosnąca jeszcze podmuchami wiatru, które ją rozszerzały. W jej wielokrotnym labiryncie wyłupane były gniazda jasne: -sklepy--wielkie, kolorowe latarnie, pełne spiętrzonego towaru i zgiełku +sklepy - wielkie, kolorowe latarnie, pełne spiętrzonego towaru i zgiełku kupujących. Przez jasne szyby tych latani można było śledzić zgiełkliwy i pełen dziwacznego ceremoniału obrzęd zakupów jesiennych. Ta wielka, fałdzista noc jesienna, rosnąca cieniami, roszerzona wiatrami, kryła w @@ -2353,12 +2353,12 @@ tandety, złoconych błahostek, cynfolii, trąbek, andrutów i kolorowych miętówek, były stacjami lekkomyślności, grzechotkami beztroski, rozsianymi na wiszarach ogromnej, labiryntowej, rozłopotanej wiatrami nocy. Wielkie i ciemne tłumy płynęły w ciemności, w hałaśliwym -zmieszaniu, w szurgocie tysięcy nóg, w gwarze tysięcy ust--rojna, +zmieszaniu, w szurgocie tysięcy nóg, w gwarze tysięcy ust - rojna, splątana wędrówka, ciągnąca arteriami jesiennego miasta. Tak płynęła ta rzeka, pełna gwaru, ciemnych spojrzeń, chytrych łypnięć, pokawałkowana rozmową, posiekana gawędą, wielka miazga plotek, śmiechów i zgiełku. Zdawało się, że to ruszyły tłumami jesienne, suche makówki sypiące -makiem--głowygrzechotki, ludzie-kołatki. Mój ojciec chodził +makiem - głowygrzechotki, ludzie-kołatki. Mój ojciec chodził zdenerwowany i kolorowy od wypieków, z błyszczącymi oczyma, w jasno oświetlonym sklepie, i nasłuchiwał. Przez szyby wystawy i portalu dochodził tu z daleka szum miasta, stłumiony gwar płynącej ciżby. Nad @@ -2407,7 +2407,7 @@ ojciec mój jednym skokiem wspiął się na półki z suknem i, uwisły wysoko nad tłumem, dął z całej siły w wielki puzon z rogu i trąbił na alarm. Ale sklepienie nie napełniło się szumem aniołów, śpieszących na pomoc, a zamiast tego każdemu jękowi trąby odpowiadał wielki, roześmiany chór -tłumu.--Jakubie, handlować! Jakubie, sprzedawać!--wołali wszyscy, a +tłumu. - Jakubie, handlować! Jakubie, sprzedawać! - wołali wszyscy, a wołanie to, wciąż powtarzane, rytmizowało się w chórze i przechodziło powoli w melodię refrenu, śpiewaną przez wszystkie gardła. Wtedy mój ojciec dał za wygraną, zeskoczył z wysokiego gzymsu i ruszył z krzykiem @@ -2460,7 +2460,7 @@ był błysk uśmiechniętej ironii. Wśród tych grup przewijał się pospolity lud, bezpostaciowy tłum, gawiedź bez twarzy i indywidualności. Wypełniał on niejako luki w krajobrazie, wyścielał tło dzwonkami i grzechotkami bezmyślnego gadania. Był to element błazeński, roztańczony tłum -poliszynelów i arlekinów, który--sam bez poważnych intencyj handlowych +poliszynelów i arlekinów, który - sam bez poważnych intencyj handlowych - doprowadzał do absurdu gdzieniegdzie nawiązujące się tansakcje swymi błazeńskimi figlami. Stopniowo jednak, znudzony błaznowaniem, wesoły ten ludek rozpraszał się w dalszych okolicach krajobrazu i tam powoli gubił @@ -2475,7 +2475,7 @@ ciemne ich sylwety zaludniały całą tę pustynną wyżynę, nad którą zwisł ciężkie i ciemne niebo, sfałdowane i chmurne, poorane w długie równoległe bruzdy, w srebrne i białe skiby, ukazujące w głębi coraz dalsze pokłady swego uwarstwienia. Światło lampy stwarzało sztuczny -dzień w owej krainie--dzień dziwny, dzień bez świtu i wieczoru. Ojciec +dzień w owej krainie - dzień dziwny, dzień bez świtu i wieczoru. Ojciec mój uspokajał się powoli. Gniew jego układał się i zastygał w pokładach i warstwach krajobrazu. Siedział teraz na galeriach wysokich półek i patrzył w jesienniejący, rozległy kraj. Widział, jak na dalekich @@ -2536,7 +2536,7 @@ wachlarzami, w które niepojętym sposobem tchnięto jakiś pozór życia. Widziałem smutny powrót mego ojca. Sztuczny dzień zabarwiał się już powoli kolorami zwyczajnego poranka. W spustoszałym sklepie najwyższe półki syciły się barwami rannego nieba. Wśród fragmentów zgasłego -pejzażu, wśród zburzonych kulis nocnej scenerii--ojciec widział +pejzażu, wśród zburzonych kulis nocnej scenerii - ojciec widział wstających ze snu subiektów. Podnosili się spomiędzy bali sukna i ziewali do słońca. W kuchni, na piętrze, Adela, ciepła od snu i ze zmierzwionymi włosami, mełła kawę na młynku, przyciskając go do białej @@ -2552,7 +2552,7 @@ EOT; Corrected EDITIONS of our eBooks get a new NUMBER, sklep11.txt VERSIONS based on separate sources get new LETTER, sklep10a.txt - Produced by Pawel Sobkowiak--Scanned and proofread by + Produced by Pawel Sobkowiak - Scanned and proofread by Polska Biblioteka Internetowa Project Gutenberg eBooks are often created from several printed diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Company.php index 79592ae..74f3567 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Company.php @@ -10,11 +10,11 @@ class Company extends \Faker\Provider\Company '{{lastName}} {{companySuffix}}', '{{lastName}}-{{lastName}}', '{{lastName}} e {{lastName}}', - '{{lastName}} de {{lastName}}', - '{{lastName}}, {{lastName}} e {{lastName}}' + '{{lastName}} e {{lastName}} {{companySuffix}}', + '{{lastName}} Comercial Ltda.' ); - protected static $companySuffix = array('e Filho', 'e Filha', 'e Filhos', 'e Associados', 'e Flia.', 'SRL', 'SA', 'S. de H.'); + protected static $companySuffix = array('e Filhos', 'e Associados', 'Ltda.', 'S.A.'); /** * A random CNPJ number. diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Payment.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Payment.php index 9643d68..1a52561 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Payment.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Payment.php @@ -69,4 +69,78 @@ class Payment extends \Faker\Provider\Payment { return static::iban($countryCode, $prefix, $length); } + + + /** + * @see list of Brazilians banks (2018-02-15), source: https://pt.wikipedia.org/wiki/Lista_de_bancos_do_Brasil + */ + protected static $banks = array( + 'BADESUL Desenvolvimento S.A. – Agência de Fomento/RS', + 'Banco Central do Brasil', + 'Banco da Amazônia', + 'Banco de Brasília', + 'Banco de Desenvolvimento de Minas Gerais', + 'Banco de Desenvolvimento do Espírito Santo', + 'Banco de Desenvolvimento do Paraná', + 'Banco do Brasil', + 'Banco do Estado de Sergipe Banese Estadual', + 'Banco do Estado do Espírito Santo Banestes', + 'Banco do Estado do Pará', + 'Banco do Estado do Rio Grande do Sul', + 'Banco do Nordeste do Brasil', + 'Banco Nacional de Desenvolvimento Econômico e Social', + 'Banco Regional de Desenvolvimento do Extremo Sul', + 'Caixa Econômica Federal', + 'Banco ABN Amro S.A.', + 'Banco Alfa', + 'Banco Banif', + 'Banco BBM', + 'Banco BMG', + 'Banco Bonsucesso', + 'Banco BTG Pactual', + 'Banco Cacique', + 'Banco Caixa Geral - Brasil', + 'Banco Citibank', + 'Banco Credibel', + 'Banco Credit Suisse', + 'Góis Monteiro & Co', + 'Banco Fator', + 'Banco Fibra', + 'Agibank', + 'Banco Guanabara', + 'Banco Industrial do Brasil', + 'Banco Industrial e Comercial', + 'Banco Indusval', + 'Banco Inter', + 'Banco Itaú BBA', + 'Banco ItaúBank', + 'Banco Itaucred Financiamentos', + 'Banco Mercantil do Brasil', + 'Banco Modal Modal', + 'Banco Morada', + 'Banco Pan', + 'Banco Paulista', + 'Banco Pine', + 'Banco Renner', + 'Banco Ribeirão Preto', + 'Banco Safra', + 'Banco Santander', + 'Banco Sofisa', + 'Banco Topázio', + 'Banco Votorantim', + 'Bradesco Bradesco', + 'Itaú Unibanco', + 'Banco Original', + 'Banco Neon', + 'Nu Pagamentos S.A', + 'XP Investimentos Corretora de Câmbio Títulos e Valores Mobiliários S.A', + ); + + /** + * @example 'Banco Neon' + */ + public static function bank() + { + return static::randomElement(static::$banks); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php index e3c87d9..4949eef 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -4,47 +4,42 @@ namespace Faker\Provider\pt_BR; class PhoneNumber extends \Faker\Provider\PhoneNumber { - - protected static $landlineFormats = array('2###-####', '3###-####'); - - protected static $cellphoneFormats = array('7###-####', '8###-####', '9###-####'); + protected static $landlineFormats = array('2###-####', '3###-####', '4###-####'); /** - * Extracted from http://portal.embratel.com.br/embratel/9-digito/ (point 11) - */ - protected static $ninthDigitAreaCodes = array( - 11, 12, 13, 14, 15, 16, 17, 18, 19, // aug/2013 - 21, 22, 24, 27, 28, // oct/2013 - 91, 92, 93, 94, 95, 96, 97, 98, 99, // nov/2014 - 81, 82, 83, 84, 85, 86, 87, 88, 89, // may/2015 - 31, 32, 33, 34, 35, 37, 38, 71, 73, 74, 75, 77, 79, // oct/2015 - //41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 53, 54, 55, 61, 62, 63, 64, 65, 66, 67, 68, 69 //by dec/2016 - ); + * Since december 2016 all mobile phone numbers in brazil begin with 9 and landlines 2, 3 or 4. + * @link http://www.anatel.gov.br/Portal/exibirPortalPaginaEspecial.do?org.apache.struts.taglib.html.TOKEN=9594e1d11fbc996d52bda44e608bb744&codItemCanal=1794&pastaSelecionada=2984 + */ + protected static $cellphoneFormats = array('9####-####'); /** * Generates a 2-digit area code not composed by zeroes. + * @link http://www.anatel.gov.br/legislacao/resolucoes/16-2001/383-resolucao-263. * @return string */ public static function areaCode() { - return static::randomDigitNotNull().static::randomDigitNotNull(); + $areaCodes = array( + '11', '12', '13', '14', '15', '16', '17', '18', '19', '21', '22', '24', + '27', '28', '31', '32', '33', '34', '35', '37', '38', '41', '42', '43', + '44', '45', '46', '47', '48', '49', '51', '53', '54', '55', '61', '62', + '63', '64', '65', '66', '67', '68', '69', '71', '73', '74', '75', '77', + '79', '81', '82', '83', '84', '85', '86', '87', '88', '89', '91', '92', + '93', '94', '95', '96', '97', '98', '99' + ); + + return self::randomElement($areaCodes); } /** - * Generates a 8/9-digit cellphone number without formatting characters. + * Generates a 9-digit cellphone number without formatting characters. * @param bool $formatted [def: true] If it should return a formatted number or not. - * @param int|bool $area [def: false] A specific area code to which the number will belong. - * If a boolean is used, will add (or not) the ninth digit. * @return string */ - public static function cellphone($formatted = true, $area = false) + public static function cellphone($formatted = true) { $number = static::numerify(static::randomElement(static::$cellphoneFormats)); - if ($area === true || in_array($area, static::$ninthDigitAreaCodes)) { - $number = "9$number"; - } - if (!$formatted) { $number = strtr($number, array('-' => '')); } @@ -53,7 +48,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber } /** - * Generates an 8-digit landline number without formatting characters. + * Generates an 9-digit landline number without formatting characters. * @param bool $formatted [def: true] If it should return a formatted number or not. * @return string */ @@ -94,15 +89,14 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber { $area = static::areaCode(); $number = ($type == 'cellphone')? - static::cellphone($formatted, in_array($area, static::$ninthDigitAreaCodes)) : + static::cellphone($formatted) : static::landline($formatted); return $formatted? "($area) $number" : $area.$number; } /** - * Concatenates {@link areaCode} and {@link cellphone} into a national cellphone number. The ninth digit is - * derived from the area code. + * Concatenates {@link areaCode} and {@link cellphone} into a national cellphone number. * @param bool $formatted [def: true] If it should return a formatted number or not. * @return string */ diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php index 4de0e93..d804ff2 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php @@ -4,7 +4,7 @@ namespace Faker\Provider\pt_PT; class Address extends \Faker\Provider\Address { - protected static $streetPrefix = array('Av.', 'Avenida', 'R.', 'Rua', 'Travessa', 'Largo'); + protected static $streetPrefix = array('Av.', 'Avenida', 'R.', 'Rua', 'Tv.', 'Travessa', 'Lg.', 'Largo'); protected static $streetNameFormats = array( '{{streetPrefix}} {{lastName}}', @@ -22,7 +22,7 @@ class Address extends \Faker\Provider\Address /** @link http://www.univ-ab.pt/PINTAC/carta_normas.htm address example in letters **/ protected static $addressFormats = array( - "{{streetAddress}}\n{{postcode}} {{city}}", + "{{streetAddress}} {{postcode}} {{city}}", ); /** @link http://www.mapadeportugal.net/indicecidades.asp **/ diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Company.php new file mode 100644 index 0000000..971d18f --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Company.php @@ -0,0 +1,16 @@ +getDateOfBirth($dateOfBirth); + + if (is_null($county)) { $countyCode = static::randomElement(array_values(static::$cnpCountyCodes)); + } elseif (!array_key_exists($county, static::$cnpCountyCodes)) { + throw new \InvalidArgumentException("Invalid county code '{$county}' received"); } else { $countyCode = static::$cnpCountyCodes[$county]; } - $cnp = (string) static::cnpFirstDigit($gender, $century) - . static::numerify('##') - . sprintf('%02d', $this->generator->month()) - . sprintf('%02d', $this->generator->dayOfMonth()) - . $countyCode - . static::numerify('##%') + $cnp = (string)$this->getGenderDigit($date, $gender, $isResident) + . $date->format('ymd') + . $countyCode + . static::numerify('##%') ; - $cnp = static::cnpAddChecksum($cnp); + $checksum = $this->getChecksumDigit($cnp); - return $cnp; + return $cnp.$checksum; } /** - * Calculates the first digit for the Personal Numerical Code (CNP) based on - * the gender and century - * - * @param string $gender Valid values: m, f, 1, 2 - * @param integer $century Valid values: 1800, 1900, 2000, 1, 2, 3, 4, 5, 6 - * @return integer + * @param $dateOfBirth + * @return \DateTime */ - protected static function cnpFirstDigit($gender = null, $century = null) + protected function getDateOfBirth($dateOfBirth) { - switch ($century) { - case 1800: + if (empty($dateOfBirth)) { + $dateOfBirthParts = array(static::numberBetween(1800, 2099)); + } else { + $dateOfBirthParts = explode('-', $dateOfBirth); + } + $baseDate = \Faker\Provider\DateTime::dateTimeBetween("first day of {$dateOfBirthParts[0]}", "last day of {$dateOfBirthParts[0]}"); + + switch (count($dateOfBirthParts)) { + case 1: + $dateOfBirthParts[] = $baseDate->format('m'); + //don't break, we need the day also + case 2: + $dateOfBirthParts[] = $baseDate->format('d'); + //don't break, next line will case 3: - case 4: - $centuryCode = 2; - break; - case 1900: - case 1: - case 2: - $centuryCode = 0; - break; - case 2000: - case 5: - case 6: - $centuryCode = 4; break; default: - $centuryCode = static::randomElement(array(0, 2, 4, 6, 9)); + throw new \InvalidArgumentException("Invalid date of birth - must be null or in the 'Y-m-d', 'Y-m', 'Y' format"); } - switch (strtolower($gender)) { - case 'm': - case 1: - $genderCode = 1; - break; - case 'f': - case 2: - $genderCode = 2; - break; - default: - $genderCode = static::randomElement(array(1, 2)); + if ($dateOfBirthParts[0] < 1800 || $dateOfBirthParts[0] > 2099) { + throw new \InvalidArgumentException("Invalid date of birth - year must be between 1900 and 2099, '{$dateOfBirthParts[0]}' received"); } - $firstDigit = $centuryCode + $genderCode; + $dateOfBirthFinal = implode('-', $dateOfBirthParts); + $date = \DateTime::createFromFormat('Y-m-d', $dateOfBirthFinal); + //a full (invalid) date might have been supplied, check if it converts + if ($date->format('Y-m-d') !== $dateOfBirthFinal) { + throw new \InvalidArgumentException("Invalid date of birth - '{$date->format('Y-m-d')}' generated based on '{$dateOfBirth}' received"); + } - return ($firstDigit > 9) ? 9 : $firstDigit; + return $date; + } + + /** + * + * https://ro.wikipedia.org/wiki/Cod_numeric_personal#S + * + * @param \DateTime $dateOfBirth + * @param bool $isResident + * @param string $gender + * @return int + */ + protected static function getGenderDigit(\DateTime $dateOfBirth, $gender, $isResident) + { + if (!$isResident) { + return 9; + } + + if ($dateOfBirth->format('Y') < 1900) { + if ($gender == Person::GENDER_MALE) { + return 3; + } + return 4; + } + + if ($dateOfBirth->format('Y') < 2000) { + if ($gender == Person::GENDER_MALE) { + return 1; + } + return 2; + } + + if ($gender == Person::GENDER_MALE) { + return 5; + } + return 6; } /** * Calculates a checksum for the Personal Numerical Code (CNP). * - * @param string $cnp Randomly generated CNP - * @return string CNP with the last digit altered to a proper checksum + * @param string $value 12 digit CNP + * @return int checksum digit */ - protected static function cnpAddChecksum($cnp) + protected function getChecksumDigit($value) { $checkNumber = 279146358279; $checksum = 0; foreach (range(0, 11) as $digit) { - $checksum += substr($cnp, $digit, 1) * substr($checkNumber, $digit, 1); + $checksum += (int)substr($value, $digit, 1) * (int)substr($checkNumber, $digit, 1); } $checksum = $checksum % 11; - return substr($cnp, 0, 12) . ($checksum == 10 ? 1 : $checksum); + return $checksum == 10 ? 1 : $checksum; } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php index e8af810..377e224 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php @@ -46,9 +46,8 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public function phoneNumber() { $type = static::randomElement(array_keys(static::$normalFormats)); - $number = static::numerify(static::randomElement(static::$normalFormats[$type])); - return $number; + return static::numerify(static::randomElement(static::$normalFormats[$type])); } public static function tollFreePhoneNumber() diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/Text.php new file mode 100644 index 0000000..410c6f9 --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/Text.php @@ -0,0 +1,154 @@ +middleNameMale(); + } elseif ($gender === static::GENDER_FEMALE) { + return $this->middleNameFemale(); + } + + return $this->middleName(static::randomElement(array( + static::GENDER_MALE, + static::GENDER_FEMALE, + ))); + } + + /** + * Return last name for the specified gender. + * + * @param string|null $gender A gender of the last name should be generated + * for. If the argument is skipped a random gender will be used. + * @return string Last name + */ + public function lastName($gender = null) + { + $lastName = static::randomElement(static::$lastName); + + if (static::GENDER_FEMALE === $gender) { + return $lastName . 'a'; + } elseif (static::GENDER_MALE === $gender) { + return $lastName; + } + + return $lastName . static::randomElement(static::$lastNameSuffix); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php index b785cfb..7a989c2 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php @@ -4,6 +4,13 @@ namespace Faker\Provider\ru_RU; class Text extends \Faker\Provider\Text { + public function realText($maxNbChars = 200, $indexSize = 2) + { + $realText = parent::realText($maxNbChars, $indexSize); + + return iconv('UTF-8', 'UTF-8//IGNORE', $realText); + } + /** * From ru.wikisource.org * diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Company.php index 1f5fad2..53091d5 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Company.php @@ -46,7 +46,7 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } /** @@ -59,6 +59,6 @@ class Company extends \Faker\Provider\Company $result[] = static::randomElement($word); } - return join($result, ' '); + return join(' ', $result); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php index 2a3e658..2ed758a 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php @@ -74,9 +74,9 @@ class Person extends \Faker\Provider\Person 'Cyprich', 'Cíger', 'Dacej', 'Danko', 'Debnár', 'Dej', 'Dekýš', 'Doležal', 'Dostál', 'Dočolomanský', 'Drajna', 'Droppa', 'Dubovský', 'Dudek', 'Dula', 'Dulla', 'Dusík', 'Dvonč', 'Dzurjanin', 'Dávid', 'Fabian', 'Fabián', 'Fajnor', 'Farkašovský', 'Feldek', 'Fico', 'Filc', 'Filip', 'Finka', 'Ftorek', 'Galis', 'Gallo', 'Gašpar', 'Gašparovič', 'Gocník', 'Golonka', 'Greguš', 'Grznár', 'Hablák', 'Habšuda', - 'Haluška', 'Halák', 'Hanko', 'Hanzal', 'Hanzel', 'Hanzel', 'Haščák', 'Heretik', 'Hečko', 'Hečková', 'Hlaváček', 'Hlinka', 'Hochschorner', + 'Haluška', 'Halák', 'Hanko', 'Hanzal', 'Hanzel', 'Hanzel', 'Haščák', 'Heretik', 'Hečko', 'Hlaváček', 'Hlinka', 'Hochschorner', 'Holub', 'Holuby', 'Horváth', 'Hossa', 'Hraško', 'Hric', 'Hrmo', 'Hrušovský', 'Huba', 'Hudáček', 'Hála', 'Ihnačák', 'Janoška', 'Jantošovič', - 'Janík', 'Jonata', 'Jurina', 'Jurinová', 'Jurík', 'Jáni', 'Jánošík', 'Kaliský', 'Karul', 'Karvaš', 'Keníž', 'Klapka', 'Klaus', 'Kolník', + 'Janík', 'Jonata', 'Jurina', 'Jurík', 'Jáni', 'Jánošík', 'Kaliský', 'Karul', 'Karvaš', 'Keníž', 'Klapka', 'Klaus', 'Kolník', 'Konstantinidis', 'Korec', 'Kostrec', 'Kováč', 'Kováčik', 'Koza', 'Kubík', 'Kučera', 'Labuda', 'Langoš', 'Lepšík', 'Lexa', 'Lintner', 'Lubina', 'Lukáč', 'Lupták', 'Líška', 'Majeský', 'Malachovský', 'Malíšek', 'Marián', 'Masaryk', 'Maslo', 'Matiaško', 'Medveď', 'Menyhért', 'Mečiar', 'Mečíř', 'Mikloško', 'Mikulík', 'Mikuš', 'Mikúš', 'Mišík', 'Mojžiš', 'Mokroš', 'Molnár', 'Moravčík', 'Musil', 'Mydlo', 'Nagy', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/sl_SI/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/sl_SI/Company.php new file mode 100644 index 0000000..0e899bf --- /dev/null +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/sl_SI/Company.php @@ -0,0 +1,14 @@ +middleNameMale(); + } elseif ($gender === static::GENDER_FEMALE) { + return $this->middleNameFemale(); + } + + return $this->middleName(static::randomElement(array( + static::GENDER_MALE, + static::GENDER_FEMALE, + ))); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php index b18a9b5..24187f3 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php @@ -4,26 +4,48 @@ namespace Faker\Provider\uk_UA; class PhoneNumber extends \Faker\Provider\PhoneNumber { + /** + * @see list of Ukraine mobile formats (2017-08-08), source: https://ru.wikipedia.org/wiki/%D0%A2%D0%B5%D0%BB%D0%B5%D1%84%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BF%D0%BB%D0%B0%D0%BD_%D0%BD%D1%83%D0%BC%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8_%D0%A3%D0%BA%D1%80%D0%B0%D0%B8%D0%BD%D1%8B + */ protected static $formats = array( // International format (mobile) '+38050#######', + '+38066#######', + '+38068#######', '+38096#######', '+38067#######', + '+38091#######', + '+38092#######', '+38093#######', + '+38094#######', + '+38095#######', + '+38096#######', + '+38097#######', + '+38098#######', '+38063#######', '+38099#######', // Internal country format (mobile) '050#######', + '066#######', + '068#######', '096#######', '067#######', + '091#######', + '092#######', '093#######', + '094#######', + '095#######', + '096#######', + '097#######', + '098#######', '063#######', '099#######', // More generic formats '+38(0##)#######', - '+38(0###)######' + '+38(0###)######', + '+38(0####)#####' ); } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php index a520dce..47414f1 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php @@ -104,7 +104,7 @@ class Address extends \Faker\Provider\Address 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands Antilles', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway', 'Oman', - 'Pakistan', 'Palau', 'Palestinian Territory', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', + 'Pakistan', 'Palau', 'Palestinian Territories', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Barthelemy', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia (Slovak Republic)', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia and the South Sandwich Islands', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Person.php index 17d48de..5954c35 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Person.php @@ -12,6 +12,10 @@ class Person extends \Faker\Provider\Person '{{lastName}}{{firstNameFemale}}', ); + protected static $titleMale = array('先生', '医生', '老师', '教授', '律师', '经理'); + + protected static $titleFemale = array('女士', '小姐', '夫人', '太太', '医生', '老师', '教授', '律师', '经理'); + /** * According to http://baike.baidu.com/view/6109935.htm, * these are the top 300 lastnames from the 6th Chinese national census of population, diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/PhoneNumber.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/PhoneNumber.php index 0959dbe..4eb4819 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/PhoneNumber.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/PhoneNumber.php @@ -5,18 +5,19 @@ namespace Faker\Provider\zh_CN; class PhoneNumber extends \Faker\Provider\PhoneNumber { protected static $operators = array( - 134, 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 178, 182, 183, 184, 187, 188, // china mobile - 130, 131, 132, 145, 155, 156, 175, 176, 185, 186, // china unicom - 133, 149, 153, 177, 180, 181, 189, // chinatelecom + 134, 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 1705, 178, 182, 183, 184, 187, 188, // China Mobile + 130, 131, 132, 145, 155, 156, 1707, 1708, 1709, 1718, 1719, 176, 185, 186, // China Unicom + 133, 153, 1700, 1701, 177, 180, 181, 189, // China Telecom 170, 171, // virtual operators ); - protected static $formats = array('########'); + protected static $formats = array('###########'); public function phoneNumber() { - $operators = static::randomElement(static::$operators); + $operator = static::randomElement(static::$operators); + $format = static::randomElement(static::$formats); - return $operators . static::numerify(static::randomElement(static::$formats)); + return $operator . static::numerify(substr($format, 0, strlen($format) - strlen($operator))); } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Address.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Address.php index 990d347..bd0b766 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Address.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Address.php @@ -176,10 +176,10 @@ class Address extends \Faker\Provider\Address '壯圍鄉', '員山鄉', '冬山鄉', '五結鄉', '三星鄉', '大同鄉', '南澳鄉', ), - '桃園縣' => array( - '桃園市', '中壢市', '大溪鎮', '楊梅鎮', '蘆竹鄉', - '大園鄉', '龜山鄉', '八德市', '龍潭鄉', '平鎮市', - '新屋鄉', '觀音鄉', '復興鄉', + '桃園市' => array( + '桃園區', '中壢區', '大溪區', '楊梅區', '蘆竹區', + '大園區', '龜山區', '八德區', '龍潭區', '平鎮區', + '新屋區', '觀音區', '復興區', ), '新竹縣' => array( '竹北市', '竹東鎮', '新埔鎮', '關西鎮', '湖口鄉', diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php index 2cefdcb..26704ab 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php @@ -250,4 +250,16 @@ class Company extends \Faker\Provider\Company } return $result; } + + /** + * return standard VAT / Tax ID / Uniform Serial Number + * + * @example 28263822 + * + * @return int + */ + public function VAT() + { + return static::randomNumber(8, true); + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php index 71f248b..e0071be 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php @@ -4,6 +4,39 @@ namespace Faker\Provider\zh_TW; class Person extends \Faker\Provider\Person { + /** + * @see https://zh.wikipedia.org/wiki/%E4%B8%AD%E8%8F%AF%E6%B0%91%E5%9C%8B%E5%9C%8B%E6%B0%91%E8%BA%AB%E5%88%86%E8%AD%89 + */ + public static $idBirthplaceCode = array( + 'A' => 10, + 'B' => 11, + 'C' => 12, + 'D' => 13, + 'E' => 14, + 'F' => 15, + 'G' => 16, + 'H' => 17, + 'I' => 34, + 'J' => 18, + 'K' => 19, + 'M' => 21, + 'N' => 22, + 'O' => 35, + 'P' => 23, + 'Q' => 24, + 'T' => 27, + 'U' => 28, + 'V' => 29, + 'W' => 32, + 'X' => 30, + 'Z' => 33 + ); + + /** + * @see https://zh.wikipedia.org/wiki/%E4%B8%AD%E8%8F%AF%E6%B0%91%E5%9C%8B%E5%9C%8B%E6%B0%91%E8%BA%AB%E5%88%86%E8%AD%89 + */ + public static $idDigitValidator = array(1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1); + protected static $maleNameFormats = array( '{{lastName}}{{firstNameMale}}', ); @@ -129,4 +162,40 @@ class Person extends \Faker\Provider\Person { return ''; } + + /** + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * + * @see https://en.wikipedia.org/wiki/National_Identification_Card_(Republic_of_China) + * + * @return string Length 10 alphanumeric characters, begins with 1 latin character (birthplace), + * 1 number (gender) and then 8 numbers (the last one is check digit). + */ + public function personalIdentityNumber($gender = null) + { + $birthPlace = self::randomKey(self::$idBirthplaceCode); + $birthPlaceCode = self::$idBirthplaceCode[$birthPlace]; + + $gender = ($gender != null) ? $gender : self::randomElement(array(self::GENDER_FEMALE, self::GENDER_MALE)); + $genderCode = ($gender === self::GENDER_MALE) ? 1 : 2; + + $randomNumberCode = self::randomNumber(7, true); + + $codes = str_split($birthPlaceCode . $genderCode . $randomNumberCode); + $total = 0; + + foreach ($codes as $key => $code) { + $total += $code * self::$idDigitValidator[$key]; + } + + $checkSumDigit = 10 - ($total % 10); + + if ($checkSumDigit == 10) { + $checkSumDigit = 0; + } + + $id = $birthPlace . $genderCode . $randomNumberCode . $checkSumDigit; + + return $id; + } } diff --git a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php index ea34445..887d12b 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php +++ b/api/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php @@ -15,85 +15,787 @@ class Text extends \Faker\Provider\Text protected static $notBeginPunct = array('、', '。', '」', '』', '!', '?', 'ー', ',', ':', ';'); /** - * Title: 三國演義 Romance of the Three Kingdoms - * Author: 羅貫中 Luo Guanzhong + * Title: 吶喊 Call to Arms (1922) + * Author: 魯迅 Lu Xun * Language: Traditional Chinese - * - * @see http://cls.hs.yzu.edu.tw/san/bin/body.asp?CHNO=001 + * @see https://zh.wikisource.org/wiki/%E5%90%B6%E5%96%8A * @var string */ protected static $baseText = <<<'EOT' -第一回:宴桃園豪傑三結義,斬黃巾英雄首立功 -詞曰:滾滾長江東逝水,浪花淘盡英雄。是非成敗轉頭空:青山依舊在,幾度夕陽紅。白髮漁樵江渚上,慣看秋月春風。一壺濁酒喜相逢:古今多少事, -都付笑談中。話說天下大勢,分久必合,合久必分:周末七國分爭,并入於秦。及秦滅之後,楚、漢分爭,又并入於漢。漢朝自高祖斬白蛇而起義,一統天下。 -後來光武中興,傳至獻帝,遂分為三國。推其致亂之由,殆始於桓、靈二帝。桓帝禁錮善類,崇信宦官。及桓帝崩,靈帝即位,大將軍竇武、太傅陳蕃,共相輔佐。 -時有宦官曹節等弄權,竇武、陳蕃謀誅之,作事不密,反為所害。中涓自此愈橫。建寧二年四月望日,帝御溫德殿。方陞座,殿角狂風驟起,只見一條大青蛇, -從梁上飛將下來,蟠於椅上。帝驚倒,左右急救入宮,百官俱奔避。須臾,蛇不見了。忽然大雷大雨,加以冰雹,落到半夜方止,壞卻房屋無數。建寧四年二月, -洛陽地震;又海水泛溢,沿海居民,盡被大浪捲入海中。光和元年,雌雞化雄。六月朔,黑氣十餘丈,飛入溫德殿中。秋七月,有虹見於玉堂;五原山岸, -盡皆崩裂。種種不祥,非止一端。帝下詔問群臣以災異之由,議郎蔡邕上疏,以為蜺墮雞化,乃婦寺干政之所致,言頗切直。帝覽奏歎息,因起更衣。 -曹節在後竊視,悉宣告左右,遂以他事陷邕於罪,放歸田里。後張讓,趙忠,封諝,段珪,曹節,候覽,蹇碩,程曠,夏惲,郭勝十人朋比為奸,號為「十常侍」。 -帝尊信張讓,呼為「阿父」,朝政日非,以致天下人心思亂,盜賊蜂起。時鉅鹿郡有兄弟三人:一名張角,一名張寶,一名張梁。那張角本是個不第秀才。 -因入山採藥,遇一老人,碧眼童顏,手執藜杖,喚角至一洞中,以天書三卷授之,曰:「此名太平要術。汝得之,當代天宣化,普救世人;若萌異心,必獲惡報。」 -角拜問姓名。老人曰:「吾乃南華老仙也。」言訖,化陣清風而去。角得此書,曉夜攻習,能呼風喚雨,號為太平道人。中平元年正月內,疫氣流行, -張角散施符水,為人治病,自稱大賢良師。角有徒弟五百餘人,雲游四方,皆能書符念咒。次後徒眾日多,角乃立三十六方,ー大方萬餘人,小方六七千ー, -各立渠帥,稱為將軍。訛言「蒼天已死,黃天當立。」又云「歲在甲子,天下大吉。」令人各以白土,書「甲子」二字於家中大門上。青、幽、徐、冀、荊、揚、 -兗、豫八州之人,家家侍奉大賢良師張角名字。角遣其黨馬元義,暗齎金帛,結交中涓封諝,以為內應。角與二弟商議曰:「至難得者,民心也。今民心已順, -若不乘勢取天下,誠為可惜。」遂一面私造黃旗,約期舉事;一面使弟子唐州,馳書報封諝。唐州乃逕赴省中告變。帝召大將軍何進調兵擒馬元義,斬之; -次收封諝等一干人下獄。張角聞知事露,星夜舉兵,自稱天公將軍,ー張寶稱地公將軍,張梁稱人公將軍ー。申言於眾曰:「今漢運將終,大聖人出; -汝等皆宜順從天意,以槳太平。」四方百姓,裹黃巾從張角反者,四五十萬。賊勢浩大,官軍望風而靡。何進奏帝火速降詔,令各處備禦,討賊立功; -一面遣中郎將盧植,皇甫嵩,朱雋,各引精兵,分三路討之。且說張角一軍,前犯幽州界分。幽州太守劉焉,乃江夏竟陵人氏,漢魯恭王之後也; -當時聞得賊兵將至,召校尉鄒靖計議。靖曰:「賊兵眾,我兵寡,明公宜作速招軍應敵。」劉焉然其說,隨即出榜招募義兵。榜文行到涿縣, -乃引出涿縣中一個英雄。那人不甚好讀書;性寬和,寡言語,喜怒不形於色;素有大志,專好結交天下豪傑;生得身長七尺五寸,兩耳垂肩,雙手過膝, -目能自顧其耳,面如冠玉,脣若塗脂;中山靖王劉勝之後,漢景帝閣下玄孫;姓劉,名備,字玄德。昔劉勝之子劉貞,漢武時封涿鹿亭侯,後坐酬金失侯, -因此遺這一枝在涿縣。玄德祖劉雄,父劉弘。弘曾舉孝廉,亦嘗作吏,早喪。玄德幼孤,事母至孝;家貧,販屨織蓆為業。家住本縣樓桑村。其家之東南, -有一大桑樹,高五丈餘,遙望之,童童如車蓋。相者云:「此家必出貴人。」玄德幼時,與鄉中小兒戲於樹下,曰:「我為天子,當乘此車蓋。」 -叔父劉元起奇其言,曰:「此兒非常人也!」因見玄德家貧,常資給之。年十五歲,母使游學,嘗師事鄭玄、盧植;與公孫瓚等為友。及劉焉發榜招軍時, -玄德年己二十八歲矣。當日見了榜文,慨然長歎。隨後一人厲聲言曰:「大丈夫不與國家出力,何故長歎?」玄德回視其人:身長八尺,豹頭環眼,燕頷虎鬚, -聲若巨雷,勢如奔馬。玄德見他形貌異常,問其姓名。其人曰:「某姓張,名飛,字翼德。世居涿郡,頗有莊田,賣酒屠豬,專好結交天下豪傑。 -適纔見公看榜而歎,故此相問。」玄德曰:「我本漢室宗親,姓劉,名備。今聞黃巾倡亂,有志欲破賊安民;恨力不能,故長歎耳。」飛曰:「吾頗有資財, -當招募鄉勇,與公同舉大事,如何?」玄德甚喜,遂與同入村店中飲酒。正飲間,見一大漢,推著一輛車子,到店門首歇了;入店坐下,便喚酒保:「快斟酒來吃, -我待趕入城去投軍。」玄德看其人:身長九尺,髯長二尺:面如重棗,脣若塗脂;丹鳳眼,臥蠶眉:相貌堂堂,威風凜凜。玄德就邀他同坐,叩其姓名。 -其人曰:「吾姓關,名羽,字壽長,後改雲長,河東解良人也。因本處勢豪,倚勢凌人,被吾殺了;逃難江湖,五六年矣。今聞此處招軍破賊,特來應募。」 -玄德遂以己志告之。雲長大喜。同到張飛莊上,共議大事。飛曰:「吾莊後有一桃園,花開正盛;明日當於園中祭告天地,我三人結為兄弟,協力同心, -然後可圖大事。」玄德、雲長、齊聲應曰:「如此甚好。」次日,於桃園中,備下烏牛白馬祭禮等項,三人焚香,再拜而說誓曰:「念劉備、關羽、張飛, -雖然異姓,既結為兄弟,則同心協力,救困扶危;上報國家,下安黎庶;不求同年同月同日生,但願同年同月同日死。皇天后土,實鑒此心。背義忘恩, -天人共戮。」誓畢,拜玄德為兄,關羽次之,張飛為弟。祭罷天地,復宰牛設酒,聚鄉中勇士,得三百餘人,就桃園中痛飲一醉。來日收拾軍器,但恨無馬匹可乘。 -正思慮間,人報「有兩個客人,引一夥伴儅,趕一群馬,投莊上來。」玄德曰:「此天佑我也!」三人出莊迎接。原來二客乃中山大商:一名張世平,一名蘇雙, -每年往北販馬,近因寇發而回。玄德請二人到莊,置酒管待,訴說欲討賊安民之意。二客大喜,願將良馬五十匹相送;又贈金銀五百兩,鑌鐵一千斤,以資器用。 -玄德謝別二客,便命良匠打造雙股劍。雲長造青龍偃月刀,又名冷豔鋸,重八十二斤。張飛造丈八點鋼矛。各置全身鎧甲。共聚鄉勇五百餘人,來見鄒靖。 -鄒靖引見太守劉焉。三人參見畢,各通姓名。玄德說起宗派,劉焉大喜,遂認玄德為姪。不數日,人報黃巾賊將程遠志統兵五萬來犯涿郡。 -劉焉令鄒靖引玄德等三人,統兵五百,前去破敵。玄德等欣然領軍前進,直至大興山下,與賊相見。賊眾皆披髮,以黃巾抹額。當下兩軍相對,玄德出馬, -ー左有雲長,右有翼德ー,揚鞭大罵:「反國逆賊,何不早降!」程遠志大怒,遣副將鄧茂出戰。張飛挺丈八蛇矛直出,手起處,刺中鄧茂心窩,翻身落馬。 -程遠志見折了鄧茂,拍馬舞刀,直取張飛。雲長舞動大刀,縱馬飛迎。程遠志見了,早吃一驚;措手不及,被雲長刀起處,揮為兩段。 -後人有詩讚二人曰:英雄發穎在今朝,一試矛兮一試刀。初出便將威力展,三分好把姓名標。眾賊見程遠志被斬,皆倒戈而走。玄德揮軍追趕,投降者不計其數, -大勝而回。劉焉親自迎接,賞勞軍士。次日,接得青州太守龔景牒文,言黃巾賊圍城將陷,乞賜救援。劉焉與玄德商議。玄德曰:「備願往救之。」 -劉焉令鄒靖將兵五千,同玄德,關,張,投青州來。賊眾見救軍至,分兵混戰。玄德兵寡不勝,退三十里下寨。玄德謂關、張曰、「賊眾我寡,必出奇兵, -方可取勝。」乃分關公引一千軍伏山左,張飛引一千軍伏山右,鳴金為號,齊出接應。次日,玄德與鄒靖,引軍鼓譟而進。賊眾迎戰,玄德引軍便退。 -賊眾乘勢追趕,方過山嶺,玄德軍中一齊鳴金,左右兩軍齊出,玄德麾軍回身復殺。三路夾攻,賊眾大潰。直趕至青州城下,太守龔景亦率民兵出城助戰。 -賊勢大敗,剿戮極多,遂解青州之圍。後人有詩讚玄德曰:運籌決算有神功,二虎還須遜一龍。初出便能垂偉績,自應分鼎在孤窮。龔景犒軍畢,鄒靖欲回。 -玄德曰:「近聞中郎將盧植與賊首張角戰於廣宗,備昔曾師事盧植,欲往助之。」於是鄒靖引軍自回,玄德與關、張引本部五百人投廣宗來。至盧植軍中, -入帳施禮,具道來意。盧植大喜,留在帳前聽調。時張角賊眾十五萬,植兵五萬,相拒於廣宗,未見勝負。植謂玄德曰:「我今圍賊在此,賊弟張梁,張寶在潁川, -與皇甫嵩、朱雋對壘。汝可引本部人馬,我更助汝一千官軍,前去潁川打探消息,約期剿捕。」玄德領命,引軍星夜投潁川來。時皇甫嵩、朱雋領軍拒賊, -賊戰不利,退入長社,依草結營。嵩與雋計曰:「賊依草結營,當用火攻之。」遂令軍士,每人束草一把,暗地埋伏。其夜大風忽起。二更以後,一齊縱火, -嵩與雋各引兵攻擊賊寨,火燄張天,賊眾驚慌,馬不及鞍,人不及甲,四散奔走。殺到天明,張梁、張寶引敗殘軍士,奪路而走。忽見一彪軍馬,盡打紅旗, -當頭來到,截往去路。為首閃出一將,身長七尺,細眼長髯;官拜騎都尉;沛國譙郡人也:姓曹,名操,字孟德。操父曹嵩,本姓夏侯氏;因為中常侍曹騰之養子, -故冒姓曹。曹嵩生操,小字阿瞞,一名吉利。操幼時,好游獵,喜歌舞;有權謀,多機變。操有叔父,見操游蕩無度,嘗怒之,言於曹嵩。嵩責操。 -操忽心生一計:見叔父來,詐倒於地,作中風之狀。叔父驚告嵩,嵩急視之,操故無恙。嵩曰:「叔言汝中風,今己愈乎?」操曰:「兒自來無此病; -因失愛於叔父,故見罔耳。」嵩信其言。後叔父但言操過,嵩並不聽。因此,操得恣意放蕩。時人有橋玄者,謂操曰:「天下將亂,非命世之才,不能濟。 -能安之者,其在君乎?」南陽何顒見操,言:「漢室將亡,安天下者,必此人也。」汝南許劭,有知人之名。操往見之,問曰:「我何如人?」劭不答。 -又問,劭曰:「子治世之能臣,亂世之奸雄也。」操聞言大喜。年二十,舉孝廉,為郎,除洛陽北都尉。初到任,即設五色棒十餘條於縣之四門。有犯禁者, -不避豪貴,皆責之。中常侍蹇碩之叔,提刀夜行,操巡夜拏住,就棒責之。由是,內外莫敢犯者,威名頗震。後為頓丘令。因黃巾起,拜為騎都尉,引馬步軍五千, -前來潁川助戰。正值張梁、張寶敗走,曹操攔住,大殺一陣,斬首萬餘級,奪得旗旛、金鼓馬匹極多。張梁、張寶死戰得脫。操見過皇甫嵩,朱雋, -隨即引兵追襲張梁、張寶去了。卻說玄德引關、張來潁川,聽得喊殺之聲,又望見火光燭天,急引兵來時,賊已敗散。玄德見皇甫嵩,朱雋,其道盧植之意。 -嵩曰:「張梁、張寶勢窮力乏,必投廣宗去依張角。玄德可即星夜往助。」玄德領命,遂引兵復回。到得半路,只見一簇軍馬,護送一輛檻車,車中之囚, -乃盧植也。玄德大驚,滾鞍下馬,問其緣故。植曰:「我圍張角,將次可破;因角用妖術,未能即勝。朝廷差黃門左豐前來體探,問我索取賄賂。 -我答曰:『軍糧尚缺,安有餘錢奉承天使?』左豐挾恨,回奏朝廷,說我高壘不戰,惰慢軍心;因此朝廷震怒,遣中郎將董卓來代將我兵,取我回京問罪。」 -張飛聽罷,大怒,要斬護送軍人,以救盧植。玄德急止之曰:「朝廷自有公論,汝豈可造次?」軍士簇擁盧植去了。關公曰:「盧中郎已被逮,別人領兵, -我等去無所依,不如且回涿郡。」玄德從其言,遂引軍北行。行無二日,忽聞山後喊聲大震。玄德引關、張縱馬上高岡望之,見漢軍大敗,後面漫山塞野, -黃巾蓋地而來,旗上大書「天公將軍」。玄德曰:「此張角也!可速戰!」三人飛馬引軍而出。張角正殺敗董卓,乘勢趕來,忽遇三人衝殺,角軍大亂, -敗走五十餘里。三人救了董卓回寨。卓問三人現居何職。玄德曰:「白身。」卓甚輕之,不為禮。玄德出,張飛大怒曰:「我等親赴血戰,救了這廝, -他卻如此無禮;若不殺之,難消我氣!」便要提刀入帳來殺董卓。正是:人情勢利古猶今,誰識英雄是白身?安得快人如翼德,盡誅世上負心人! -畢竟董卓性命如何,且看下文分解。 +我在年青時候也曾經做過許多夢,後來大半忘卻了,但自己也並不以爲可惜。所謂回憶者,雖說可以使人歡欣,有時也不免使人寂寞,使精神的絲縷還牽著已逝的寂寞的時光,又有什麼意味呢,而我偏苦于不能全忘卻,這不能全忘的一部分,到現在便成了《吶喊》的來由。 +我有四年多,曾經常常,——幾乎是每天,出入于質鋪和藥店裏,年紀可是忘卻了,總之是藥店的櫃臺正和我一樣高,質鋪的是比我高一倍,我從一倍高的櫃臺外送上衣服或首飾去,在侮蔑裡接了錢,再到一樣高的櫃臺上給我久病的父親去買藥。回家之後,又須忙別的事了,因爲開方的醫生是最有名的,以此所用的藥引也奇特:冬天的蘆根,經霜三年的甘蔗,蟋蟀要原對的,結子的平地木,……多不是容易辦到的東西。然而我的父親終于日重一日的亡故了。 +有誰從小康人家而墜入困頓的麼,我以爲在這途路中,大概可以看見世人的真面目;我要到N進K學堂去了,仿佛是想走異路,逃異地,去尋求別樣的人們。我的母親沒有法,辦了八元的川資,說是由我的自便;然而伊哭了,這正是情理中的事,因爲那時讀書應試是正路,所謂學洋務,社會上便以爲是一種走投無路的人,只得將靈魂賣給鬼子,要加倍的奚落而且排斥的,而況伊又看不見自己的兒子了。然而我也顧不得這些事,終于到N去進了K學堂了,在這學堂裏,我纔知道世上還有所謂格致,算學,地理,歷史,繪圖和體操。生理學並不教,但我們卻看到些木版的《全體新論》和《化學衛生論》之類了。我還記得先前的醫生的議論和方藥,和現在所知道的比較起來,便漸漸的悟得中醫不過是一種有意的或無意的騙子,同時又很起了對于被騙的病人和他的家族的同情;而且從譯出的歷史上,又知道了日本維新是大半發端于西方醫學的事實。 +因爲這些幼稚的知識,後來便使我的學籍列在日本一個鄉間的醫學專門學校裏了。我的夢很美滿,預備卒業回來,救治像我父親似的被誤的病人的疾苦,戰爭時候便去當軍醫,一面又促進了國人對于維新的信仰。我已不知道教授微生物學的方法,現在又有了怎樣的進步了,總之那時是用了電影,來顯示微生物的形狀的,因此有時講義的一段落已完,而時間還沒有到,教師便映些風景或時事的畫片給學生看,以用去這多餘的光陰。其時正當日俄戰爭的時候,關于戰事的畫片自然也就比較的多了,我在這一個講堂中,便須常常隨喜我那同學們的拍手和喝采。有一回,我竟在畫片上忽然會見我久違的許多中國人了,一個綁在中間,許多站在左右,一樣是強壯的體格,而顯出麻木的神情。據解說,則綁著的是替俄國做了軍事上的偵探,正要被日軍砍下頭顱來示衆,而圍著的便是來賞鑑這示衆的盛舉的人們。 +這一學年沒有完畢,我已經到了東京了,因爲從那一回以後,我便覺得醫學並非一件緊要事,凡是愚弱的國民,卽使體格如何健全,如何茁壯,也只能做毫無意義的示衆的材料和看客,病死多少是不必以爲不幸的。所以我們的第一要著,是在改變他們的精神,而善于改變精神的是,我那時以爲當然要推文藝,于是想提倡文藝運動了。在東京的留學生很有學法政理化以至警察工業的,但沒有人治文學和美術;可是在冷淡的空氣中,也幸而尋到幾個同志了,此外又邀集了必須的幾個人,商量之後,第一步當然是出雜誌,名目是取“新的生命”的意思,因爲我們那時大抵帶些復古的傾向,所以只謂之《新生》。 +《新生》的出版之期接近了,但最先就隱去了若干擔當文字的人,接着又逃走了資本,結果只剩下不名一錢的三個人。創始時候旣已背時,失敗時候當然無可吿語,而其後卻連這三個人也都爲各自的運命所驅策,不能在一處縱談將來的好夢了,這就是我們的並未產生的《新生》的結局。 +我感到未嘗經驗的無聊,是自此以後的事。我當初是不知其所以然的;後來想,凡有一人的主張,得了贊和,是促其前進的,得了反對,是促其奮鬭的,獨有叫喊于生人中,而生人並無反應,既非贊同,也無反對,如置身毫無邊際的荒原,無可措手的了,這是怎樣的悲哀呵,我于是以我所感到者爲寂寞。 +這寂寞又一天一天的長大起來,如大毒蛇,纏住了我的靈魂了。 +然而我雖然自有無端的悲哀,卻也並不憤懣,因爲這經驗使我反省,看見自己了:就是我決不是一個振臂一呼應者雲集的英雄。 +只是我自己的寂寞是不可不驅除的,因爲這于我太痛苦。我于是用了種種法,來麻醉自己的靈魂,使我沈入于國民中,使我回到古代去,後來也親歷或旁觀過幾樣更寂寞更悲哀的事,都爲我所不願追懷,甘心使他們和我的腦一同消滅在泥土裏的,但我的麻醉法卻也似乎已經奏了功,再沒有青年時候的慷慨激昂的意思了。 +S會館裏有三間屋,相傳是往昔曾在院子裏的槐樹上縊死過一個女人的,現在槐樹已經高不可攀了,而這屋還沒有人住;許多年,我便寓在這屋裏鈔古碑。客中少有人來,古碑中也遇不到什麼問題和主義,而我的生命卻居然暗暗的消去了,這也就是我惟一的願望。夏夜,蚊子多了,便搖著蒲扇坐在槐樹下,從密葉縫裡看那一點一點的青天,晚出的槐蠶又每每冰冷的落在頭頸上。 +那時偶或來談的是一個老朋友金心異,將手提的大皮夾放在破桌上,脫下長衫,對面坐下了,因爲怕狗,似乎心房還在怦怦的跳動。 +“你鈔了這些有什麼用?”有一夜,他翻著我那古碑的鈔本,發了研究的質問了。“沒有什麼用。”“那麼,你鈔他是什麼意思呢?”“沒有什麼意思。”“我想,你可以做點文章……” +我懂得他的意思了,他們正辦《新青年》,然而那時仿佛不特沒有人來贊同,並且也還沒有人來反對,我想,他們許是感到寂寞了,但是說: +“假如一間鐵屋子,是絕無窗戶而萬難破毀的,裏面有許多熟睡的人們,不久都要悶死了,然而是從昏睡入死滅,並不感到就死的悲哀。現在你大嚷起來,驚起了較爲清醒的幾個人,使這不幸的少數者來受無可挽救的臨終的苦楚,你倒以爲對得起他們麼?” +“然而幾個人旣然起來,你不能說決沒有毀壞這鐵屋的希望。” +是的,我雖然自有我的確信,然而說到希望,卻是不能抹殺的,因爲希望是在于將來,決不能以我之必無的證明,來折服了他之所謂可有,于是我終于答應他也做文章了,這便是最初的一篇《狂人日記》。從此以後,便一發而不可收,每寫些小說模樣的文章,以敷衍朋友們的囑托,積久就有了十餘篇。 +在我自己,本以爲現在是已經並非一個切迫而不能已于言的人了,但或者也還未能忘懷于當日自己的寂寞的悲哀罷,所以有時候仍不免吶喊幾聲,聊以慰藉那在寂寞裏奔馳的猛士,使他不憚于前驅。至于我的喊聲是勇猛或是悲哀,是可憎或是可笑,那倒是不暇顧及的;但旣然是吶喊,則當然須聽將令的了,所以我往往不恤用了曲筆,在《藥》的瑜兒的墳上平空添上一個花環,在《明天》裏也不敍單四嫂子竟沒有做到看見兒子的夢,因爲那時的主將是不主張消極的。至于自己,卻也並不願將自以爲苦的寂寞,再來傳染給也如我那年青時候似的正做著好夢的青年。 +這樣說來,我的小說和藝術的距離之遠,也就可想而知了,然而到今日還能蒙着小說的名,甚而至于且有成集的機會,無論如何總不能不說是一件徼幸的事,但徼幸雖使我不安于心,而懸揣人間暫時還有讀者,則究竟也仍然是高興的。 +所以我竟將我的短篇小說結集起來,而且付印了,又因爲上面所說的緣由,便稱之爲《吶喊》。 +魯鎭的酒店的格局,是和別處不同的:都是當街一個曲尺形的大櫃臺,櫃裏面豫備着熱水,可以隨時溫酒。做工的人,傍午傍晚散了工,每每花四文銅錢,買一碗酒,——這是二十多年前的事,現在每碗要漲到十文,——靠櫃外站着,熱熱的喝了休息;倘肯多花一文,便可以買一碟鹽煮筍,或者茴香豆,做下酒物了,如果出到十幾文,那就能買一樣葷菜,但這些顧客,多是短衣幫,大抵沒有這樣闊綽。只有穿長衫的,纔踱進店面隔壁的房子裏,要酒要菜,慢慢地坐喝。 +我從十二歲起,便在鎭口的咸亨酒店裏當夥計,掌櫃說,樣子太傻,怕侍候不了長衫主顧,就在外面做點事罷。外面的短衣主顧,雖然容易說話,但嘮嘮叨叨纏夾不清的也很不少。他們往往要親眼看着黃酒從罎子裏舀出,看過壺子底裏有水沒有,又親看將壺子放在熱水裏,然後放心:在這嚴重監督下,羼水也很爲難。所以過了幾天,掌櫃又說我幹不了這事。幸虧薦頭的情面大,辭退不得,便改爲專管溫酒的一種無聊職務了。 +我從此便整天的站在櫃臺裏,專管我的職務。雖然沒有什麼失職,但總覺得有些單調,有些無聊。掌櫃是一副凶臉孔,主顧也沒有好聲氣,教人活潑不得;只有孔乙己到店,纔可以笑幾聲,所以至今還記得。 +孔乙己是站着喝酒而穿長衫的唯一的人。他身材很高大;青白臉色,皺紋間時常夾些傷痕;一部亂蓬蓬的花白的鬍子。穿的雖然是長衫,可是又髒又破,似乎十多年沒有補,也沒有洗。他對人說話,總是滿口之乎者也,教人半懂不懂的。因爲他姓孔,別人便從描紅紙上的「上大人孔乙己」這半懂不懂的話裏,替他取下一個綽號,叫作孔乙己。孔乙己一到店,所有喝酒的人便都看着他笑,有的叫道,「孔乙己,你臉上又添上新傷疤了!」他不回答,對櫃裏說,「溫兩碗酒,要一碟茴香豆。」便排出九文大錢。他們又故意的高聲嚷道,「你一定又偷了人家的東西了!」孔乙己睜大眼睛說,「你怎麼這樣憑空汚人清白……」「什麼清白?我前天親眼見你偷了何家的書,弔着打。」孔乙己便漲紅了臉,額上的青筋條條綻出,爭辯道,「竊書不能算偷……竊書!……讀書人的事,能算偷麼?」接連便是難懂的話,什麼「君子固窮」,什麼「者乎」之類,引得衆人都哄笑起來:店內外充滿了快活的空氣。 +聽人家背地裏談論,孔乙己原來也讀過書,但終于沒有進學,又不會營生;于是愈過愈窮,弄到將要討飯了。幸而寫得一筆好字,便替人家鈔鈔書,換一碗飯喫。可惜他又有一樣壞脾氣,便是好喝嬾做。坐不到幾天,便連人和書籍紙張筆硯,一齊失蹤。如是幾次,叫他鈔書的人也沒有了。孔乙己沒有法,便免不了偶然做些偷竊的事。但他在我們店裏,品行卻比別人都好,就是從不拖欠;雖然間或沒有現錢,暫時記在粉板上,但不出一月,定然還清,從粉板上拭去了孔乙己的名字。 +孔乙己喝過半碗酒,漲紅的臉色漸漸復了原,旁人便又問道,「孔乙己,你當眞認識字麼?」孔乙己看着問他的人,顯出不屑置辯的神氣。他們便接着說道,「你怎的連半個秀才也撈不到呢?」孔乙己立刻顯出頹唐不安模樣,臉上籠上了一層灰色,嘴裏說些話;這回可是全是之乎者也之類,一些不懂了。在這時候,衆人也都哄笑起來:店內外充滿了快活的空氣。 +在這些時候,我可以附和着笑,掌櫃是決不責備的。而且掌櫃見了孔乙己,也每每這樣問他,引人發笑。孔乙己自己知道不能和他們談天,便只好向孩子說話。有一回對我說道,「你讀過書麼?」我略略點一點頭。他說,「讀過書,……我便考你一考。茴香豆的茴字,怎樣寫的?」我想,討飯一樣的人,也配考我麼?便回過臉去,不再理會。孔乙己等了許久,很懇切的說道,「不能寫罷?……我教給你,記着!這些字應該記着。將來做掌櫃的時候,寫賬要用。」我暗想我和掌櫃的等級還很遠呢,而且我們掌櫃也從不將茴香豆上賬;又好笑,又不耐煩,嬾嬾的答他道,「誰要你教,不是草頭底下一個來回的回字麼?」孔乙己顯出極高興的樣子,將兩個指頭的長指甲敲着櫃臺,點頭說,「對呀對呀!……回字有四樣寫法,你知道麼?」我愈不耐煩了,努着嘴走遠。孔乙己剛用指甲蘸了酒,想在櫃上寫字,見我毫不熱心,便又歎一口氣,顯出極惋惜的樣子。 +有幾回,鄰舍孩子聽得笑聲,也趕熱鬧,圍住了孔乙己。他便給他們茴香豆喫,一人一顆。孩子喫完豆,仍然不散,眼睛都望着碟子。孔乙己着了慌,伸開五指將碟子罩住,彎腰下去說道,「不多了,我已經不多了。」直起身又看一看豆,自己搖頭說,「不多不多!多乎哉?不多也。」於是這一羣孩子都在笑聲裏走散了。 +孔乙己是這樣的使人快活,可是沒有他,別人也便這麼過。 +有一天,大約是中秋前的兩三天,掌櫃正在慢慢的結賬,取下粉板,忽然說,「孔乙己長久沒有來了。還欠十九個錢呢!」我纔也覺得他的確長久沒有來了。一個喝酒的人說道,「他怎麼會來?……他打折了腿了。」掌櫃說,「哦!」「他總仍舊是偷。這一回,是自己發昏,竟偷到丁舉人家裏去了。他家的東西,偷得的麼?」「後來怎麼樣?」「怎麼樣?先寫服辯,後來是打,打了大半夜,再打折了腿。」「後來呢?」「後來打折了腿了。」「打折了怎樣呢?」「怎樣?……誰曉得?許是死了。」掌櫃也不再問,仍然慢慢的算他的賬。 +中秋之後,秋風是一天涼比一天,看看將近初冬;我整天的靠着火,也須穿上棉襖了。一天的下半天,沒有一個顧客,我正合了眼坐着。忽然間聽得一個聲音,「溫一碗酒。」這聲音雖然極低,卻很耳熟。看時又全沒有人。站起來向外一望,那孔乙己便在櫃臺下對了門檻坐着。他臉上黑而且瘦,已經不成樣子;穿一件破夾襖,盤着兩腿,下面墊一個蒲包,用草繩在肩上掛住;見了我,又說道,「溫一碗酒。」掌櫃也伸出頭去,一面說,「孔乙己麼?你還欠十九個錢呢!」孔乙己很頹唐的仰面答道,「這……下回還清罷。這一回是現錢,酒要好。」掌櫃仍然同平常一樣,笑着對他說,「孔乙己,你又偷了東西了!」但他這回卻不十分分辯,單說了一句「不要取笑!」「取笑?要是不偷,怎麼會打斷腿?」孔乙己低聲說道,「跌斷,跌,跌……」他的眼色,很像懇求掌櫃,不要再提。此時已經聚集了幾個人,便和掌櫃都笑了。我溫了酒,端出去,放在門檻上。他從破衣袋裏摸出四文大錢,放在我手裏,見他滿手是泥,原來他便用這手走來的。不一會,他喝完酒,便又在旁人的說笑聲中,坐着用這手慢慢走去了。 +自此以後,又長久沒有看見孔乙己。到了年關,掌櫃取下粉板說,「孔乙己還欠十九個錢呢!」到第二年的端午,又說「孔乙己還欠十九個錢呢!」到中秋可是沒有說,再到年關也沒有看見他。 +我到現在終于沒有見——大約孔乙己的確死了。 +秋天的後半夜,月亮下去了,太陽還沒有出,只剩下一片烏藍的天;除了夜遊的東西,什麽都睡著。華老栓忽然坐起身,擦着火柴,點上遍身油膩的燈盞,茶館的兩間屋子裏,便彌滿了青白的光。 +「小栓的爹,你就去麽?」是一個老女人的聲音。裏邊的小屋子裏,也發出一陣咳嗽。「唔。」老栓一面聽,一面應,一面扣上衣服;伸手過去說,「你給我罷。」 +華大媽在枕頭底下掏了半天,掏出一包洋錢,交給老栓,老栓接了,抖抖的裝入衣袋,又在外面按了兩下;便點上燈籠,吹熄燈盞,走向裏屋子去了。那屋子裏面,正在窸窸窣窣的響,接著便是一通咳嗽。老栓候他平靜下去,才低低的叫道,「小栓……你不要起來。……店麽?你娘會安排的。」 +老栓聽得兒子不再說話,料他安心睡了;便出了門,走到街上。街上黑沈沈的一無所有,只有一條灰白的路,看得分明。燈光照着他的兩腳,一前一後的走。有時也遇到幾隻狗,可是一隻也沒有叫。天氣比屋子裏冷多了;老栓倒覺爽快,彷彿一旦變了少年,得了神通,有給人生命的本領似的,跨步格外高遠。而且路也愈走愈分明,天也愈走愈亮了。 +老栓正在專心走路,忽然吃了一驚,遠遠裏看見一條丁字街,明明白白橫著。他便退了幾步,尋到一家關着門的鋪子,蹩進簷下,靠門立住了。好一會,身上覺得有些發冷。「哼,老頭子。」「倒高興……。」 +老栓又喫一驚,睜眼看時,幾個人從他面前過去了。一個還回頭看他,樣子不甚分明,但很像久餓的人見了食物一般,眼裏閃出一種攫取的光。老栓看看燈籠,已經熄了。按一按衣袋,硬硬的還在。仰起頭兩面一望,只見許多古怪的人,三三兩兩,鬼似的在那裏徘徊;定睛再看,卻也看不出什麼別的奇怪。 +沒有多久,又見幾個兵,在那邊走動;衣服前後的一個大白圓圈,遠地裏也看得清楚,走過面前的,並且看出號衣上暗紅的鑲邊。——一陣腳步聲響,一眨眼,已經擁過了一大簇人。那三三兩兩的人,也忽然合作一堆,潮一般向前趕;將到丁字街口,便突然立住,簇成一個半圓。 +老栓也向那邊看,卻只見一堆人的後背;頸項都伸得很長,彷彿許多鴨,被無形的手揑住了的,向上提着。靜了一會,似乎有點聲音,便又動搖起來,轟的一聲,都向後退;一直散到老栓立着的地方,幾乎將他擠倒了。 +「喂!一手交錢,一手交貨!」一個渾身黑色的人,站在老栓面前,眼光正像兩把刀,刺得老栓縮小了一半。那人一隻大手,向他攤着;一隻手卻撮着一個鮮紅的饅頭,那紅的還是一點一點的往下滴。 +老栓慌忙摸出洋錢,抖抖的想交給他,卻又不敢去接他的東西。那人便焦急起來,嚷道,「怕什麼?怎的不拿!」老栓還躊躇着;黑的人便搶過燈籠,一把扯下紙罩,裹了饅頭,塞與老栓;一手抓過洋錢,揑一揑,轉身去了。嘴裏哼着說,「這老東西……。」 +「這給誰治病的呀?」老栓也似乎聽得有人問他,但他並不答應;他的精神,現在只在一個包上,彷彿抱着一個十世單傳的嬰兒,別的事情,都已置之度外了。他現在要將這包裏的新的生命,移植到他家裏,收穫許多幸福。太陽也出來了;在他面前,顯出一條大道,直到他家中,後面也照見丁字街頭破匾上「古口亭口」這四個黯淡的金字。 +老栓走到家,店面早經收拾乾淨,一排一排的茶桌,滑溜溜的發光。但是沒有客人;只有小栓坐在裏排的桌前吃飯,大粒的汗,從額上滾下,夾襖也帖住了脊心,兩塊肩胛骨高高凸出,印成一個陽文的「八字」。老栓見這樣子,不免皺一皺展開的眉心。他的女人,從竈下急急走出,睜着眼睛,嘴唇有些發抖。「得了麼?」「得了。」 +兩個人一齊走進竈下,商量了一會;華大媽便出去了,不多時,拏着一片老荷葉回來,攤在桌上。老栓也打開燈籠罩,用荷葉重新包了那紅的饅頭。小栓也吃完飯,他的母親慌忙說:「小栓——你坐着,不要到這裏來。」一面整頓了竈火,老栓便把一個碧綠的包,一個紅紅白白的破燈籠,一同塞在竈裏;一陣紅黑的火焰過去時,店屋裏散滿了一種奇怪的香味。 +「好香!你們吃什麼點心呀?」這是駝背五少爺到了。這人每天總在茶館裏過日,來得最早,去得最遲,此時恰恰蹩到臨街的壁角的桌邊,便坐下問話,然而沒有人答應他。「炒米粥麽?」仍然沒有人應。老栓匆匆走出,給他泡上茶。 +「小栓進來罷!」華大媽叫小栓進了裏面的屋子,中間放好一條凳,小栓坐了。他的母親端過一碟烏黑的圓東西,輕輕說:——「喫下去罷,——病便好了。」 +小栓撮起這黑東西,看了一會,似乎拏着自己的性命一般,心裏說不出的奇怪。十分小心的拗開了,焦皮裏面竄出一道白氣,白氣散了,是兩半個白麵的饅頭。——不多工夫,已經全在肚裏了,卻全忘了什麼味;面前只剩下一張空盤。他的旁邊,一面立着他的父親,一面立着他的母親,兩人的眼光,都彷彿要在他身裏注進什麽又要取出什麽似的;便禁不住心跳起來,按着胸膛,又是一陣咳嗽。 +「睡一會罷,——便好了。」 +小栓依他母親的話,咳着睡了。華大媽候他喘氣平靜,才輕輕的給他蓋上了滿幅補釘的夾被。 +店裏坐着許多人,老栓也忙了,提着大銅壺,一趟一趟的給客人沖茶;兩個眼眶,都圍着一圈黑線。 +「老栓,你有些不舒服麽?——你生病麽?」一個花白鬍子的人說。「沒有。」 +「沒有?——我想笑嘻嘻的,原也不像……」花白鬍子便取消了自己的話。 +「老栓只是忙。要是他的兒子……」駝背五少爺話還未完,突然闖進了一個滿臉橫肉的人,披一件玄色布衫,散着紐扣,用很寬的玄色腰帶,胡亂捆在腰間。剛進門,便對老栓嚷道: +「吃了麽?好了麽?老栓,就是運氣了你!你運氣,要不是我信息靈……。」 +老栓一手提了茶壺,一手恭恭敬敬的垂着;笑嘻嘻的聽。滿座的人,也都恭恭敬敬的聽。華大媽也黑着眼眶,笑嘻嘻的送出茶碗茶葉來,加上一個橄欖,老栓便去沖了水。 +「這是包好!這是與眾不同的。你想,趁熱的拏來,趁熱吃下。」橫肉的人只是嚷。 +「真的呢,要沒有康大叔照顧,怎麽會這樣……」華大媽也很感激的謝他。 +「包好,包好!這樣的趁熱吃下。這樣的人血饅頭,什麽癆病都包好!」 +華大媽聽到「癆病」這兩個字,變了一點臉色,似乎有些不高興;但又立刻堆上笑,搭訕着走開了。這康大叔卻沒有覺察,仍然提高了喉嚨只是嚷,嚷得裏面睡着的小栓也合夥咳嗽起來。 +「原來你家小栓碰到了這樣的好運氣了。這病自然一定全好;怪不得老栓整天的笑着呢。」花白鬍子一面說,一面走到康大叔面前,低聲下氣的問道,「康大叔——聽說今天結果的一個犯人,便是夏家的孩子,那是誰的孩子?究竟是什麼事?」 +「誰的?不就是夏四奶奶的兒子麽?那個小傢伙!」康大叔見眾人都聳起耳朵聽他,便格外高興,橫肉塊塊飽綻,越發大聲說,「這小東西不要命,不要就是了。我可是這一回一點沒有得到好處;連剝下來的衣服,都給管牢的紅眼睛阿義拏去了。——第一要算我們栓叔運氣;第二是夏三爺賞了二十五兩雪白的銀子,獨自落腰包,一文不花。」 +小栓慢慢的從小屋子裏走出,兩手按了胸口,不住的咳嗽;走到竈下,盛出一碗冷飯,泡上熱水,坐下便吃。華大媽跟着他走,輕輕的問道,「小栓,你好些麽?——你仍舊只是肚餓?……」 +「包好,包好!」康大叔瞥了小栓一眼,仍然回過臉,對眾人說,「夏三爺真是乖角兒,要是他不先告官,連他滿門抄斬。現在怎樣?銀子!——這小東西也真不成東西!關在牢裏,還要勸牢頭造反。」 +「阿呀,那還了得。」坐在後排的一個二十多歲的人,很現出氣憤模樣。 +「你要曉得紅眼睛阿義是去盤盤底細的,他卻和他攀談了。他說:這大清的天下是我們大家的。你想:這是人話麽?紅眼睛原知道他家裏只有一個老娘,可是沒有料到他竟會那麽窮,搾不出一點油水,已經氣破肚皮了。他還要老虎頭上搔癢,便給他兩個嘴巴!」 +「義哥是一手好拳棒,這兩下,一定夠他受用了。」壁角的駝背忽然高興起來。 +「他這賤骨頭打不怕,還要說可憐可憐哩。」 +花白鬍子的人說,「打了這種東西,有什麽可憐呢?」 +康大叔顯出看他不上的樣子,冷笑着說,「你沒有聽清我的話;看他神氣,是說阿義可憐哩!」 +聽着的人的眼光,忽然有些板滯;話也停頓了。小栓已經吃完飯,吃得滿身流汗,頭上都冒出蒸氣來。 +「阿義可憐——瘋話,簡直是發了瘋了。」花白鬍子恍然大悟似的說。 +「發了瘋了。」二十多歲的人也恍然大悟的說。 +店裏的坐客,便又現出活氣,談笑起來。小栓也趁着熱鬧,拚命咳嗽;康大叔走上前,拍他肩膀說: +「包好!小栓——你不要這麼咳。包好!」 +「瘋了。」駝背五少爺點着頭說。 +西關外靠着城根的地面,本是一塊官地;中間歪歪斜斜一條細路,是貪走便道的人,用鞋底造成的,但卻成了自然的界限。路的左邊,都埋着死刑和瘐斃的人,右邊是窮人的叢塚。兩面都已埋到層層疊疊,宛然闊人家裏祝壽時候的饅頭。 +這一年的清明,分外寒冷;楊柳才吐出半粒米大的新芽。天明未久,華大媽已在右邊的一坐新墳前面,排出四碟菜,一碗飯,哭了一場。化過紙,呆呆的坐在地上;彷彿等候什麽似的,但自己也說不出等候什麽。微風起來,吹動他短髮,確乎比去年白得多了。 +小路上又來了一個女人,也是半白頭髮,襤褸的衣裙;提一個破舊的朱漆圓籃,外掛一串紙錠,三步一歇的走。忽然見華大媽坐在地上看他,便有些躊躇,慘白的臉上,現出些羞愧的顏色;但終於硬着頭皮,走到左邊的一坐墳前,放下了籃子。 +那墳與小栓的墳,一字兒排着,中間只隔一條小路。華大媽看他排好四碟菜,一碗飯,立着哭了一通,化過紙錠;心裏暗暗地想,「這墳裏的也是兒子了。」那老女人徘徊觀望了一回,忽然手腳有些發抖,蹌蹌踉踉退下幾步,瞪着眼只是發怔。 +華大媽見這樣子,生怕他傷心到快要發狂了;便忍不住立起身,跨過小路,低聲對他說,「你這位老奶奶不要傷心了,——我們還是回去罷。」 +那人點一點頭,眼睛仍然向上瞪着;也低聲吃吃的說道,「你看,——看這是什麽呢?」 +華大媽跟了他指頭看去,眼光便到了前面的墳,這墳上草根還沒有全合,露出一塊一塊的黃土,煞是難看。再往上仔細看時,卻不覺也吃一驚;——分明有一圈紅白的花,圍着那尖圓的墳頂。 +他們的眼睛都已老花多年了,但望這紅白的花,卻還能明白看見。花也不很多,圓圓的排成一個圈,不很精神,倒也整齊。華大媽忙看他兒子和別人的墳,卻只有不怕冷的幾點青白小花,零星開着;便覺得心裏忽然感到一種不足和空虛,不願意根究。那老女人又走近幾步,細看了一遍,自言自語的說,「這沒有根,不像自己開的。——這地方有誰來呢?孩子不會來玩;——親戚本家早不來了。——這是怎麼一回事呢?」他想了又想,忽又流下淚來,大聲說道: +「瑜兒,他們都冤枉了你,你還是忘不了,傷心不過,今天特意顯點靈,要我知道麽?」他四面一看,只見一隻烏鴉,站在一株沒有葉的樹上,便接着說,「我知道了。——瑜兒,可憐他們坑了你,他們將來總有報應,天都知道;你閉了眼睛就是了。——你如果真在這裏,聽到我的話,——便教這烏鴉飛上你的墳頂,給我看罷。」 +微風早經停息了;枯草支支直立,有如銅絲。一絲發抖的聲音,在空氣中愈顫愈細,細到沒有,周圍便都是死一般靜。兩人站在枯草叢裏,仰面看那烏鴉;那烏鴉也在筆直的樹枝間,縮着頭,鐵鑄一般站著。 +許多的工夫過去了;上墳的人漸漸增多,幾個老的小的,在土墳間出沒。 +華大媽不知怎的,似乎卸下了一挑重擔,便想到要走;一面勸着說,「我們還是回去罷。」 +那老女人嘆一口氣,無精打采的收起飯菜;又遲疑了一刻,終於慢慢地走了。嘴裏自言自語的說,「這是怎麼一回事呢?……」 +他們走不上二三十步遠,忽聽得背後「啞——」的一聲大叫;兩個人都竦然的回過頭,只見那烏鴉張開兩翅,一挫身,直向着遠處的天空,箭也似的飛去了。 +住在我們後進院子裏的三太太,在夏間買了一對白兔,是給伊的孩子們看的。 +這一對白兔,似乎離娘並不久,雖然是異類,也可以看出他們的天真爛熳來。但也豎直了小小的通紅的長耳朵,動著鼻子,眼睛裏頗現些驚疑的神色,大約究竟覺得人地生疏,沒有在老家時候的安心了。這種東西,倘到廟會日期自己出去買,每個至多不過兩弔錢,而三太太卻花了一元,因為是叫小使上店買來的。 +孩子們自然大得意了,嚷著圍住了看;大人也都圍著看;還有一匹小狗名叫S的也跑來,闖過去一嗅,打了一個噴嚏,退了幾步。三太太吆喝道,「S,聽著,不准你咬他!」於是在他頭上打了一拳,S便退開了,從此並不咬。 +這一對兔總是關在後窗後面的小院子裏的時候多,聽說是因為太喜歡撕壁紙,也常常啃木器腳。這小院子裏有一株野桑樹,桑子落地,他們最愛吃,便連喂他們的菠菜也不吃了。烏鴉喜鵲想要下來時,他們便躬著身子用後腳在地上使勁的一彈,砉的一聲直跳上來,像飛起了一團雪,鴉鵲嚇得趕緊走,這樣的幾回,再也不敢近來了。三太太說,鴉鵲到不打緊,至多也不過搶吃一點食料,可惡的是一匹大黑貓,常在矮牆上惡狠狠的看,這卻要防的,幸而S和貓是對頭,或者還不至於有什麼罷。 +孩子們時時捉他們來玩耍;他們很和氣,豎起耳朵,動著鼻子,馴良的站在小手的圈子裏,但一有空,卻也就溜開去了。他們夜裏的臥榻是一個小木箱,裏面鋪些稻草,就在後窗的房檐下。 +這樣的幾個月之後,他們忽而自己掘土了,掘得非常快,前腳一抓,後腳一踢,不到半天,已經掘成一個深洞。大家都奇怪,後來仔細看時,原來一個的肚子比別一個的大得多了。他們第二天便將乾草和樹葉銜進洞裏去,忙了大半天。 +大家都高興,說又有小兔可看了;三太太便對孩子們下了戒嚴令,從此不許再去捉。我的母親也很喜歡他們家族的繁榮,還說待生下來的離了乳,也要去討兩匹來養在自己的窗外面。 +他們從此便住在自造的洞府裏,有時也出來吃些食,後來不見了,可不知道他們是預先運糧存在裏面呢還是竟不吃。過了十多天,三太太對我說,那兩匹又出來了,大約小兔是生下來又都死掉了,因為雌的一匹的奶非常多,卻並不見有進去哺養孩子的形跡。伊言語之間頗氣憤,然而也沒有法。 +有一天,太陽很溫暖,也沒有風,樹葉都不動,我忽聽得許多人在那裏笑,尋聲看時,卻見許多人都靠著三太太的後窗看:原來有一個小兔,在院子裏跳躍了。這比他的父母買來的時候還小得遠,但也已經能用後腳一彈地,迸跳起來了。孩子們爭著告訴我說,還看見一個小兔到洞口來探一探頭,但是即刻便縮回去了,那該是他的弟弟罷。 +那小的也撿些草葉吃,然而大的似乎不許他,往往夾口的搶去了,而自己並不吃。孩子們笑得響,那小的終於吃驚了,便跳著鑽進洞裏去;大的也跟到洞門口,用前腳推著他的孩子的脊樑,推進之後,又爬開泥土來封了洞。 +從此小院子裏更熱鬧,窗口也時時有人窺探了。 +然而竟又全不見了那小的和大的。這時是連日的陰天,三太太又慮到遭了那大黑貓的毒手的事去。我說不然,那是天氣冷,當然都躲著,太陽一齣,一定出來的。 +太陽出來了,他們卻都不見。於是大家就忘卻了。 +惟有三太太是常在那裏喂他們菠菜的,所以常想到。伊有一回走進窗後的小院子去,忽然在牆角發見了一個別的洞,再看舊洞口,卻依稀的還見有許多爪痕。這爪痕倘說是大兔的,爪該不會有這樣大,伊又疑心到那常在牆上的大黑貓去了,伊於是也就不能不定下發掘的決心了。伊終於出來取了鋤子,一路掘下去,雖然疑心,卻也希望著意外的見了小白兔的,但是待到底,卻只見一堆爛草夾些兔毛,怕還是臨蓐時候所鋪的罷,此外是冷清清的,全沒有什麼雪白的小兔的蹤跡,以及他那隻一探頭未出洞外的弟弟了。 +氣憤和失望和淒涼,使伊不能不再掘那牆角上的新洞了。一動手,那大的兩匹便先竄出洞外面。伊以為他們搬了家了,很高興,然而仍然掘,待見底,那裏面也鋪著草葉和兔毛,而上面卻睡著七個很小的兔,遍身肉紅色,細看時,眼睛全都沒有開。 +一切都明白了,三太太先前的預料果不錯。伊為預防危險起見,便將七個小的都裝在木箱中,搬進自己的房裏,又將大的也捺進箱裏面,勒令伊去哺乳。 +三太太從此不但深恨黑貓,而且頗不以大兔為然了。據說當初那兩個被害之先,死掉的該還有,因為他們生一回,決不至於只兩個,但為了哺乳不勻,不能爭食的就先死了。這大概也不錯的,現在七個之中,就有兩個很瘦弱。所以三太太一有閑空,便捉住母兔,將小兔一個一個輪流的擺在肚子上來喝奶,不准有多少。 +母親對我說,那樣麻煩的養兔法,伊歷來連聽也未曾聽到過,恐怕是可以收入《無雙譜》的。 +白兔的家族更繁榮;大家也又都高興了。 +但自此之後,我總覺得淒涼。夜半在燈下坐著想,那兩條小性命,竟是人不知鬼不覺的早在不知什麼時候喪失了,生物史上不著一些痕跡,並S也不叫一聲。我於是記起舊事來,先前我住在會館裏,清早起身,只見大槐樹下一片散亂的鴿子毛,這明明是膏於鷹吻的了,上午長班來一打掃,便什麼都不見,誰知道曾有一個生命斷送在這裏呢?我又曾路過西四牌樓,看見一匹小狗被馬車軋得快死,待回來時,什麼也不見了,搬掉了罷,過往行人憧憧的走著,誰知道曾有一個生命斷送在這裏呢?夏夜,窗外面,常聽到蒼蠅的悠長的吱吱的叫聲,這一定是給蠅虎咬住了,然而我向來無所容心於其間,而別人並且不聽到…… +假使造物也可以責備,那麼,我以為他實在將生命造得太濫了,毀得太濫了。 +嗥的一聲,又是兩條貓在窗外打起架來。「迅兒!你又在那裏打貓了?」「不,他們自己咬。他那裏會給我打呢。」 +我的母親是素來很不以我的虐待貓為然的,現在大約疑心我要替小兔抱不平,下什麼辣手,便起來探問了。而我在全家的口碑上,卻的確算一個貓敵。我曾經害過貓,平時也常打貓,尤其是在他們配合的時候。但我之所以打的原因並非因為他們配合,是因為他們嚷,嚷到使我睡不著,我以為配合是不必這樣大嚷而特嚷的。 +況且黑貓害了小兔,我更是「師出有名」的了。我覺得母親實在太修善,於是不由的就說出模棱的近乎不以為然的答話來。 +造物太胡鬧,我不能不反抗他了,雖然也許是倒是幫他的忙…… +那黑貓是不能久在矮牆上高視闊步的了,我決定的想,於是又不由的一瞥那藏在書箱裏的一瓶青酸鉀。 +我在倒數上去的二十年中,只看過兩回中國戲,前十年是絕不看,因為沒有看戲的意思和機會,那兩回全在後十年,然而都沒有看出什麼來就走了。 +第一回是民國元年我初到北京的時候,當時一個朋友對我說,北京戲最好,你不去見見世面麽?我想,看戲是有味的,而況在北京呢。於是都興緻勃勃的跑到什麼園,戲文已經開場了,在外面也早聽到鼕鼕地響。我們挨進門,幾個紅的綠的在我的眼前一閃爍,便又看見戲臺下滿是許多頭,再定神四面看,卻見中間也還有幾個空座,擠過去要坐時,又有人對我發議論,我因為耳朵已經喤的響著了,用了心,纔聽到他是說「有人,不行!」。 +我們退到後面,一個辮子很光的卻來領我們到了側面,指出一個地位來。這所謂地位者,原來是一條長凳,然而他那坐板比我的上腿要狹到四分之三,他的腳比我的下腿要長過三分之二。我先是沒有爬上去的勇氣,接著便聯想到私刑拷打的刑具,不由的毛骨悚然的走出了。 +走了許多路,忽聽得我的朋友的聲音道,「究竟怎的?」我回過臉去,原來他也被我帶出來了。他很詫異的說,「怎麼總是走,不答應?」我說,「朋友,對不起,我耳朵只在鼕鼕喤喤的響,並沒有聽到你的話。」 +後來我每一想到,便很以為奇怪,似乎這戲太不好,——否則便是我近來在戲臺下不適於生存了。 +第二回忘記了那一年,總之是募集湖北水災捐而譚叫天還沒有死。捐法是兩元錢買一張戲票,可以到第一舞臺去看戲,扮演的多是名角,其一就是小叫天。我買了一張票,本是對於勸募人聊以塞責的,然而似乎又有好事家乘機對我說了些叫天不可不看的大法要了。我於是忘了前幾年的鼕鼕喤喤之災,竟到第一舞臺去了,但大約一半也因為重價購來的寶票,總得使用了纔舒服。我打聽得叫天出臺是遲的,而第一舞臺卻是新式構造,用不著爭座位,便放了心,延宕到九點鐘纔去,誰料照例,人都滿了,連立足也難,我只得擠在遠處的人叢中看一個老旦在臺上唱。那老旦嘴邊插著兩個點火的紙撚子,旁邊有一個鬼卒,我費盡思量,纔疑心他或者是目連的母親,因為後來又出來了一個和尚。然而我又不知道那名角是誰,就去問擠小在我的左邊的一位胖紳士。他很看不起似的斜瞥了我一眼,說道, 「龔雲甫!」我深愧淺陋而且粗疏,臉上一熱,同時腦裡也制出了決不再問的定章,於是看小旦唱,看花旦唱,看老生唱,看不知什麼角色唱,看一大班人亂打,看兩三個人互打,從九點多到十點,從十點到十一點,從十一點到十一點半,從十一點半到十二點,——然而叫天竟還沒有來。 +我向來沒有這樣忍耐的等待過什麼事物,而況這身邊的胖紳士的吁吁的喘氣,這臺上的鼕鼕喤喤的敲打,紅紅綠綠的晃蕩,加之以十二點,忽而使我省誤到在這裡不適於生存了。我同時便機械的擰轉身子,用力往外只一擠,覺得背後便已滿滿的,大約那彈性的胖紳士早在我的空處胖開了他的右半身了。我後無迴路,自然擠而又擠,終於出了大門。街上除了專等看客的車輛之外,幾乎沒有什麼行人了,大門口卻還有十幾個人昂著頭看戲目,別有一堆人站著並不看什麼,我想:他們大概是看散戲之後出來的女人們的,而叫天卻還沒有來…… +然而夜氣很清爽,真所謂「沁人心脾」,我在北京遇著這樣的好空氣,仿佛這是第一遭了。 +這一夜,就是我對於中國戲告了別的一夜,此後再沒有想到他,即使偶而經過戲園,我們也漠不相關,精神上早已一在天之南一在地之北了。 +但是前幾天,我忽在無意之中看到一本日本文的書,可惜忘記了書名和著者,總之是關於中國戲的。其中有一篇,大意仿佛說,中國戲是大敲,大叫,大跳,使看客頭昏腦眩,很不適於劇場,但若在野外散漫的所在,遠遠的看起來,也自有他的風致。我當時覺著這正是說了在我意中而未曾想到的話,因為我確記得在野外看過很好的戲,到北京以後的連進兩回戲園去,也許還是受了那時的影響哩。可惜我不知道怎麼一來,竟將書名忘卻了。 +至於我看好戲的時候,卻實在已經是「遠哉遙遙」的了,其時恐怕我還不過十一二歲。我們魯鎮的習慣,本來是凡有出嫁的女兒,倘自己還未當家,夏間便大抵回到母家去消夏。那時我的祖母雖然還康建,但母親也已分擔了些家務,所以夏期便不能多日的歸省了,只得在掃墓完畢之後,抽空去住幾天,這時我便每年跟了我的母親住在外祖母的家裡。那地方叫平橋村,是一個離海邊不遠,極偏僻的,臨河的小村莊;住戶不滿三十家,都種田,打魚,只有一家很小的雜貨店。但在我是樂土:因為我在這裡不但得到優待,又可以免念「秩秩斯乾幽幽南山」了。 +和我一同玩的是許多小朋友,因為有了遠客,他們也都從父母那裡得了減少工作的許可,伴我來遊戲。在小村裡,一家的客,幾乎也就是公共的。我們年紀都相仿,但論起行輩來,卻至少是叔子,有幾個還是太公,因為他們合村都同姓,是本家。然而我們是朋友,即使偶而吵鬧起來,打了太公,一村的老老少少,也決沒有一個會想出「犯上」這兩個字來,而他們也百分之九十九不識字。 +我們每天的事情大概是掘蚯蚓,掘來穿在銅絲做的小鉤上,伏在河沿上去釣蝦。蝦是水世界裡的呆子,決不憚用了自己的兩個鉗捧著鉤尖送到嘴裡去的,所以不半天便可以釣到一大碗。這蝦照例是歸我吃的。其次便是一同去放牛,但或者因為高等動物了的緣故罷,黃牛水牛都欺生,敢於欺侮我,因此我也總不敢走近身,只好遠遠地跟著,站著。這時候,小朋友們便不再原諒我會讀「秩秩斯干」,卻全都嘲笑起來了。 +至於我在那裡所第一盼望的,卻在到趙莊去看戲。趙莊是離平橋村五里的較大的村莊;平橋村太小,自己演不起戲,每年總付給趙莊多少錢,算作合做的。當時我並不想到他們為什麼年年要演戲。現在想,那或者是春賽,是社戲了。 +就在我十一二歲時候的這一年,這日期也看看等到了。不料這一年真可惜,在早上就叫不到船。平橋村只有一隻早出晚歸的航船是大船,決沒有留用的道理。其餘的都是小船,不合用;央人到鄰村去問,也沒有,早都給別人定下了。外祖母很氣惱,怪家裡的人不早定,絮叨起來。母親便寬慰伊,說我們魯鎮的戲比小村裡的好得多,一年看幾回,今天就算了。只有我急得要哭,母親卻竭力的囑咐我,說萬不能裝模裝樣,怕又招外祖母生氣,又不准和別人一同去,說是怕外祖母要擔心。 +總之,是完了。到下午,我的朋友都去了,戲已經開場了,我似乎聽到鑼鼓的聲音,而且知道他們在戲臺下買豆漿喝。 +這一天我不釣蝦,東西也少吃。母親很為難,沒有法子想。到晚飯時候,外祖母也終於覺察了,並且說我應當不高興,他們太怠慢,是待客的禮數裡從來沒有的。吃飯之後,看過戲的少年們也都聚攏來了,高高興興的來講戲。只有我不開口;他們都嘆息而且表同情。忽然間,一個最聰明的雙喜大悟似的提議了,他說,「大船?八叔的航船不是回來了麽?」十幾個別的少年也大悟,立刻攛掇起來,說可以坐了這航船和我一同去。我高興了。然而外祖母又怕都是孩子,不可靠;母親又說是若叫大人一同去,他們白天全有工作,要他熬夜,是不合情理的。在這遲疑之中,雙喜可又看出底細來了,便又大聲的說道,「我寫包票!船又大;迅哥兒向來不亂跑;我們又都是識水性的!」 +誠然!這十多個少年,委實沒有一個不會鳧水的,而且兩三個還是弄潮的好手。 +外祖母和母親也相信,便不再駁回,都微笑了。我們立刻一哄的出了門。 +我的很重的心忽而輕鬆了,身體也似乎舒展到說不出的大。一出門,便望見月下的平橋內泊著一隻白篷的航船,大家跳下船,雙喜拔前篙,阿發拔後篙,年幼的都陪我坐在艙中,較大的聚在船尾。母親送出來吩咐「要小心」的時候,我們已經點開船,在橋石上一磕,退後幾尺,即又上前出了橋。於是架起兩支櫓,一支兩人,一里一換,有說笑的,有嚷的,夾著潺潺的船頭激水的聲音,在左右都是碧綠的豆麥田地的河流中,飛一般徑向趙莊前進了。 +兩岸的豆麥和河底的水草所發散出來的清香,夾雜在水氣中撲面的吹來;月色便朦朧在這水氣裡。淡黑的起伏的連山,仿佛是踴躍的鐵的獸脊似的,都遠遠的向船尾跑去了,但我卻還以為船慢。他們換了四回手,漸望見依稀的趙莊,而且似乎聽到歌吹了,還有幾點火,料想便是戲臺,但或者也許是漁火。 +那聲音大概是橫笛,宛轉,悠揚,使我的心也沉靜,然而又自失起來,覺得要和他彌散在含著豆麥蘊藻之香的夜氣裡。 +那火接近了,果然是漁火;我纔記得先前望見的也不是趙莊。那是正對船頭的一叢松柏林,我去年也曾經去遊玩過,還看見破的石馬倒在地下,一個石羊蹲在草裡呢。過了那林,船便彎進了叉港,於是趙莊便真在眼前了。 +最惹眼的是屹立在莊外臨河的空地上的一座戲臺,模胡在遠處的月夜中,和空間幾乎分不出界限,我疑心畫上見過的仙境,就在這裡出現了。這時船走得更快,不多時,在臺上顯出人物來,紅紅綠綠的動,近臺的河裡一望烏黑的是看戲的人家的船篷。 +「近臺沒有什麼空了,我們遠遠的看罷。」阿發說。 +這時船慢了,不久就到,果然近不得台旁,大家只能下了篙,比那正對戲臺的神棚還要遠。其實我們這白篷的航船,本也不願意和烏篷的船在一處,而況沒有空地呢…… +在停船的匆忙中,看見臺上有一個黑的長鬍子的背上插著四張旗,捏著長槍,和一群赤膊的人正打仗。雙喜說,那就是有名的鐵頭老生,能連翻八十四個筋斗,他日裡親自數過的。 +我們便都擠在船頭上看打仗,但那鐵頭老生卻又並不翻筋斗,只有幾個赤膊的人翻,翻了一陣,都進去了,接著走出一個小旦來,咿咿呀呀的唱。雙喜說,「晚上看客少,鐵頭老生也懈了,誰肯顯本領給白地看呢?」我相信這話對,因為其時臺下已經不很有人,鄉下人為了明天的工作,熬不得夜,早都睡覺去了,疏疏朗朗的站著的不過是幾十個本村和鄰村的閑漢。烏篷船裡的那些土財主的家眷固然在,然而他們也不在乎看戲,多半是專到戲臺下來吃糕餅水果和瓜子的。所以簡直可以算白地。 +然而我的意思卻也並不在乎看翻筋斗。我最願意看的是一個人蒙了白布,兩手在頭上捧著一支棒似的蛇頭的蛇精,其次是套了黃布衣跳老虎。但是等了許多時都不見,小旦雖然進去了,立刻又出來了一個很老的小生。我有些疲倦了,託桂生買豆漿去。他去了一刻,回來說,「沒有。賣豆漿的聾子也回去了。日裡倒有,我還喝了兩碗呢。現在去舀一瓢水來給你喝罷。」 +我不喝水,支撐著仍然看,也說不出見了些什麼,只覺得戲子的臉都漸漸的有些稀奇了,那五官漸不明顯,似乎融成一片的再沒有什麼高低。年紀小的幾個多打呵欠了,大的也各管自己談話。忽而一個紅衫的小丑被綁在臺柱子上,給一個花白鬍子的用馬鞭打起來了,大家纔又振作精神的笑著看。在這一夜裡,我以為這實在要算是最好的一折。 +然而老旦終於出臺了。老旦本來是我所最怕的東西,尤其是怕他坐下了唱。這時候,看見大家也都很掃興,纔知道他們的意見是和我一致的。那老旦當初還只是踱來踱去的唱,後來竟在中間的一把交椅上坐下了。我很擔心;雙喜他們卻就破口喃喃的罵。我忍耐的等著,許多工夫,只見那老旦將手一抬,我以為就要站起來了,不料他卻又慢慢的放下在原地方,仍舊唱。全船裡幾個人不住的吁氣,其餘的也打起哈欠來。雙喜終於熬不住了,說道,怕他會唱到天明還不完,還是我們走的好罷。大家立刻都贊成,和開船時候一樣踴躍,三四人徑奔船尾,拔了篙,點退幾丈,迴轉船頭,駕起櫓,罵著老旦,又向那松柏林前進了。 +月還沒有落,仿佛看戲也並不很久似的,而一離趙莊,月光又顯得格外的皎潔。回望戲臺在燈火光中,卻又如初來未到時候一般,又漂渺得像一座仙山樓閣,滿被紅霞罩著了。吹到耳邊來的又是橫笛,很悠揚;我疑心老旦已經進去了,但也不好意思說再回去看。 +不多久,松柏林早在船後了,船行也並不慢,但周圍的黑暗只是濃,可知已經到了深夜。他們一面議論著戲子,或罵,或笑,一面加緊的搖船。這一次船頭的激水聲更其響亮了,那航船,就像一條大白魚背著一群孩子在浪花裡躥,連夜漁的幾個老漁父,也停了艇子看著喝采起來。 +離平橋村還有一里模樣,船行卻慢了,搖船的都說很疲乏,因為太用力,而且許久沒有東西吃。這回想出來的是桂生,說是羅漢豆正旺相,柴火又現成,我們可以偷一點來煮吃。大家都贊成,立刻近岸停了船;岸上的田裡,烏油油的都是結實的羅漢豆。 +「阿阿,阿發,這邊是你家的,這邊是老六一家的,我們偷那一邊的呢?」雙喜先跳下去了,在岸上說。 +我們也都跳上岸。阿發一面跳,一面說道,「且慢,讓我來看一看罷,」他於是往來的摸了一回,直起身來說道,「偷我們的罷,我們的大得多呢。」一聲答應,大家便散開在阿發家的豆田裡,各摘了一大捧,拋入船艙中。雙喜以為再多偷,倘給阿發的娘知道是要哭罵的,於是各人便到六一公公的田裡又各偷了一大捧。 +我們中間幾個年長的仍然慢慢的搖著船,幾個到後艙去生火,年幼的和我都剝豆。不久豆熟了,便任憑航船浮在水面上,都圍起來用手撮著吃。吃完豆,又開船,一面洗器具,豆莢豆殼全拋在河水裡,什麼痕跡也沒有了。雙喜所慮的是用了八公公船上的鹽和柴,這老頭子很細心,一定要知道,會罵的。然而大家議論之後,歸結是不怕。他如果罵,我們便要他歸還去年在岸邊拾去的一枝枯桕樹,而且當面叫他「八癩子」。 +「都回來了!那裡會錯。我原說過寫包票的!」雙喜在船頭上忽而大聲的說。 +我向船頭一望,前面已經是平橋。橋腳上站著一個人,卻是我的母親,雙喜便是對伊說著話。我走出前艙去,船也就進了平橋了,停了船,我們紛紛都上岸。母親頗有些生氣,說是過了三更了,怎麼回來得這樣遲,但也就高興了,笑著邀大家去吃炒米。 +大家都說已經吃了點心,又渴睡,不如及早睡的好,各自回去了。 +第二天,我向午纔起來,並沒有聽到什麼關係八公公鹽柴事件的糾葛,下午仍然去釣蝦。 +「雙喜,你們這班小鬼,昨天偷了我的豆了罷?又不肯好好的摘,蹋壞了不少。」 我抬頭看時,是六一公公棹著小船,賣了豆回來了,船肚裡還有剩下的一堆豆。 +「是的。我們請客。我們當初還不要你的呢。你看,你把我的蝦嚇跑了!」雙喜說。 +六一公公看見我,便停了楫,笑道,「請客?——這是應該的。」於是對我說, 「迅哥兒,昨天的戲可好麽?」 +我點一點頭,說道,「好。」「豆可中吃呢?」我又點一點頭,說道,「很好。」 +不料六一公公竟非常感激起來,將大拇指一翹,得意的說道,「這真是大市鎮裡出來的讀過書的人纔識貨!我的豆種是粒粒挑選過的,鄉下人不識好歹,還說我的豆比不上別人的呢。我今天也要送些給我們的姑奶奶嘗嘗去……」他於是打著楫子過去了。 +待到母親叫我回去吃晚飯的時候,桌上便有一大碗煮熟了的羅漢豆,就是六一公公送給母親和我吃的。聽說他還對母親極口誇獎我,說「小小年紀便有見識,將來一定要中狀元。姑奶奶,你的福氣是可以寫包票的了。」但我吃了豆,卻並沒有昨夜的豆那麼好。 +真的,一直到現在,我實在再沒有吃到那夜似的好豆,——也不再看到那夜似的好戲了。 +方玄綽近來愛說「差不多」這一句話,幾乎成了「口頭禪」似的;而且不但說,的確也盤據在他腦裏了。他最初說的是「都一樣」,後來大約覺得欠穩當了,便改為「差不多」,一直使用到現在。 +他自從發見了這一句平凡的警句以後,雖然引起了不少的新感慨,同時卻也到許多新慰安。譬如看見老輩威壓青年,在先是要憤憤的,但現在卻就轉念道,將來這少年有了兒孫時,大抵也要擺這架子的罷,便再沒有什麼不平了。又如看見兵士打車夫,在先也要憤憤的,但現在也就轉念道,倘使這車夫當了兵,這兵拉了車,大抵也就這麼打,便再也不放在心上了。他這樣想著的時候,有時也疑心是因為自己沒有和惡社會奮鬥的勇氣,所以瞞心昧己的故意造出來的一條逃路,很近於「無是非之心」,遠不如改正了好。然而這意見總反而在他腦裏生長起來。 +他將這「差不多說」最初公表的時候是在北京首善學校的講堂上,其時大概是提起關於歷史上的事情來,於是說到「古今人不相遠」,說到各色人等的「性相近」,終於牽扯到學生和官僚身上,大發其議論道: +「現在社會上時髦的都通行罵官僚,而學生罵得尤利害。然而官僚並不是天生的特別種族,就是平民變就的。現在學生出身的官僚就不少,和老官僚有什麼兩樣呢?『易地則皆然』,思想言論舉動豐采都沒有什麼大區別……便是學生團體新辦的許多事業,不是也已經難免出弊病,大半煙消火滅了麽?差不多的。但中國將來之可慮就在此……」 +散坐在講堂裏的二十多個聽講者,有的悵然了,或者是以為這話對;有的勃然了,大約是以為侮辱了神聖的青年;有幾個卻對他微笑了,大約以為這是他替自己的辯解:因為方玄綽就是兼做官僚的。 +而其實卻是都錯誤。這不過是他的一種新不平;雖說不平,又只是他的一種安分的空論。他自己雖然不知道是因為懶,還是因為無用,總之覺得是一個不肯運動,十分安分守己的人。總長冤他有神經病,只要地位還不至於動搖,他決不開一開口;教員的薪水欠到大半年了,只要別有官俸支持,他也決不開一開口。不但不開口,當教員聯合索薪的時候,他還暗地裏以為欠斟酌,太嚷嚷;直到聽得同寮過分的奚落他們了,這纔略有些小感慨,後來一轉念,這或者因為自己正缺錢,而別的官並不兼做教員的緣故罷,於是就釋然了。 +他雖然也缺錢,但從沒有加入教員的團體內,大家議決罷課,可是不去上課了。政府說「上了課纔給錢」,他纔略恨他們的類乎用果子耍猴子;一個大教育家說道「教員一手挾書包一手要錢不高尚」,他纔對於他的太太正式的發牢騷了。 +「喂,怎麼只有兩盤?」聽了「不高尚說」這一日的晚餐時候,他看著菜蔬說。 +他們是沒有受過新教育的,太太並無學名或雅號,所以也就沒有什麼稱呼了,照老例雖然也可以叫「太太」但他又不願意太守舊,於是就發明瞭一個「喂」字。太太對他卻連「喂」字也沒有,只要臉向著他說話,依據習慣法,他就知道這話是對他而發的。 +「可是上月領來的一成半都完了……昨天的米,也還是好容易纔賒來的呢。」伊站在桌旁臉對著他說。 +「你看,還說教書的要薪水是卑鄙哩。這種東西似乎連人要吃飯,飯要米做,米要錢買這一點粗淺事情都不知道……」 +「對啦。沒有錢怎麼買米,沒有米怎麼煮……」 +他兩頰都鼓起來了,仿佛氣惱這答案正和他的議論「差不多」,近乎隨聲附和模樣;接著便將頭轉向別一面去了,依據習慣法,這是宣告討論中止的表示。 +待到淒風冷雨這一天,教員們因為向政府去索欠薪,在新華門前爛泥裏被國軍打得頭破血出之後,倒居然也發了一點薪水。方玄綽不費舉手之勞的領了錢,酌還些舊債,卻還缺一大筆款,這是因為官俸也頗有些拖欠了。當是時,便是廉吏清官們也漸以為薪之不可不索,而況兼做教員的方玄綽,自然更表同情於學界起來,所以大家主張繼續罷課的時候,他雖然仍未到場,事後卻尤其心悅誠服的確守了公共的決議。 +然而政府竟又付錢,學校也就開課了。但在前幾天,卻有學生總會上一個呈文給政府,說「教員倘若不上課,便要付欠薪。」這雖然並無效,而方玄綽卻忽而記起前回政府所說的「上了課纔給錢」的話來,「差不多」這一個影子在他眼前又一幌,而且並不消滅,於是他便在講堂上公表了。 +準此,可見如果將「差不多說」鍛煉羅織起來,自然也可以判作一種挾帶私心的不平,但總不能說是專為自己做官的辯解。只是每到這些時,他又常常喜歡拉上中國將來的命運之類的問題,一不小心,便連自己也以為是一個憂國的志士;人們是每苦於沒有「自知之明」的。 +但是「差不多」的事實又發生了,政府當初雖只不理那些招人頭痛的教員,後來竟不理到無關痛癢的官吏,欠而又欠,終於逼得先前鄙薄教員要錢的好官,也很有幾員化為索薪大會裏的驍將了。惟有幾種日報上卻很發了些鄙薄譏笑他們的文字。方玄綽也毫不為奇,毫不介意,因為他根據了他的「差不多說」,知道這是新聞記者還未缺少潤筆的緣故,萬一政府或是闊人停了津貼,他們多半也要開大會的。 +他既已表同情於教員的索薪,自然也贊成同寮的索俸,然而他仍安坐在衙門中,照例的並不一同去討債。至於有人疑心他孤高,那可也不過是一種誤解罷了。他自己說,他是自從出世以來,只有人向他來要債,他從沒有向人去討過債,所以這一端是「非其所長」。而且他是不敢見手握經經濟之權的人物,這種人待到失了權勢之後,捧著一本《大乘起信論》講佛學的時候,固然也很是「藹然可親」的了,但還在寶座上時,卻總是一副閻王臉,將別人都當奴才看自以為手操著你們這些窮小子們的生殺之權。他因此不敢見,也不願見他們。這種脾氣,雖然有時連自己也覺得是孤高,但往往同時也疑心這其實是沒本領。 +大家左索右索,總自一節一節的挨過去了,但比起先前來,方玄綽究竟是萬分的拮据,所以使用的小廝和交易的店家不消說,便是方太太對於他也漸漸的缺了敬意,只要看伊近來不很附和,而且常常提出獨創的意見,有些唐突的舉動,也就可以瞭然了。到了陰曆五月初四的午前,他一回來,伊便將一疊賬單塞在他的鼻子跟前,這也是往常所沒有的。 +「一總總得一百八十塊錢纔夠開消……發了麽?」伊並不對著他看的說。 +「哼,我明天不做官了。錢的支票是領來的了,可是索薪大會的代表不發放,先說是沒有同去的人都不發,後來又說是要到他們跟前去親領。他們今天單捏著支票,就變了閻王臉了,我實在怕看見……我錢也不要了,官也不做了,這樣無限量的卑屈……」 +方太太見了這少見的義憤,倒有些愕然了,但也就沉靜下來。 +「我想,還不如去親領罷,這算什麼呢。」伊看著他的臉說。 +「我不去!這是官俸,不是賞錢,照例應該由會計科送來的。」 +「可是不送來又怎麼好呢……哦,昨夜忘記說了,孩子們說那學費,學校裏已經催過好幾次了,說是倘若再不繳……」 +「胡說!做老子的辦事教書都不給錢,兒子去念幾句書倒要錢?」 +伊覺得他已經不很顧忌道理,似乎就要將自己當作校長來出氣,犯不上,便不再言語了。 +兩個默默的吃了午飯。他想了一會,又懊惱的出去了。 +照舊例,近年是每逢節根或年關的前一天,他一定須在夜裏的十二點鐘纔回家,一面走,一面掏著懷中,一面大聲的叫道,「喂,領來了!」於是遞給伊一疊簇新的中交票,臉上很有些得意的形色。誰知道初四這一天卻破了例,他不到七點鐘便回家來。方太太很驚疑,以為他竟已辭了職了,但暗暗地察看他臉上,卻也並不見有什麼格外倒運的神情。「怎麼了?……這樣早?……」伊看定了他說。「發不及了,領不出了,銀行已經關了門,得等初八。」「親領?……」伊惴惴的問。 +「親領這一層也已經取消了,聽說仍舊由會計科分送。可是銀行今天已經關了門,休息三天,得等到初八的上午。」他坐下,眼睛看著地面了,喝過一口茶,纔又慢慢的開口說,「幸而衙門裏也沒有什麼問題了,大約到初八就準有錢……向不相干的親戚朋友去借錢,實在是一件煩難事。我午後硬著頭皮去尋金永生,談了一會,他先恭維我不去索薪,不肯親領,非常之清高,一個人正應該這樣做;待到知道我想要向他通融五十元,就像我在他嘴裏塞了一大把鹽似的,凡有臉上可以打皺的地迫都打起皺來,說房租怎樣的收不起,買賣怎樣的賠本,在同事面前親身領款,也不算什麼的,即刻將我支使出來了。」 +「這樣緊急的節根,誰還肯借出錢去呢。」方太太卻只淡淡的說,並沒有什麼慨然。 +方玄綽低下頭來了,覺得這也無怪其然的,況且自己和金永生本來很疏遠。他接著就記起去年年關的事來,那時有一個同鄉來借十塊錢,他其時明明已經收到了衙門的領款憑單的了,因為死怕這人將來未必會還錢,便裝了副為難的神色,說道衙門裏既然領不到俸錢,學校裏又不發薪水,實在「愛莫能助」,將他空手送走了。他雖然自已並不看見裝了怎樣的臉,但此時卻覺得很局促,嘴唇微微一動,又搖一搖頭。 +然而不多久,他忽而恍然大悟似的發命令了:叫小廝即刻上街去賒一瓶蓮花白。他知道店家希圖明天多還帳,大抵是不敢不賒的,假如不賒,則明天分文不還,正是他們應得的懲罰。蓮花白竟賒來了,他喝了兩杯,青白色的臉上泛了紅,吃完飯,又頗有些高興了,他點上一枝大號哈德門香煙,從桌上抓起一本《嘗試集》來,躺在床上就要看。 +「那麼明天怎麼對付店家呢?」方太太追上去,站在床面前看著他的臉說。「店家?……教他們初八的下半天來。」「我可不能這麼說。他們不相信,不答應的。」「有什麼不相信。他們可以問去,全衙門裏什麼人也沒有領到,都得初八!」他戟著第二個指頭在帳子裏的空中畫了一個半圓,方太太跟著指頭也看了一個半圓,只見這手便去翻開了《嘗試集》。 +方太太見他強橫到出乎情理之外了,也暫時開不得口。 +「我想,這模樣是鬧不下去的,將來總得想點法,做點什麼別的事……」伊終於尋到了別的路,說。「什麼法呢?我『文不像謄錄生,武不像救火兵』,別的做什麼?」「你不是給上海的書鋪子做過文章麽?」 +「上海的書鋪子?買稿要一個一個的算字,空格不算數。你看我做在那裏的白話詩去,空白有多少,怕只值三百大錢一本罷。收版權稅又半年六月沒消息,『遠水救不得近火』,誰耐煩。」「那麼,給這裏的報館裏……」 +「給報館裏?便在這裏很大的報館裏,我靠著一個學生在那裏做編輯的大情面,一千字也就是這幾個錢,即使一早做到夜,能夠養活你們麽?況且我肚子裏也沒有這許多文章。」 +「那麼,過了節怎麼辦呢?」「過了節麽?——仍舊做官……明天店家來要錢,你只要說初八的下午。」 +他又要看《嘗試集》了。方太太怕失了機會,連忙吞吞吐吐的說:「我想,過了節,到了初八,我們……倒不如去買一張彩票……」「胡說!會說出這樣無教育的……」 +這時候,他忽而又記起被金永生支使出來以後的事了。那時他惘惘的走過稻香村,看店門口豎著許多斗大的字的廣告道「頭彩幾萬元」,仿佛記得心裏也一動,或者也許放慢了腳步的罷,但似乎因為捨不得皮夾裏僅存的六角錢,所以竟也毅然決然的走遠了。他臉色一變,方太太料想他是在惱著伊的無教育,便趕緊退開,沒有說完話。方玄綽也沒有說完話,將腰一伸,咿咿嗚嗚的就念《嘗試集》。 +我冒了嚴寒,回到相隔二千餘里,別了二十餘年的故鄉去。 +時候既然是深冬;漸近故鄉時,天氣又陰晦了,冷風吹進船艙中,嗚嗚的響,從蓬隙向外一望,蒼黃的天底下,遠近橫著幾個蕭索的荒村,沒有一些活氣。我的心禁不住悲涼起來了。 +阿!這不是我二十年來時時記得的故鄉? +我所記得的故鄉全不如此。我的故鄉好得多了。但要我記起他的美麗,說出他的佳處來,卻又沒有影像,沒有言辭了。仿佛也就如此。於是我自己解釋說:故鄉本也如此,——雖然沒有進步,也未必有如我所感的悲涼,這只是我自己心情的改變罷了,因為我這次回鄉,本沒有什麼好心緒。 +我這次是專為了別他而來的。我們多年聚族而居的老屋,已經公同賣給別姓了,交屋的期限,只在本年,所以必須趕在正月初一以前,永別了熟識的老屋,而且遠離了熟識的故鄉,搬家到我在謀食的異地去。 +第二日清早晨我到了我家的門口了。瓦楞上許多枯草的斷莖當風抖著,正在說明這老屋難免易主的原因。幾房的本家大約已經搬走了,所以很寂靜。我到了自家的房外,我的母親早已迎著出來了,接著便飛出了八歲的侄兒宏兒。 +我的母親很高興,但也藏著許多淒涼的神情,教我坐下,歇息,喝茶,且不談搬家的事。宏兒沒有見過我,遠遠的對面站著只是看。 +但我們終於談到搬家的事。我說外間的寓所已經租定了,又買了幾件傢具,此外須將家裡所有的木器賣去,再去增添。母親也說好,而且行李也略已齊集,木器不便搬運的,也小半賣去了,只是收不起錢來。 +「你休息一兩天,去拜望親戚本家一回,我們便可以走了。」母親說。 +「是的。」 +「還有閏土,他每到我家來時,總問起你,很想見你一回面。我已經將你到家的大約日期通知他,他也許就要來了。」 +這時候,我的腦裡忽然閃出一幅神異的圖畫來:深藍的天空中掛著一輪金黃的圓月,下麵是海邊的沙地,都種著一望無際的碧綠的西瓜,其間有一個十一二歲的少年,項帶銀圈,手捏一柄鋼叉,向一匹猹盡力的刺去,那猹卻將身一扭,反從他的胯下逃走了。 +這少年便是閏土。我認識他時,也不過十多歲,離現在將有三十年了;那時我的父親還在世,家景也好,我正是一個少爺。那一年,我家是一件大祭祀的值年。這祭祀,說是三十多年才能輪到一回,所以很鄭重;正月裡供祖像,供品很多,祭器很講究,拜的人也很多,祭器也很要防偷去。我家只有一個忙月(我們這裡給人做工的分三種:整年給一定人家做工的叫長工;按日給人做工的叫短工;自己也種地,只在過年過節以及收租時候來給一定人家做工的稱忙月),忙不過來,他便對父親說,可以叫他的兒子閏土來管祭器的。 +我的父親允許了;我也很高興,因為我早聽到閏土這名字,而且知道他和我仿佛年紀,閏月生的,五行缺土,所以他的父親叫他閏土。他是能裝弶捉小鳥雀的。 +我於是日日盼望新年,新年到,閏土也就到了。好容易到了年末,有一日,母親告訴我,閏土來了,我便飛跑的去看。他正在廚房裡,紫色的圓臉,頭戴一頂小氈帽,頸上套一個明晃晃的銀項圈,這可見他的父親十分愛他,怕他死去,所以在神佛面前許下願心,用圈子將他套住了。他見人很怕羞,只是不怕我,沒有旁人的時候,便和我說話,於是不到半日,我們便熟識了。 +我們那時候不知道談些什麼,只記得閏土很高興,說是上城之後,見了許多沒有見過的東西。 +第二日,我便要他捕鳥。他說: +"這不能。須大雪下了才好。我們沙地上,下了雪,我掃出一塊空地來,用短棒支起一個大竹匾,撒下秕穀,看鳥雀來吃時,我遠遠地將縛在棒上的繩子只一拉,那鳥雀就罩在竹匾下了。什麼都有:稻雞,角雞,鵓鴣,藍背……" +我於是又很盼望下雪。 +閏土又對我說: +"現在太冷,你夏天到我們這裡來。我們日裡到海邊撿貝殼去,紅的綠的都有,鬼見怕也有,觀音手也有。晚上我和爹管西瓜去,你也去。" +"管賊麽?" +"不是。走路的人口渴了摘一個瓜吃,我們這裡是不算偷的。要管的是獾豬,刺蝟,猹。月亮底下,你聽,啦啦的響了,猹在咬瓜了。你便捏了胡叉,輕輕地走去……" +我那時並不知道這所謂猹的是怎麼一件東西——便是現在也沒有知道——只是無端的覺得狀如小狗而很兇猛。 +"他不人麽?" +"有胡叉呢。走到了,看見猹了,你便刺。這畜生很伶俐,倒向你奔來,反從胯下竄了。他的皮毛是油一般的滑……" +我素不知道天下有這許多新鮮事:海邊有如許五色的貝殼;西瓜有這樣危險的經歷,我先前單知道他在水果店裡出賣罷了。 +"我們沙地裡,潮汛要來的時候,就有許多跳魚兒只是跳,都有青蛙似的兩個腳……" +阿!閏土的心裡有無窮無盡的希奇的事,都是我往常的朋友所不知道的。他們不知道一些事,閏土在海邊時,他們都和我一樣只看見院子裡高牆上的四角的天空。 +可惜正月過去了,閏土須回家裡去,我急得大哭,他也躲到廚房裡,哭著不肯出門,但終於被他父親帶走了。他後來還托他的父親帶給我一包貝殼和幾支很好看的鳥毛,我也曾送他一兩次東西,但從此沒有再見面。 +現在我的母親提起了他,我這兒時的記憶,忽而全都閃電似的蘇生過來,似乎看到了我的美麗的故鄉了。我應聲說: +"這好極!他,——怎樣?……" +"他?……他景況也很不如意……"母親說著,便向房外看,"這些人又來了。說是買木器,順手也就隨便拿走的,我得去看看。" +母親站起身,出去了。門外有幾個女人的聲音。我便招宏兒走近面前,和他閑話:問他可會寫字,可願意出門。 +"我們坐火車去麽?" +"我們坐火車去。" +"船呢?" +"先坐船,……" +"哈!這模樣了!鬍子這麼長了!"一種尖利的怪聲突然大叫起來。 +我吃了一嚇,趕忙抬起頭,卻見一個凸顴骨,薄嘴唇,五十歲上下的女人站在我面前,兩手搭在髀間,沒有系裙,張著兩腳,正像一個畫圖儀器裡細腳伶仃的圓規。 +我愕然了。 +"不認識了麽?我還抱過你咧!" +我愈加愕然了。幸而我的母親也就進來,從旁說: +"他多年出門,統忘卻了。你該記得罷,"便向著我說,"這是斜對門的楊二嫂,……開豆腐店的。" +哦,我記得了。我孩子時候,在斜對門的豆腐店裡確乎終日坐著一個楊二嫂,人都叫伊"豆腐西施"⑹。但是擦著白粉,顴骨沒有這麼高,嘴唇也沒有這麼薄,而且終日坐著,我也從沒有見過這圓規式的姿勢。那時人說:因為伊,這豆腐店的買賣非常好。但這大約因為年齡的關係,我卻並未蒙著一毫感化,所以竟完全忘卻了。然而圓規很不平,顯出鄙夷的神色,仿佛嗤笑法國人不知道拿破侖,美國人不知道華盛頓似的,冷笑說: +"忘了?這真是貴人眼高……" +"那有這事……我……"我惶恐著,站起來說。 +"那麼,我對你說。迅哥兒,你闊了,搬動又笨重,你還要什麼這些破爛木器,讓我拿去罷。我們小戶人家,用得著。" +"我並有闊哩。我須賣了這些,再去……" +"阿呀呀,你放了道台了,還說不闊?你現在有三房姨太太;出門便是八抬的大轎,還說不闊?嚇,什麼都瞞不過我。" +我知道無話可說了,便閉了口,默默的站著。 +"阿呀阿呀,真是愈有錢,便愈是一毫不肯放鬆,愈是一毫不肯放鬆,便愈有錢……"圓規一面憤憤的迴轉身,一面絮絮的說,慢慢向外走,順便將我母親的一副手套塞在褲腰裡,出去了。 +此後又有近處的本家和親戚來訪問我。我一面應酬,偷空便收拾些行李,這樣的過了三四天。 +一日是天氣很冷的午後,我吃過午飯,坐著喝茶,覺得外面有人進來了,便回頭去看。我看時,不由的非常出驚,慌忙站起身,迎著走去。 +這來的便是閏土。雖然我一見便知道是閏土,但又不是我這記憶上的閏土了。他身材增加了一倍;先前的紫色的圓臉,已經變作灰黃,而且加上了很深的皺紋;眼睛也像他父親一樣,周圍都腫得通紅,這我知道,在海邊種地的人,終日吹著海風,大抵是這樣的。他頭上是一頂破氈帽,身上只一件極薄的棉衣,渾身瑟索著;手裡提著一個紙包和一支長煙管,那手也不是我所記得的紅活圓實的手,卻又粗又笨而且開裂,像是松樹皮了。 +我這時很興奮,但不知道怎麼說才好,只是說: + +"阿!閏土哥,——你來了?……" + +我接著便有許多話,想要連珠一般湧出:角雞,跳魚兒,貝殼,猹,……但又總覺得被什麼擋著似的,單在腦裡面迴旋,吐不出口外去。 + +他站住了,臉上現出歡喜和淒涼的神情;動著嘴唇,卻沒有作聲。他的態度終於恭敬起來了,分明的叫道: +"老爺!……" +我似乎打了一個寒噤;我就知道,我們之間已經隔了一層可悲的厚障壁了。我也說不出話。 +他回過頭去說,"水生,給老爺磕頭。"便拖出躲在背後的孩子來,這正是一個廿年前的閏土,只是黃瘦些,頸子上沒有銀圈罷了。"這是第五個孩子,沒有見過世面,躲躲閃閃……" +母親和宏兒樓來了,他們大約也聽到了聲音。 +"老太太。信是早收到了。我實在喜歡的不得了,知道老爺回來……"閏土說。 +"阿,你怎的這樣客氣起來。你們先前不是哥弟稱呼麽?還是照舊:迅哥兒。"母親高興的說。 +"阿呀,老太太真是……這成什麼規矩。那時是孩子,不懂事……"閏土說著,又叫水生上來打拱,那孩子卻害羞,緊緊的只貼在他背後。 +"他就是水生?第五個?都是生人,怕生也難怪的;還是宏兒和他去走走。"母親說。 +宏兒聽得這話,便來招水生,水生卻鬆鬆爽爽同他一路出去了。母親叫閏土坐,他遲疑了一回,終於就了坐,將長煙管靠在桌旁,遞過紙包來,說: +"冬天沒什麼東西了。這一點乾青豆倒是自家曬在那裡的,請老爺……" +我問問他的景況。他只是搖頭。 +"非常難。第六個孩子也會幫忙了,卻總是吃不夠……又不太平……什麼地方都要錢,沒有規定……收成又壞。種出東西來,挑去賣,總要捐幾回錢,折了本;不去賣,又只能爛掉……" +他只是搖頭;臉上雖然刻著許多皺紋,卻全然不動,仿佛石像一般。他大約只是覺得苦,卻又形容不出,沉默了片時,便拿起煙管來默默的吸煙了。 +母親問他,知道他的家裡事務忙,明天便得回去;又沒有吃過午飯,便叫他自己到廚下炒飯吃去。 +他出去了;母親和我都嘆息他的景況:多子,饑荒,苛稅,兵,匪,官,紳,都苦得他像一個木偶人了。母親對我說,凡是不必搬走的東西,盡可以送他,可以聽他自己去揀擇。 +下午,他揀好了幾件東西:兩條長桌,四個椅子,一副香爐和燭臺,一桿抬秤。他又要所有的草灰(我們這裡煮飯是燒稻草的,那灰,可以做沙地的肥料),待我們啟程的時候,他用船來載去。 +夜間,我們又談些閑天,都是無關緊要的話;第二天早晨,他就領了水生回去了。 +又過了九日,是我們啟程的日期。閏土早晨便到了,水生沒有同來,卻只帶著一個五歲的女兒管船隻。我們終日很忙碌,再沒有談天的工夫。來客也不少,有送行的,有拿東西的,有送行兼拿東西的。待到傍晚我們上船的時候,這老屋裡的所有破舊大小粗細東西,已經一掃而空了。 +我們的船向前走,兩岸的青山在黃昏中,都裝成了深黛顏色,連著退向船後梢去。 +宏兒和我靠著船窗,同看外面模糊的風景,他忽然問道: +"大伯!我們什麼時候回來?" +"回來?你怎麼還沒有走就想回來了。" +"可是,水生約我到他家玩去咧……"他睜著大的黑眼睛,癡癡的想。 +我和母親也都有些惘然,於是又提起閏土來。母親說,那豆腐西施的楊二嫂,自從我家收拾行李以來,本是每日必到的,前天伊在灰堆裡,掏出十多個碗碟來,議論之後,便定說是閏土埋著的,他可以在運灰的時候,一齊搬回家裡去;楊二嫂發見了這件事,自己很以為功,便拿了那狗氣殺(這是我們這裡養雞的器具,木盤上面有著柵欄,內盛食料,雞可以伸進頸子去啄,狗卻不能,只能看著氣死),飛也似的跑了,虧伊裝著這麼高低的小腳,竟跑得這樣快。 +老屋離我愈遠了;故鄉的山水也都漸漸遠離了我,但我卻並不感到怎樣的留戀。我只覺得我四面有看不見的高牆,將我隔成孤身,使我非常氣悶;那西瓜地上的銀項圈的小英雄的影像,我本來十分清楚,現在卻忽地模糊了,又使我非常的悲哀。 +母親和宏兒都睡著了。 +我躺著,聽船底潺潺的水聲,知道我在走我的路。我想:我竟與閏土隔絕到這地步了,但我們的後輩還是一氣,宏兒不是正在想念水生麽。我希望他們不再像我,又大家隔膜起來……然而我又不願意他們因為要一氣,都如我的辛苦展轉而生活,也不願意他們都如閏土的辛苦麻木而生活,也不願意都如別人的辛苦恣睢而生活。他們應該有新的生活,為我們所未經生活過的。 +我想到希望,忽然害怕起來了。閏土要香爐和燭臺的時候,我還暗地裡笑他,以為他總是崇拜偶像,什麼時候都不忘卻。現在我所謂希望,不也是我自己手製的偶像麽?只是他的願望切近,我的願望茫遠罷了。 +我在朦朧中,眼前展開一片海邊碧綠的沙地來,上面深藍的天空中掛著一輪金黃的圓月。我想:希望本是無所謂有,無所謂無的。這正如地上的路;其實地上本沒有路,走的人多了,也便成了路。 +臨河的土場上,太陽漸漸的收了他通黃的光線了。場邊靠河的烏桕樹葉,乾巴巴的纔喘過氣來,幾個花腳蚊子在下面哼著飛舞。面河的農家的煙突裏,逐漸減少了炊煙,女人孩子們都在自己門口的土場上波些水,放下小桌子和矮凳;人知道,這已經是晚飯的時候了。 +老人男人坐在矮凳上,搖著大芭蕉扇閑談,孩子飛也似的跑,或者蹲在烏桕樹下賭玩石子。女人端出烏黑的蒸乾菜和松花黃的米飯,熱蓬蓬冒煙。河裏駛過文人的酒船,文豪見了,大發詩興,說:「無思無慮,這真是田家樂呵!」 +但文豪的話有些不合事實,就因為他們沒有聽到九斤老太的話。這時候,九斤老太正在大怒,拿破芭蕉扇敲著凳腳說: +「我活到七十九歲了,活夠了,不願意眼見這些敗家相,——還是死的好。立刻就要喫飯了,還喫炒豆子,喫窮了一家子!」 +伊的曾孫女兒六斤捏著一把豆,正從對面跑來,見這情形,便直奔河邊,藏在烏桕樹後,伸出雙丫角的小頭,大聲說,「這老不死的!」 +九斤老太雖然高壽,耳朵卻還不很聾,但也沒有聽到孩子的話,仍舊自己說,「這真是一代不如一代!」 +這村莊的習慣有點特別,女人生下孩子,多喜歡用秤稱了輕重,便用斤數當作小名。九斤老太自從慶祝了五十大壽以後,便漸漸的變了不平家,常說伊年青的時候,天氣沒有現在這般熱,豆子也沒有現在這般硬;總之現在的時世是不對了。何況六斤比伊的曾祖,少了三斤,比伊父親七斤,又少了一斤,這真是一條顛撲不破的實例。所以伊又用勁說,「這真是一代不如一代!」 +伊的兒媳七斤嫂子正捧著飯籃走到桌邊,便將飯籃在桌上一摔,憤憤的說,「你老人家又這麼說了。六斤生下來的時候,不是六斤五兩麽?你家的秤又是私秤,加重稱,十八兩秤;用了準十六,我們的六斤該有七斤多哩。我想便是太公和公公,也不見得正是九斤八斤十足,用的秤也許是十四兩……」 +「一代不如一代!」 +七斤嫂還沒有答話,忽然看見七斤從小巷口轉出,便移了方向,對他嚷道,「你這死屍怎麼這時候纔回來,死到那裏去了!不管人家等著你開飯!」 +七斤雖然住在農村,卻早有些飛黃騰達的意思。從他的祖父到他,三代不捏鋤頭柄了;他也照例的幫人撐著航船,每日一回,早晨從魯鎮進城,傍晚又回到魯鎮,因此很知道些時事:例如什麼地方,雷公劈死了蜈蚣精;什麼地方,閨女生了一個夜叉之類。他在村人裏面,的確已經是一名出場人物了。但夏天喫飯不點燈,卻還守著農家習慣,所以回家太遲,是該罵的。 +七斤一手捏著象牙嘴白銅斗六尺多長的湘妃竹煙管,低著頭,慢慢地走來,坐在矮凳上。六斤也趁勢溜出,坐在他身邊,叫他爹爹。七斤沒有應。 +「一代不如一代!」九斤老太說。 +七斤慢慢地抬起頭來,嘆一口氣說,「皇帝坐了龍庭了。」 +七斤嫂呆了一刻,忽而恍然大悟的道,「這可好了,這不是又要皇恩大赦了麽!」 +七斤又嘆一口氣,說,「我沒有辮子。」 +「皇帝要辮子麽?」 +「皇帝要辮子。」 +「你怎麼知道呢?」七斤嫂有些著急,趕忙的問。 +「咸亨酒店裏的人,都說要的。」 +七斤嫂這時從直覺上覺得事情似乎有些不妙了,因為咸亨酒店是消息靈通的所在。伊一轉眼瞥見七斤的光頭,便忍不住動怒,怪他恨他怨他;忽然又絕望起來,裝好一碗飯,搡在七斤的面前道,「還是趕快喫你的飯罷!哭喪著臉,就會長出辮子來麽?」 +太陽收盡了他最末的光線了,水面暗暗地回覆過涼氣來;土場上一片碗筷聲響,人人的脊樑上又都吐出汗粒。七斤嫂喫完三碗飯,偶然抬起頭,心坎裏便禁不住突突地發跳。伊透過烏桕葉,看見又矮又胖的趙七爺正從獨木橋上走來,而且穿著寶藍色竹布的長衫。 +趙七爺是鄰村茂源酒店的主人,又是這三十裏方圓以內的唯一的出色人物兼學問家;因為有學問,所以又有些遺老的臭味。他有十多本金聖嘆批評的《三國志》,時常坐著一個字一個字的讀;他不但能說出五虎將姓名,甚而至於還知道黃忠表字漢昇和馬超表字孟起。革命以後,他便將辮子盤在頂上,像道士一般;常常嘆息說,倘若趙子龍在世,天下便不會亂到這地步了。七斤嫂眼睛好,早望見今天的趙七爺已經不是道士,卻變成光滑頭皮,烏黑髮頂;伊便知道這一定是皇帝坐了龍庭,而且一定須有辮子,而且七斤一定是非常危險。因為趙七爺的這件竹布長衫,輕易是不常穿的,三年以來,只穿過兩次:一次是和他嘔氣的麻子阿四病了的時候,一次是曾經砸爛他酒店的魯大爺死了的時候;現在是第三次了,這一定又是於他有慶,於他的仇家有殃了。 +七斤嫂記得,兩年前七斤喝醉了酒,曾經罵過趙七爺是「賤胎」,所以這時便立刻直覺到七斤的危險,心坎裏突突地發起跳來。 +趙七爺一路走來,坐著喫飯的人都站起身,拿筷子點著自己的飯碗說,「七爺,請在我們這裏用飯!」七爺也一路點頭,說道「請請」,卻一徑走到七斤家的桌旁。七斤們連忙招呼,七爺也微笑著說「請請」,一面細細的研究他們的飯菜。 +「好香的菜乾,——聽到了風聲了麽?」趙七爺站在七斤的後面七斤嫂的對面說。 +「皇帝坐了龍庭了。」七斤說。 +七斤嫂看著七爺的臉,竭力陪笑道,「皇帝已經坐了龍庭,幾時皇恩大赦呢?」 +「皇恩大赦?——大赦是慢慢的總要大赦罷。」七爺說到這裏,聲色忽然嚴厲起來,「但是你家七斤的辮子呢,辮子?這倒是要緊的事。你們知道:長毛時候,留髮不留頭,留頭不留髮,……」 +七斤和他的女人沒有讀過書,不很懂得這古典的奧妙,但覺得有學問的七爺這麼說,事情自然非常重大,無可輓回,便仿佛受了死刑宣告似的,耳朵裏嗡的一聲,再也說不出一句話。 +「一代不如一代,——」九斤老太正在不平,趁這機會,便對趙七爺說,「現在的長毛,只是剪人家的辮子,僧不僧,道不道的。從前的長毛,這樣的麽?我活到七十九歲了,活夠了。從前的長毛是——整匹的紅緞子裹頭,拖下去,拖下去,一直拖到腳跟;王爺是黃緞子,拖下去,黃緞子;紅緞子,黃緞子,—— 我活夠了,七十九歲了。」 +七斤嫂站起身,自言自語的說,「這怎麼好呢?這樣的一班老小,都靠他養活的人,……」 +趙七爺搖頭道,「那也沒法。沒有辮子,該當何罪,書上都一條一條明明白白寫著的。不管他家裏有些什麼人。」 +七斤嫂聽到書上寫著,可真是完全絕望了;自己急得沒法,便忽然又恨到七斤。伊用筷子指著他的鼻尖說,「這死屍自作自受!造反的時候,我本來說,不要撐船了,不要上城了。他偏要死進城去,滾進城去,進城便被人剪去了辮子。從前是絹光烏黑的辮子,現在弄得僧不僧道不道的。這囚徒自作自受,帶累了我們又怎麼說呢?這活死屍的囚徒……」 +村人看見趙七爺到村,都趕緊喫完飯,聚在七斤家飯桌的周圍。七斤自己知道是出場人物,被女人當大眾這樣辱罵,很不雅觀,便只得抬起頭,慢慢地說道: +「你今天說現成話,那時你……」 +「你這活死屍的囚徒……」 +看客中間,八一嫂是心腸最好的人,抱著伊的兩周歲的遺腹子,正在七斤嫂身邊看熱鬧;這時過意不去,連忙解勸說,「七斤嫂,算了罷。人不是神仙,誰知道未來事呢?便是七斤嫂,那時不也說,沒有辮子倒也沒有什麼醜麽?況且衙門裏的大老爺也還沒有告示,……」 +七斤嫂沒有聽完,兩個耳朵早通紅了;便將筷子轉過向來,指著八一嫂的鼻子,說,「阿呀,這是什麼話呵!八一嫂,我自己看來倒還是一個人,會說出這樣昏誕胡塗話麽?那時我是,整整哭了三天,誰都看見;連六斤這小鬼也都哭,……」六斤剛喫完一大碗飯,拿了空碗,伸手去嚷著要添。七斤嫂正沒好氣,便用筷子在伊的雙丫角中間,直紮下去,大喝道,「誰要你來多嘴!你這偷漢的小寡婦!」 +撲的一聲,六斤手裏的空碗落在地上了,恰巧又碰著一塊磚角,立刻破成一個很大的缺口。七斤直跳起來,撿起破碗,合上檢查一回,也喝道,「入娘的!」一巴掌打倒了六斤。六斤躺著哭,九斤老太拉了伊的手,連說著「一代不如一代」,一同走了。 +八一嫂也發怒,大聲說,「七斤嫂,你『恨棒打人』……」 +趙七爺本來是笑著旁觀的;但自從八一嫂說了「衙門裏的大老爺沒有告示」這話以後,卻有些生氣了。這時他已經繞出桌旁,接著說,「『恨棒打人』,算什麼呢。大兵是就要到的。你可知道,這回保駕的是張大帥,張大帥就是燕人張翼德的後代,他一支丈八蛇矛,就有萬夫不當之勇,誰能抵擋他?」他兩手同時捏起空拳,仿佛握著無形的蛇矛模樣,向八一嫂搶進幾步道,「你能抵擋他麽!」 +八一嫂正氣得抱著孩子發抖,忽然見趙七爺滿臉油汗,瞪著眼,準對伊衝過來,便十分害怕,不敢說完話,回身走了。趙七爺也跟著走去,眾人一面怪八一嫂多事,一面讓開路,幾個剪過辮子重新留起的便趕快躲在人叢後面,怕他看見。趙七爺也不細心察訪,通過人叢,忽然轉入烏桕樹後,說道「你能抵擋他麽!」 跨上獨木橋,揚長去了。 +村人們呆呆站著,心裏計算,都覺得自己確乎抵不住張翼德,因此也決定七斤便要沒有性命。七斤既然犯了皇法,想起他往常對人談論城中的新聞的時候,就不該含著長煙管顯出那般驕傲模樣,所以對七斤的犯法,也覺得有些暢快。他們也仿佛想發些議論,卻又覺得沒有什麼議論可發。嗡嗡的一陣亂嚷,蚊子都撞過赤膊身子,闖到烏桕樹下去做市;他們也就慢慢地走散回家,關上門去睡覺。七斤嫂咕噥著,也收了傢伙和桌子矮凳回家,關上門睡覺了。 +七斤將破碗拿回家裏,坐在門檻上吸煙;但非常憂愁,忘卻了吸煙,象牙嘴六尺多長湘妃竹煙管的白銅鬥裏的火光,漸漸發黑了。他心裏但覺得事情似乎十分危急,也想想些方法,想些計畫,但總是非常模糊,貫穿不得:「辮子呢辮子?丈八蛇矛。一代不如一代!皇帝坐龍庭。破的碗須得上城去釘好。誰能抵擋他?書上一條一條寫著。入娘的!……」 +第二日清晨,七斤依舊從魯鎮撐航船進城,傍晚回到魯鎮,又拿著六尺多長的湘妃竹煙管和一個飯碗回村。他在晚飯席上,對九斤老太說,這碗是在城內釘合的,因為缺口大,所以要十六個銅釘,三文一個,一總用了四十八文小錢。 +九斤老太很不高興的說,「一代不如一代,我是活夠了。三文錢一個釘;從前的釘,這樣的麽?從前的釘是……我活了七十九歲了,——」 +此後七斤雖然是照例日日進城,但家景總有些黯淡,村人大抵迴避著,不再來聽他從城內得來的新聞。七斤嫂也沒有好聲氣,還時常叫他「囚徒」。 +過了十多日,七斤從城內回家,看見他的女人非常高興,問他說,「你在城裏可聽到些什麼?」 +「沒有聽到些什麼。」 +「皇帝坐了龍庭沒有呢?」 +「他沒有說。」 +「咸亨酒店裏也沒有人說麽?」 +「也沒人說。」 +「我想皇帝一定是不坐龍庭了。我今天走過趙七爺的店前,看見他又坐著念書了,辮子又盤在頂上了,也沒有穿長衫。」 +「…………」 +「你想,不坐龍庭了罷?」 +「我想,不坐了罷。」 +現在的七斤,是七斤嫂和村人又都早給他相當的尊敬,相當的待遇了。到夏天,他們仍舊在自家門口的土場上喫飯;大家見了,都笑嘻嘻的招呼。九斤老太早已做過八十大壽,仍然不平而且健康。六斤的雙丫角,已經變成一支大辮子了;伊雖然新近裹腳,卻還能幫同七斤嫂做事,捧著十八個銅釘的飯碗,在土場上一瘤一拐的往來。 +星期日的早晨,我揭去一張隔夜的日曆,向著新的那一張上看了又看的說: +“啊,十月十日,——今天原來正是雙十節。這裏卻一點沒有記載!” +我的一位前輩先生N,正走到我的寓裏來談閑天,一聽這話,便很不高興的對我說: +“他們對!他們不記得,你怎樣他;你記得,又怎樣呢?” +這位N先生本來脾氣有點乖張,時常生些無謂的氣,說些不通世故的話。當這時候,我大抵任他自言自語,不贊一辭;他獨自發完議論,也就算了。 +他說: +“我最佩服北京雙十節的情形。早晨,員警到門,吩咐道:『掛旗!』『是,掛旗!』”各家大半懶洋洋的踱出一個國民來,撅起一塊斑駁陸離的洋布。這樣一直到夜,——收了旗關門;幾家偶然忘卻的,便掛到第二天的上午。 +“他們忘卻了紀念,紀念也忘卻了他們!” +“我也是忘卻了紀念的一個人。倘使紀念起來,那第一個雙十節前後的事,便都上我的心頭,使我坐立不穩了。” +“多少故人的臉,都浮在我眼前。幾個少年辛苦奔走了十多年,暗地裏一顆彈丸要了他的性命;幾個少年一擊不中,在監牢裏身受一個多月的苦刑;幾個少年懷著遠志,忽然蹤影全無,連屍首也不知那裏去了。——” +“他們都在社會的冷笑惡罵迫害傾陷裏過了一生;現在他們的墳墓也早在忘卻裏漸漸平塌下去了。” +“我不堪紀念這些事。” +“我們還是記起一點得意的事來談談吧。” +N忽然現出笑容,伸手在自己頭上一摸,高聲說: +“我最得意的是自從第一個雙十節以後,我在路上走,不再被人笑駡了。” +“老兄,你可知道頭髮是我們中國人的寶貝和冤家,古今來多少人在這上頭吃些毫無價值的苦呵!” +“我們的很古的古人,對於頭髮似乎也還看輕。據刑法看來,最要緊的自然是腦袋,所以大辟是上刑;次要便是生殖器了,所以宮刑和幽閉也是一件嚇人的罰;至於髡,那是微乎其微了,然而推想起來,正不知道曾有多少人們因為光著頭皮便被社會踐踏了一生世。” +“我們講革命的時候,大談什麼揚州三日,嘉定屠城,其實也不過一種手段;老實說:那時中國人的反抗,何嘗因為亡國,只是因為拖辮子。” +“頑殺盡了,遺老都壽終了,辮子早留定了,洪楊又鬧起來了。我的祖母曾對我說,那時做百姓才難哩,全留著頭髮的被官兵殺,還是辮子的便被長毛殺!” +“我不知道有多少中國人只因為這不痛不癢的頭髮而吃苦,受難,滅亡。” +N兩眼望著屋樑,似乎想些事,仍然說: +“誰知道頭髮的苦輪到我了。” +“我出去留學,便剪掉了辮子,這並沒有別的奧妙,只為他不太便當罷了。不料有幾位辮子盤在頭頂上的同學們便很厭惡我;監督也大怒,說要停了我的官費,送回中國去。” +“不幾天,這位監督卻自己被人剪去辮子逃走了。去剪的人們裏面,一個便是做《革命軍》的鄒容,這人也因此不能再留學,回到上海來,後來死在西牢裏。你也早忘卻了罷?” +“過了幾年,我的家景大不如前了,非謀點事做便要受餓,只得也回到中國來。我一到上海,便買定一條假辮子,那時是二元的市價,帶著回家。我的母親倒也不說什麼,然而旁人一見面,便都首先研究這辮子,待到知道是假,就一聲冷笑,將我擬為殺頭的罪名;有一位本家,還預備去告官,但後來因為恐怕革命黨的造反或者要成功,這才中止了。” +“我想,假的不如真的直截爽快,我便索性廢了假辮子,穿著西裝在街上走。” +“一路走去,一路便是笑駡的聲音,有的還跟在後面罵:『這冒失鬼!』『假洋鬼子!』” +“我於是不穿洋服了,改了大衫,他們罵得更厲害。” +“在這日暮途窮的時候,我的手裏才添出一支手杖來,拚命的打了幾回,他們漸漸的不罵了。只是走到沒有打過的生地方還是罵。” +“這件事很使我悲哀,至今還時時記得哩。我在留學的時候,曾經看見日報上登載一個遊歷南洋和中國的本多博士的事;這位博士是不懂中國和馬來語的,人問他,你不懂話,怎麼走路呢?他拿起手杖來說,這便是他們的話,他們都懂!我因此氣憤了好幾天,誰知道我竟不知不覺的自己也做了,而且那些人都懂了。……” +“宣統初年,我在本地的中學校做監學,同事是避之惟恐不遠,官僚是防之惟恐不嚴,我終日如坐在冰窖子裏,如站在刑場旁邊,其實並非別的,只因為缺少了一條辮子!” +“有一日,幾個學生忽然走到我的房裏來,說:『先生,我們要剪辮子了。』我說:『不行!』『有辮子好呢,沒有辮子好呢?』『沒有辮子好……』『你怎麼說不行呢?』『犯不上,你們還是不剪上算,——等一等罷。』”他們不說什麼,撅著嘴唇走出房去,然而終於剪掉了。 +“呵!不得了了,人言嘖嘖了;我卻只裝作不知道,一任他們光著頭皮,和許多辮子一齊上講堂。” +“然而這剪辮病傳染了;第三天,師範學堂的學生忽然也剪下了六條辮子,晚上便開除了六個學生。這六個人,留校不能,回家不得,一直挨到第一個雙十節之後又一個多月,才消去了犯罪的火烙印。” +“我呢?也一樣,只是元年冬天到北京,還被人罵過幾次,後來罵我的人也被員警剪去了辮子,我就不再被人辱駡了;但我沒有到鄉間去。”N顯出非常得意模樣,忽而又沉下臉來:“現在你們這些理想家,又在那裏嚷什麼女子剪髮了,又要造出許多毫無所得而痛苦的人!”“現在不是已經有剪掉頭發的女人,因此考不進學校去,或者被學校除了名麼?”“改革嘛,武器在那裏?工讀麼,工廠在那裏?”“仍然留起,嫁給人家做媳婦去:忘卻了一切還是幸福,倘使伊記著些平等自由的話,便要苦痛一生世!”“我要借了阿爾志跋綏夫的話問你們:『你們將黃金時代的出現豫約給這些人們的子孫了,但有什麼給這些人們自己呢?』”“啊,造物的皮鞭沒有到中國的脊樑上時,中國便永遠是這一樣的中國,絕不肯自己改變一隻毫毛!”“你們的嘴裏既然並無毒牙,何以偏要在額上帖起『蝮蛇』兩個大字,引乞丐來打殺?……”N愈說愈離奇了,但一見到我不很願聽的神情,便立刻閉了口,站起來取帽子。我說:“回去麼?”他答道:“是的,天要下雨了。”我默默的送他到門口。他戴上帽子說:“再見!請你恕我打攪,好在明天便不是雙十節,我們統可以忘卻了。” +我從鄉下跑到京城裏,一轉眼已經六年了。其間耳聞目睹的所謂國家大事,算起來也很不少;但在我心裏,都不留什麼痕跡,倘要我尋出這些事的影響來說,便只是增長了我的壞脾氣,——老實說,便是教我一天比一天的看不起人。 +但有一件小事,卻於我有意義,將我從壞脾氣裏拖開,使我至今忘記不得。 +這是民國六年的冬天,大北風颳得正猛,我因為生計關係,不得不一早在路上走。一路幾乎遇不見人,好容易才雇定了一輛人力車,教他拉到S門去。不一會,北風小了,路上浮塵早已刮淨,剩下一條潔白的大道來,車夫也跑得更快。剛近S門,忽而車把上帶著一個人,慢慢地倒了。 +跌倒的是一個女人,花白頭髮,衣服都很破爛。伊從馬路上突然向車前橫截過來;車夫已經讓開道,但伊的破棉背心沒有上扣,微風吹著,向外展開,所以終於兜著車把。幸而車夫早有點停步,否則伊定要栽一個大斤斗,跌到頭破血出了。 +伊伏在地上;車夫便也立住腳。我料定這老女人並沒有傷,又沒有別人看見,便很怪他多事,要自己惹出是非,也誤了我的路。 +我便對他說,"沒有什麼的。走你的罷!" +車夫毫不理會,——或者並沒有聽到,——卻放下車子,扶那老女人慢慢起來,攙著臂膊立定,問伊說:"你怎麼啦?""我摔壞了。" +我想,我眼見你慢慢倒地,怎麼會摔壞呢,裝腔作勢罷了,這真可憎惡。車夫多事,也正是自討苦吃,現在你自己想法去。 +車夫聽了這老女人的話,卻毫不躊躇,仍然攙著伊的臂膊,便一步一步的向前走。我有些詫異,忙看前面,是一所巡警分駐所,大風之後,外面也不見人。這車夫扶著那老女人,便正是向那大門走去。 +我這時突然感到一種異樣的感覺,覺得他滿身灰塵的後影,剎時高大了,而且愈走愈大,須仰視才見。而且他對於我,漸漸的又幾乎變成一種威壓,甚而至於要榨出皮袍下面藏著的"小"來。 +我的活力這時大約有些凝滯了,坐著沒有動,也沒有想,直到看見分駐所裏走出一個巡警,才下了車。 +巡警走近我說,"你自己雇車罷,他不能拉你了。" +我沒有思索的從外套袋裏抓出一大把銅元,交給巡警,說,"請你給他……" +風全住了,路上還很靜。我走著,一面想,幾乎怕敢想到自己。以前的事姑且擱起,這一大把銅元又是什麼意思?獎他麼?我還能裁判車夫麼?我不能回答自己。 +這事到了現在,還是時時記起。我因此也時時煞了苦痛,努力的要想到我自己。幾年來的文治武力,在我早如幼小時候所讀過的"子曰詩云"一般,背不上半句了。獨有這一件小事,卻總是浮在我眼前,有時反更分明,教我慚愧,催我自新,並且增長我的勇氣和希望。 +「沒有聲音,——小東西怎了?」紅鼻子老拱手裏擎了一碗黃酒,說著,向間壁努一努嘴。藍皮阿五便放下酒碗,在他脊梁上用死勁的打了一掌,含含糊糊嚷道:「你……你你又在想心思。……」 +原來魯鎮是僻靜地方,還有些古風:不上一更,大家便都關門睡覺。深更半夜沒有睡的只有兩家:一家是咸亨酒店,幾個酒肉朋友圍著櫃臺,吃喝得正高興;一家便是間壁的單四嫂子,他自從前年守了寡,便須專靠著自己的一雙手紡出綿紗來,養活他自己和他三歲的兒子,所以睡的也遲。 +這幾天,確鑿沒有紡紗的聲音了。但夜深沒有睡的既然只有兩家,這單四嫂子家有聲音,便自然只有老拱們聽到,沒有聲音,也只有老拱們聽到。 +老拱挨了打,仿佛很舒服似的喝了一大口酒,嗚嗚的唱起小曲來。 +這時候,單四嫂子正抱著他的寶兒,坐在床沿上,紡車靜靜的立在地上。黑沉沉的燈光,照著寶兒的臉,緋紅裏帶一點青。單四嫂子心裏計算:神簽也求過了,願心也許過了,單方也吃過了,要是還不見效,怎麼好?——那隻有去診何小仙了。但寶兒也許是日輕夜重,到了明天,太陽一出,熱也會退,氣喘也會平的:這實在是病人常有的事。 +單四嫂子是一個粗笨女人,不明白這「但」字的可怕:許多壞事固然幸虧有了他才變好,許多好事卻也因為有了他都弄糟。夏天夜短,老拱們嗚嗚的唱完了不多時,東方已經發白;不一會,窗縫裏透進了銀白色的曙光。 +單四嫂子等候天明,卻不像別人這樣容易,覺得非常之慢,寶兒的一呼吸,幾乎長過一年。現在居然明亮了;天的明亮,壓倒了燈光,——看見寶兒的鼻翼,已經一放一收的扇動。 +單四嫂子知道不妙,暗暗叫一聲「阿呀!」心裏計算:怎麼好?只有去診何小仙這一條路了。他雖然是粗笨女人,心裏卻有決斷,便站起身,從木柜子里掏出每天節省下來的十三個小銀元和一百八十銅錢,都裝在衣袋里,鎖上門,抱著寶兒直向何家奔過去。 +天氣還早,何家已經坐著四個病人了。他摸出四角銀元,買了號簽,第五個輪到寶兒。何小仙伸開兩個指頭按脈,指甲足有四寸多長,單四嫂子暗地納罕,心裏計算:寶兒該有活命了。但總免不了著急,忍不住要問,便局局促促的說: +「先生,——我家的寶兒什麼病呀?」「他中焦塞著。」「不妨事麽?他……」「先去吃兩帖。」「他喘不過氣來,鼻翅子都扇著呢。」這是火克金……」 +何小仙說了半句話,便閉上眼睛;單四嫂子也不好意思再問。在何小仙對面坐著的一個三十多歲的人,此時已經開好一張藥方,指著紙角上的幾個字說道: +「這第一味保嬰活命丸,須是賈家濟世老店才有!」單四嫂子接過藥方,一面走,一面想。他雖是粗笨女人,卻知道何家與濟世老店與自己的家,正是一個三角點;自然是買了藥回去便宜了。於是又徑向濟世老店奔過去。店夥也翹了長指甲慢慢的看方,慢慢的包藥。單四嫂子抱了寶兒等著;寶兒忽然擎起小手來,用力拔他散亂著的一綹頭髮,這是從來沒有的舉動,單四嫂子怕得發怔。 +太陽早出了。單四嫂子抱了孩子,帶著藥包,越走覺得越重;孩子又不住的掙扎,路也覺得越長。沒奈何坐在路旁一家公館的門檻上,休息了一會,衣服漸漸的冰著肌膚,才知道自己出了一身汗;寶兒卻仿佛睡著了。他再起來慢慢地走,仍然支撐不得,耳朵邊忽然聽得人說: +「單四嫂子,我替你抱勃羅!」似乎是藍皮阿五的聲音。 +他抬頭看時,正是藍皮阿五,睡眼朦朧的跟著他走。 +單四嫂子在這時候,雖然很希望降下一員天將,助他一臂之力,卻不願是阿五。但阿五有些俠氣,無論如何,總是偏要幫忙,所以推讓了一會,終於得了許可了。他便伸開臂膊,從單四嫂子的乳房和孩子之間,直伸下去,抱去了孩子。單四嫂子便覺乳房上發了一條熱,剎時間直熱到臉上和耳根。 +他們兩人離開了二尺五寸多地,一同走著。阿五說些話,單四嫂子卻大半沒有答。走了不多時候,阿五又將孩子還給他,說是昨天與朋友約定的吃飯時候到了;單四嫂子便接了孩子。幸而不遠便是家,早看見對門的王九媽在街邊坐著,遠遠地說話: +「單四嫂子,孩子怎了?——看過先生了麽?」「看是看了。——王九媽,你有年紀,見的多,不如請你老法眼看一看,怎樣……」「唔……」「怎樣……?」「唔……」王九媽端詳了一番,把頭點了兩點,搖了兩搖。 +寶兒吃下藥,已經是午後了。單四嫂子留心看他神情,似乎仿佛平穩了不少;到得下午,忽然睜開眼叫一聲「媽!」又仍然合上眼,像是睡去了。他睡了一刻,額上鼻尖都沁出一粒一粒的汗珠,單四嫂子輕輕一摸,膠水般粘著手;慌忙去摸胸口,便禁不住嗚咽起來。 +寶兒的呼吸從平穩到沒有,單四嫂子的聲音也就從嗚咽變成號啕。這時聚集了幾堆人:門內是王九媽藍皮阿五之類,門外是咸亨的掌柜和紅鼻老拱之類。王九媽便發命令,燒了一串紙錢;又將兩條板凳和五件衣服作抵,替單四嫂子借了兩塊洋錢,給幫忙的人備飯。 +第一個問題是棺木。單四嫂子還有一副銀耳環和一支裹金的銀簪,都交給了咸亨的掌柜,托他作一個保,半現半賒的買一具棺木。藍皮阿五也伸出手來,很願意自告奮勇;王九媽卻不許他,只准他明天抬棺材的差使,阿五罵了一聲「老畜生」,怏怏的努了嘴站著。掌柜便自去了;晚上回來,說棺木須得現做,後半夜才成功。 +掌柜回來的時候,幫忙的人早吃過飯;因為魯鎮還有些古風,所以不上一更,便都回家睡覺了。只有阿五還靠著咸亨的櫃臺喝酒,老拱也嗚嗚的唱。 +這時候,單四嫂子坐在床沿上哭著,寶兒在床上躺著,紡車靜靜的在地上立著。許多工夫,單四嫂子的眼淚宣告完結了,眼睛張得很大,看看四面的情形,覺得奇怪:所有的都是不會有的事。他心裏計算:不過是夢罷了,這些事都是夢。明天醒過來,自己好好的睡在床上,寶兒也好好的睡在自己身邊。他也醒過來,叫一聲「媽」,生龍活虎似的跳去玩了。 +老拱的歌聲早經寂靜,咸亨也熄了燈。單四嫂子張著眼,總不信所有的事。——雞也叫了;東方漸漸發白,窗縫裏透進了銀白色的曙光。 +銀白的曙光又漸漸顯出緋紅,太陽光接著照到屋脊。單四嫂子張著眼,呆呆坐著;聽得打門聲音,才吃了一嚇,跑出去開門。門外一個不認識的人,背了一件東西;後面站著王九媽。 +哦,他們背了棺材來了。 +下半天,棺木才合上蓋:因為單四嫂子哭一回,看一回,總不肯死心塌地的蓋上;幸虧王九媽等得不耐煩,氣憤憤的跑上前,一把拖開他,才七手八腳的蓋上了。 +但單四嫂子待他的寶兒,實在已經盡了心,再沒有什麼缺陷。昨天燒過一串紙錢,上午又燒了四十九捲《大悲咒》;收斂的時候,給他穿上頂新的衣裳,平日喜歡的玩意兒,——一個泥人,兩個小木碗,兩個玻璃瓶,——都放在枕頭旁邊。後來王九媽掐著指頭子細推敲,也終於想不出一些什麼缺陷。 +這日里,藍皮阿五簡直整天沒有到;咸亨掌柜便替單四嫂子雇了兩名腳夫,每名二百另十個大錢,抬棺木到義冢地上安放。王九媽又幫他煮了飯,凡是動過手開過口的人都吃了飯。太陽漸漸顯出要落山的顏色;吃過飯的人也不覺都顯出要回家的顏色,——於是他們終於都回了家。 +單四嫂子很覺得頭眩,歇息了一會,倒居然有點平穩了。但他接連著便覺得很異樣:遇到了平生沒有遇到過的事,不像會有的事,然而的確出現了。他越想越奇,又感到一件異樣的事——這屋子忽然太靜了。 +他站起身,點上燈火,屋子越顯得靜。他昏昏的走去關上門,回來坐在床沿上,紡車靜靜的立在地上。他定一定神,四面一看,更覺得坐立不得,屋子不但太靜,而且也太大了,東西也太空了。太大的屋子四麵包圍著他,太空的東西四面壓著他,叫他喘氣不得。 +他現在知道他的寶兒確乎死了;不願意見這屋子,吹熄了燈,躺著。他一面哭,一面想:想那時候,自己紡著棉紗,寶兒坐在身邊吃茴香豆,瞪著一雙小黑眼睛想了一刻,便說,「媽!爹賣餛飩,我大了也賣餛飩,賣許多許多錢,——我都給你。」那時候,真是連紡出的棉紗,也仿佛寸寸都有意思,寸寸都活著。但現在怎麼了?現在的事,單四嫂子卻實在沒有想到什麼。——我早經說過:他是粗笨女人。他能想出什麼呢?他單覺得這屋子太靜,太大,太空罷了。 +但單四嫂子雖然粗笨,卻知道還魂是不能有的事,他的寶兒也的確不能再見了。嘆一口氣,自言自語的說,「寶兒,你該還在這裏,你給我夢裏見見罷。」於是合上眼,想趕快睡去,會他的寶兒,苦苦的呼吸通過了靜和大和空虛,自己聽得明白。 +單四嫂子終於朦朦朧朧的走入睡鄉,全屋子都很靜。這時紅鼻子老拱的小曲,也早經唱完;蹌蹌踉踉出了咸亨,卻又提尖了喉嚨,唱道: +「我的冤家呀!——可憐你,——孤另另的……」 +藍皮阿五便伸手揪住了老拱的肩頭,兩個人七歪八斜的笑著擠著走去。 +單四嫂子早睡著了,老拱們也走了,咸亨也關上門了。這時的魯鎮,便完全落在寂靜里。只有那暗夜為想變成明天,卻仍在這寂靜里奔波;另有幾條狗,也躲在暗地裏嗚嗚的叫。 +陳士成看過縣考的榜、回到家裏的時候,已經是下午了。他去得本很早,一見榜,便先在這上面尋陳字。陳字也不少,似乎也都爭先恐後的跳進他眼睛裏來,然而接著的卻全不是士成這兩個字。他於是重新再在十二張榜的圓圖裏細細地搜尋,看的人全已散盡了,而陳士成在榜上終於沒有見,單站在試院的照壁的面前。 +涼風雖然拂拂的吹動他斑白的短髮,初冬的太陽卻還是很溫和的來曬他。但他似乎被太陽曬得頭暈了,臉色越加變成灰白,從勞乏的紅腫的兩眼裏,發出古怪的閃光。這時他其實早已不看到什麼牆上的榜文了,只見有許多烏黑的圓圈,在眼前泛泛的遊走。 +雋了秀才,上省去鄉試,一徑聯捷上去,……紳士們既然千方百計的來攀親,人們又都像看見神明似的敬畏,深悔先前的輕薄,發昏,……趕走了租住在自己破宅門裏的雜姓——那是不勞說趕,自己就搬的,——屋宇全新了,門口是旗竿和扁額,……要清高可以做京官,否則不如謀外放。……他平日安排停當的前程,這時候又像受潮的糖塔一般,剎時倒塌,只剩下一堆碎片了。他不自覺的旋轉了覺得渙散了身軀,惘惘的走向歸家的路。 +他剛到自己的房門口,七個學童便一齊放開喉嚨,吱的念起書來。他大吃一驚,耳朵邊似乎敲了一聲磬,只見七個頭拖了小辮子在眼前幌,幌得滿房,黑圈子也夾著跳舞。他坐下了,他們送上晚課來,臉上都顯出小覷他的神色。 +「回去罷。」他遲疑了片時,這才悲慘的說。 +他們胡亂的包了書包,挾著,一溜煙跑走了。 +陳士成還看見許多小頭夾著黑圓圈在眼前跳舞,有時雜亂,有時也擺成異樣的陣圖,然而漸漸的減少了,模胡了。 +「這回又完了!」 +他大吃一驚,直跳起來,分明就在耳邊的話,回過頭去卻並沒有什麼人,仿佛又聽得嗡的敲了一聲磬,自己的嘴也說道: +「這回又完了!」 +他忽而舉起一隻手來,屈指計數著想,十一,十三回,連今年是十六回,竟沒有一個考官懂得文章,有眼無珠,也是可憐的事,便不由嘻嘻的失了笑。然而他憤然了,驀地從書包布底下抽出謄真的制藝和試帖來,拿著往外走,剛近房門,卻看見滿眼都明亮,連一群雞也正在笑他,便禁不住心頭突突的狂跳,只好縮回裏面了。 +他又就了坐,眼格外的閃爍;他目睹著許多東西,然而很模胡,——是倒塌了的糖塔一般的前程躺在他面前,這前程又只是廣大起來,阻住了他的一切路。 +別家的炊煙早消歇了,碗筷也洗過了,而陳士成還不去做飯。寓在這裏的雜姓是知道老例的,凡遇到縣考的年頭,看見發榜後的這樣的眼光,不如及早關了門,不要多管事。最先就絕了人聲,接著是陸續的熄了燈火,獨有月亮,卻緩緩的出現在寒夜的空中。 +空中青碧到如一片海,略有些浮雲,仿佛有誰將粉筆洗在筆洗裏似的搖曳。月亮對著陳士成註下寒冷的光波來,當初也不過像是一面新磨的鐵鏡罷了,而這鏡卻詭秘的照透了陳士成的全身,就在他身上映出鐵的月亮的影。 +他還在房外的院子裏徘徊,眼裏頗清靜了,四近也寂靜。但這寂靜忽又無端的紛擾起來,他耳邊又確鑿聽到急促的低聲說: +「左彎右彎……」 +他聳然了,傾耳聽時,那聲音卻又提高的複述道:「右彎!」 +他記得了。這院子,是他家還未如此雕零的時候,一到夏天的夜間,夜夜和他的祖母在此納涼的院子。那時他不過十歲有零的孩子,躺在竹榻上,祖母便坐在榻旁邊,講給他有趣的故事聽。伊說是曾經聽得伊的祖母說,陳氏的祖宗是巨富的,這屋子便是祖基,祖宗埋著無數的銀子,有福氣的子孫一定會得到的罷,然而至今還沒有現。至於處所,那是藏在一個謎語的中間: +「左彎右彎,前走後走,量金量銀不論斗。」 +對於這謎語,陳士成便在平時,本也常常暗地裏加以揣測的,可惜大抵剛以為可以通,卻又立刻覺得不合了。有一回,他確有把握,知道這是在租給唐家的房底下的了,然而總沒有前去發掘的勇氣;過了幾時,可又覺得太不相像了。至於他自己房子裏的幾個掘過的舊痕跡,那卻全是先前幾回下第以後的發了怔忡的舉動,後來自己一看到,也還感到慚愧而且羞人。 +但今天鐵的光罩住了陳士成,又軟軟的來勸他了,他或者偶一遲疑,便給他正經的證明,又加上陰森的摧逼,使他不得不又向自己的房裏轉過眼光去。 +白光如一柄白團扇,搖搖擺擺的閃起在他房裏了。 +「也終於在這裏!」 +他說著,獅子似的趕快走進那房裏去,但跨進裏面的時候,便不見了白光的影蹤,只有莽蒼蒼的一間舊房,和幾個破書桌都沒在昏暗裏。他爽然的站著,慢慢的再定睛,然而白光卻分明的又起來了,這回更廣大,比硫黃火更白凈,比朝霧更霏微,而且便在靠東牆的一張書桌下。 +陳士成獅子似的奔到門後邊,伸手去摸鋤頭,撞著一條黑影。他不知怎的有些怕了,張惶的點了燈,看鋤頭無非倚著。他移開桌子,用鋤頭一氣掘起四塊大方磚,蹲身一看,照例是黃澄澄的細沙,揎了袖爬開細沙,便露出下面的黑土來。他極小心的,幽靜的,一鋤一鋤往下掘,然而深夜究竟太寂靜了,尖鐵觸土的聲音,總是鈍重的不肯瞞人的發響。 +土坑深到二尺多了,並不見有甕口,陳士成正心焦,一聲脆響,頗震得手腕痛,鋤尖碰到什麼堅硬的東西了;他急忙拋下鋤頭,摸索著看時,一塊大方磚在下麵。他的心抖得很利害,聚精會神的挖起那方磚來,下麵也滿是先前一樣的黑土,爬鬆了許多土,下麵似乎還無窮。但忽而又觸著堅硬的小東西了,圓的,大約是一個銹銅錢;此外也還有幾片破碎的磁片。 +陳士成心裏仿佛覺得空虛了,渾身流汗,急躁的只爬搔;這其間,心在空中一抖動,又觸著一種古怪的小東西了,這似乎約略有些馬掌形的,但觸手很鬆脆。他又聚精會神的挖起那東西來,謹慎的撮著,就燈光下仔細看時,那東西斑斑剝剝的像是爛骨頭,上面還帶著一排零落不全的牙齒。他已經誤到這許是下巴骨了,而那下巴骨也便在他手裏索索的動彈起來,而且笑吟吟的顯出笑影,終於聽得他開口道: +「這回又完了!」 +他慄然的發了大冷,同時也放了手,下巴骨輕飄飄的回到坑底裏不多久,他也就逃到院子裏了。他偷看房裏面,燈火如此輝煌,下巴骨如此嘲笑,異乎尋常的怕人,便再不敢向那邊看。他躲在遠處的簷下的陰影裏,覺得較為安全了;但在這平安中,忽而耳朵邊又聽得竊竊的低聲說: +「這裏沒有……到山裏去……」 +陳士成似乎記得白天在街上也曾聽得有人說這種話,他不待再聽完,已經恍然大悟了。他突然仰面向天,月亮已向西高峰這方面隱去,遠想離城三十五里的西高峰正在眼前,朝笏一般黑魆魆的挺立著,周圍便放出浩大閃爍的白光來。 +而且這白光又遠遠的就在前面了。 +「是的,到山裏去!」 +他決定的想,慘然的奔出去了。幾回的開門之後,門裏面便再不聞一些聲息。燈火結了大燈花照著空屋和坑洞,畢畢剝剝的炸了幾聲之後,便漸漸的縮小以至於無有,那是殘油已經燒盡了。 +「開城門來~~」 +含著大希望的恐怖的悲聲,遊絲似的在西關門前的黎明中,戰戰兢兢的叫喊。 +第二天的日中,有人在離西門十五里的萬流湖裏看見一個浮屍,當即傳揚開去,終於傳到地保的耳朵裏了,便叫鄉下人撈將上來。那是一個男屍,五十多歲,「身中面白無鬚」,渾身也沒有什麼衣褲。或者說這就是陳士成。但鄰居懶得去看,也並無屍親認領,於是經縣委員相驗之後,便由地保埋了。至於死因,那當然是沒有問題的,剝取死屍的衣服本來是常有的事,夠不上疑心到謀害去:而且仵作也證明是生前的落水,因為他確鑿曾在水底裏掙命,所以十個指甲裏都滿嵌著河底泥。 +有鬼似的。 +然而要做這一篇速朽的文章,纔下筆,便感到萬分的困難了。第一是文章的名目。孔子曰,“名不正則言不順”。這原是應該極註意的。傳的名目很繁多:列傳,自傳,內傳,外傳,別傳,家傳,小傳……,而可惜都不合。“列傳”麽,這一篇並非和許多闊人排在“正史”裏;“自傳”麽,我又並非就是阿Q。說是“外傳”,“內傳”在那裏呢?倘用“內傳”,阿Q又決不是神仙。“別傳”呢,阿Q實在未曾有大總統上諭宣付國史館立“本傳”——雖說英國正史上並無“博徒列傳”,而文豪迭更司也做過《博徒別傳》這一部書,但文豪則可,在我輩卻不可。其次是“家傳”,則我既不知與阿Q是否同宗,也未曾受他子孫的拜託;或“小傳”,則阿Q又更無別的“大傳”了。總而言之,這一篇也便是“本傳”,但從我的文章著想,因為文體卑下,是“引車賣漿者流”所用的話,所以不敢僭稱,便從不入三教九流的小說家所謂“閑話休題言歸正傳”這一句套話裏,取出“正傳”兩個字來,作為名目,即使與古人所撰《書法正傳》的“正傳”字面上很相混,也顧不得了。 +第二,立傳的通例,開首大抵該是“某,字某,某地人也”,而我並不知道阿Q姓什麼。有一回,他似乎是姓趙,但第二日便模糊了。那是趙太爺的兒子進了秀才的時候,鑼聲鏜鏜的報到村裏來,阿Q正喝了兩碗黃酒,便手舞足蹈的說,這於他也很光采,因為他和趙太爺原來是本家,細細的排起來他還比秀才長三輩呢。其時幾個旁聽人倒也肅然的有些起敬了。那知道第二天,地保便叫阿Q到趙太爺家裏去;太爺一見,滿臉濺朱,喝道: +“阿Q,你這渾小子!你說我是你的本家麽?”阿Q不開口。趙太爺愈看愈生氣了,搶進幾步說:“你敢胡說!我怎麼會有你這樣的本家?你姓趙麽?”阿Q不開口,想往後退了;趙太爺跳過去,給了他一個嘴巴。 +“你怎麼會姓趙!——你那裏配姓趙!” +阿Q並沒有抗辯他確鑿姓趙,只用手摸著左頰,和地保退出去了;外面又被地保訓斥了一番,謝了地保二百文酒錢。知道的人都說阿Q太荒唐,自己去招打;他大約未必姓趙,即使真姓趙,有趙太爺在這裏,也不該如此胡說的。此後便再沒有人提起他的氏族來,所以我終於不知道阿Q究竟什麼姓。 +第三,我又不知道阿Q的名字是怎麼寫的。他活著的時候,人都叫他阿Quei,死了以後,便沒有一個人再叫阿Quei了,那裏還會有“著之竹帛”的事。若論“著之竹帛”,這篇文章要算第一次,所以先遇著了這第一個難關。我曾仔細想:阿Quei,阿桂還是阿貴呢?倘使他號月亭,或者在八月間做過生日,那一定是阿桂了;而他既沒有號——也許有號,只是沒有人知道他,——又未嘗散過生日徵文的帖子:寫作阿桂,是武斷的。又倘使他有一位老兄或令弟叫阿富,那一定是阿貴了;而他又只是一個人:寫作阿貴,也沒有佐證的。其餘音Quei的偏僻字樣,更加湊不上了。先前,我也曾問過趙太爺的兒子茂才先生,誰料博雅如此公,竟也茫然,但據結論說,是因為陳獨秀辦了《新青年》提倡洋字,所以國粹淪亡,無可查考了。我的最後的手段,只有托一個同鄉去查阿Q犯事的案卷,八個月之後纔有回信,說案卷裏並無與阿Quei的聲音相近的人。我雖不知道是真沒有,還是沒有查,然而也再沒有別的方法了。生怕註音字母還未通行,只好用了“洋字”,照英國流行的拼法寫他為阿Quei,略作阿Q。這近於盲從《新青年》,自己也很抱歉,但茂才公尚且不知,我還有什麼好辦法呢。 +第四,是阿Q的籍貫了。倘他姓趙,則據現在好稱郡望的老例,可以照《郡名百家姓》上的註解,說是“隴西天水人也”,但可惜這姓是不甚可靠的,因此籍貫也就有些決不定。他雖然多住未莊,然而也常常宿在別處,不能說是未莊人,即使說是“未莊人也”,也仍然有乖史法的。 +我所聊以自慰的,是還有一個“阿”字非常正確,絕無附會假借的缺點,頗可以就正於通人。至於其餘,卻都非淺學所能穿鑿,只希望有“歷史癖與考據癖”的胡適之先生的門人們,將來或者能夠尋出許多新端緒來,但是我這《阿Q正傳》到那時卻又怕早經消滅了。 +阿Q不獨是姓名籍貫有些渺茫,連他先前的“行狀”也渺茫。因為未莊的人們之於阿Q,只要他幫忙,只拿他玩笑,從來沒有留心他的“行狀”的。而阿Q自己也不說,獨有和別人口角的時候,間或瞪著眼睛道: +“我先前——比你闊的多啦!你算是什麼東西!” +阿Q沒有家,住在未莊的土穀祠裏;也沒有固定的職業,只給人家做短工,割麥便割麥,舂米便舂米,撐船便撐船。工作略長久時,他也或住在臨時主人的家裏,但一完就走了。所以,人們忙碌的時候,也還記起阿Q來,然而記起的是做工,並不是“行狀”;一閑空,連阿Q都早忘卻,更不必說“行狀”了。只是有一回,有一個老頭子頌揚說:“阿Q真能做!”這時阿Q赤著膊,懶洋洋的瘦伶仃的正在他面前,別人也摸不著這話是真心還是譏笑,然而阿Q很喜歡。 +阿Q又很自尊,所有未莊的居民,全不在他眼神裏,甚而至於對於兩位“文童”也有以為不值一笑的神情。夫文童者,將來恐怕要變秀才者也;趙太爺錢太爺大受居民的尊敬,除有錢之外,就因為都是文童的爹爹,而阿Q在精神上獨不表格外的崇奉,他想:我的兒子會闊得多啦!加以進了幾回城,阿Q自然更自負,然而他又很鄙薄城裏人,譬如用三尺三寸寬的木板做成的凳子,未莊人叫“長凳”,他也叫“長凳”,城裏人卻叫“條凳”,他想:這是錯的,可笑!油煎大頭魚,未莊都加上半寸長的蔥葉,城裏卻加上切細的蔥絲,他想:這也是錯的,可笑!然而未莊人真是不見世面的可笑的鄉下人呵,他們沒有見過城裏的煎魚! +阿Q“先前闊”,見識高,而且“真能做”,本來幾乎是一個“完人”了,但可惜他體質上還有一些缺點。最惱人的是在他頭皮上,頗有幾處不知於何時的癩瘡疤。這雖然也在他身上,而看阿Q的意思,倒也似乎以為不足貴的,因為他諱說“癩”以及一切近於“賴”的音,後來推而廣之,“光”也諱,“亮”也諱,再後來,連“燈”“燭”都諱了。一犯諱,不問有心與無心,阿Q便全疤通紅的發起怒來,估量了對手,口訥的他便罵,氣力小的他便打;然而不知怎麼一回事,總還是阿Q吃虧的時候多。於是他漸漸的變換了方針,大抵改為怒目而視了。 +誰知道阿Q採用怒目主義之後,未莊的閑人們便愈喜歡玩笑他。一見面,他們便假作吃驚的說: +“噲,亮起來了。” +阿Q照例的發了怒,他怒目而視了。 +“原來有保險燈在這裏!”他們並不怕。 +阿Q沒有法,只得另外想出報複的話來: +“你還不配……”這時候,又仿佛在他頭上的是一種高尚的光容的癩頭瘡,並非平常的癩頭瘡了;但上文說過,阿Q是有見識的,他立刻知道和“犯忌”有點抵觸,便不再往底下說。 +閒人還不完,只撩他,於是終而至於打。阿Q在形式上打敗了,被人揪住黃辮子,在壁上碰了四五個響頭,閒人這纔心滿意足的得勝的走了,阿Q站了一刻,心裏想,“我總算被兒子打了,現在的世界真不像樣……”於是也心滿意足的得勝的走了。 +阿Q想在心裏的,後來每每說出口來,所以凡是和阿Q玩笑的人們,幾乎全知道他有這一種精神上的勝利法,此後每逢揪住他黃辮子的時候,人就先一著對他說: +“阿Q,這不是兒子打老子,是人打畜生。自己說:人打畜生!” +阿Q兩隻手都捏住了自己的辮根,歪著頭,說道: +“打蟲豸,好不好?我是蟲豸——還不放麽?” +但雖然是蟲豸,閒人也並不放,仍舊在就近什麼地方給他碰了五六個響頭,這纔心滿意足的得勝的走了,他以為阿Q這回可遭了瘟。然而不到十秒鐘,阿Q也心滿意足的得勝的走了,他覺得他是第一個能夠自輕自賤的人,除了“自輕自賤”不算外,餘下的就是“第一個”。狀元不也是“第一個”麽?“你算是什麼東西”呢!? +阿Q以如是等等妙法剋服怨敵之後,便愉快的跑到酒店裏喝幾碗酒,又和別人調笑一通,口角一通,又得了勝,愉快的回到土穀祠,放倒頭睡著了。假使有錢,他便去押牌寶,一堆人蹲在地面上,阿Q即汗流滿面的夾在這中間,聲音他最響: +“青龍四百!” +“咳~~開~~啦!”樁家揭開盒子蓋,也是汗流滿面的唱。“天門啦~~角回啦~~!人和穿堂空在那裏啦~~!阿Q的銅錢拿過來~~! +“穿堂一百——一百五十!” +阿Q的錢便在這樣的歌吟之下,漸漸的輸入別個汗流滿面的人物的腰間。他終於只好擠出堆外,站在後面看,替別人著急,一直到散場,然後戀戀的回到土穀祠,第二天,腫著眼睛去工作。 +但真所謂“塞翁失馬安知非福”罷,阿Q不幸而贏了一回,他倒幾乎失敗了。 +這是未莊賽神的晚上。這晚上照例有一臺戲,戲臺左近,也照例有許多的賭攤。做戲的鑼鼓,在阿Q耳朵裏仿佛在十里之外;他只聽得樁家的歌唱了。他贏而又贏,銅錢變成角洋,角洋變成大洋,大洋又成了疊。他興高采烈得非常:“天門兩塊!” +他不知道誰和誰為什麼打起架來了。罵聲打聲腳步聲,昏頭昏腦的一大陣,他纔爬起來,賭攤不見了,人們也不見了,身上有幾處很似乎有些痛,似乎也挨了幾拳幾腳似的,幾個人詫異的對他看。他如有所失的走進土穀祠,定一定神,知道他的一堆洋錢不見了。趕賽會的賭攤多不是本村人,還到那裏去尋根柢呢? +很白很亮的一堆洋錢!而且是他的——現在不見了!說是算被兒子拿去了罷,總還是忽忽不樂;說自己是蟲豸罷,也還是忽忽不樂:他這回纔有些感到失敗的苦痛了。 +但他立刻轉敗為勝了。他擎起右手,用力的在自己臉上連打了兩個嘴巴,熱剌剌的有些痛;打完之後,便心平氣和起來,似乎打的是自己,被打的是別一個自己,不久也就仿佛是自己打了別個一般,——雖然還有些熱剌剌,——心滿意足的得勝的躺下了。他睡著了。 +然而阿Q雖然常優勝,卻直待蒙趙太爺打他嘴巴之後,這纔出了名。 +他付過地保二百文酒錢,憤憤的躺下了,後來想:“現在的世界太不成話,兒子打老子……”於是忽而想到趙太爺的威風,而現在是他的兒子了,便自己也漸漸的得意起來,爬起身,唱著《小孤孀上墳》到酒店去。這時候,他又覺得趙太爺高人一等了。 +說也怪,從此之後,果然大家也仿佛格外尊敬他。這在阿Q,或者以為因為他是趙太爺的父親,而其實也不然。未莊通例,倘如阿七打阿八,或者李四打張三,向來本不算口碑。一上口碑,則打的既有名,被打的也就托庇有了名。至於錯在阿Q,那自然是不必說。所以者何?就因為趙太爺是不會錯的。但他既然錯,為什麼大家又仿佛格外尊敬他呢?這可難解,穿鑿起來說,或者因為阿Q說是趙太爺的本家,雖然挨了打,大家也還怕有些真,總不如尊敬一些穩當。否則,也如孔廟裏的太牢一般,雖然與豬羊一樣,同是畜生,但既經聖人下箸,先儒們便不敢妄動了。 +阿Q此後倒得意了許多年。 +有一年的春天,他醉醺醺的在街上走,在牆根的日光下,看見王胡在那裏赤著膊捉蝨子,他忽然覺得身上也癢起來了。這王胡,又癩又胡,別人都叫他王癩胡,阿Q卻刪去了一個癩字,然而非常渺視他。阿Q的意思,以為癩是不足為奇的,只有這一部絡腮鬍子,實在太新奇,令人看不上眼。他於是併排坐下去了。倘是別的閑人們,阿Q本不敢大意坐下去。但這王胡旁邊,他有什麼怕呢?老實說:他肯坐下去,簡直還是抬舉他。 +阿Q也脫下破夾襖來,翻檢了一回,不知道因為新洗呢還是因為粗心,許多工夫,只捉到三四個。他看那王胡,卻是一個又一個,兩個又三個,只放在嘴裏畢畢剝剝的響。 +阿Q最初是失望,後來卻不平了:看不上眼的王胡尚且那麼多,自己倒反這樣少,這是怎樣的大失體統的事呵!他很想尋一兩個大的,然而竟沒有,好容易纔捉到一個中的,恨恨的塞在厚嘴唇裏,狠命一咬,劈的一聲,又不及王胡的響。 +他癩瘡疤塊塊通紅了,將衣服摔在地上,吐一口唾沫,說: +“這毛蟲!” +“癩皮狗,你罵誰?”王胡輕蔑的抬起眼來說。 +阿Q近來雖然比較的受人尊敬,自己也更高傲些,但和那些打慣的閑人們見面還膽怯,獨有這回卻非常武勇了。這樣滿臉鬍子的東西,也敢出言無狀麽? +“誰認便罵誰!”他站起來,兩手叉在腰間說。 +“你的骨頭癢了麽?”王胡也站起來,披上衣服說。 +阿Q以為他要逃了,搶進去就是一拳。這拳頭還未達到身上,已經被他抓住了,只一拉,阿Q蹌蹌踉踉的跌進去,立刻又被王胡扭住了辮子,要拉到牆上照例去碰頭。 +“‘君子動口不動手’!”阿Q歪著頭說。 +王胡似乎不是君子,並不理會,一連給他碰了五下,又用力的一推,至於阿Q跌出六尺多遠,這纔滿足的去了。 +在阿Q的記憶上,這大約要算是生平第一件的屈辱,因為王胡以絡腮鬍子的缺點,向來只被他奚落,從沒有奚落他,更不必說動手了。而他現在竟動手,很意外,難道真如市上所說,皇帝已經停了,不要秀才和舉人了,因此趙家減了威風,因此他們也便小覷了他麽? +阿Q無可適從的站著。 +遠遠的走來了一個人,他的對頭又到了。這也是阿Q最厭惡的一個人,就是錢太爺的大兒子。他先前跑上城裏去進洋學堂,不知怎麼又跑到東洋去了,半年之後他回到家裏來,腿也直了,辮子也不見了,他的母親大哭了十幾場,他的老婆跳了三回井。後來,他的母親到處說,“這辮子是被壞人灌醉了酒剪去了。本來可以做大官,現在只好等留長再說了。”然而阿Q不肯信,偏稱他“假洋鬼子”,也叫作“裏通外國的人”,一見他,一定在肚子裏暗暗的咒罵。 +阿Q尤其“深惡而痛絕之”的,是他的一條假辮子。辮子而至於假,就是沒有了做人的資格;他的老婆不跳第四回井,也不是好女人。 +這“假洋鬼子”近來了。 +“禿兒。驢……”阿Q歷來本只在肚子裏罵,沒有出過聲,這回因為正氣忿,因為要報仇,便不由的輕輕的說出來了。 +不料這禿兒卻拿著一支黃漆的棍子——就是阿Q所謂哭喪棒——大蹋步走了過來。阿Q在這剎那,便知道大約要打了,趕緊抽緊筋骨,聳了肩膀等候著,果然,拍的一聲,似乎確鑿打在自己頭上了。 +“我說他!”阿Q指著近旁的一個孩子,分辯說。 +拍!拍拍! +在阿Q的記憶上,這大約要算是生平第二件的屈辱。幸而拍拍的響了之後,於他倒似乎完結了一件事,反而覺得輕鬆些,而且“忘卻”這一件祖傳的寶貝也發生了效力,他慢慢的走,將到酒店門口,早已有些高興了。 +但對面走來了靜修庵裏的小尼姑。阿Q便在平時,看見伊也一定要唾罵,而況在屈辱之後呢?他於是發生了回憶,又發生了敵愾了。 +“我不知道我今天為什麼這樣晦氣,原來就因為見了你!”他想。 +他迎上去,大聲的吐一口唾沫: +“咳,呸!” +小尼姑全不睬,低了頭只是走。阿Q走近伊身旁,突然伸出手去摩著伊新剃的頭皮,呆笑著,說: +“禿兒!快回去,和尚等著你……” +“你怎麼動手動腳……”尼姑滿臉通紅的說,一面趕快走。 +酒店裏的人大笑了。阿Q看見自己的勛業得了賞識,便愈加興高采烈起來: +“和尚動得,我動不得?”他扭住伊的面頰。 +酒店裏的人大笑了。阿Q更得意,而且為了滿足那些賞鑒家起見,再用力的一擰,纔放手。 +他這一戰,早忘卻了王胡,也忘卻了假洋鬼子,似乎對於今天的一切“晦氣”都報了仇;而且奇怪,又仿佛全身比拍拍的響了之後輕鬆,飄飄然的似乎要飛去了。 +“這斷子絕孫的阿Q!”遠遠地聽得小尼姑的帶哭的聲音。 +“哈哈哈!”阿Q十分得意的笑。 +“哈哈哈!”酒店裏的人也九分得意的笑。 +有人說:有些勝利者,願意敵手如虎,如鷹,他纔感得勝利的歡喜;假使如羊,如小雞,他便反覺得勝利的無聊。又有些勝利者,當剋服一切之後,看見死的死了,降的降了,“臣誠惶誠恐死罪死罪”,他於是沒有了敵人,沒有了對手,沒有了朋友,只有自己在上,一個,孤另另,淒涼,寂寞,便反而感到了勝利的悲哀。然而我們的阿Q卻沒有這樣乏,他是永遠得意的:這或者也是中國精神文明冠於全球的一個證據了。 +看那,他飄飄然的似乎要飛去了! +然而這一次的勝利,卻又使他有些異樣。他飄飄然的飛了大半天,飄進土穀祠,照例應該躺下便打鼾。誰知道這一晚,他很不容易合眼,他覺得自己的大拇指和第二指有點古怪:仿佛比平常滑膩些。不知道是小尼姑的臉上有一點滑膩的東西粘在他指上,還是他的指頭在小尼姑臉上磨得滑膩了?…… +“斷子絕孫的阿Q!” +阿Q的耳朵裏又聽到這句話。他想:不錯,應該有一個女人,斷子絕孫便沒有人供一碗飯,……應該有一個女人。夫“不孝有三無後為大”,而“若敖之鬼餒而”,也是一件人生的大哀,所以他那思想,其實是樣樣合於聖經賢傳的,只可惜後來有些“不能收其放心”了。 +“女人,女人!……”他想。 +“……和尚動得……女人,女人!……女人!”他又想。 +我們不能知道這晚上阿Q在什麼時候纔打鼾。但大約他從此總覺得指頭有些滑膩,所以他從此總有些飄飄然;“女……”他想。 +即此一端,我們便可以知道女人是害人的東西。 +中國的男人,本來大半都可以做聖賢,可惜全被女人毀掉了。商是妲己鬧亡的;周是褒姒弄壞的;秦……雖然史無明文,我們也假定他因為女人,大約未必十分錯;而董卓可是的確給貂蟬害死了。 +阿Q本來也是正人,我們雖然不知道他曾蒙什麼明師指授過,但他對於“男女之大防”卻歷來非常嚴;也很有排斥異端——如小尼姑及假洋鬼子之類——的正氣。他的學說是:凡尼姑,一定與和尚私通;一個女人在外面走,一定想引誘野男人;一男一女在那裏講話,一定要有勾當了。為懲治他們起見,所以他往往怒目而視,或者大聲說幾句“誅心”話,或者在冷僻處,便從後面擲一塊小石頭。 +誰知道他將到“而立”之年,竟被小尼姑害得飄飄然了。這飄飄然的精神,在禮教上是不應該有的,——所以女人真可惡,假使小尼姑的臉上不滑膩,阿Q便不至於被蠱,又假使小尼姑的臉上蓋一層布,阿Q便也不至於被蠱了,——他五六年前,曾在戲臺下的人叢中擰過一個女人的大腿,但因為隔一層褲,所以此後並不飄飄然,——而小尼姑並不然,這也足見異端之可惡。 +“女……”阿Q想。 +他對於以為“一定想引誘野男人”的女人,時常留心看,然而伊並不對他笑。他對於和他講話的女人,也時常留心聽,然而伊又並不提起關於什麼勾當的話來。哦,這也是女人可惡之一節:伊們全都要裝“假正經”的。 +這一天,阿Q在趙太爺家裏舂了一天米,吃過晚飯,便坐在廚房裏吸旱煙。倘在別家,吃過晚飯本可以回去的了,但趙府上晚飯早,雖說定例不准掌燈,一吃完便睡覺,然而偶然也有一些例外:其一,是趙大爺未進秀才的時候,准其點燈讀文章;其二,便是阿Q來做短工的時候,准其點燈舂米。因為這一條例外,所以阿Q在動手舂米之前,還坐在廚房裏吸旱煙。 +吳媽,是趙太爺家裏唯一的女僕,洗完了碗碟,也就在長凳上坐下了,而且和阿Q談閑天: +“太太兩天沒有吃飯哩,因為老爺要買一個小的……” +女人……吳媽……這小孤孀……”阿Q想。 +“我們的少奶奶是八月裏要生孩子了……” +“女人……”阿Q想。 +阿Q放下煙管,站了起來。 +“我們的少奶奶……”吳媽還嘮叨說。 +“我和你困覺,我和你困覺!”阿Q忽然搶上去,對伊跪下了。 +一剎時中很寂然。 +“阿呀!”吳媽楞了一息,突然發抖,大叫著往外跑,且跑且嚷,似乎後來帶哭了。 +阿Q對了牆壁跪著也發楞,於是兩手扶著空板凳,慢慢的站起來,仿佛覺得有些糟。他這時確也有些忐忑了,慌張的將煙管插在褲帶上,就想去舂米。蓬的一聲,頭上著了很粗的一下,他急忙迴轉身去,那秀才便拿了一支大竹杠站在他面前。 +“你反了,……你這……” +大竹杠又向他劈下來了。阿Q兩手去抱頭,拍的正打在指節上,這可很有些痛。他衝出廚房門,仿佛背上又著了一下似的。 +“忘八蛋!”秀才在後面用了官話這樣罵。 +阿Q奔入舂米場,一個人站著,還覺得指頭痛,還記得“忘八蛋”,因為這話是未莊的鄉下人從來不用,專是見過官府的闊人用的,所以格外怕,而印象也格外深。但這時,他那“女……”的思想卻也沒有了。而且打罵之後,似乎一件事也已經收束,倒反覺得一無掛礙似的,便動手去舂米。舂了一會,他熱起來了,又歇了手脫衣服。 +脫下衣服的時候,他聽得外面很熱鬧,阿Q生平本來最愛看熱鬧,便即尋聲走出去了。尋聲漸漸的尋到趙太爺的內院裏,雖然在昏黃中,卻辨得出許多人,趙府一家連兩日不吃飯的太太也在內,還有間壁的鄒七嫂,真正本家的趙白眼,趙司晨。 +少奶奶正拖著吳媽走出下房來,一面說: +“你到外面來,……不要躲在自己房裏想……” +“誰不知道你正經,……短見是萬萬尋不得的。”鄒七嫂也從旁說。 +吳媽只是哭,夾些話,卻不甚聽得分明。 +阿Q想:“哼,有趣,這小孤孀不知道鬧著什麼玩意兒了?”他想打聽,走近趙司晨的身邊。這時他猛然間看見趙大爺向他奔來,而且手裏捏著一支大竹杠。他看見這一支大竹杠,便猛然間悟到自己曾經被打,和這一場熱鬧似乎有點相關。他翻身便走,想逃回舂米場,不圖這支竹杠阻了他的去路,於是他又翻身便走,自然而然的走出後門,不多工夫,已在土穀祠內了。 +阿Q坐了一會,皮膚有些起粟,他覺得冷了,因為雖在春季,而夜間頗有餘寒,尚不宜於赤膊。他也記得布衫留在趙家,但倘若去取,又深怕秀才的竹杠。然而地保進來了。 +“阿Q,你的媽媽的!你連趙家的用人都調戲起來,簡直是造反。害得我晚上沒有覺睡,你的媽媽的!……” +如是云云的教訓了一通,阿Q自然沒有話。臨末,因為在晚上,應該送地保加倍酒錢四百文,阿Q正沒有現錢,便用一頂氈帽做抵押,並且訂定了五條件: +一 明天用紅燭——要一斤重的——一對,香一封,到趙府上去賠罪。 +二 趙府上請道士祓除縊鬼,費用由阿Q負擔。 +三 阿Q從此不准踏進趙府的門檻。四 吳媽此後倘有不測,惟阿Q是問。 +五 阿Q不准再去索取工錢和布衫。 +阿Q自然都答應了,可惜沒有錢。幸而已經春天,棉被可以無用,便質了二千大錢,履行條約。赤膊磕頭之後,居然還剩幾文,他也不再贖氈帽,統統喝了酒了。但趙家也並不燒香點燭,因為太太拜佛的時候可以用,留著了。那破布衫是大半做了少奶奶八月間生下來的孩子的襯尿布,那小半破爛的便都做了吳媽的鞋底。 +第五章 生計問題[编辑 +阿Q禮畢之後,仍舊回到土穀祠,太陽下去了,漸漸覺得世上有些古怪。他仔細一想,終於省悟過來:其原因蓋在自己的赤膊。他記得破夾襖還在,便披在身上,躺倒了,待張開眼睛,原來太陽又已經照在西牆上頭了。他坐起身,一面說道,“媽媽的……” +他起來之後,也仍舊在街上逛,雖然不比赤膊之有切膚之痛,卻又漸漸的覺得世上有些古怪了。仿佛從這一天起,未莊的女人們忽然都怕了羞,伊們一見阿Q走來,便個個躲進門裏去。甚而至於將近五十歲的鄒七嫂,也跟著別人亂鑽,而且將十一歲的女兒都叫進去了。阿Q很以為奇,而且想:“這些東西忽然都學起小姐模樣來了。這娼婦們……” +,卻是許多日以後的事。其一,酒店不肯賒欠了;其二,管土穀祠的老頭子說些廢話,似乎叫他走;其三,他雖然記不清多少日,但確乎有許多日,沒有一個人來叫他做短工。酒店不賒,熬著也罷了;老頭子催他走,嚕囌一通也就算了;只是沒有人來叫他做短工,卻使阿Q肚子餓:這委實是一件非常“媽媽的”的事情。 +阿Q忍不下去了,他只好到老主顧的家裏去探問,——但獨不許踏進趙府的門檻,——然而情形也異樣:一定走出一個男人來,現了十分煩厭的相貌,像回覆乞丐一般的搖手道: +“沒有沒有!你出去!” +阿Q愈覺得稀奇了。他想,這些人家向來少不了要幫忙,不至於現在忽然都無事,這總該有些蹊蹺在裏面了。他留心打聽,纔知道他們有事都去叫小Don。這小D,是一個窮小子,又瘦又乏,在阿Q的眼睛裏,位置是在王胡之下的,誰料這小子竟謀了他的飯碗去。所以阿Q這一氣,更與平常不同,當氣憤憤的走著的時候,忽然將手一揚,唱道: +“我手執鋼鞭將你打!……” +幾天之後,他竟在錢府的照壁前遇見了小D。“仇人相見分外眼明”,阿Q便迎上去,小D也站住了。 +“畜生!”阿Q怒目而視的說,嘴角上飛出唾沫來。 +“我是蟲豸,好麽?……”小D說。 +這謙遜反使阿Q更加憤怒起來,但他手裏沒有鋼鞭,於是只得撲上去,伸手去拔小D的辮子。小D一手護住了自己的辮根,一手也來拔阿Q的辮子,阿Q便也將空著的一隻手護住了自己的辮根。從先前的阿Q看來,,小D本來是不足齒數的,但他近來挨了餓,又瘦又乏已經不下於小D,所以便成了勢均力敵的現象,四隻手拔著兩顆頭,都彎了腰,在錢家粉牆上映出一個藍色的虹形,至於半點鐘之久了。 +“好了,好了!”看的人們說,大約是解勸的。 +“好,好!”看的人們說,不知道是解勸,是頌揚,還是煽動。 +然而他們都不聽。阿Q進三步,小D便退三步,都站著;小D進三步,阿Q便退三步,又都站著。大約半點鐘,——未莊少有自鳴鐘,所以很難說,或者二十分,——他們的頭髮裏便都冒煙,額上便都流汗,阿Q的手放鬆了,在同一瞬間,小D的手也正放鬆了,同時直起,同時退開,都擠出人叢去。 +“記著罷,媽媽的……”阿Q回過頭去說。 +“媽媽的,記著罷……”小D也回過頭來說。 +這一場“龍虎鬥”似乎並無勝敗,也不知道看的人可滿足,都沒有發什麼議論,而阿Q卻仍然沒有人來叫他做短工。 +有一日很溫和,微風拂拂的頗有些夏意了,阿Q卻覺得寒冷起來,但這還可擔當,第一倒是肚子餓。棉被,氈帽,布衫,早已沒有了,其次就賣了棉襖;現在有褲子,卻萬不可脫的;有破夾襖,又除了送人做鞋底之外,決定賣不出錢。他早想在路上拾得一註錢,但至今還沒有見;他想在自己的破屋裏忽然尋到一註錢,慌張的四顧,但屋內是空虛而且瞭然。於是他決計出門求食去了。 +他在路上走著要“求食”,看見熟識的酒店,看見熟識的饅頭,但他都走過了,不但沒有暫停,而且並不想要。他所求的不是這類東西了;他求的是什麼東西,他自己不知道。 +未莊本不是大村鎮,不多時便走盡了。村外多是水田,滿眼是新秧的嫩綠,夾著幾個圓形的活動的黑點,便是耕田的農夫。阿Q並不賞鑒這田家樂,卻只是走,因為他直覺的知道這與他的“求食”之道是很遼遠的。但他終於走到靜修庵的牆外了。 +庵周圍也是水田,粉牆突出在新綠裏,後面的低土牆裏是菜園。阿Q遲疑了一會,四面一看,並沒有人。他便爬上這矮牆去,扯著何首烏藤,但泥土仍然簌簌的掉,阿Q的腳也索索的抖;終於攀著桑樹枝,跳到裏面了。裏面真是鬱鬱蔥蔥,但似乎並沒有黃酒饅頭,以及此外可吃的之類。靠西牆是竹叢,下麵許多筍,只可惜都是並未煮熟的,還有油菜早經結子,芥菜已將開花,小白菜也很老了。 +阿Q仿佛文童落第似的覺得很冤屈,他慢慢走近園門去,忽而非常驚喜了,這分明是一畦老蘿蔔。他於是蹲下便拔,而門口突然伸出一個很圓的頭來,又即縮回去了,這分明是小尼姑。小尼姑之流是阿Q本來視若草芥的,但世事須“退一步想”,所以他便趕緊拔起四個蘿蔔,擰下青葉,兜在大襟裏。然而老尼姑已經出來了。 +“阿彌陀佛,阿Q,你怎麼跳進園裏來偷蘿蔔!……阿呀,罪過呵,阿唷,阿彌陀佛!……” +“我什麼時候跳進你的園裏來偷蘿蔔?”阿Q且看且走的說。 +“現在……這不是?”老尼姑指著他的衣兜。 +“這是你的?你能叫得他答應你麽?你……” +阿Q沒有說完話,拔步便跑;追來的是一匹很肥大的黑狗。這本來在前門的,不知怎的到後園來了。黑狗哼而且追,已經要咬著阿Q的腿,幸而從衣兜裏落下一個蘿蔔來,那狗給一嚇,略略一停,阿Q已經爬上桑樹,跨到土牆,連人和蘿蔔都滾出牆外面了。只剩著黑狗還在對著桑樹嗥,老尼姑念著佛。 +阿Q怕尼姑又放出黑狗來,拾起蘿蔔便走,沿路又撿了幾塊小石頭,但黑狗卻並不再現。阿Q於是拋了石塊,一面走一面吃,而且想道,這裏也沒有什麼東西尋,不如進城去…… +待三個蘿蔔吃完時,他已經打定了進城的主意了。 +第六章 從中興到末路[编辑] +在未莊再看見阿Q出現的時候,是剛過了這年的中秋。人們都驚異,說是阿Q回來了,於是又回上去想道,他先前那裏去了呢?阿Q前幾回的上城,大抵早就興高采烈的對人說,但這一次卻並不,所以也沒有一個人留心到。他或者也曾告訴過管土穀祠的老頭子,然而未莊老例,只有趙太爺、錢太爺和秀才大爺上城纔算一件事。假洋鬼子尚且不足數,何況是阿Q:因此老頭子也就不替他宣傳,而未莊的社會上也就無從知道了。 +但阿Q這回的回來,卻與先前大不同,確乎很值得驚異。天色將黑,他睡眼蒙朧的在酒店門前出現了,他走近櫃臺,從腰間伸出手來,滿把是銀的和銅的,在櫃上一扔說,“現錢!打酒來!”穿的是新夾襖,看去腰間還掛著一個大搭連,沉鈿鈿的將褲帶墜成了很彎很彎的弧線。未莊老例,看見略有些醒目的人物,是與其慢也寧敬的,現在雖然明知道是阿Q,但因為和破夾襖的阿Q有些兩樣了,古人云,“士別三日便當刮目相待”,所以堂倌,掌櫃,酒客,路人,便自然顯出一種凝而且敬的形態來。掌櫃既先之以點頭,又繼之以談話: +“豁,阿Q,你回來了!” +“回來了。” +“發財發財,你是——在……” +“上城去了!” +這一件新聞,第二天便傳遍了全未莊。人人都願意知道現錢和新夾襖的阿Q的中興史,所以在酒店裏,茶館裏,廟簷下,便漸漸的探聽出來了。這結果,是阿Q得了新敬畏。 +據阿Q說,他是在舉人老爺家裏幫忙。這一節,聽的人都肅然了。這老爺本姓白,但因為合城裏只有他一個舉人,所以不必再冠姓,說起舉人來就是他。這也不獨在未莊是如此,便是一百里方圓之內也都如此,人們幾乎多以為他的姓名就叫舉人老爺的了。在這人的府上幫忙,那當然是可敬的。但據阿Q又說,他卻不高興再幫忙了,因為這舉人老爺實在太“媽媽的”了。這一節,聽的人都嘆息而且快意,因為阿Q本不配在舉人老爺家裏幫忙,而不幫忙是可惜的。 +據阿Q說,他的回來,似乎也由於不滿意城裏人,這就在他們將長凳稱為條凳,而且煎魚用蔥絲,加以最近觀察所得的缺點,是女人的走路也扭得不很好。然而也偶有大可佩服的地方,即如未莊的鄉下人不過打三十二張的竹牌,只有假洋鬼子能夠叉“麻醬”,城裏卻連小烏龜子都叉得精熟的。什麼假洋鬼子,只要放在城裏的十幾歲的小烏龜子的手裏,也就立刻是“小鬼見閻王”。這一節,聽的人都赧然了。 +“你們可看見過殺頭麽?”阿Q說,“咳,好看。殺革命黨。唉,好看好看,……”他搖搖頭,將唾沫飛在正對面的趙司晨的臉上。這一節,聽的人都凜然了。但阿Q又四面一看,忽然揚起右手,照著伸長脖子聽得出神的王胡的後項窩上直劈下去道: +“嚓!” +王胡驚得一跳,同時電光石火似的趕快縮了頭,而聽的人又都悚然而且欣然了。從此王胡瘟頭瘟腦的許多日,並且再不敢走近阿Q的身邊;別的人也一樣。 +阿Q這時在未莊人眼睛裏的地位,雖不敢說超過趙太爺,但謂之差不多,大約也就沒有什麼語病的了。 +然而不多久,這阿Q的大名忽又傳遍了未莊的閨中。雖然未莊只有錢趙兩姓是大屋,此外十之九都是淺閨,但閨中究竟是閨中,所以也算得一件神異。女人們見面時一定說,鄒七嫂在阿Q那裏買了一條藍綢裙,舊固然是舊的,但只化了九角錢。還有趙白眼的母親,——一說是趙司晨的母親,待考,——也買了一件孩子穿的大紅洋紗衫,七成新,只用三百大錢九二串。於是伊們都眼巴巴的想見阿Q,缺綢裙的想問他買綢裙,要洋紗衫的想問他買洋紗衫,不但見了不逃避,有時阿Q已經走過了,也還要追上去叫住他,問道: +“阿Q,你還有綢裙麽?沒有?紗衫也要的,有罷?” +後來這終於從淺閨傳進深閨裏去了。因為鄒七嫂得意之餘,將伊的綢裙請趙太太去鑒賞,趙太太又告訴了趙太爺而且著實恭維了一番。趙太爺便在晚飯桌上,和秀才大爺討論,以為阿Q實在有些古怪,我們門窗應該小心些;但他的東西,不知道可還有什麼可買,也許有點好東西罷。加以趙太太也正想買一件價廉物美的皮背心。於是家族決議,便托鄒七嫂即刻去尋阿Q,而且為此新闢了第三種的例外:這晚上也姑且特准點油燈。 +油燈幹了不少了,阿Q還不到。趙府的全眷都很焦急,打著呵欠,或恨阿Q太飄忽,或怨鄒七嫂不上緊。趙太太還怕他因為春天的條件不敢來,而趙太爺以為不足慮:因為這是“我”去叫他的。果然,到底趙太爺有見識,阿Q終於跟著鄒七嫂進來了。“他只說沒有沒有,我說你自己當面說去,他還要說,我說……”鄒七嫂氣喘吁吁的走著說。 +“太爺!”阿Q似笑非笑的叫了一聲,在簷下站住了。 +“阿Q,聽說你在外面發財,”趙太爺踱開去,眼睛打量著他的全身,一面說。“那很好,那很好的。這個,……聽說你有些舊東西,……可以都拿來看一看,……這也並不是別的,因為我倒要……”“我對鄒七嫂說過了。都完了。”“完了?”趙太爺不覺失聲的說,“那裏會完得這樣快呢?”“那是朋友的,本來不多。他們買了些,……”“總該還有一點罷。”“現在,只剩了一張門幕了。”“就拿門幕來看看罷。”趙太太慌忙說。 +“那麼,明天拿來就是,”趙太爺卻不甚熱心了。“阿Q,你以後有什麼東西的時候,你儘先送來給我們看,……” +“價錢決不會比別家出得少!”秀才說。秀才娘子忙一瞥阿Q的臉,看他感動了沒有。 +“我要一件皮背心。”趙太太說。 +阿Q雖然答應著,卻懶洋洋的出去了,也不知道他是否放在心上。這使趙太爺很失望,氣憤而且擔心,至於停止了打呵欠。秀才對於阿Q的態度也很不平,於是說,這忘八蛋要提防,或者不如吩咐地保,不許他住在未莊。但趙太爺以為不然,說這也怕要結怨,況且做這路生意的大概是“老鷹不吃窩下食”,本村倒不必擔心的;只要自己夜裏警醒點就是了。秀才聽了這“庭訓”,非常之以為然,便即刻撤銷了驅逐阿Q的提議,而且叮囑鄒七嫂,請伊千萬不要向人提起這一段話。 +但第二日,鄒七嫂便將那藍裙去染了皂,又將阿Q可疑之點傳揚出去了,可是確沒有提起秀才要驅逐他這一節。然而這已經於阿Q很不利。最先,地保尋上門了,取了他的門幕去,阿Q說是趙太太要看的,而地保也不還並且要議定每月的孝敬錢。其次,是村人對於他的敬畏忽而變相了,雖然還不敢來放肆,卻很有遠避的神情,而這神情和先前的防他來“嚓”的時候又不同,頗混著“敬而遠之”的分子了。 +只有一班閑人們卻還要尋根究底的去探阿Q的底細。阿Q也並不諱飾,傲然的說出他的經驗來。從此他們纔知道,他不過是一個小腳色,不但不能上牆,並且不能進洞,只站在洞外接東西。有一夜,他剛纔接到一個包,正手再進去,不一會,只聽得裏面大嚷起來,他便趕緊跑,連夜爬出城,逃回未莊來了,從此不敢再去做。然而這故事卻於阿Q更不利,村人對於阿Q的“敬而遠之”者,本因為怕結怨,誰料他不過是一個不敢再偷的偷兒呢?這實在是“斯亦不足畏也矣”。 +第七章 革命[编辑] +宣統三年九月十四日——即阿Q將搭連賣給趙白眼的這一天——三更四點,有一隻大烏篷船到了趙府上的河埠頭。這船從黑魆魆中盪來,鄉下人睡得熟,都沒有知道;出去時將近黎明,卻很有幾個看見的了。據探頭探腦的調查來的結果,知道那竟是舉人老爺的船! +那船便將大不安載給了未莊,不到正午,全村的人心就很動搖。船的使命,趙家本來是很秘密的,但茶坊酒肆裏卻都說,革命黨要進城,舉人老爺到我們鄉下來逃難了。惟有鄒七嫂不以為然,說那不過是幾口破衣箱,舉人老爺想來寄存的,卻已被趙太爺回覆轉去。其實舉人老爺和趙秀才素不相能,在理本不能有“共患難”的情誼,況且鄒七嫂又和趙家是鄰居,見聞較為切近,所以大概該是伊對的。 +阿Q的耳朵裏,本來早聽到過革命黨這一句話,今年又親眼見過殺掉革命黨。但他有一種不知從那裏來的意見,以為革命黨便是造反,造反便是與他為難,所以一向是“深惡而痛絕之”的。殊不料這卻使百里聞名的舉人老爺有這樣怕,於是他未免也有些“神往”了,況且未莊的一群鳥男女的慌張的神情,也使阿Q更快意。 +“革命也好罷,”阿Q想,“革這夥媽媽的的命,太可惡!太可恨!……便是我,也要投降革命黨了。” +阿Q近來用度窘,大約略略有些不平;加以午間喝了兩碗空肚酒,愈加醉得快,一面想一面走,便又飄飄然起來。不知怎麼一來,忽而似乎革命黨便是自己,未莊人卻都是他的俘虜了。他得意之餘,禁不住大聲的嚷道: +“造反了!造反了!” +未莊人都用了驚懼的眼光對他看。這一種可憐的眼光,是阿Q從來沒有見過的,一見之下,又使他舒服得如六月裏喝了雪水。他更加高興的走而且喊道: +“好,……我要什麼就是什麼,我歡喜誰就是誰。得得,鏘鏘!悔不該,酒醉錯斬了鄭賢弟,悔不該,呀呀呀……得得,鏘鏘,得,鏘令鏘!我手執鋼鞭將你打……” +趙府上的兩位男人和兩個真本家,也正站在大門口論革命。阿Q沒有見,昂了頭直唱過去。“得得,……” +“老Q,”趙太爺怯怯的迎著低聲的叫。“鏘鏘,”阿Q料不到他的名字會和“老”字聯結起來,以為是一句別的話,與己無幹,只是唱。“得,鏘,鏘令鏘,鏘!”“老Q。”“悔不該……” +“阿Q!”秀才只得直呼其名了。 +阿Q這纔站住,歪著頭問道,“什麼?” +“老Q,…現在……”趙太爺卻又沒有話,“現在……發財麽?” +“發財?自然。要什麼就是什麼……” +“阿……Q哥,像我們這樣窮朋友是不要緊的……”趙白眼惴惴的說,似乎想探革命黨的口風。 +“窮朋友?你總比我有錢。”阿Q說著自去了。 +大家都憮然,沒有話。趙太爺父子回家,晚上商量到點燈。趙白眼回家,便從腰間扯下搭連來,交給他女人藏在箱底裏。 +阿Q飄飄然的飛了一通,回到土穀祠,酒已經醒透了。這晚上,管祠的老頭子也意外的和氣,請他喝茶;阿Q便向他要了兩個餅,吃完之後,又要了一支點過的四兩燭和一個樹燭臺,點起來,獨自躺在自己的小屋裏。他說不出的新鮮而且高興,燭火像元夜似的閃閃的跳,他的思想也迸跳起來了: +“造反?有趣,……來了一陣白盔白甲的革命黨,都拿著板刀,鋼鞭,炸彈,洋炮,三尖兩刃刀,鉤鐮槍,走過土穀祠,叫道,‘阿Q!同去同去!’於是一同去。…… +“這時未莊的一夥鳥男女纔好笑哩,跪下叫道,‘阿Q,饒命!’誰聽他!第一個該死的是小D和趙太爺,還有秀才,還有假洋鬼子,……留幾條麽?王胡本來還可留,但也不要了。…… +“東西,……直走進去打開箱子來:元寶,洋錢,洋紗衫,……秀才娘子的一張寧式床先搬到土穀祠,此外便擺了錢家的桌椅,——或者也就用趙家的罷。自己是不動手的了,叫小D來搬,要搬得快,搬得不快打嘴巴。…… +“趙司晨的妹子真醜。鄒七嫂的女兒過幾年再說。假洋鬼子的老婆會和沒有辮子的男人睡覺,嚇,不是好東西!秀才的老婆是眼胞上有疤的。……吳媽長久不見了,不知道在那裏,——可惜腳太大。” +阿Q沒有想得十分停當,已經發了鼾聲,四兩燭還只點去了小半寸,紅焰焰的光照著他張開的嘴。 +“荷荷!”阿Q忽而大叫起來,抬了頭倉皇的四顧,待到看見四兩燭,卻又倒頭睡去了。 +第二天他起得很遲,走出街上看時,樣樣都照舊。他也仍然肚餓,他想著,想不起什麼來;但他忽而似乎有了主意了,慢慢的跨開步,有意無意的走到靜修庵。 +庵和春天時節一樣靜,白的牆壁和漆黑的門。他想了一想,前去打門,一隻狗在裏面叫。他急急拾了幾塊斷磚,再上去較為用力的打,打到黑門上生出許多麻點的時候,纔聽得有人來開門。 +阿Q連忙捏好磚頭,擺開馬步,準備和黑狗來開戰。但庵門只開了一條縫,並無黑狗從中衝出,望進去只有一個老尼姑。 +“你又來什麼事?”伊大吃一驚的說。 +“革命了……你知道?……”阿Q說得很含糊。 +“革命革命,革過一革的,……你們要革得我們怎麼樣呢?”老尼姑兩眼通紅的說。 +“什麼?……”阿Q詫異了。 +“你不知道,他們已經來革過了!” +“誰?……”阿Q更其詫異了。 +“那秀才和洋鬼子!” +阿Q很出意外,不由的一錯愕;老尼姑見他失了銳氣,便飛速的關了門,阿Q再推時,牢不可開,再打時,沒有回答了。 +那還是上午的事。趙秀才消息靈,一知道革命黨已在夜間進城,便將辮子盤在頂上,一早去拜訪那歷來也不相能的錢洋鬼子。這是“咸與維新”的時候了,所以他們便談得很投機,立刻成了情投意合的同志,也相約去革命。他們想而又想,纔想出靜修庵裏有一塊“皇帝萬歲萬萬歲”的龍牌,是應該趕緊革掉的,於是又立刻同到庵裏去革命。因為老尼姑來阻擋,說了三句話,他們便將伊當作滿政府,在頭上很給了不少的棍子和栗鑿。尼姑待他們走後,定了神來檢點,龍牌固然已經碎在地上了,而且又不見了觀音娘娘座前的一個宣德爐。 +這事阿Q後來纔知道。他頗悔自己睡著,但也深怪他們不來招呼他。他又退一步想道: +“難道他們還沒有知道我已經投降了革命黨麽?” +第八章 不准革命[编辑] +未莊的人心日見其安靜了。據傳來的消息,知道革命黨雖然進了城,倒還沒有什麼大異樣。知縣大老爺還是原官,不過改稱了什麼,而且舉人老爺也做了什麼——這些名目,未莊人都說不明白——官,帶兵的也還是先前的老把總。只有一件可怕的事是另有幾個不好的革命黨夾在裏面搗亂,第二天便動手剪辮子,聽說那鄰村的航船七斤便著了道兒,弄得不像人樣子了。但這卻還不算大恐怖,因為未莊人本來少上城,即使偶有想進城的,也就立刻變了計,碰不著這危險。阿Q本也想進城去尋他的老朋友,一得這消息,也只得作罷了。 +但未莊也不能說是無改革。幾天之後,將辮子盤在頂上的逐漸增加起來了,早經說過,最先自然是茂才公,其次便是趙司晨和趙白眼,後來是阿Q。倘在夏天,大家將辮子盤在頭頂上或者打一個結,本不算什麼稀奇事,但現在是暮秋,所以這“秋行夏令”的情形,在盤辮家不能不說是萬分的英斷,而在未莊也不能說無關於改革了。 +趙司晨腦後空蕩盪的走來,看見的人大嚷說, +“豁,革命黨來了!” +阿Q聽到了很羡慕。他雖然早知道秀才盤辮的大新聞,但總沒有想到自己可以照樣做,現在看見趙司晨也如此,纔有了學樣的意思,定下實行的決心。他用一支竹筷將辮子盤在頭頂上,遲疑多時,這纔放膽的走去。 +他在街上走,人也看他,然而不說什麼話,阿Q當初很不快,後來便很不平。他近來很容易鬧脾氣了;其實他的生活,倒也並不比造反之前反艱難,人見他也客氣,店鋪也不說要現錢。而阿Q總覺得自己太失意:既然革了命,不應該只是這樣的。況且有一回看見小D,愈使他氣破肚皮了。 +小D也將辮子盤在頭頂上了,而且也居然用一支竹筷。阿Q萬料不到他也敢這樣做,自己也決不准他這樣做!小D是什麼東西呢?他很想即刻揪住他,拗斷他的竹筷,放下他的辮子,並且批他幾個嘴巴,聊且懲罰他忘了生辰八字,也敢來做革命黨的罪。但他終於饒放了,單是怒目而視的吐一口唾沫道“呸!” +這幾日裏,進城去的只有一個假洋鬼子。趙秀才本也想靠著寄存箱子的淵源,親身去拜訪舉人老爺的,但因為有剪辮的危險,所以也中止了。他寫了一封“黃傘格”的信,托假洋鬼子帶上城,而且托他給自己紹介紹介,去進自由黨。假洋鬼子回來時,向秀才討還了四塊洋錢,秀才便有一塊銀桃子掛在大襟上了;未莊人都驚服,說這是柿油黨的頂子,抵得一個翰林;趙太爺因此也驟然大闊,遠過於他兒子初雋秀才的時候,所以目空一切,見了阿Q,也就很有些不放在眼裏了。 +阿Q正在不平,又時時刻刻感著冷落,一聽得這銀桃子的傳說,他立即悟出自己之所以冷落的原因了:要革命,單說投降,是不行的;盤上辮子,也不行的;第一著仍然要和革命黨去結識。他生平所知道的革命黨只有兩個,城裏的一個早已“嚓”的殺掉了,現在只剩了一個假洋鬼子。他除卻趕緊去和假洋鬼子商量之外,再沒有別的道路了。 +錢府的大門正開著,阿Q便怯怯的躄進去。他一到裏面,很吃了驚,只見假洋鬼子正站在院子的中央,一身烏黑的大約是洋衣,身上也掛著一塊銀桃子,手裏是阿Q曾經領教過的棍子,已經留到一尺多長的辮子都拆開了披在肩背上,蓬頭散髮的像一個劉海仙。對面挺直的站著趙白眼和三個閑人,正在必恭必敬的聽說話。 +阿Q輕輕的走近了,站在趙白眼的背後,心裏想招呼,卻不知道怎麼說纔好:叫他假洋鬼子固然是不行的了,洋人也不妥,革命黨也不妥,或者就應該叫洋先生了罷。 +洋先生卻沒有見他,因為白著眼睛講得正起勁: +“我是性急的,所以我們見面,我總是說:洪哥!我們動手罷!他卻總說道No!——這是洋話,你們不懂的。否則早已成功了。然而這正是他做事小心的地方。他再三再四的請我上湖北,我還沒有肯。誰願意在這小縣城裏做事情。……” +“唔,……這個……”阿Q候他略停,終於用十二分的勇氣開口了,但不知道因為什麼,又並不叫他洋先生。 +聽著說話的四個人都吃驚的回顧他。洋先生也纔看見: +“什麼?” +“我……” +“出去!” +“我要投……” +“滾出去!”洋先生揚起哭喪棒來了。 +趙白眼和閑人們便都吆喝道:“先生叫你滾出去,你還不聽麽!” +阿Q將手向頭上一遮,不自覺的逃出門外;洋先生倒也沒有追。他快跑了六十多步,這纔慢慢的走,於是心裏便湧起了憂愁:洋先生不准他革命,他再沒有別的路;從此決不能望有白盔白甲的人來叫他,他所有的抱負,志向,希望,前程,全被一筆勾銷了。至於閑人們傳揚開去,給小D王胡等輩笑話,倒是還在其次的事。 +他似乎從來沒有經驗過這樣的無聊。他對於自己的盤辮子,仿佛也覺得無意味,要侮蔑;為報仇起見,很想立刻放下辮子來,但也沒有竟放。他遊到夜間,賒了兩碗酒,喝下肚去,漸漸的高興起來了,思想裏纔又出現白盔白甲的碎片。 +有一天,他照例的混到夜深,待酒店要關門,纔踱回土穀祠去。 +拍,吧~~! +他忽而聽得一種異樣的聲音,又不是爆竹。阿Q本來是愛看熱鬧,愛管閑事的,便在暗中直尋過去。似乎前面有些腳步聲;他正聽,猛然間一個人從對面逃來了。阿Q一看見,便趕緊翻身跟著逃。那人轉彎,阿Q也轉彎,那人站住了,阿Q也站住。他看後面並無什麼,看那人便是小D。 +“什麼?”阿Q不平起來了。 +“趙……趙家遭搶了!”小D氣喘吁吁的說。 +阿Q的心怦怦的跳了。小D說了便走;阿Q卻逃而又停的兩三回。但他究竟是做過“這路生意”,格外膽大,於是躄出路角,仔細的聽,似乎有些嚷嚷,又仔細的看,似乎許多白盔白甲的人,絡繹的將箱子抬出了,器具抬出了,秀才娘子的寧式床也抬出了,但是不分明,他還想上前,兩隻腳卻沒有動。 +這一夜沒有月,未莊在黑暗裏很寂靜,寂靜到像羲皇時候一般太平。阿Q站著看到自己發煩,也似乎還是先前一樣,在那裏來來往往的搬,箱子抬出了,器具抬出了,秀才娘子的寧式床也抬出了,……抬得他自己有些不信他的眼睛了。但他決計不再上前,卻回到自己的祠裏去了。 +土穀祠裏更漆黑;他關好大門,摸進自己的屋子裏。他躺了好一會,這纔定了神,而且發出關於自己的思想來:白盔白甲的人明明到了,並不來打招呼,搬了許多好東西,又沒有自己的份,——這全是假洋鬼子可惡,不准我造反,否則,這次何至於沒有我的份呢?阿Q越想越氣,終於禁不住滿心痛恨起來,毒毒的點一點頭:“不准我造反,只准你造反?媽媽的假洋鬼子,——好,你造反!造反是殺頭的罪名呵,我總要告一狀,看你抓進縣裏去殺頭,——滿門抄斬,——嚓!嚓!” +第九章 大團圓[编辑] +趙家遭搶之後,未莊人大抵很快意而且恐慌,阿Q也很快意而且恐慌。但四天之後,阿Q在半夜裏忽被抓進縣城裏去了。那時恰是暗夜,一隊兵,一隊團丁,一隊員警,五個偵探,悄悄地到了未莊,乘昏暗圍住土穀祠,正對門架好機關槍;然而阿Q不衝出。許多時沒有動靜,把總焦急起來了,懸了二十千的賞,纔有兩個團丁冒了險,逾垣進去,裏應外合,一擁而入,將阿Q抓出來;直待擒出祠外面的機關槍左近,他纔有些清醒了。 +到進城,已經是正午,阿Q見自己被攙進一所破衙門,轉了五六個彎,便推在一間小屋裏。他剛剛一蹌踉,那用整株的木料做成的柵欄門便跟著他的腳跟闔上了,其餘的三面都是牆壁,仔細看時,屋角上還有兩個人。 +阿Q雖然有些忐忑,卻並不很苦悶,因為他那土穀祠裏的臥室,也並沒有比這間屋子更高明。那兩個也仿佛是鄉下人,漸漸和他兜搭起來了,一個說是舉人老爺要追他祖父欠下來的陳租,一個不知道為了什麼事。他們問阿Q,阿Q爽利的答道,“因為我想造反。” +他下半天便又被抓出柵欄門去了,到得大堂,上面坐著一個滿頭剃得精光的老頭子。阿Q疑心他是和尚,但看見下麵站著一排兵,兩旁又站著十幾個長衫人物,也有滿頭剃得精光像這老頭子的,也有將一尺來長的頭髮披在背後像那假洋鬼子的,都是一臉橫肉,怒目而視的看他;他便知道這人一定有些來歷,膝關節立刻自然而然的寬鬆,便跪了下去了。 +“站著說!不要跪!”長衫人物都吆喝說。 +阿Q雖然似乎懂得,但總覺得站不住,身不由己的蹲了下去,而且終於趁勢改為跪下了。 +“奴隸性!……”長衫人物又鄙夷似的說,但也沒有叫他起來。 +“你從實招來罷,免得吃苦。我早都知道了。招了可以放你。”那光頭的老頭子看定了阿Q的臉,沉靜的清楚的說。 +“招罷!”長衫人物也大聲說。 +“我本來要……來投……”阿Q胡裏胡塗的想了一通,這纔斷斷續續的說。 +“那麼,為什麼不來的呢?”老頭子和氣的問。 +“假洋鬼子不准我!” +“胡說此刻說,也遲了。現在你的同黨在那裏?” +“什麼?…… +“那一晚打劫趙家的一夥人。” +“他們沒有來叫我。他們自己搬走了。”阿Q提起來便憤憤。 +“走到那裏去了呢?說出來便放你了。”老頭子更和氣了。 +“我不知道,……他們沒有來叫我……” +然而老頭子使了一個眼色,阿Q便又被抓進柵欄門裏了。他第二次抓出柵欄門,是第二天的上午。 +大堂的情形都照舊。上面仍然坐著光頭的老頭子,阿Q也仍然下了跪。 +老頭子和氣的問道,“你還有什麼話說麽?” +阿Q一想,沒有話,便回答說,“沒有。” +於是一個長衫人物拿了一張紙,並一支筆送到阿Q的面前,要將筆塞在他手裏。阿Q這時很吃驚,幾乎“魂飛魄散”了:因為他的手和筆相關,這回是初次。他正不知怎樣拿;那人卻又指著一處地方教他畫花押。 +“我……我……不認得字。”阿Q一把抓住了筆,惶恐而且慚愧的說。 +“那麼,便宜你,畫一個圓圈!” +阿Q要畫圓圈了,那手捏著筆卻只是抖。於是那人替他將紙鋪在地上,阿Q伏下去,使盡了平生的力氣畫圓圈。他生怕被人笑話,立志要畫得圓,但這可惡的筆不但很沉重,並且不聽話,剛剛一抖一抖的幾乎要合縫,卻又向外一聳,畫成瓜子模樣了。 +阿Q正羞愧自己畫得不圓,那人卻不計較,早已掣了紙筆去,許多人又將他第二次抓進柵欄門。 +他第二次進了柵欄,倒也並不十分懊惱。他以為人生天地之間,大約本來有時要抓進抓出,有時要在紙上畫圓圈的,惟有圈而不圓,卻是他“行狀”上的一個汙點。但不多時也就釋然了,他想:孫子纔畫得很圓的圓圈呢。於是他睡著了。 +然而這一夜,舉人老爺反而不能睡:他和把總嘔了氣了。舉人老爺主張第一要追贓,把總主張第一要示眾。把總近來很不將舉人老爺放在眼裏了,拍案打凳的說道,“懲一儆百!你看,我做革命黨還不上二十天,搶案就是十幾件,全不破案,我的面子在那裏?破了案,你又來迂。不成!這是我管的!”舉人老爺窘急了,然而還堅持,說是倘若不追贓,他便立刻辭了幫辦民政的職務。而把總卻道,“請便罷!”於是舉人老爺在這一夜竟沒有睡,但幸第二天倒也沒有辭。 +阿Q第三次抓出柵欄門的時候,便是舉人老爺睡不著的那一夜的明天的上午了。他到了大堂,上面還坐著照例的光頭老頭子;阿Q也照例的下了跪。 +老頭子很和氣的問道,“你還有什麼話麽?” +阿Q一想,沒有話,便回答說,“沒有。” +許多長衫和短衫人物,忽然給他穿上一件洋布的白背心,上面有些黑字。阿Q很氣苦:因為這很像是帶孝,而帶孝是晦氣的。然而同時他的兩手反縛了,同時又被一直抓出衙門外去了。 +阿Q被抬上了一輛沒有蓬的車,幾個短衣人物也和他同坐在一處。這車立刻走動了,前面是一班背著洋炮的兵們和團丁,兩旁是許多張著嘴的看客,後面怎樣,阿Q沒有見。但他突然覺到了:這豈不是去殺頭麽?他一急,兩眼發黑,耳朵裏喤的一聲,似乎發昏了。然而他又沒有全發昏,有時雖然著急,有時卻也泰然;他意思之間,似乎覺得人生天地間,大約本來有時也未免要殺頭的。 +他還認得路,於是有些詫異了:怎麼不向著法場走呢?他不知道這是在遊街,在示眾。但即使知道也一樣,他不過便以為人生天地間,大約本來有時也未免要遊街要示眾罷了 +他省悟了,這是繞到法場去的路,這一定是“嚓”的去殺頭。他惘惘的向左右看,全跟著馬蟻似的人,而在無意中,卻在路旁的人叢中發見了一個吳媽。很久違,伊原來在城裏做工了。阿Q忽然很羞愧自己沒志氣:竟沒有唱幾句戲。他的思想仿佛旋風似的在腦裏一迴旋:《小孤孀上墳》欠堂皇,《龍虎鬥》裏的“悔不該……”也太乏,還是“手執鋼鞭將你打”罷。他同時想手一揚,纔記得這兩手原來都捆著,於是“手執鋼鞭”也不唱了。 +“過了二十年又是一個……”阿Q在百忙中,“無師自通”的說出半句從來不說的話。 +“好!!!”從人叢裏,便發出豺狼的嗥叫一般的聲音來。 +車子不住的前行,阿Q在喝采聲中,輪轉眼睛去看吳媽,似乎伊一向並沒有見他,卻只是出神的看著兵們背上的洋炮。 +阿Q於是再看那些喝采的人們 +這剎那中,他的思想又仿佛旋風似的在腦裏一迴旋了。四年之前,他曾在山腳下遇見一隻餓狼,永是不近不遠的跟定他,要吃他的肉。他那時嚇得幾乎要死,幸而手裏有一柄斫柴刀,纔得仗這壯了膽,支持到未莊;可是永遠記得那狼眼睛,又凶又怯,閃閃的像兩顆鬼火,似乎遠遠的來穿透了他的皮肉。而這回他又看見從來沒有見過的更可怕的眼睛了,又鈍又鋒利,不但已經咀嚼了他的話,並且還要咀嚼他皮肉以外的東西,永是不近不遠的跟他走。 +這些睛們似乎連成一氣,已經在那裏咬他的靈魂。 +“救命,……” +然而阿Q沒有說。他早就兩眼發黑,耳朵裏嗡的一聲,覺得全身仿佛微塵似的迸散了。 +至於當時的影響,最大的倒反在舉人老爺,因為終於沒有追贓,他全家都號啕了。其次是趙府,非特秀才因為上城去報官,被不好的革命黨剪了辮子,而且又破費了二十千的賞錢,所以全家也號啕了。從這一天以來,他們便漸漸的都發生了遺老的氣味。 +至於輿論,在未莊是無異議,自然都說阿Q壞,被槍斃便是他的壞的證據:不壞又何至於被槍斃呢?而城裏的輿論卻不佳,他們多半不滿足,以為槍斃並無殺頭這般好看;而且那是怎樣的一個可笑的死囚呵,游了那麼久的街,竟沒有唱一句戲:他們白跟一趟了。 EOT; protected static $encoding = 'UTF-8'; diff --git a/api/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php b/api/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php index 389dbfe..431f765 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php @@ -14,9 +14,9 @@ class UniqueGenerator /** * @param Generator $generator - * @param $maxRetries + * @param integer $maxRetries */ - public function __construct(Generator $generator, $maxRetries) + public function __construct(Generator $generator, $maxRetries = 10000) { $this->generator = $generator; $this->maxRetries = $maxRetries; diff --git a/api/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php b/api/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php index 1a31857..1352dfc 100644 --- a/api/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php +++ b/api/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php @@ -14,6 +14,8 @@ class ValidGenerator /** * @param Generator $generator + * @param callable|null $validator + * @param integer $maxRetries */ public function __construct(Generator $generator, $validator = null, $maxRetries = 10000) { @@ -32,6 +34,8 @@ class ValidGenerator /** * Catch and proxy all generator calls but return only valid values * @param string $attribute + * + * @return mixed */ public function __get($attribute) { @@ -42,6 +46,8 @@ class ValidGenerator * Catch and proxy all generator calls with arguments but return only valid values * @param string $name * @param array $arguments + * + * @return mixed */ public function __call($name, $arguments) { diff --git a/api/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php b/api/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php deleted file mode 100644 index 12fe8e6..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php +++ /dev/null @@ -1,305 +0,0 @@ -assertEquals($checksum, Iban::checksum($iban), $iban); - } - - public function validatorProvider() - { - return array( - array('AL47212110090000000235698741', true), - array('AD1200012030200359100100', true), - array('AT611904300234573201', true), - array('AZ21NABZ00000000137010001944', true), - array('BH67BMAG00001299123456', true), - array('BE68539007547034', true), - array('BA391290079401028494', true), - array('BR7724891749412660603618210F3', true), - array('BG80BNBG96611020345678', true), - array('CR0515202001026284066', true), - array('HR1210010051863000160', true), - array('CY17002001280000001200527600', true), - array('CZ6508000000192000145399', true), - array('DK5000400440116243', true), - array('DO28BAGR00000001212453611324', true), - array('EE382200221020145685', true), - array('FO6264600001631634', true), - array('FI2112345600000785', true), - array('FR1420041010050500013M02606', true), - array('GE29NB0000000101904917', true), - array('DE89370400440532013000', true), - array('GI75NWBK000000007099453', true), - array('GR1601101250000000012300695', true), - array('GL8964710001000206', true), - array('GT82TRAJ01020000001210029690', true), - array('HU42117730161111101800000000', true), - array('IS140159260076545510730339', true), - array('IE29AIBK93115212345678', true), - array('IL620108000000099999999', true), - array('IT60X0542811101000000123456', true), - array('KZ86125KZT5004100100', true), - array('KW81CBKU0000000000001234560101', true), - array('LV80BANK0000435195001', true), - array('LB62099900000001001901229114', true), - array('LI21088100002324013AA', true), - array('LT121000011101001000', true), - array('LU280019400644750000', true), - array('MK07250120000058984', true), - array('MT84MALT011000012345MTLCAST001S', true), - array('MR1300020001010000123456753', true), - array('MU17BOMM0101101030300200000MUR', true), - array('MD24AG000225100013104168', true), - array('MC5811222000010123456789030', true), - array('ME25505000012345678951', true), - array('NL91ABNA0417164300', true), - array('NO9386011117947', true), - array('PK36SCBL0000001123456702', true), - array('PL61109010140000071219812874', true), - array('PS92PALS000000000400123456702', true), - array('PT50000201231234567890154', true), - array('QA58DOHB00001234567890ABCDEFG', true), - array('RO49AAAA1B31007593840000', true), - array('SM86U0322509800000000270100', true), - array('SA0380000000608010167519', true), - array('RS35260005601001611379', true), - array('SK3112000000198742637541', true), - array('SI56263300012039086', true), - array('ES9121000418450200051332', true), - array('SE4550000000058398257466', true), - array('CH9300762011623852957', true), - array('TN5910006035183598478831', true), - array('TR330006100519786457841326', true), - array('AE070331234567890123456', true), - array('GB29NWBK60161331926819', true), - array('VG96VPVG0000012345678901', true), - array('YY24KIHB12476423125915947930915268', true), - array('ZZ25VLQT382332233206588011313776421', true), - - - array('AL4721211009000000023569874', false), - array('AD120001203020035910010', false), - array('AT61190430023457320', false), - array('AZ21NABZ0000000013701000194', false), - array('BH67BMAG0000129912345', false), - array('BE6853900754703', false), - array('BA39129007940102849', false), - array('BR7724891749412660603618210F', false), - array('BG80BNBG9661102034567', false), - array('CR051520200102628406', false), - array('HR121001005186300016', false), - array('CY1700200128000000120052760', false), - array('CZ650800000019200014539', false), - array('DK500040044011624', false), - array('DO28BAGR0000000121245361132', false), - array('EE38220022102014568', false), - array('FO626460000163163', false), - array('FI2112345600000780', false), - array('FR1420041010050500013M0260', false), - array('GE29NB000000010190491', false), - array('DE8937040044053201300', false), - array('GI75NWBK00000000709945', false), - array('GR160110125000000001230069', false), - array('GL896471000100020', false), - array('GT82TRAJ0102000000121002969', false), - array('HU4211773016111110180000000', false), - array('IS14015926007654551073033', false), - array('IE29AIBK9311521234567', false), - array('IL62010800000009999999', false), - array('IT60X054281110100000012345', false), - array('KZ86125KZT500410010', false), - array('KW81CBKU000000000000123456010', false), - array('LV80BANK000043519500', false), - array('LB6209990000000100190122911', false), - array('LI21088100002324013A', false), - array('LT12100001110100100', false), - array('LU28001940064475000', false), - array('MK0725012000005898', false), - array('MT84MALT011000012345MTLCAST001', false), - array('MR130002000101000012345675', false), - array('MU17BOMM0101101030300200000MU', false), - array('MD24AG00022510001310416', false), - array('MC58112220000101234567890', false), - array('ME2550500001234567895', false), - array('NL91ABNA041716430', false), - array('NO938601111794', false), - array('PK36SCBL000000112345670', false), - array('PL6110901014000007121981287', false), - array('PS92PALS00000000040012345670', false), - array('PT5000020123123456789015', false), - array('QA58DOHB00001234567890ABCDEF', false), - array('RO49AAAA1B3100759384000', false), - array('SM86U032250980000000027010', false), - array('SA038000000060801016751', false), - array('RS3526000560100161137', false), - array('SK311200000019874263754', false), - array('SI5626330001203908', false), - array('ES912100041845020005133', false), - array('SE455000000005839825746', false), - array('CH930076201162385295', false), - array('TN591000603518359847883', false), - array('TR33000610051978645784132', false), - array('AE07033123456789012345', false), - array('GB29NWBK6016133192681', false), - array('VG96VPVG000001234567890', false), - array('YY24KIHB1247642312591594793091526', false), - array('ZZ25VLQT38233223320658801131377642', false), - ); - } - - /** - * @dataProvider validatorProvider - */ - public function testIsValid($iban, $isValid) - { - $this->assertEquals($isValid, Iban::isValid($iban), $iban); - } - - public function alphaToNumberProvider() - { - return array( - array('A', 10), - array('B', 11), - array('C', 12), - array('D', 13), - array('E', 14), - array('F', 15), - array('G', 16), - array('H', 17), - array('I', 18), - array('J', 19), - array('K', 20), - array('L', 21), - array('M', 22), - array('N', 23), - array('O', 24), - array('P', 25), - array('Q', 26), - array('R', 27), - array('S', 28), - array('T', 29), - array('U', 30), - array('V', 31), - array('W', 32), - array('X', 33), - array('Y', 34), - array('Z', 35), - ); - } - - /** - * @dataProvider alphaToNumberProvider - */ - public function testAlphaToNumber($letter, $number) - { - $this->assertEquals($number, Iban::alphaToNumber($letter), $letter); - } - - public function mod97Provider() - { - // Large numbers - $return = array( - array('123456789123456789', 7), - array('111222333444555666', 73), - array('4242424242424242424242', 19), - array('271828182845904523536028', 68), - ); - - // 0-200 - for ($i = 0; $i < 200; $i++) { - $return[] = array((string)$i, $i % 97); - } - - return $return; - } - /** - * @dataProvider mod97Provider - */ - public function testMod97($number, $result) - { - $this->assertEquals($result, Iban::mod97($number), $number); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php b/api/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php deleted file mode 100644 index c217017..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php +++ /dev/null @@ -1,62 +0,0 @@ -assertInternalType('string', $checkDigit); - $this->assertEquals($checkDigit, Luhn::computeCheckDigit($partialNumber)); - } - - public function validatorProvider() - { - return array( - array('79927398710', false), - array('79927398711', false), - array('79927398712', false), - array('79927398713', true), - array('79927398714', false), - array('79927398715', false), - array('79927398716', false), - array('79927398717', false), - array('79927398718', false), - array('79927398719', false), - array(79927398713, true), - array(79927398714, false), - ); - } - - /** - * @dataProvider validatorProvider - */ - public function testIsValid($number, $isValid) - { - $this->assertEquals($isValid, Luhn::isValid($number)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php b/api/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php deleted file mode 100644 index 262243d..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php +++ /dev/null @@ -1,27 +0,0 @@ -assertSame(null, $generator->value); - } - - public function testGeneratorReturnsDefaultValueForAnyPropertyGet() - { - $generator = new DefaultGenerator(123); - $this->assertSame(123, $generator->foo); - $this->assertNotSame(null, $generator->bar); - } - - public function testGeneratorReturnsDefaultValueForAnyMethodCall() - { - $generator = new DefaultGenerator(123); - $this->assertSame(123, $generator->foobar()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php b/api/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php deleted file mode 100644 index e437292..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php +++ /dev/null @@ -1,147 +0,0 @@ -addProvider(new FooProvider()); - $generator->addProvider(new BarProvider()); - $this->assertEquals('barfoo', $generator->format('fooFormatter')); - } - - public function testGetFormatterReturnsCallable() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertTrue(is_callable($generator->getFormatter('fooFormatter'))); - } - - public function testGetFormatterReturnsCorrectFormatter() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $expected = array($provider, 'fooFormatter'); - $this->assertEquals($expected, $generator->getFormatter('fooFormatter')); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testGetFormatterThrowsExceptionOnIncorrectProvider() - { - $generator = new Generator; - $generator->getFormatter('fooFormatter'); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testGetFormatterThrowsExceptionOnIncorrectFormatter() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $generator->getFormatter('barFormatter'); - } - - public function testFormatCallsFormatterOnProvider() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertEquals('foobar', $generator->format('fooFormatter')); - } - - public function testFormatTransfersArgumentsToFormatter() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertEquals('bazfoo', $generator->format('fooFormatterWithArguments', array('foo'))); - } - - public function testParseReturnsSameStringWhenItContainsNoCurlyBraces() - { - $generator = new Generator(); - $this->assertEquals('fooBar#?', $generator->parse('fooBar#?')); - } - - public function testParseReturnsStringWithTokensReplacedByFormatters() - { - $generator = new Generator(); - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertEquals('This is foobar a text with foobar', $generator->parse('This is {{fooFormatter}} a text with {{ fooFormatter }}')); - } - - public function testMagicGetCallsFormat() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertEquals('foobar', $generator->fooFormatter); - } - - public function testMagicCallCallsFormat() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertEquals('foobar', $generator->fooFormatter()); - } - - public function testMagicCallCallsFormatWithArguments() - { - $generator = new Generator; - $provider = new FooProvider(); - $generator->addProvider($provider); - $this->assertEquals('bazfoo', $generator->fooFormatterWithArguments('foo')); - } - - public function testSeed() - { - $generator = new Generator; - - $generator->seed(0); - $mtRandWithSeedZero = mt_rand(); - $generator->seed(0); - $this->assertEquals($mtRandWithSeedZero, mt_rand(), 'seed(0) should be deterministic.'); - - $generator->seed(); - $mtRandWithoutSeed = mt_rand(); - $this->assertNotEquals($mtRandWithSeedZero, $mtRandWithoutSeed, 'seed() should be different than seed(0)'); - $generator->seed(); - $this->assertNotEquals($mtRandWithoutSeed, mt_rand(), 'seed() should not be deterministic.'); - - $generator->seed('10'); - $this->assertTrue(true, 'seeding with a non int value doesn\'t throw an exception'); - } -} - -class FooProvider -{ - public function fooFormatter() - { - return 'foobar'; - } - - public function fooFormatterWithArguments($value = '') - { - return 'baz' . $value; - } -} - -class BarProvider -{ - public function fooFormatter() - { - return 'barfoo'; - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php deleted file mode 100644 index 5a5f66d..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php +++ /dev/null @@ -1,46 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testLatitude() - { - $latitude = $this->faker->latitude(); - $this->assertInternalType('float', $latitude); - $this->assertGreaterThanOrEqual(-90, $latitude); - $this->assertLessThanOrEqual(90, $latitude); - } - - public function testLongitude() - { - $longitude = $this->faker->longitude(); - $this->assertInternalType('float', $longitude); - $this->assertGreaterThanOrEqual(-180, $longitude); - $this->assertLessThanOrEqual(180, $longitude); - } - - public function testCoordinate() - { - $coordinate = $this->faker->localCoordinates(); - $this->assertInternalType('array', $coordinate); - $this->assertInternalType('float', $coordinate['latitude']); - $this->assertGreaterThanOrEqual(-90, $coordinate['latitude']); - $this->assertLessThanOrEqual(90, $coordinate['latitude']); - $this->assertInternalType('float', $coordinate['longitude']); - $this->assertGreaterThanOrEqual(-180, $coordinate['longitude']); - $this->assertLessThanOrEqual(180, $coordinate['longitude']); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php deleted file mode 100644 index 1373b2b..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php +++ /dev/null @@ -1,45 +0,0 @@ -addProvider(new Barcode($faker)); - $faker->seed(0); - $this->faker = $faker; - } - - public function testEan8() - { - $code = $this->faker->ean8(); - $this->assertRegExp('/^\d{8}$/i', $code); - $codeWithoutChecksum = substr($code, 0, -1); - $checksum = substr($code, -1); - $this->assertEquals(TestableBarcode::eanChecksum($codeWithoutChecksum), $checksum); - } - - public function testEan13() - { - $code = $this->faker->ean13(); - $this->assertRegExp('/^\d{13}$/i', $code); - $codeWithoutChecksum = substr($code, 0, -1); - $checksum = substr($code, -1); - $this->assertEquals(TestableBarcode::eanChecksum($codeWithoutChecksum), $checksum); - } -} - -class TestableBarcode extends Barcode -{ - public static function eanChecksum($input) - { - return parent::eanChecksum($input); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php deleted file mode 100644 index 6fc0cc9..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php +++ /dev/null @@ -1,551 +0,0 @@ -assertTrue(is_integer(BaseProvider::randomDigit())); - } - - public function testRandomDigitReturnsDigit() - { - $this->assertTrue(BaseProvider::randomDigit() >= 0); - $this->assertTrue(BaseProvider::randomDigit() < 10); - } - - public function testRandomDigitNotNullReturnsNotNullDigit() - { - $this->assertTrue(BaseProvider::randomDigitNotNull() > 0); - $this->assertTrue(BaseProvider::randomDigitNotNull() < 10); - } - - - public function testRandomDigitNotReturnsValidDigit() - { - for ($i = 0; $i <= 9; $i++) { - $this->assertTrue(BaseProvider::randomDigitNot($i) >= 0); - $this->assertTrue(BaseProvider::randomDigitNot($i) < 10); - $this->assertTrue(BaseProvider::randomDigitNot($i) !== $i); - } - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testRandomNumberThrowsExceptionWhenCalledWithAMax() - { - BaseProvider::randomNumber(5, 200); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testRandomNumberThrowsExceptionWhenCalledWithATooHighNumberOfDigits() - { - BaseProvider::randomNumber(10); - } - - public function testRandomNumberReturnsInteger() - { - $this->assertTrue(is_integer(BaseProvider::randomNumber())); - $this->assertTrue(is_integer(BaseProvider::randomNumber(5, false))); - } - - public function testRandomNumberReturnsDigit() - { - $this->assertTrue(BaseProvider::randomNumber(3) >= 0); - $this->assertTrue(BaseProvider::randomNumber(3) < 1000); - } - - public function testRandomNumberAcceptsStrictParamToEnforceNumberSize() - { - $this->assertEquals(5, strlen((string) BaseProvider::randomNumber(5, true))); - } - - public function testNumberBetween() - { - $min = 5; - $max = 6; - - $this->assertGreaterThanOrEqual($min, BaseProvider::numberBetween($min, $max)); - $this->assertGreaterThanOrEqual(BaseProvider::numberBetween($min, $max), $max); - } - - public function testNumberBetweenAcceptsZeroAsMax() - { - $this->assertEquals(0, BaseProvider::numberBetween(0, 0)); - } - - public function testRandomFloat() - { - $min = 4; - $max = 10; - $nbMaxDecimals = 8; - - $result = BaseProvider::randomFloat($nbMaxDecimals, $min, $max); - - $parts = explode('.', $result); - - $this->assertInternalType('float', $result); - $this->assertGreaterThanOrEqual($min, $result); - $this->assertLessThanOrEqual($max, $result); - $this->assertLessThanOrEqual($nbMaxDecimals, strlen($parts[1])); - } - - public function testRandomLetterReturnsString() - { - $this->assertTrue(is_string(BaseProvider::randomLetter())); - } - - public function testRandomLetterReturnsSingleLetter() - { - $this->assertEquals(1, strlen(BaseProvider::randomLetter())); - } - - public function testRandomLetterReturnsLowercaseLetter() - { - $lowercaseLetters = 'abcdefghijklmnopqrstuvwxyz'; - $this->assertTrue(strpos($lowercaseLetters, BaseProvider::randomLetter()) !== false); - } - - public function testRandomAsciiReturnsString() - { - $this->assertTrue(is_string(BaseProvider::randomAscii())); - } - - public function testRandomAsciiReturnsSingleCharacter() - { - $this->assertEquals(1, strlen(BaseProvider::randomAscii())); - } - - public function testRandomAsciiReturnsAsciiCharacter() - { - $lowercaseLetters = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertTrue(strpos($lowercaseLetters, BaseProvider::randomAscii()) !== false); - } - - public function testRandomElementReturnsNullWhenArrayEmpty() - { - $this->assertNull(BaseProvider::randomElement(array())); - } - - public function testRandomElementReturnsElementFromArray() - { - $elements = array('23', 'e', 32, '#'); - $this->assertContains(BaseProvider::randomElement($elements), $elements); - } - - public function testRandomElementReturnsElementFromAssociativeArray() - { - $elements = array('tata' => '23', 'toto' => 'e', 'tutu' => 32, 'titi' => '#'); - $this->assertContains(BaseProvider::randomElement($elements), $elements); - } - - public function testShuffleReturnsStringWhenPassedAStringArgument() - { - $this->assertInternalType('string', BaseProvider::shuffle('foo')); - } - - public function testShuffleReturnsArrayWhenPassedAnArrayArgument() - { - $this->assertInternalType('array', BaseProvider::shuffle(array(1, 2, 3))); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testShuffleThrowsExceptionWhenPassedAnInvalidArgument() - { - BaseProvider::shuffle(false); - } - - public function testShuffleArraySupportsEmptyArrays() - { - $this->assertEquals(array(), BaseProvider::shuffleArray(array())); - } - - public function testShuffleArrayReturnsAnArrayOfTheSameSize() - { - $array = array(1, 2, 3, 4, 5); - $this->assertSameSize($array, BaseProvider::shuffleArray($array)); - } - - public function testShuffleArrayReturnsAnArrayWithSameElements() - { - $array = array(2, 4, 6, 8, 10); - $shuffleArray = BaseProvider::shuffleArray($array); - $this->assertContains(2, $shuffleArray); - $this->assertContains(4, $shuffleArray); - $this->assertContains(6, $shuffleArray); - $this->assertContains(8, $shuffleArray); - $this->assertContains(10, $shuffleArray); - } - - public function testShuffleArrayReturnsADifferentArrayThanTheOriginal() - { - $arr = array(1, 2, 3, 4, 5); - $shuffledArray = BaseProvider::shuffleArray($arr); - $this->assertNotEquals($arr, $shuffledArray); - } - - public function testShuffleArrayLeavesTheOriginalArrayUntouched() - { - $arr = array(1, 2, 3, 4, 5); - BaseProvider::shuffleArray($arr); - $this->assertEquals($arr, array(1, 2, 3, 4, 5)); - } - - public function testShuffleStringSupportsEmptyStrings() - { - $this->assertEquals('', BaseProvider::shuffleString('')); - } - - public function testShuffleStringReturnsAnStringOfTheSameSize() - { - $string = 'abcdef'; - $this->assertEquals(strlen($string), strlen(BaseProvider::shuffleString($string))); - } - - public function testShuffleStringReturnsAnStringWithSameElements() - { - $string = 'acegi'; - $shuffleString = BaseProvider::shuffleString($string); - $this->assertContains('a', $shuffleString); - $this->assertContains('c', $shuffleString); - $this->assertContains('e', $shuffleString); - $this->assertContains('g', $shuffleString); - $this->assertContains('i', $shuffleString); - } - - public function testShuffleStringReturnsADifferentStringThanTheOriginal() - { - $string = 'abcdef'; - $shuffledString = BaseProvider::shuffleString($string); - $this->assertNotEquals($string, $shuffledString); - } - - public function testShuffleStringLeavesTheOriginalStringUntouched() - { - $string = 'abcdef'; - BaseProvider::shuffleString($string); - $this->assertEquals($string, 'abcdef'); - } - - public function testNumerifyReturnsSameStringWhenItContainsNoHashSign() - { - $this->assertEquals('fooBar?', BaseProvider::numerify('fooBar?')); - } - - public function testNumerifyReturnsStringWithHashSignsReplacedByDigits() - { - $this->assertRegExp('/foo\dBa\dr/', BaseProvider::numerify('foo#Ba#r')); - } - - public function testNumerifyReturnsStringWithPercentageSignsReplacedByDigits() - { - $this->assertRegExp('/foo\dBa\dr/', BaseProvider::numerify('foo%Ba%r')); - } - - public function testNumerifyReturnsStringWithPercentageSignsReplacedByNotNullDigits() - { - $this->assertNotEquals('0', BaseProvider::numerify('%')); - } - - public function testNumerifyCanGenerateALargeNumberOfDigits() - { - $largePattern = str_repeat('#', 20); // definitely larger than PHP_INT_MAX on all systems - $this->assertEquals(20, strlen(BaseProvider::numerify($largePattern))); - } - - public function testLexifyReturnsSameStringWhenItContainsNoQuestionMark() - { - $this->assertEquals('fooBar#', BaseProvider::lexify('fooBar#')); - } - - public function testLexifyReturnsStringWithQuestionMarksReplacedByLetters() - { - $this->assertRegExp('/foo[a-z]Ba[a-z]r/', BaseProvider::lexify('foo?Ba?r')); - } - - public function testBothifyCombinesNumerifyAndLexify() - { - $this->assertRegExp('/foo[a-z]Ba\dr/', BaseProvider::bothify('foo?Ba#r')); - } - - public function testBothifyAsterisk() - { - $this->assertRegExp('/foo([a-z]|\d)Ba([a-z]|\d)r/', BaseProvider::bothify('foo*Ba*r')); - } - - public function testBothifyUtf() - { - $utf = 'œ∑´®†¥¨ˆøπ“‘和製╯°□°╯︵ ┻━┻🐵 🙈 ﺚﻣ ﻦﻔﺳ ﺲﻘﻄﺗ ﻮﺑﺎﻠﺘﺣﺪﻳﺩ،, ﺝﺰﻳﺮﺘﻳ ﺏﺎﺴﺘﺧﺩﺎﻣ ﺄﻧ ﺪﻧﻭ. ﺇﺫ ﻪﻧﺍ؟ ﺎﻠﺴﺗﺍﺭ ﻮﺘ'; - $this->assertRegExp('/'.$utf.'foo\dB[a-z]a([a-z]|\d)r/u', BaseProvider::bothify($utf.'foo#B?a*r')); - } - - public function testAsciifyReturnsSameStringWhenItContainsNoStarSign() - { - $this->assertEquals('fooBar?', BaseProvider::asciify('fooBar?')); - } - - public function testAsciifyReturnsStringWithStarSignsReplacedByAsciiChars() - { - $this->assertRegExp('/foo.Ba.r/', BaseProvider::asciify('foo*Ba*r')); - } - - public function regexifyBasicDataProvider() - { - return array( - array('azeQSDF1234', 'azeQSDF1234', 'does not change non regex chars'), - array('foo(bar){1}', 'foobar', 'replaces regex characters'), - array('', '', 'supports empty string'), - array('/^foo(bar){1}$/', 'foobar', 'ignores regex delimiters') - ); - } - - /** - * @dataProvider regexifyBasicDataProvider - */ - public function testRegexifyBasicFeatures($input, $output, $message) - { - $this->assertEquals($output, BaseProvider::regexify($input), $message); - } - - public function regexifyDataProvider() - { - return array( - array('\d', 'numbers'), - array('\w', 'letters'), - array('(a|b)', 'alternation'), - array('[aeiou]', 'basic character class'), - array('[a-z]', 'character class range'), - array('[a-z1-9]', 'multiple character class range'), - array('a*b+c?', 'single character quantifiers'), - array('a{2}', 'brackets quantifiers'), - array('a{2,3}', 'min-max brackets quantifiers'), - array('[aeiou]{2,3}', 'brackets quantifiers on basic character class'), - array('[a-z]{2,3}', 'brackets quantifiers on character class range'), - array('(a|b){2,3}', 'brackets quantifiers on alternation'), - array('\.\*\?\+', 'escaped characters'), - array('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}', 'complex regex') - ); - } - - /** - * @dataProvider regexifyDataProvider - */ - public function testRegexifySupportedRegexSyntax($pattern, $message) - { - $this->assertRegExp('/' . $pattern . '/', BaseProvider::regexify($pattern), 'Regexify supports ' . $message); - } - - public function testOptionalReturnsProviderValueWhenCalledWithWeight1() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $this->assertNotNull($faker->optional(100)->randomDigit); - } - - public function testOptionalReturnsNullWhenCalledWithWeight0() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $this->assertNull($faker->optional(0)->randomDigit); - } - - public function testOptionalAllowsChainingPropertyAccess() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $faker->addProvider(new \ArrayObject(array(1))); // hack because method_exists forbids stubs - $this->assertEquals(1, $faker->optional(100)->count); - $this->assertNull($faker->optional(0)->count); - } - - public function testOptionalAllowsChainingMethodCall() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $faker->addProvider(new \ArrayObject(array(1))); // hack because method_exists forbids stubs - $this->assertEquals(1, $faker->optional(100)->count()); - $this->assertNull($faker->optional(0)->count()); - } - - public function testOptionalAllowsChainingProviderCallRandomlyReturnNull() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $values = array(); - for ($i=0; $i < 10; $i++) { - $values[]= $faker->optional()->randomDigit; - } - $this->assertContains(null, $values); - - $values = array(); - for ($i=0; $i < 10; $i++) { - $values[]= $faker->optional(50)->randomDigit; - } - $this->assertContains(null, $values); - } - - /** - * @link https://github.com/fzaninotto/Faker/issues/265 - */ - public function testOptionalPercentageAndWeight() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $faker->addProvider(new \Faker\Provider\Miscellaneous($faker)); - - $valuesOld = array(); - $valuesNew = array(); - - for ($i = 0; $i < 10000; ++$i) { - $valuesOld[] = $faker->optional(0.5)->boolean(100); - $valuesNew[] = $faker->optional(50)->boolean(100); - } - - $this->assertEquals( - round(array_sum($valuesOld) / 10000, 2), - round(array_sum($valuesNew) / 10000, 2) - ); - } - - public function testUniqueAllowsChainingPropertyAccess() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $faker->addProvider(new \ArrayObject(array(1))); // hack because method_exists forbids stubs - $this->assertEquals(1, $faker->unique()->count); - } - - public function testUniqueAllowsChainingMethodCall() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $faker->addProvider(new \ArrayObject(array(1))); // hack because method_exists forbids stubs - $this->assertEquals(1, $faker->unique()->count()); - } - - public function testUniqueReturnsOnlyUniqueValues() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $values = array(); - for ($i=0; $i < 10; $i++) { - $values[]= $faker->unique()->randomDigit; - } - sort($values); - $this->assertEquals(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), $values); - } - - /** - * @expectedException OverflowException - */ - public function testUniqueThrowsExceptionWhenNoUniqueValueCanBeGenerated() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - for ($i=0; $i < 11; $i++) { - $faker->unique()->randomDigit; - } - } - - public function testUniqueCanResetUniquesWhenPassedTrueAsArgument() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $values = array(); - for ($i=0; $i < 10; $i++) { - $values[]= $faker->unique()->randomDigit; - } - $values[]= $faker->unique(true)->randomDigit; - for ($i=0; $i < 9; $i++) { - $values[]= $faker->unique()->randomDigit; - } - sort($values); - $this->assertEquals(array(0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9), $values); - } - - public function testValidAllowsChainingPropertyAccess() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $this->assertLessThan(10, $faker->valid()->randomDigit); - } - - public function testValidAllowsChainingMethodCall() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $this->assertLessThan(10, $faker->valid()->numberBetween(5, 9)); - } - - public function testValidReturnsOnlyValidValues() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $values = array(); - $evenValidator = function($digit) { - return $digit % 2 === 0; - }; - for ($i=0; $i < 50; $i++) { - $values[$faker->valid($evenValidator)->randomDigit] = true; - } - $uniqueValues = array_keys($values); - sort($uniqueValues); - $this->assertEquals(array(0, 2, 4, 6, 8), $uniqueValues); - } - - /** - * @expectedException OverflowException - */ - public function testValidThrowsExceptionWhenNoValidValueCanBeGenerated() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $evenValidator = function($digit) { - return $digit % 2 === 0; - }; - for ($i=0; $i < 11; $i++) { - $faker->valid($evenValidator)->randomElement(array(1, 3, 5, 7, 9)); - } - } - - /** - * @expectedException InvalidArgumentException - */ - public function testValidThrowsExceptionWhenParameterIsNotCollable() - { - $faker = new \Faker\Generator(); - $faker->addProvider(new \Faker\Provider\Base($faker)); - $faker->valid(12)->randomElement(array(1, 3, 5, 7, 9)); - } - - /** - * @expectedException LengthException - * @expectedExceptionMessage Cannot get 2 elements, only 1 in array - */ - public function testRandomElementsThrowsWhenRequestingTooManyKeys() - { - BaseProvider::randomElements(array('foo'), 2); - } - - public function testRandomElements() - { - $this->assertCount(1, BaseProvider::randomElements(), 'Should work without any input'); - - $empty = BaseProvider::randomElements(array(), 0); - $this->assertInternalType('array', $empty); - $this->assertCount(0, $empty); - - $shuffled = BaseProvider::randomElements(array('foo', 'bar', 'baz'), 3); - $this->assertContains('foo', $shuffled); - $this->assertContains('bar', $shuffled); - $this->assertContains('baz', $shuffled); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php deleted file mode 100644 index 1f7a99a..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php +++ /dev/null @@ -1,73 +0,0 @@ -generator = new Generator(); - $this->generator->addProvider(new Biased($this->generator)); - - $this->results = array_fill(1, self::MAX, 0); - } - - public function performFake($function) - { - for($i = 0; $i < self::NUMBERS; $i++) { - $this->results[$this->generator->biasedNumberBetween(1, self::MAX, $function)]++; - } - } - - public function testUnbiased() - { - $this->performFake(array('\Faker\Provider\Biased', 'unbiased')); - - // assert that all numbers are near the expected unbiased value - foreach ($this->results as $number => $amount) { - // integral - $assumed = (1 / self::MAX * $number) - (1 / self::MAX * ($number - 1)); - // calculate the fraction of the whole area - $assumed /= 1; - $this->assertGreaterThan(self::NUMBERS * $assumed * .95, $amount, "Value was more than 5 percent under the expected value"); - $this->assertLessThan(self::NUMBERS * $assumed * 1.05, $amount, "Value was more than 5 percent over the expected value"); - } - } - - public function testLinearHigh() - { - $this->performFake(array('\Faker\Provider\Biased', 'linearHigh')); - - foreach ($this->results as $number => $amount) { - // integral - $assumed = 0.5 * pow(1 / self::MAX * $number, 2) - 0.5 * pow(1 / self::MAX * ($number - 1), 2); - // calculate the fraction of the whole area - $assumed /= pow(1, 2) * .5; - $this->assertGreaterThan(self::NUMBERS * $assumed * .9, $amount, "Value was more than 10 percent under the expected value"); - $this->assertLessThan(self::NUMBERS * $assumed * 1.1, $amount, "Value was more than 10 percent over the expected value"); - } - } - - public function testLinearLow() - { - $this->performFake(array('\Faker\Provider\Biased', 'linearLow')); - - foreach ($this->results as $number => $amount) { - // integral - $assumed = -0.5 * pow(1 / self::MAX * $number, 2) - -0.5 * pow(1 / self::MAX * ($number - 1), 2); - // shift the graph up - $assumed += 1 / self::MAX; - // calculate the fraction of the whole area - $assumed /= pow(1, 2) * .5; - $this->assertGreaterThan(self::NUMBERS * $assumed * .9, $amount, "Value was more than 10 percent under the expected value"); - $this->assertLessThan(self::NUMBERS * $assumed * 1.1, $amount, "Value was more than 10 percent over the expected value"); - } - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php deleted file mode 100644 index f73831b..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php +++ /dev/null @@ -1,53 +0,0 @@ -assertRegExp('/^#[a-f0-9]{6}$/i', Color::hexColor()); - } - - public function testSafeHexColor() - { - $this->assertRegExp('/^#[a-f0-9]{6}$/i', Color::safeHexColor()); - } - - public function testRgbColorAsArray() - { - $this->assertEquals(3, count(Color::rgbColorAsArray())); - } - - public function testRgbColor() - { - $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; - $this->assertRegExp('/^' . $regexp . ',' . $regexp . ',' . $regexp . '$/i', Color::rgbColor()); - } - - public function testRgbCssColor() - { - $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; - $this->assertRegExp('/^rgb\(' . $regexp . ',' . $regexp . ',' . $regexp . '\)$/i', Color::rgbCssColor()); - } - - public function testRgbaCssColor() - { - $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; - $regexpAlpha = '([01]?(\.\d+)?)'; - $this->assertRegExp('/^rgba\(' . $regexp . ',' . $regexp . ',' . $regexp . ',' . $regexpAlpha . '\)$/i', Color::rgbaCssColor()); - } - - public function testSafeColorName() - { - $this->assertRegExp('/^[\w]+$/', Color::safeColorName()); - } - - public function testColorName() - { - $this->assertRegExp('/^[\w]+$/', Color::colorName()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php deleted file mode 100644 index ac26c5a..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php +++ /dev/null @@ -1,30 +0,0 @@ -addProvider(new Company($faker)); - $faker->addProvider(new Lorem($faker)); - $this->faker = $faker; - } - - public function testJobTitle() - { - $jobTitle = $this->faker->jobTitle(); - $pattern = '/^[A-Za-z]+$/'; - $this->assertRegExp($pattern, $jobTitle); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php deleted file mode 100644 index 252662b..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php +++ /dev/null @@ -1,172 +0,0 @@ -originalTz = date_default_timezone_get(); - $this->defaultTz = 'UTC'; - date_default_timezone_set($this->defaultTz); - } - - public function tearDown() - { - date_default_timezone_set($this->originalTz); - } - - public function testUnixTime() - { - $timestamp = DateTimeProvider::unixTime(); - $this->assertInternalType('int', $timestamp); - $this->assertTrue($timestamp >= 0); - $this->assertTrue($timestamp <= time()); - } - - public function testDateTime() - { - $date = DateTimeProvider::dateTime(); - $this->assertInstanceOf('\DateTime', $date); - $this->assertGreaterThanOrEqual(new \DateTime('@0'), $date); - $this->assertLessThanOrEqual(new \DateTime(), $date); - $this->assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); - } - - public function testDateTimeWithTimezone() - { - $date = DateTimeProvider::dateTime('now', 'America/New_York'); - $this->assertEquals($date->getTimezone(), new \DateTimeZone('America/New_York')); - } - - public function testDateTimeAD() - { - $date = DateTimeProvider::dateTimeAD(); - $this->assertInstanceOf('\DateTime', $date); - $this->assertGreaterThanOrEqual(new \DateTime('0000-01-01 00:00:00'), $date); - $this->assertLessThanOrEqual(new \DateTime(), $date); - $this->assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); - } - - public function testIso8601() - { - $date = DateTimeProvider::iso8601(); - $this->assertRegExp('/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-Z](\d{4})?$/', $date); - $this->assertGreaterThanOrEqual(new \DateTime('@0'), new \DateTime($date)); - $this->assertLessThanOrEqual(new \DateTime(), new \DateTime($date)); - } - - public function testDate() - { - $date = DateTimeProvider::date(); - $this->assertRegExp('/^\d{4}-\d{2}-\d{2}$/', $date); - $this->assertGreaterThanOrEqual(new \DateTime('@0'), new \DateTime($date)); - $this->assertLessThanOrEqual(new \DateTime(), new \DateTime($date)); - } - - public function testTime() - { - $date = DateTimeProvider::time(); - $this->assertRegExp('/^\d{2}:\d{2}:\d{2}$/', $date); - } - - /** - * - * @dataProvider providerDateTimeBetween - */ - public function testDateTimeBetween($start, $end) - { - $date = DateTimeProvider::dateTimeBetween($start, $end); - $this->assertInstanceOf('\DateTime', $date); - $this->assertGreaterThanOrEqual(new \DateTime($start), $date); - $this->assertLessThanOrEqual(new \DateTime($end), $date); - $this->assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); - } - - public function providerDateTimeBetween() - { - return array( - array('-1 year', false), - array('-1 year', null), - array('-1 day', '-1 hour'), - array('-1 day', 'now'), - ); - } - - /** - * - * @dataProvider providerDateTimeInInterval - */ - public function testDateTimeInInterval($start, $interval = "+5 days", $isInFuture) - { - $date = DateTimeProvider::dateTimeInInterval($start, $interval); - $this->assertInstanceOf('\DateTime', $date); - - $_interval = \DateInterval::createFromDateString($interval); - $_start = new \DateTime($start); - if ($isInFuture) { - $this->assertGreaterThanOrEqual($_start, $date); - $this->assertLessThanOrEqual($_start->add($_interval), $date); - } else { - $this->assertLessThanOrEqual($_start, $date); - $this->assertGreaterThanOrEqual($_start->add($_interval), $date); - } - } - - public function providerDateTimeInInterval() - { - return array( - array('-1 year', '+5 days', true), - array('-1 day', '-1 hour', false), - array('-1 day', '+1 hour', true), - ); - } - - public function testFixedSeedWithMaximumTimestamp() - { - $max = '2018-03-01 12:00:00'; - - mt_srand(1); - $unixTime = DateTimeProvider::unixTime($max); - $datetimeAD = DateTimeProvider::dateTimeAD($max); - $dateTime1 = DateTimeProvider::dateTime($max); - $dateTimeBetween = DateTimeProvider::dateTimeBetween('2014-03-01 06:00:00', $max); - $date = DateTimeProvider::date('Y-m-d', $max); - $time = DateTimeProvider::time('H:i:s', $max); - $iso8601 = DateTimeProvider::iso8601($max); - $dateTimeThisCentury = DateTimeProvider::dateTimeThisCentury($max); - $dateTimeThisDecade = DateTimeProvider::dateTimeThisDecade($max); - $dateTimeThisMonth = DateTimeProvider::dateTimeThisMonth($max); - $amPm = DateTimeProvider::amPm($max); - $dayOfMonth = DateTimeProvider::dayOfMonth($max); - $dayOfWeek = DateTimeProvider::dayOfWeek($max); - $month = DateTimeProvider::month($max); - $monthName = DateTimeProvider::monthName($max); - $year = DateTimeProvider::year($max); - $dateTimeThisYear = DateTimeProvider::dateTimeThisYear($max); - mt_srand(); - - //regenerate Random Date with same seed and same maximum end timestamp - mt_srand(1); - $this->assertEquals($unixTime, DateTimeProvider::unixTime($max)); - $this->assertEquals($datetimeAD, DateTimeProvider::dateTimeAD($max)); - $this->assertEquals($dateTime1, DateTimeProvider::dateTime($max)); - $this->assertEquals($dateTimeBetween, DateTimeProvider::dateTimeBetween('2014-03-01 06:00:00', $max)); - $this->assertEquals($date, DateTimeProvider::date('Y-m-d', $max)); - $this->assertEquals($time, DateTimeProvider::time('H:i:s', $max)); - $this->assertEquals($iso8601, DateTimeProvider::iso8601($max)); - $this->assertEquals($dateTimeThisCentury, DateTimeProvider::dateTimeThisCentury($max)); - $this->assertEquals($dateTimeThisDecade, DateTimeProvider::dateTimeThisDecade($max)); - $this->assertEquals($dateTimeThisMonth, DateTimeProvider::dateTimeThisMonth($max)); - $this->assertEquals($amPm, DateTimeProvider::amPm($max)); - $this->assertEquals($dayOfMonth, DateTimeProvider::dayOfMonth($max)); - $this->assertEquals($dayOfWeek, DateTimeProvider::dayOfWeek($max)); - $this->assertEquals($month, DateTimeProvider::month($max)); - $this->assertEquals($monthName, DateTimeProvider::monthName($max)); - $this->assertEquals($year, DateTimeProvider::year($max)); - $this->assertEquals($dateTimeThisYear, DateTimeProvider::dateTimeThisYear($max)); - mt_srand(); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php deleted file mode 100644 index 9f68ba8..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php +++ /dev/null @@ -1,75 +0,0 @@ -assertRegExp('#^http://lorempixel.com/640/480/#', Image::imageUrl()); - } - - public function testImageUrlAcceptsCustomWidthAndHeight() - { - $this->assertRegExp('#^http://lorempixel.com/800/400/#', Image::imageUrl(800, 400)); - } - - public function testImageUrlAcceptsCustomCategory() - { - $this->assertRegExp('#^http://lorempixel.com/800/400/nature/#', Image::imageUrl(800, 400, 'nature')); - } - - public function testImageUrlAcceptsCustomText() - { - $this->assertRegExp('#^http://lorempixel.com/800/400/nature/Faker#', Image::imageUrl(800, 400, 'nature', false, 'Faker')); - } - - public function testImageUrlAddsARandomGetParameterByDefault() - { - $url = Image::imageUrl(800, 400); - $splitUrl = preg_split('/\?/', $url); - - $this->assertEquals(count($splitUrl), 2); - $this->assertRegexp('#\d{5}#', $splitUrl[1]); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testUrlWithDimensionsAndBadCategory() - { - Image::imageUrl(800, 400, 'bullhonky'); - } - - public function testDownloadWithDefaults() - { - $url = "http://www.lorempixel.com/"; - $curlPing = curl_init($url); - curl_setopt($curlPing, CURLOPT_TIMEOUT, 5); - curl_setopt($curlPing, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($curlPing, CURLOPT_RETURNTRANSFER, true); - $data = curl_exec($curlPing); - $httpCode = curl_getinfo($curlPing, CURLINFO_HTTP_CODE); - curl_close($curlPing); - - if ($httpCode < 200 | $httpCode > 300) { - $this->markTestSkipped("LoremPixel is offline, skipping image download"); - } - - $file = Image::image(sys_get_temp_dir()); - $this->assertFileExists($file); - if (function_exists('getimagesize')) { - list($width, $height, $type, $attr) = getimagesize($file); - $this->assertEquals(640, $width); - $this->assertEquals(480, $height); - $this->assertEquals(constant('IMAGETYPE_JPEG'), $type); - } else { - $this->assertEquals('jpg', pathinfo($file, PATHINFO_EXTENSION)); - } - if (file_exists($file)) { - unlink($file); - } - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php deleted file mode 100644 index e715e82..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php +++ /dev/null @@ -1,130 +0,0 @@ -addProvider(new Lorem($faker)); - $faker->addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function localeDataProvider() - { - $providerPath = realpath(__DIR__ . '/../../../src/Faker/Provider'); - $localePaths = array_filter(glob($providerPath . '/*', GLOB_ONLYDIR)); - foreach ($localePaths as $path) { - $parts = explode('/', $path); - $locales[] = array($parts[count($parts) - 1]); - } - - return $locales; - } - - /** - * @link http://stackoverflow.com/questions/12026842/how-to-validate-an-email-address-in-php - * - * @requires PHP 5.4 - * @dataProvider localeDataProvider - */ - public function testEmailIsValid($locale) - { - $this->loadLocalProviders($locale); - $pattern = '/^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD'; - $emailAddress = $this->faker->email(); - $this->assertRegExp($pattern, $emailAddress); - } - - /** - * @requires PHP 5.4 - * @dataProvider localeDataProvider - */ - public function testUsernameIsValid($locale) - { - $this->loadLocalProviders($locale); - $pattern = '/^[A-Za-z0-9._]+$/'; - $username = $this->faker->username(); - $this->assertRegExp($pattern, $username); - } - - public function loadLocalProviders($locale) - { - $providerPath = realpath(__DIR__ . '/../../../src/Faker/Provider'); - if (file_exists($providerPath.'/'.$locale.'/Internet.php')) { - $internet = "\\Faker\\Provider\\$locale\\Internet"; - $this->faker->addProvider(new $internet($this->faker)); - } - if (file_exists($providerPath.'/'.$locale.'/Person.php')) { - $person = "\\Faker\\Provider\\$locale\\Person"; - $this->faker->addProvider(new $person($this->faker)); - } - if (file_exists($providerPath.'/'.$locale.'/Company.php')) { - $company = "\\Faker\\Provider\\$locale\\Company"; - $this->faker->addProvider(new $company($this->faker)); - } - } - - public function testPasswordIsValid() - { - $this->assertRegexp('/^.{6}$/', $this->faker->password(6, 6)); - } - - public function testSlugIsValid() - { - $pattern = '/^[a-z0-9-]+$/'; - $slug = $this->faker->slug(); - $this->assertSame(preg_match($pattern, $slug), 1); - } - - public function testUrlIsValid() - { - $url = $this->faker->url(); - $this->assertNotFalse(filter_var($url, FILTER_VALIDATE_URL)); - } - - public function testLocalIpv4() - { - $this->assertNotFalse(filter_var(Internet::localIpv4(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); - } - - public function testIpv4() - { - $this->assertNotFalse(filter_var($this->faker->ipv4(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); - } - - public function testIpv4NotLocalNetwork() - { - $this->assertNotRegExp('/\A1\./', $this->faker->ipv4()); - } - - public function testIpv4NotBroadcast() - { - $this->assertNotEquals('255.255.255.255', $this->faker->ipv4()); - } - - public function testIpv6() - { - $this->assertNotFalse(filter_var($this->faker->ipv6(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); - } - - public function testMacAddress() - { - $this->assertRegExp('/^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$/i', Internet::macAddress()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php deleted file mode 100644 index 347b135..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php +++ /dev/null @@ -1,26 +0,0 @@ -assertNotNull($faker->name(), 'Localized Name Provider ' . $matches[1] . ' does not throw errors'); - } - } - - public function testLocalizedAddressProvidersDoNotThrowErrors() - { - foreach (glob(__DIR__ . '/../../../src/Faker/Provider/*/Address.php') as $localizedAddress) { - preg_match('#/([a-zA-Z_]+)/Address\.php#', $localizedAddress, $matches); - $faker = Factory::create($matches[1]); - $this->assertNotNull($faker->address(), 'Localized Address Provider ' . $matches[1] . ' does not throw errors'); - } - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php deleted file mode 100644 index 62785d4..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php +++ /dev/null @@ -1,108 +0,0 @@ -assertEquals('Word word word word.', TestableLorem::text(24)); - } - - public function testTextReturnsSentencesWhenAskedSizeLessThan100() - { - $this->assertEquals('This is a test sentence. This is a test sentence. This is a test sentence.', TestableLorem::text(99)); - } - - public function testTextReturnsParagraphsWhenAskedSizeGreaterOrEqualThanThan100() - { - $this->assertEquals('This is a test paragraph. It has three sentences. Exactly three.', TestableLorem::text(100)); - } - - public function testSentenceWithZeroNbWordsReturnsEmptyString() - { - $this->assertEquals('', Lorem::sentence(0)); - } - - public function testSentenceWithNegativeNbWordsReturnsEmptyString() - { - $this->assertEquals('', Lorem::sentence(-1)); - } - - public function testParagraphWithZeroNbSentencesReturnsEmptyString() - { - $this->assertEquals('', Lorem::paragraph(0)); - } - - public function testParagraphWithNegativeNbSentencesReturnsEmptyString() - { - $this->assertEquals('', Lorem::paragraph(-1)); - } - - public function testSentenceWithPositiveNbWordsReturnsAtLeastOneWord() - { - $sentence = Lorem::sentence(1); - - $this->assertGreaterThan(1, strlen($sentence)); - $this->assertGreaterThanOrEqual(1, count(explode(' ', $sentence))); - } - - public function testParagraphWithPositiveNbSentencesReturnsAtLeastOneWord() - { - $paragraph = Lorem::paragraph(1); - - $this->assertGreaterThan(1, strlen($paragraph)); - $this->assertGreaterThanOrEqual(1, count(explode(' ', $paragraph))); - } - - public function testWordssAsText() - { - $words = TestableLorem::words(2, true); - - $this->assertEquals('word word', $words); - } - - public function testSentencesAsText() - { - $sentences = TestableLorem::sentences(2, true); - - $this->assertEquals('This is a test sentence. This is a test sentence.', $sentences); - } - - public function testParagraphsAsText() - { - $paragraphs = TestableLorem::paragraphs(2, true); - - $expected = "This is a test paragraph. It has three sentences. Exactly three.\n\nThis is a test paragraph. It has three sentences. Exactly three."; - $this->assertEquals($expected, $paragraphs); - } -} - -class TestableLorem extends Lorem -{ - - public static function word() - { - return 'word'; - } - - public static function sentence($nbWords = 5, $variableNbWords = true) - { - return 'This is a test sentence.'; - } - - public static function paragraph($nbSentences = 3, $variableNbSentences = true) - { - return 'This is a test paragraph. It has three sentences. Exactly three.'; - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php deleted file mode 100644 index 6a4c559..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php +++ /dev/null @@ -1,54 +0,0 @@ -assertContains(Miscellaneous::boolean(), array(true, false)); - } - - public function testMd5() - { - $this->assertRegExp('/^[a-z0-9]{32}$/', Miscellaneous::md5()); - } - - public function testSha1() - { - $this->assertRegExp('/^[a-z0-9]{40}$/', Miscellaneous::sha1()); - } - - public function testSha256() - { - $this->assertRegExp('/^[a-z0-9]{64}$/', Miscellaneous::sha256()); - } - - public function testLocale() - { - $this->assertRegExp('/^[a-z]{2,3}_[A-Z]{2}$/', Miscellaneous::locale()); - } - - public function testCountryCode() - { - $this->assertRegExp('/^[A-Z]{2}$/', Miscellaneous::countryCode()); - } - - public function testCountryISOAlpha3() - { - $this->assertRegExp('/^[A-Z]{3}$/', Miscellaneous::countryISOAlpha3()); - } - - public function testLanguage() - { - $this->assertRegExp('/^[a-z]{2}$/', Miscellaneous::languageCode()); - } - - public function testCurrencyCode() - { - $this->assertRegExp('/^[A-Z]{3}$/', Miscellaneous::currencyCode()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php deleted file mode 100644 index 4e22e2c..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php +++ /dev/null @@ -1,206 +0,0 @@ -addProvider(new BaseProvider($faker)); - $faker->addProvider(new DateTimeProvider($faker)); - $faker->addProvider(new PersonProvider($faker)); - $faker->addProvider(new PaymentProvider($faker)); - $this->faker = $faker; - } - - public function localeDataProvider() - { - $providerPath = realpath(__DIR__ . '/../../../src/Faker/Provider'); - $localePaths = array_filter(glob($providerPath . '/*', GLOB_ONLYDIR)); - foreach ($localePaths as $path) { - $parts = explode('/', $path); - $locales[] = array($parts[count($parts) - 1]); - } - - return $locales; - } - - public function loadLocalProviders($locale) - { - $providerPath = realpath(__DIR__ . '/../../../src/Faker/Provider'); - if (file_exists($providerPath.'/'.$locale.'/Payment.php')) { - $payment = "\\Faker\\Provider\\$locale\\Payment"; - $this->faker->addProvider(new $payment($this->faker)); - } - } - - public function testCreditCardTypeReturnsValidVendorName() - { - $this->assertTrue(in_array($this->faker->creditCardType, array('Visa', 'MasterCard', 'American Express', 'Discover Card'))); - } - - public function creditCardNumberProvider() - { - return array( - array('Discover Card', '/^6011\d{12}$/'), - array('Visa', '/^4\d{12,15}$/'), - array('MasterCard', '/^5[1-5]\d{14}$/') - ); - } - - /** - * @dataProvider creditCardNumberProvider - */ - public function testCreditCardNumberReturnsValidCreditCardNumber($type, $regexp) - { - $cardNumber = $this->faker->creditCardNumber($type); - $this->assertRegExp($regexp, $cardNumber); - $this->assertTrue(Luhn::isValid($cardNumber)); - } - - public function testCreditCardNumberCanFormatOutput() - { - $this->assertRegExp('/^6011-\d{4}-\d{4}-\d{4}$/', $this->faker->creditCardNumber('Discover Card', true)); - } - - public function testCreditCardExpirationDateReturnsValidDateByDefault() - { - $expirationDate = $this->faker->creditCardExpirationDate; - $this->assertTrue(intval($expirationDate->format('U')) > strtotime('now')); - $this->assertTrue(intval($expirationDate->format('U')) < strtotime('+36 months')); - } - - public function testRandomCard() - { - $cardDetails = $this->faker->creditCardDetails; - $this->assertEquals(count($cardDetails), 4); - $this->assertEquals(array('type', 'number', 'name', 'expirationDate'), array_keys($cardDetails)); - } - - protected $ibanFormats = array( - 'AD' => '/^AD\d{2}\d{4}\d{4}[A-Z0-9]{12}$/', - 'AE' => '/^AE\d{2}\d{3}\d{16}$/', - 'AL' => '/^AL\d{2}\d{8}[A-Z0-9]{16}$/', - 'AT' => '/^AT\d{2}\d{5}\d{11}$/', - 'AZ' => '/^AZ\d{2}[A-Z]{4}[A-Z0-9]{20}$/', - 'BA' => '/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/', - 'BE' => '/^BE\d{2}\d{3}\d{7}\d{2}$/', - 'BG' => '/^BG\d{2}[A-Z]{4}\d{4}\d{2}[A-Z0-9]{8}$/', - 'BH' => '/^BH\d{2}[A-Z]{4}[A-Z0-9]{14}$/', - 'BR' => '/^BR\d{2}\d{8}\d{5}\d{10}[A-Z]{1}[A-Z0-9]{1}$/', - 'CH' => '/^CH\d{2}\d{5}[A-Z0-9]{12}$/', - 'CR' => '/^CR\d{2}\d{3}\d{14}$/', - 'CY' => '/^CY\d{2}\d{3}\d{5}[A-Z0-9]{16}$/', - 'CZ' => '/^CZ\d{2}\d{4}\d{6}\d{10}$/', - 'DE' => '/^DE\d{2}\d{8}\d{10}$/', - 'DK' => '/^DK\d{2}\d{4}\d{9}\d{1}$/', - 'DO' => '/^DO\d{2}[A-Z0-9]{4}\d{20}$/', - 'EE' => '/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/', - 'ES' => '/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/', - 'FR' => '/^FR\d{2}\d{5}\d{5}[A-Z0-9]{11}\d{2}$/', - 'GB' => '/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/', - 'GE' => '/^GE\d{2}[A-Z]{2}\d{16}$/', - 'GI' => '/^GI\d{2}[A-Z]{4}[A-Z0-9]{15}$/', - 'GR' => '/^GR\d{2}\d{3}\d{4}[A-Z0-9]{16}$/', - 'GT' => '/^GT\d{2}[A-Z0-9]{4}[A-Z0-9]{20}$/', - 'HR' => '/^HR\d{2}\d{7}\d{10}$/', - 'HU' => '/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/', - 'IE' => '/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/', - 'IL' => '/^IL\d{2}\d{3}\d{3}\d{13}$/', - 'IS' => '/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/', - 'IT' => '/^IT\d{2}[A-Z]{1}\d{5}\d{5}[A-Z0-9]{12}$/', - 'KW' => '/^KW\d{2}[A-Z]{4}\d{22}$/', - 'KZ' => '/^KZ\d{2}\d{3}[A-Z0-9]{13}$/', - 'LB' => '/^LB\d{2}\d{4}[A-Z0-9]{20}$/', - 'LI' => '/^LI\d{2}\d{5}[A-Z0-9]{12}$/', - 'LT' => '/^LT\d{2}\d{5}\d{11}$/', - 'LU' => '/^LU\d{2}\d{3}[A-Z0-9]{13}$/', - 'LV' => '/^LV\d{2}[A-Z]{4}[A-Z0-9]{13}$/', - 'MC' => '/^MC\d{2}\d{5}\d{5}[A-Z0-9]{11}\d{2}$/', - 'MD' => '/^MD\d{2}[A-Z0-9]{2}[A-Z0-9]{18}$/', - 'ME' => '/^ME\d{2}\d{3}\d{13}\d{2}$/', - 'MK' => '/^MK\d{2}\d{3}[A-Z0-9]{10}\d{2}$/', - 'MR' => '/^MR\d{2}\d{5}\d{5}\d{11}\d{2}$/', - 'MT' => '/^MT\d{2}[A-Z]{4}\d{5}[A-Z0-9]{18}$/', - 'MU' => '/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/', - 'NL' => '/^NL\d{2}[A-Z]{4}\d{10}$/', - 'NO' => '/^NO\d{2}\d{4}\d{6}\d{1}$/', - 'PK' => '/^PK\d{2}[A-Z]{4}[A-Z0-9]{16}$/', - 'PL' => '/^PL\d{2}\d{8}\d{16}$/', - 'PS' => '/^PS\d{2}[A-Z]{4}[A-Z0-9]{21}$/', - 'PT' => '/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/', - 'RO' => '/^RO\d{2}[A-Z]{4}[A-Z0-9]{16}$/', - 'RS' => '/^RS\d{2}\d{3}\d{13}\d{2}$/', - 'SA' => '/^SA\d{2}\d{2}[A-Z0-9]{18}$/', - 'SE' => '/^SE\d{2}\d{3}\d{16}\d{1}$/', - 'SI' => '/^SI\d{2}\d{5}\d{8}\d{2}$/', - 'SK' => '/^SK\d{2}\d{4}\d{6}\d{10}$/', - 'SM' => '/^SM\d{2}[A-Z]{1}\d{5}\d{5}[A-Z0-9]{12}$/', - 'TN' => '/^TN\d{2}\d{2}\d{3}\d{13}\d{2}$/', - 'TR' => '/^TR\d{2}\d{5}\d{1}[A-Z0-9]{16}$/', - 'VG' => '/^VG\d{2}[A-Z]{4}\d{16}$/', - ); - - /** - * @dataProvider localeDataProvider - */ - public function testBankAccountNumber($locale) - { - $parts = explode('_', $locale); - $countryCode = array_pop($parts); - - if (!isset($this->ibanFormats[$countryCode])) { - // No IBAN format available - return; - } - - $this->loadLocalProviders($locale); - - try { - $iban = $this->faker->bankAccountNumber; - } catch (\InvalidArgumentException $e) { - // Not implemented, nothing to test - $this->markTestSkipped("bankAccountNumber not implemented for $locale"); - return; - } - - // Test format - $this->assertRegExp($this->ibanFormats[$countryCode], $iban); - - // Test checksum - $this->assertTrue(Iban::isValid($iban), "Checksum for $iban is invalid"); - } - - public function ibanFormatProvider() - { - $return = array(); - foreach ($this->ibanFormats as $countryCode => $regex) { - $return[] = array($countryCode, $regex); - } - return $return; - } - /** - * @dataProvider ibanFormatProvider - */ - public function testIban($countryCode, $regex) - { - $iban = $this->faker->iban($countryCode); - - // Test format - $this->assertRegExp($regex, $iban); - - // Test checksum - $this->assertTrue(Iban::isValid($iban), "Checksum for $iban is invalid"); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php deleted file mode 100644 index a8d1c0f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php +++ /dev/null @@ -1,86 +0,0 @@ -addProvider(new Person($faker)); - $this->assertContains($faker->firstName($gender), $expected); - } - - public function firstNameProvider() - { - return array( - array(null, array('John', 'Jane')), - array('foobar', array('John', 'Jane')), - array('male', array('John')), - array('female', array('Jane')), - ); - } - - public function testFirstNameMale() - { - $this->assertContains(Person::firstNameMale(), array('John')); - } - - public function testFirstNameFemale() - { - $this->assertContains(Person::firstNameFemale(), array('Jane')); - } - - /** - * @dataProvider titleProvider - */ - public function testTitle($gender, $expected) - { - $faker = new Generator(); - $faker->addProvider(new Person($faker)); - $this->assertContains($faker->title($gender), $expected); - } - - public function titleProvider() - { - return array( - array(null, array('Mr.', 'Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.')), - array('foobar', array('Mr.', 'Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.')), - array('male', array('Mr.', 'Dr.', 'Prof.')), - array('female', array('Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.')), - ); - } - - public function testTitleMale() - { - $this->assertContains(Person::titleMale(), array('Mr.', 'Dr.', 'Prof.')); - } - - public function testTitleFemale() - { - $this->assertContains(Person::titleFemale(), array('Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.')); - } - - public function testLastNameReturnsDoe() - { - $faker = new Generator(); - $faker->addProvider(new Person($faker)); - $this->assertEquals($faker->lastName(), 'Doe'); - } - - public function testNameReturnsFirstNameAndLastName() - { - $faker = new Generator(); - $faker->addProvider(new Person($faker)); - $this->assertContains($faker->name(), array('John Doe', 'Jane Doe')); - $this->assertContains($faker->name('foobar'), array('John Doe', 'Jane Doe')); - $this->assertContains($faker->name('male'), array('John Doe')); - $this->assertContains($faker->name('female'), array('Jane Doe')); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php deleted file mode 100644 index f73bda8..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php +++ /dev/null @@ -1,35 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumberFormat() - { - $number = $this->faker->e164PhoneNumber(); - $this->assertRegExp('/^\+[0-9]{11,}$/', $number); - } - - public function testImeiReturnsValidNumber() - { - $imei = $this->faker->imei(); - $this->assertTrue(Luhn::isValid($imei)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php deleted file mode 100644 index 68f75ae..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php +++ /dev/null @@ -1,189 +0,0 @@ - - */ - -namespace Faker\Test\Provider; - -use Faker; - -/** - * Class ProviderOverrideTest - * - * @package Faker\Test\Provider - * - * This class tests a large portion of all locale specific providers. It does not test the entire stack, because each - * locale specific provider (can) has specific implementations. The goal of this test is to test the common denominator - * and to try to catch possible invalid multi-byte sequences. - */ -class ProviderOverrideTest extends \PHPUnit_Framework_TestCase -{ - /** - * Constants with regular expression patterns for testing the output. - * - * Regular expressions are sensitive for malformed strings (e.g.: strings with incorrect encodings) so by using - * PCRE for the tests, even though they seem fairly pointless, we test for incorrect encodings also. - */ - const TEST_STRING_REGEX = '/.+/u'; - - /** - * Slightly more specific for e-mail, the point isn't to properly validate e-mails. - */ - const TEST_EMAIL_REGEX = '/^(.+)@(.+)$/ui'; - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testAddress($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->city); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->postcode); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->address); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->country); - } - - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testCompany($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->company); - } - - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testDateTime($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->century); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->timezone); - } - - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testInternet($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->userName); - - $this->assertRegExp(static::TEST_EMAIL_REGEX, $faker->email); - $this->assertRegExp(static::TEST_EMAIL_REGEX, $faker->safeEmail); - $this->assertRegExp(static::TEST_EMAIL_REGEX, $faker->freeEmail); - $this->assertRegExp(static::TEST_EMAIL_REGEX, $faker->companyEmail); - } - - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testPerson($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->name); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->title); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->firstName); - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->lastName); - } - - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testPhoneNumber($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->phoneNumber); - } - - - /** - * @dataProvider localeDataProvider - * @param string $locale - */ - public function testUserAgent($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->userAgent); - } - - - /** - * @dataProvider localeDataProvider - * - * @param null $locale - * @param string $locale - */ - public function testUuid($locale = null) - { - $faker = Faker\Factory::create($locale); - - $this->assertRegExp(static::TEST_STRING_REGEX, $faker->uuid); - } - - - /** - * @return array - */ - public function localeDataProvider() - { - $locales = $this->getAllLocales(); - $data = array(); - - foreach ($locales as $locale) { - $data[] = array( - $locale - ); - } - - return $data; - } - - - /** - * Returns all locales as array values - * - * @return array - */ - private function getAllLocales() - { - static $locales = array(); - - if ( ! empty($locales)) { - return $locales; - } - - // Finding all PHP files in the xx_XX directories - $providerDir = __DIR__ .'/../../../src/Faker/Provider'; - foreach (glob($providerDir .'/*_*/*.php') as $file) { - $localisation = basename(dirname($file)); - - if (isset($locales[ $localisation ])) { - continue; - } - - $locales[ $localisation ] = $localisation; - } - - return $locales; - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php deleted file mode 100644 index 3baf49f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php +++ /dev/null @@ -1,54 +0,0 @@ -addProvider(new Text($generator)); - $generator->seed(0); - - $lengths = array(10, 20, 50, 70, 90, 120, 150, 200, 500); - - foreach ($lengths as $length) { - $this->assertLessThan($length, $generator->realText($length)); - } - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testTextMaxIndex() - { - $generator = new Generator(); - $generator->addProvider(new Text($generator)); - $generator->seed(0); - $generator->realText(200, 11); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testTextMinIndex() - { - $generator = new Generator(); - $generator->addProvider(new Text($generator)); - $generator->seed(0); - $generator->realText(200, 0); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testTextMinLength() - { - $generator = new Generator(); - $generator->addProvider(new Text($generator)); - $generator->seed(0); - $generator->realText(9); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php deleted file mode 100644 index b45b9f8..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php +++ /dev/null @@ -1,38 +0,0 @@ -assertNotNull(UserAgent::userAgent()); - } - - public function testFirefoxUserAgent() - { - $this->stringContains(' Firefox/', UserAgent::firefox()); - } - - public function testSafariUserAgent() - { - $this->stringContains('Safari/', UserAgent::safari()); - } - - public function testInternetExplorerUserAgent() - { - $this->assertStringStartsWith('Mozilla/5.0 (compatible; MSIE ', UserAgent::internetExplorer()); - } - - public function testOperaUserAgent() - { - $this->assertStringStartsWith('Opera/', UserAgent::opera()); - } - - public function testChromeUserAgent() - { - $this->stringContains('(KHTML, like Gecko) Chrome/', UserAgent::chrome()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php deleted file mode 100644 index fceb8df..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php +++ /dev/null @@ -1,26 +0,0 @@ -assertTrue($this->isUuid($uuid)); - } - - public function testUuidExpectedSeed() - { - mt_srand(123); - $this->assertEquals("8e2e0c84-50dd-367c-9e66-f3ab455c78d6", BaseProvider::uuid()); - $this->assertEquals("073eb60a-902c-30ab-93d0-a94db371f6c8", BaseProvider::uuid()); - } - - protected function isUuid($uuid) - { - return is_string($uuid) && (bool) preg_match('/^[a-f0-9]{8,8}-(?:[a-f0-9]{4,4}-){3,3}[a-f0-9]{12,12}$/i', $uuid); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php deleted file mode 100644 index d323f1e..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php deleted file mode 100644 index 3765a10..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php deleted file mode 100644 index afc8c27..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php +++ /dev/null @@ -1,30 +0,0 @@ -addProvider(new Payment($faker)); - $this->faker = $faker; - } - - public function testVatIsValid() - { - $vat = $this->faker->vat(); - $unspacedVat = $this->faker->vat(false); - $this->assertRegExp('/^(AT U\d{8})$/', $vat); - $this->assertRegExp('/^(ATU\d{8})$/', $unspacedVat); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php deleted file mode 100644 index 31c6325..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php +++ /dev/null @@ -1,30 +0,0 @@ -addProvider(new Payment($faker)); - $this->faker = $faker; - } - - public function testVatIsValid() - { - $vat = $this->faker->vat(); - $unspacedVat = $this->faker->vat(false); - $this->assertRegExp('/^(BG \d{9,10})$/', $vat); - $this->assertRegExp('/^(BG\d{9,10})$/', $unspacedVat); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php deleted file mode 100644 index 606599f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php +++ /dev/null @@ -1,29 +0,0 @@ -addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testIfFirstNameMaleCanReturnData() - { - $firstNameMale = $this->faker->firstNameMale(); - $this->assertNotEmpty($firstNameMale); - } - - public function testIfFirstNameFemaleCanReturnData() - { - $firstNameFemale = $this->faker->firstNameFemale(); - $this->assertNotEmpty($firstNameFemale); - } -} -?> diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php deleted file mode 100644 index bd33c3d..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php +++ /dev/null @@ -1,46 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Miscellaneous($faker)); - - for ($i = 0; $i < 1000; $i++) { - $birthNumber = $faker->birthNumber(); - $birthNumber = str_replace('/', '', $birthNumber); - - // check date - $year = intval(substr($birthNumber, 0, 2), 10); - $month = intval(substr($birthNumber, 2, 2), 10); - $day = intval(substr($birthNumber, 4, 2), 10); - - // make 4 digit year from 2 digit representation - $year += $year < 54 ? 2000 : 1900; - - // adjust special cases for month - if ($month > 50) $month -= 50; - if ($year >= 2004 && $month > 20) $month -= 20; - - $this->assertTrue(checkdate($month, $day, $year), "Birth number $birthNumber: date $year/$month/$day is invalid."); - - // check CRC if presented - if (strlen($birthNumber) == 10) { - $crc = intval(substr($birthNumber, -1), 10); - $refCrc = intval(substr($birthNumber, 0, -1), 10) % 11; - if ($refCrc == 10) { - $refCrc = 0; - } - $this->assertEquals($crc, $refCrc, "Birth number $birthNumber: checksum $crc doesn't match expected $refCrc.");; - } - } - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php deleted file mode 100644 index ddbdd7a..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php deleted file mode 100644 index 91ce5ca..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php deleted file mode 100644 index 2d61ad5..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php +++ /dev/null @@ -1,28 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumberFormat() - { - $number = $this->faker->phoneNumber; - $this->assertRegExp('/^06\d{2} \d{7}|\+43 \d{4} \d{4}(-\d{2})?$/', $number); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php deleted file mode 100644 index 2f2de27..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php +++ /dev/null @@ -1,69 +0,0 @@ -addProvider(new Address($faker)); - $faker->addProvider(new Person($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function canton () - { - $canton = $this->faker->canton(); - $this->assertInternalType('array', $canton); - $this->assertCount(1, $canton); - - foreach ($canton as $cantonShort => $cantonName){ - $this->assertInternalType('string', $cantonShort); - $this->assertEquals(2, strlen($cantonShort)); - $this->assertInternalType('string', $cantonName); - $this->assertGreaterThan(2, strlen($cantonName)); - } - } - - /** - * @test - */ - public function cantonName () - { - $cantonName = $this->faker->cantonName(); - $this->assertInternalType('string', $cantonName); - $this->assertGreaterThan(2, strlen($cantonName)); - } - - /** - * @test - */ - public function cantonShort () - { - $cantonShort = $this->faker->cantonShort(); - $this->assertInternalType('string', $cantonShort); - $this->assertEquals(2, strlen($cantonShort)); - } - - /** - * @test - */ - public function address (){ - $address = $this->faker->address(); - $this->assertInternalType('string', $address); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php deleted file mode 100644 index 907af21..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php +++ /dev/null @@ -1,35 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function emailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php deleted file mode 100644 index 0c5f937..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumber() - { - $this->assertRegExp('/^0\d{2} ?\d{3} ?\d{2} ?\d{2}|\+41 ?(\(0\))?\d{2} ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->phoneNumber()); - } - - public function testMobileNumber() - { - $this->assertRegExp('/^07[56789] ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->mobileNumber()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php deleted file mode 100644 index 8d39ff0..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php deleted file mode 100644 index ef8e9f2..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php +++ /dev/null @@ -1,48 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testCityPrefix() - { - $cityPrefix = $this->faker->cityPrefix(); - $this->assertNotEmpty($cityPrefix); - $this->assertInternalType('string', $cityPrefix); - $this->assertRegExp('/[A-Z][a-z]+/', $cityPrefix); - } - - public function testStreetSuffix() - { - $streetSuffix = $this->faker->streetSuffix(); - $this->assertNotEmpty($streetSuffix); - $this->assertInternalType('string', $streetSuffix); - $this->assertRegExp('/[A-Z][a-z]+/', $streetSuffix); - } - - public function testState() - { - $state = $this->faker->state(); - $this->assertNotEmpty($state); - $this->assertInternalType('string', $state); - $this->assertRegExp('/[A-Z][a-z]+/', $state); - } -} - -?> diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php deleted file mode 100644 index fb17c09..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php +++ /dev/null @@ -1,68 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - /** - * Test the validity of province - */ - public function testProvince() - { - $province = $this->faker->province(); - $this->assertNotEmpty($province); - $this->assertInternalType('string', $province); - $this->assertRegExp('/[A-Z][a-z]+/', $province); - } - - /** - * Test the validity of province abbreviation - */ - public function testProvinceAbbr() - { - $provinceAbbr = $this->faker->provinceAbbr(); - $this->assertNotEmpty($provinceAbbr); - $this->assertInternalType('string', $provinceAbbr); - $this->assertRegExp('/^[A-Z]{2}$/', $provinceAbbr); - } - - /** - * Test the validity of postcode letter - */ - public function testPostcodeLetter() - { - $postcodeLetter = $this->faker->randomPostcodeLetter(); - $this->assertNotEmpty($postcodeLetter); - $this->assertInternalType('string', $postcodeLetter); - $this->assertRegExp('/^[A-Z]{1}$/', $postcodeLetter); - } - - /** - * Test the validity of Canadian postcode - */ - public function testPostcode() - { - $postcode = $this->faker->postcode(); - $this->assertNotEmpty($postcode); - $this->assertInternalType('string', $postcode); - $this->assertRegExp('/^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/', $postcode); - } -} - -?> diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php deleted file mode 100644 index a5e965b..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php +++ /dev/null @@ -1,56 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testCity() - { - $city = $this->faker->city(); - $this->assertNotEmpty($city); - $this->assertInternalType('string', $city); - $this->assertRegExp('/[A-Z][a-z]+/', $city); - } - - public function testCountry() - { - $country = $this->faker->country(); - $this->assertNotEmpty($country); - $this->assertInternalType('string', $country); - $this->assertRegExp('/[A-Z][a-z]+/', $country); - } - - public function testLocalityName() - { - $localityName = $this->faker->localityName(); - $this->assertNotEmpty($localityName); - $this->assertInternalType('string', $localityName); - $this->assertRegExp('/[A-Z][a-z]+/', $localityName); - } - - public function testAreaSuffix() - { - $areaSuffix = $this->faker->areaSuffix(); - $this->assertNotEmpty($areaSuffix); - $this->assertInternalType('string', $areaSuffix); - $this->assertRegExp('/[A-Z][a-z]+/', $areaSuffix); - } -} - -?> diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php deleted file mode 100644 index f8a8f6c..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php +++ /dev/null @@ -1,35 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testIfPhoneNumberCanReturnData() - { - $number = $this->faker->phoneNumber; - $this->assertNotEmpty($number); - } - - public function phoneNumberFormat() - { - $number = $this->faker->phoneNumber; - $this->assertRegExp('/(^\([0]\d{1}\))(\d{7}$)|(^\([0][2]\d{1}\))(\d{6,8}$)|([0][8][0][0])([\s])(\d{5,8}$)/', $number); - } -} -?> diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php deleted file mode 100644 index d3b4682..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php +++ /dev/null @@ -1,49 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testProvince() - { - $province = $this->faker->province(); - $this->assertNotEmpty($province); - $this->assertInternalType('string', $province); - } - - public function testCity() - { - $city = $this->faker->city(); - $this->assertNotEmpty($city); - $this->assertInternalType('string', $city); - } - - public function testMunicipality() - { - $municipality = $this->faker->municipality(); - $this->assertNotEmpty($municipality); - $this->assertInternalType('string', $municipality); - } - - public function testBarangay() - { - $barangay = $this->faker->barangay(); - $this->assertInternalType('string', $barangay); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php deleted file mode 100644 index a62e1c6..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php +++ /dev/null @@ -1,26 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testStreetNumber() - { - $this->assertRegExp('/^\d{2,3}$/', $this->faker->streetNumber()); - } - - public function testBlockNumber() - { - $this->assertRegExp('/^Blk\s*\d{2,3}[A-H]*$/i', $this->faker->blockNumber()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php deleted file mode 100644 index 60828b2..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php +++ /dev/null @@ -1,43 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - // http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan - // y means 0 to 8 only - // x means 0 to 9 - public function testMobilePhoneNumberStartWith9Returns9yxxxxxx() - { - $startsWith9 = false; - while (!$startsWith9) { - $mobileNumber = $this->faker->mobileNumber(); - $startsWith9 = preg_match('/^(\+65|65)?\s*9/', $mobileNumber); - } - - $this->assertRegExp('/^(\+65|65)?\s*9\s*[0-8]{3}\s*\d{4}$/', $mobileNumber); - } - - // http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan - // z means 1 to 9 only - // x means 0 to 9 - public function testMobilePhoneNumberStartWith7Or8Returns7Or8zxxxxxx() - { - $startsWith7Or8 = false; - while (!$startsWith7Or8) { - $mobileNumber = $this->faker->mobileNumber(); - $startsWith7Or8 = preg_match('/^(\+65|65)?\s*[7-8]/', $mobileNumber); - } - $this->assertRegExp('/^(\+65|65)?\s*[7-8]\s*[1-9]{3}\s*\d{4}$/', $mobileNumber); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php deleted file mode 100644 index 484b125..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php +++ /dev/null @@ -1,52 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function testCityName() - { - $city = $this->faker->cityName(); - $this->assertNotEmpty($city); - $this->assertInternalType('string', $city); - } - - /** - * @test - */ - public function testDistrict() - { - $district = $this->faker->district(); - $this->assertNotEmpty($district); - $this->assertInternalType('string', $district); - } - - /** - * @test - */ - public function testRegion() - { - $region = $this->faker->region(); - $this->assertNotEmpty($region); - $this->assertInternaltype('string', $region); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php deleted file mode 100644 index d17593f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php +++ /dev/null @@ -1,84 +0,0 @@ -addProvider(new Payment($faker)); - $this->faker = $faker; - } - - public function testBankAccountNumber() - { - $accNo = $this->faker->bankAccountNumber; - $this->assertTrue(ctype_digit($accNo)); - $this->assertLessThanOrEqual(17, strlen($accNo)); - } - - public function testBankRoutingNumber() - { - $routingNo = $this->faker->bankRoutingNumber; - $this->assertRegExp('/^\d{9}$/', $routingNo); - $this->assertEquals(Payment::calculateRoutingNumberChecksum($routingNo), $routingNo[8]); - } - - public function routingNumberProvider() - { - return array( - array('122105155'), - array('082000549'), - array('121122676'), - array('122235821'), - array('102101645'), - array('102000021'), - array('123103729'), - array('071904779'), - array('081202759'), - array('074900783'), - array('104000029'), - array('073000545'), - array('101000187'), - array('042100175'), - array('083900363'), - array('091215927'), - array('091300023'), - array('091000022'), - array('081000210'), - array('101200453'), - array('092900383'), - array('104000029'), - array('121201694'), - array('107002312'), - array('091300023'), - array('041202582'), - array('042000013'), - array('123000220'), - array('091408501'), - array('064000059'), - array('124302150'), - array('125000105'), - array('075000022'), - array('307070115'), - array('091000022'), - ); - } - - /** - * @dataProvider routingNumberProvider - */ - public function testCalculateRoutingNumberChecksum($routingNo) - { - $this->assertEquals($routingNo[8], Payment::calculateRoutingNumberChecksum($routingNo), $routingNo); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php deleted file mode 100644 index ae2951a..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php +++ /dev/null @@ -1,84 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumber() - { - for ($i = 0; $i < 100; $i++) { - $number = $this->faker->phoneNumber; - $baseNumber = preg_replace('/ *x.*$/', '', $number); // Remove possible extension - $digits = array_values(array_filter(str_split($baseNumber), 'ctype_digit')); - - // Prefix '1' allowed - if (count($digits) === 11) { - $this->assertEquals('1', $digits[0]); - $digits = array_slice($digits, 1); - } - - // 10 digits - $this->assertEquals(10, count($digits)); - - // Last two digits of area code cannot be identical - $this->assertNotEquals($digits[1], $digits[2]); - - // Last two digits of exchange code cannot be 1 - if ($digits[4] === 1) { - $this->assertNotEquals($digits[4], $digits[5]); - } - - // Test format - $this->assertRegExp('/^(\+?1)?([ -.]*\d{3}[ -.]*| *\(\d{3}\) *)\d{3}[-.]?\d{4}$/', $baseNumber); - } - } - - public function testTollFreeAreaCode() - { - $this->assertContains($this->faker->tollFreeAreaCode, array(800, 822, 833, 844, 855, 866, 877, 888, 880, 887, 889)); - } - - public function testTollFreePhoneNumber() - { - for ($i = 0; $i < 100; $i++) { - $number = $this->faker->tollFreePhoneNumber; - $digits = array_values(array_filter(str_split($number), 'ctype_digit')); - - // Prefix '1' allowed - if (count($digits) === 11) { - $this->assertEquals('1', $digits[0]); - $digits = array_slice($digits, 1); - } - - // 10 digits - $this->assertEquals(10, count($digits)); - - $areaCode = $digits[0] . $digits[1] . $digits[2]; - $this->assertContains($areaCode, array('800', '822', '833', '844', '855', '866', '877', '888', '880', '887', '889')); - - // Last two digits of exchange code cannot be 1 - if ($digits[4] === 1) { - $this->assertNotEquals($digits[4], $digits[5]); - } - - // Test format - $this->assertRegExp('/^(\+?1)?([ -.]*\d{3}[ -.]*| *\(\d{3}\) *)\d{3}[-.]?\d{4}$/', $number); - } - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php deleted file mode 100644 index 678a388..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php +++ /dev/null @@ -1,26 +0,0 @@ -addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testGenerateValidCompanyNumber() - { - $companyRegNo = $this->faker->companyNumber(); - - $this->assertEquals(14, strlen($companyRegNo)); - $this->assertRegExp('#^\d{4}/\d{6}/\d{2}$#', $companyRegNo); - } -} \ No newline at end of file diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php deleted file mode 100644 index 7edd63f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php deleted file mode 100644 index bfb516a..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php +++ /dev/null @@ -1,65 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumber() - { - for ($i = 0; $i < 10; $i++) { - $number = $this->faker->phoneNumber; - - $digits = array_values(array_filter(str_split($number), 'ctype_digit')); - - // 10 digits - if($digits[0] = 2 && $digits[1] == 7) { - $this->assertLessThanOrEqual(11, count($digits)); - } else { - $this->assertGreaterThanOrEqual(10, count($digits)); - } - } - } - - public function testTollFreePhoneNumber() - { - for ($i = 0; $i < 10; $i++) { - $number = $this->faker->tollFreeNumber; - $digits = array_values(array_filter(str_split($number), 'ctype_digit')); - - if (count($digits) === 11) { - $this->assertEquals('0', $digits[0]); - } - - $areaCode = $digits[0] . $digits[1] . $digits[2] . $digits[3]; - $this->assertContains($areaCode, array('0800', '0860', '0861', '0862')); - } - } - - public function testCellPhoneNumber() - { - for ($i = 0; $i < 10; $i++) { - $number = $this->faker->mobileNumber; - $digits = array_values(array_filter(str_split($number), 'ctype_digit')); - - if($digits[0] = 2 && $digits[1] == 7) { - $this->assertLessThanOrEqual(11, count($digits)); - } else { - $this->assertGreaterThanOrEqual(10, count($digits)); - } - - $this->assertRegExp('/^(\+27|27)?(\()?0?([6][0-4]|[7][1-9]|[8][1-9])(\))?( |-|\.|_)?(\d{3})( |-|\.|_)?(\d{4})/', $number); - } - } -} \ No newline at end of file diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php deleted file mode 100644 index 55360ba..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php +++ /dev/null @@ -1,38 +0,0 @@ -seed(1); - $faker->addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testDNI() - { - $dni = $this->faker->dni; - $this->assertTrue($this->isValidDNI($dni)); - } - - // validation taken from http://kiwwito.com/php-function-for-spanish-dni-nie-validation/ - public function isValidDNI($string) - { - if (strlen($string) != 9 || - preg_match('/^[XYZ]?([0-9]{7,8})([A-Z])$/i', $string, $matches) !== 1) { - return false; - } - - $map = 'TRWAGMYFPDXBNJZSQVHLCKE'; - - list(, $number, $letter) = $matches; - - return strtoupper($letter) === $map[((int) $number) % 23]; - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php deleted file mode 100644 index 3f0e506..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testEmailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php deleted file mode 100644 index 46c1cd7..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php +++ /dev/null @@ -1,29 +0,0 @@ -addProvider(new Payment($faker)); - $this->faker = $faker; - } - - public function testVatIsValid() - { - $vat = $this->faker->vat(); - $unspacedVat = $this->faker->vat(false); - $this->assertRegExp('/^(BE 0\d{9})$/', $vat); - $this->assertRegExp('/^(BE0\d{9})$/', $unspacedVat); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php deleted file mode 100644 index f589c1f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php +++ /dev/null @@ -1,69 +0,0 @@ -addProvider(new Address($faker)); - $faker->addProvider(new Person($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function canton () - { - $canton = $this->faker->canton(); - $this->assertInternalType('array', $canton); - $this->assertCount(1, $canton); - - foreach ($canton as $cantonShort => $cantonName){ - $this->assertInternalType('string', $cantonShort); - $this->assertEquals(2, strlen($cantonShort)); - $this->assertInternalType('string', $cantonName); - $this->assertGreaterThan(2, strlen($cantonName)); - } - } - - /** - * @test - */ - public function cantonName () - { - $cantonName = $this->faker->cantonName(); - $this->assertInternalType('string', $cantonName); - $this->assertGreaterThan(2, strlen($cantonName)); - } - - /** - * @test - */ - public function cantonShort () - { - $cantonShort = $this->faker->cantonShort(); - $this->assertInternalType('string', $cantonShort); - $this->assertEquals(2, strlen($cantonShort)); - } - - /** - * @test - */ - public function address (){ - $address = $this->faker->address(); - $this->assertInternalType('string', $address); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php deleted file mode 100644 index 2f20871..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php +++ /dev/null @@ -1,35 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function emailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php deleted file mode 100644 index 1f3fc20..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumber() - { - $this->assertRegExp('/^0\d{2} ?\d{3} ?\d{2} ?\d{2}|\+41 ?(\(0\))?\d{2} ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->phoneNumber()); - } - - public function testMobileNumber() - { - $this->assertRegExp('/^07[56789] ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->mobileNumber()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php deleted file mode 100644 index 5486cf9..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php +++ /dev/null @@ -1,74 +0,0 @@ -addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testSiretReturnsAValidSiret() - { - $siret = $this->faker->siret(false); - $this->assertRegExp("/^\d{14}$/", $siret); - $this->assertTrue(Luhn::isValid($siret)); - } - - public function testSiretReturnsAWellFormattedSiret() - { - $siret = $this->faker->siret(); - $this->assertRegExp("/^\d{3}\s\d{3}\s\d{3}\s\d{5}$/", $siret); - $siret = str_replace(' ', '', $siret); - $this->assertTrue(Luhn::isValid($siret)); - } - - public function testSirenReturnsAValidSiren() - { - $siren = $this->faker->siren(false); - $this->assertRegExp("/^\d{9}$/", $siren); - $this->assertTrue(Luhn::isValid($siren)); - } - - public function testSirenReturnsAWellFormattedSiren() - { - $siren = $this->faker->siren(); - $this->assertRegExp("/^\d{3}\s\d{3}\s\d{3}$/", $siren); - $siren = str_replace(' ', '', $siren); - $this->assertTrue(Luhn::isValid($siren)); - } - - public function testCatchPhraseReturnsValidCatchPhrase() - { - $this->assertTrue(TestableCompany::isCatchPhraseValid($this->faker->catchPhrase())); - } - - public function testIsCatchPhraseValidReturnsFalseWhenAWordsAppearsTwice() - { - $isCatchPhraseValid = TestableCompany::isCatchPhraseValid('La sécurité de rouler en toute sécurité'); - $this->assertFalse($isCatchPhraseValid); - } - - public function testIsCatchPhraseValidReturnsTrueWhenNoWordAppearsTwice() - { - $isCatchPhraseValid = TestableCompany::isCatchPhraseValid('La sécurité de rouler en toute simplicité'); - $this->assertTrue($isCatchPhraseValid); - } -} - -class TestableCompany extends Company -{ - public static function isCatchPhraseValid($catchPhrase) - { - return parent::isCatchPhraseValid($catchPhrase); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php deleted file mode 100644 index abd039f..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php +++ /dev/null @@ -1,40 +0,0 @@ -addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testIfFirstNameMaleCanReturnData() - { - $firstNameMale = $this->faker->firstNameMale(); - $this->assertNotEmpty($firstNameMale); - } - - public function testIfLastNameMaleCanReturnData() - { - $lastNameMale = $this->faker->lastNameMale(); - $this->assertNotEmpty($lastNameMale); - } - - public function testIfFirstNameFemaleCanReturnData() - { - $firstNameFemale = $this->faker->firstNameFemale(); - $this->assertNotEmpty($firstNameFemale); - } - - public function testIfLastNameFemaleCanReturnData() - { - $lastNameFemale = $this->faker->lastNameFemale(); - $this->assertNotEmpty($lastNameFemale); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php deleted file mode 100644 index 7612253..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php +++ /dev/null @@ -1,69 +0,0 @@ -addProvider(new Address($faker)); - $faker->addProvider(new Person($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function canton () - { - $canton = $this->faker->canton(); - $this->assertInternalType('array', $canton); - $this->assertCount(1, $canton); - - foreach ($canton as $cantonShort => $cantonName){ - $this->assertInternalType('string', $cantonShort); - $this->assertEquals(2, strlen($cantonShort)); - $this->assertInternalType('string', $cantonName); - $this->assertGreaterThan(2, strlen($cantonName)); - } - } - - /** - * @test - */ - public function cantonName () - { - $cantonName = $this->faker->cantonName(); - $this->assertInternalType('string', $cantonName); - $this->assertGreaterThan(2, strlen($cantonName)); - } - - /** - * @test - */ - public function cantonShort () - { - $cantonShort = $this->faker->cantonShort(); - $this->assertInternalType('string', $cantonShort); - $this->assertEquals(2, strlen($cantonShort)); - } - - /** - * @test - */ - public function address (){ - $address = $this->faker->address(); - $this->assertInternalType('string', $address); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php deleted file mode 100644 index 16616c7..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php +++ /dev/null @@ -1,35 +0,0 @@ -addProvider(new Person($faker)); - $faker->addProvider(new Internet($faker)); - $faker->addProvider(new Company($faker)); - $this->faker = $faker; - } - - /** - * @test - */ - public function emailIsValid() - { - $email = $this->faker->email(); - $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php deleted file mode 100644 index d3f17b8..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php +++ /dev/null @@ -1,32 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumber() - { - $this->assertRegExp('/^0\d{2} ?\d{3} ?\d{2} ?\d{2}|\+41 ?(\(0\))?\d{2} ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->phoneNumber()); - } - - public function testMobileNumber() - { - $this->assertRegExp('/^07[56789] ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->mobileNumber()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php deleted file mode 100644 index 7bef3fa..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php +++ /dev/null @@ -1,23 +0,0 @@ -addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testIfTaxIdCanReturnData() - { - $vatId = $this->faker->vatId(); - $this->assertRegExp('/^IT[0-9]{11}$/', $vatId); - } - -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php deleted file mode 100644 index 5d0dc23..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php +++ /dev/null @@ -1,23 +0,0 @@ -addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testIfTaxIdCanReturnData() - { - $taxId = $this->faker->taxId(); - $this->assertRegExp('/^[a-zA-Z]{6}[0-9]{2}[a-zA-Z][0-9]{2}[a-zA-Z][0-9]{3}[a-zA-Z]$/', $taxId); - } - -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php deleted file mode 100644 index 97fc566..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php +++ /dev/null @@ -1,36 +0,0 @@ -addProvider(new Person($faker)); - $faker->seed(1); - - $this->assertEquals('アオタ ミノル', $faker->kanaName); - } - - public function testFirstKanaNameReturnsHaruka() - { - $faker = new Generator(); - $faker->addProvider(new Person($faker)); - $faker->seed(1); - - $this->assertEquals('ハルカ', $faker->firstKanaName); - } - - public function testLastKanaNameReturnsNakajima() - { - $faker = new Generator(); - $faker->addProvider(new Person($faker)); - $faker->seed(1); - - $this->assertEquals('ナカジマ', $faker->lastKanaName); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php deleted file mode 100644 index f3c9572..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php +++ /dev/null @@ -1,27 +0,0 @@ -addProvider(new Person($faker)); - $faker->seed(1); - - $this->assertRegExp('/^[А-Я]{1}\.[\w\W]+$/u', $faker->name); - } - - public function testIdNumber() - { - $faker = new Generator(); - $faker->addProvider(new Person($faker)); - $faker->seed(2); - - $this->assertRegExp('/^[А-Я]{2}\d{8}$/u', $faker->idNumber); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php deleted file mode 100644 index 9216de7..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php +++ /dev/null @@ -1,29 +0,0 @@ -addProvider(new Payment($faker)); - $this->faker = $faker; - } - - public function testVatIsValid() - { - $vat = $this->faker->vat(); - $unspacedVat = $this->faker->vat(false); - $this->assertRegExp('/^(BE 0\d{9})$/', $vat); - $this->assertRegExp('/^(BE0\d{9})$/', $unspacedVat); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php deleted file mode 100644 index 4775b14..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php +++ /dev/null @@ -1,34 +0,0 @@ -addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testGenerateValidVatNumber() - { - $vatNo = $this->faker->vat(); - - $this->assertEquals(14, strlen($vatNo)); - $this->assertRegExp('/^NL[0-9]{9}B[0-9]{2}$/', $vatNo); - } - - public function testGenerateValidBtwNumberAlias() - { - $btwNo = $this->faker->btw(); - - $this->assertEquals(14, strlen($btwNo)); - $this->assertRegExp('/^NL[0-9]{9}B[0-9]{2}$/', $btwNo); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php deleted file mode 100644 index f59142b..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php +++ /dev/null @@ -1,25 +0,0 @@ -addProvider(new Company($faker)); - $this->faker = $faker; - } - - public function testCnpjFormatIsValid() - { - $cnpj = $this->faker->cnpj(false); - $this->assertRegExp('/\d{8}\d{4}\d{2}/', $cnpj); - $cnpj = $this->faker->cnpj(true); - $this->assertRegExp('/\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}/', $cnpj); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php deleted file mode 100644 index 767c188..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php +++ /dev/null @@ -1,33 +0,0 @@ -addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testCpfFormatIsValid() - { - $cpf = $this->faker->cpf(false); - $this->assertRegExp('/\d{9}\d{2}/', $cpf); - $cpf = $this->faker->cpf(true); - $this->assertRegExp('/\d{3}\.\d{3}\.\d{3}-\d{2}/', $cpf); - } - - public function testRgFormatIsValid() - { - $rg = $this->faker->rg(false); - $this->assertRegExp('/\d{8}\d/', $rg); - $rg = $this->faker->rg(true); - $this->assertRegExp('/\d{2}\.\d{3}\.\d{3}-[0-9X]/', $rg); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php deleted file mode 100644 index d2adc15..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php +++ /dev/null @@ -1,30 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testPostCodeIsValid() - { - $main = '[1-9]{1}[0-9]{2}[0,1,4,5,9]{1}'; - $pattern = "/^($main)|($main-[0-9]{3})+$/"; - $postcode = $this->faker->postcode(); - $this->assertSame(preg_match($pattern, $postcode), 1, $postcode); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php deleted file mode 100644 index 9bfb7a2..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php +++ /dev/null @@ -1,52 +0,0 @@ -addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testTaxpayerIdentificationNumberIsValid() - { - $tin = $this->faker->taxpayerIdentificationNumber(); - $this->assertTrue($this->isValidTin($tin), $tin); - } - - /** - * - * @link http://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal - * - * @param type $tin - * - * @return boolean - */ - public static function isValidTin($tin) - { - $regex = '(([1,2,3,5,6,8]{1}[0-9]{8})|((45)|(70)|(71)|(72)|(77)|(79)|(90|(98|(99))))[0-9]{7})'; - if (is_null($tin) || !is_numeric($tin) || !strlen($tin) == 9 || preg_match("/$regex/", $tin) !== 1) { - return false; - } - $n = str_split($tin); - // cd - Control Digit - $cd = ($n[0] * 9 + $n[1] * 8 + $n[2] * 7 + $n[3] * 6 + $n[4] * 5 + $n[5] * 4 + $n[6] * 3 + $n[7] * 2) % 11; - if ($cd === 0 || $cd === 1) { - $cd = 0; - } else { - $cd = 11 - $cd; - } - if ($cd === intval($n[8])) { - return true; - } - - return false; - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php deleted file mode 100644 index 04b2f63..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php +++ /dev/null @@ -1,25 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumberReturnsPhoneNumberWithOrWithoutPrefix() - { - $this->assertRegExp('/^(9[1,2,3,6][0-9]{7})|(2[0-9]{8})|(\+351 [2][0-9]{8})|(\+351 9[1,2,3,6][0-9]{7})/', $this->faker->phoneNumber()); - } - public function testMobileNumberReturnsMobileNumberWithOrWithoutPrefix() - { - $this->assertRegExp('/^(9[1,2,3,6][0-9]{7})/', $this->faker->mobileNumber()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php deleted file mode 100644 index 5816b63..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php +++ /dev/null @@ -1,95 +0,0 @@ -seed(1); - $faker->addProvider(new DateTime($faker)); - $faker->addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function testCnpReturnsValidCnp() - { - $cnp = $this->faker->cnp; - $this->assertTrue($this->isValidCnp($cnp)); - } - - public function testCnpReturnsMaleCnp() - { - $cnp = $this->faker->cnp('m'); - $this->assertRegExp('/^[1357]\d{12}$/', $cnp); - } - - public function testCnpReturnsFemaleCnp() - { - $cnp = $this->faker->cnp('f'); - $this->assertRegExp('/^[2468]\d{12}$/', $cnp); - } - - public function testCnpReturns1800sCnp() - { - $cnp = $this->faker->cnp(null, 1800); - $this->assertRegExp('/^[34]\d{12}$/', $cnp); - } - - public function testCnpReturns1900sCnp() - { - $cnp = $this->faker->cnp(null, 1900); - $this->assertRegExp('/^[12]\d{12}$/', $cnp); - } - - public function testCnpReturns2000sCnp() - { - $cnp = $this->faker->cnp(null, 2000); - $this->assertRegExp('/^[56]\d{12}$/', $cnp); - } - - public function testCnpReturnsBrasovCnp() - { - $cnp = $this->faker->cnp(null, null, 'BV'); - $this->assertRegExp('/^\d{7}08\d{4}$/', $cnp); - } - - public function testCnpReturns2000sClujFemaleCnp() - { - $cnp = $this->faker->cnp('f', 2000, 'CJ'); - $this->assertRegExp('/^6\d{6}12\d{4}$/', $cnp); - } - - protected function isValidCnp($cnp) - { - if ( - is_string($cnp) - && (bool) preg_match(static::TEST_CNP_REGEX, $cnp) - && checkdate(substr($cnp, 3, 2), substr($cnp, 5, 2), substr($cnp, 1, 2)) - ){ - $checkNumber = 279146358279; - - $checksum = 0; - foreach (range(0, 11) as $digit) { - $checksum += substr($cnp, $digit, 1) * substr($checkNumber, $digit, 1); - } - $checksum = $checksum % 11; - - if ( - ($checksum < 10 && $checksum == substr($cnp, -1)) - || ($checksum == 10 && substr($cnp, -1) == 1) - ){ - return true; - } - } - - return false; - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php deleted file mode 100644 index 97314d5..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php +++ /dev/null @@ -1,31 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumberReturnsNormalPhoneNumber() - { - $this->assertRegExp('/^0(?:[23][13-7]|7\d)\d{7}$/', $this->faker->phoneNumber()); - } - - public function testTollFreePhoneNumberReturnsTollFreePhoneNumber() - { - $this->assertRegExp('/^08(?:0[1267]|70)\d{6}$/', $this->faker->tollFreePhoneNumber()); - } - - public function testPremiumRatePhoneNumberReturnsPremiumRatePhoneNumber() - { - $this->assertRegExp('/^090[036]\d{6}$/', $this->faker->premiumRatePhoneNumber()); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php deleted file mode 100644 index 623723a..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php +++ /dev/null @@ -1,60 +0,0 @@ -addProvider(new Person($faker)); - $this->faker = $faker; - } - - public function provideSeedAndExpectedReturn() - { - return array( - array(1, '720727', '720727-5798'), - array(2, '710414', '710414-5664'), - array(3, '591012', '591012-4519'), - array(4, '180307', '180307-0356'), - array(5, '820904', '820904-7748') - ); - } - - /** - * @dataProvider provideSeedAndExpectedReturn - */ - public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected) - { - $faker = $this->faker; - $faker->seed($seed); - $pin = $faker->personalIdentityNumber(\DateTime::createFromFormat('ymd', $birthdate)); - $this->assertEquals($expected, $pin); - } - - public function testPersonalIdentityNumberGeneratesLuhnCompliantNumbers() - { - $pin = str_replace('-', '', $this->faker->personalIdentityNumber()); - $this->assertTrue(Luhn::isValid($pin)); - } - - public function testPersonalIdentityNumberGeneratesOddValuesForMales() - { - $pin = $this->faker->personalIdentityNumber(null, 'male'); - $this->assertEquals(1, $pin{9} % 2); - } - - public function testPersonalIdentityNumberGeneratesEvenValuesForFemales() - { - $pin = $this->faker->personalIdentityNumber(null, 'female'); - $this->assertEquals(0, $pin{9} % 2); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php deleted file mode 100644 index a3e38d7..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php +++ /dev/null @@ -1,80 +0,0 @@ -addProvider(new Address($faker)); - $this->faker = $faker; - } - - public function testPostCodeIsValid() - { - $main = '[0-9]{5}'; - $pattern = "/^($main)|($main-[0-9]{3})+$/"; - $postcode = $this->faker->postcode; - $this->assertRegExp($pattern, $postcode, 'Post code ' . $postcode . ' is wrong!'); - } - - public function testEmptySuffixes() - { - $this->assertEmpty($this->faker->citySuffix, 'City suffix should be empty!'); - $this->assertEmpty($this->faker->streetSuffix, 'Street suffix should be empty!'); - } - - public function testStreetCyrOnly() - { - $pattern = "/[0-9А-ЩЯІЇЄЮа-щяіїєюьIVXCM][0-9А-ЩЯІЇЄЮа-щяіїєюь \'-.]*[А-Яа-я.]/u"; - $streetName = $this->faker->streetName; - $this->assertSame( - preg_match($pattern, $streetName), - 1, - 'Street name ' . $streetName . ' is wrong!' - ); - } - - public function testCityNameCyrOnly() - { - $pattern = "/[А-ЩЯІЇЄЮа-щяіїєюь][0-9А-ЩЯІЇЄЮа-щяіїєюь \'-]*[А-Яа-я]/u"; - $city = $this->faker->city; - $this->assertSame( - preg_match($pattern, $city), - 1, - 'City name ' . $city . ' is wrong!' - ); - } - - public function testRegionNameCyrOnly() - { - $pattern = "/[А-ЩЯІЇЄЮ][А-ЩЯІЇЄЮа-щяіїєюь]*а$/u"; - $regionName = $this->faker->region; - $this->assertSame( - preg_match($pattern, $regionName), - 1, - 'Region name ' . $regionName . ' is wrong!' - ); - } - - public function testCountryCyrOnly() - { - $pattern = "/[А-ЩЯІЇЄЮа-щяіїєюьIVXCM][А-ЩЯІЇЄЮа-щяіїєюь \'-]*[А-Яа-я.]/u"; - $country = $this->faker->country; - $this->assertSame( - preg_match($pattern, $country), - 1, - 'Country name ' . $country . ' is wrong!' - ); - } -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php deleted file mode 100644 index 13620c7..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php +++ /dev/null @@ -1,35 +0,0 @@ -addProvider(new PhoneNumber($faker)); - $this->faker = $faker; - } - - public function testPhoneNumberFormat() - { - $pattern = "/((\+38)(((\(\d{3}\))\d{7}|(\(\d{4}\))\d{6})|(\d{8})))|0\d{9}/"; - $phoneNumber = $this->faker->phoneNumber; - $this->assertSame( - preg_match($pattern, $phoneNumber), - 1, - 'Phone number format ' . $phoneNumber . ' is wrong!' - ); - - } - -} diff --git a/api/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php b/api/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php deleted file mode 100644 index 01d6b5b..0000000 --- a/api/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php +++ /dev/null @@ -1,77 +0,0 @@ -textClass = new \ReflectionClass('Faker\Provider\zh_TW\Text'); - } - - protected function getMethod($name) { - $method = $this->textClass->getMethod($name); - - $method->setAccessible(true); - - return $method; - } - - /** @test */ - function it_should_explode_the_string_to_array() - { - $this->assertSame( - array('中', '文', '測', '試', '真', '有', '趣'), - $this->getMethod('explode')->invokeArgs(null, array('中文測試真有趣')) - ); - - $this->assertSame( - array('標', '點', ',', '符', '號', '!'), - $this->getMethod('explode')->invokeArgs(null, array('標點,符號!')) - ); - } - - /** @test */ - function it_should_return_the_string_length() - { - $this->assertContains( - $this->getMethod('strlen')->invokeArgs(null, array('中文測試真有趣')), - array(7, 21) - ); - } - - /** @test */ - function it_should_return_the_character_is_valid_start_or_not() - { - $this->assertTrue($this->getMethod('validStart')->invokeArgs(null, array('中'))); - - $this->assertTrue($this->getMethod('validStart')->invokeArgs(null, array('2'))); - - $this->assertTrue($this->getMethod('validStart')->invokeArgs(null, array('Hello'))); - - $this->assertFalse($this->getMethod('validStart')->invokeArgs(null, array('。'))); - - $this->assertFalse($this->getMethod('validStart')->invokeArgs(null, array('!'))); - } - - /** @test */ - function it_should_append_end_punct_to_the_end_of_string() - { - $this->assertSame( - '中文測試真有趣。', - $this->getMethod('appendEnd')->invokeArgs(null, array('中文測試真有趣')) - ); - - $this->assertSame( - '中文測試真有趣。', - $this->getMethod('appendEnd')->invokeArgs(null, array('中文測試真有趣,')) - ); - - $this->assertSame( - '中文測試真有趣!', - $this->getMethod('appendEnd')->invokeArgs(null, array('中文測試真有趣!')) - ); - } -} diff --git a/api/vendor/fzaninotto/faker/test/documentor.php b/api/vendor/fzaninotto/faker/test/documentor.php deleted file mode 100644 index 1051ea2..0000000 --- a/api/vendor/fzaninotto/faker/test/documentor.php +++ /dev/null @@ -1,16 +0,0 @@ -seed(1); -$documentor = new Faker\Documentor($generator); -?> -getFormatters() as $provider => $formatters): ?> - -### `` - - $example): ?> - // - - -seed(5); - -echo ''; -?> - - - - -boolean(25)): ?> - - -
    - streetAddress ?> - city ?> - postcode ?> - state ?> -
    - -boolean(33)): ?> - bs ?> - -boolean(33)): ?> - - - -boolean(15)): ?> -
    -text(400) ?> -]]> -
    - -
    - -
    diff --git a/api/vendor/illuminate/auth/Access/Gate.php b/api/vendor/illuminate/auth/Access/Gate.php index 200fca8..7dcef0a 100644 --- a/api/vendor/illuminate/auth/Access/Gate.php +++ b/api/vendor/illuminate/auth/Access/Gate.php @@ -108,6 +108,30 @@ class Gate implements GateContract return $this; } + /** + * Define abilities for a resource. + * + * @param string $name + * @param string $class + * @param array $abilities + * @return $this + */ + public function resource($name, $class, array $abilities = null) + { + $abilities = $abilities ?: [ + 'view' => 'view', + 'create' => 'create', + 'update' => 'update', + 'delete' => 'delete', + ]; + + foreach ($abilities as $ability => $method) { + $this->define($name.'.'.$ability, $class.'@'.$method); + } + + return $this; + } + /** * Create the ability callback for a callback string. * @@ -329,11 +353,11 @@ class Gate implements GateContract if (isset($this->abilities[$ability])) { return $this->abilities[$ability]; - } else { - return function () { - return false; - }; } + + return function () { + return false; + }; } /** @@ -469,4 +493,14 @@ class Gate implements GateContract { return call_user_func($this->userResolver); } + + /** + * Get all of the defined abilities. + * + * @return array + */ + public function abilities() + { + return $this->abilities; + } } diff --git a/api/vendor/illuminate/auth/AuthManager.php b/api/vendor/illuminate/auth/AuthManager.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/AuthServiceProvider.php b/api/vendor/illuminate/auth/AuthServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/Authenticatable.php b/api/vendor/illuminate/auth/Authenticatable.php index 0c4f12c..63fa4dd 100644 --- a/api/vendor/illuminate/auth/Authenticatable.php +++ b/api/vendor/illuminate/auth/Authenticatable.php @@ -28,7 +28,7 @@ trait Authenticatable */ public function getAuthIdentifier() { - return $this->getKey(); + return $this->{$this->getAuthIdentifierName()}; } /** diff --git a/api/vendor/illuminate/auth/Console/MakeAuthCommand.php b/api/vendor/illuminate/auth/Console/AuthMakeCommand.php similarity index 98% rename from api/vendor/illuminate/auth/Console/MakeAuthCommand.php rename to api/vendor/illuminate/auth/Console/AuthMakeCommand.php index b1db7db..31a89d0 100644 --- a/api/vendor/illuminate/auth/Console/MakeAuthCommand.php +++ b/api/vendor/illuminate/auth/Console/AuthMakeCommand.php @@ -5,7 +5,7 @@ namespace Illuminate\Auth\Console; use Illuminate\Console\Command; use Illuminate\Console\DetectsApplicationNamespace; -class MakeAuthCommand extends Command +class AuthMakeCommand extends Command { use DetectsApplicationNamespace; diff --git a/api/vendor/illuminate/auth/Console/stubs/make/routes.stub b/api/vendor/illuminate/auth/Console/stubs/make/routes.stub index 70f3513..2c37ded 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/routes.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/routes.stub @@ -1,4 +1,4 @@ Auth::routes(); -Route::get('/home', 'HomeController@index'); +Route::get('/home', 'HomeController@index')->name('home'); diff --git a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/login.stub b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/login.stub index 757d821..07924ce 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/login.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/login.stub @@ -6,8 +6,9 @@
    Login
    +
    -
    + {{ csrf_field() }}
    diff --git a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/email.stub b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/email.stub index e566cfb..ad38245 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/email.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/email.stub @@ -6,6 +6,7 @@
    Reset Password
    +
    @if (session('status'))
    @@ -13,7 +14,7 @@
    @endif - + {{ csrf_field() }}
    diff --git a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/reset.stub b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/reset.stub index 6ed9298..84ec010 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/reset.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/passwords/reset.stub @@ -8,13 +8,7 @@
    Reset Password
    - @if (session('status')) -
    - {{ session('status') }} -
    - @endif - - + {{ csrf_field() }} diff --git a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/register.stub b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/register.stub index 83b9f0d..38eef83 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/views/auth/register.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/views/auth/register.stub @@ -6,8 +6,9 @@
    Register
    +
    - + {{ csrf_field() }}
    diff --git a/api/vendor/illuminate/auth/Console/stubs/make/views/home.stub b/api/vendor/illuminate/auth/Console/stubs/make/views/home.stub index de73a98..d8437bf 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/views/home.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/views/home.stub @@ -8,6 +8,12 @@
    Dashboard
    + @if (session('status')) +
    + {{ session('status') }} +
    + @endif + You are logged in!
    diff --git a/api/vendor/illuminate/auth/Console/stubs/make/views/layouts/app.stub b/api/vendor/illuminate/auth/Console/stubs/make/views/layouts/app.stub index 6fec5f6..d4745b4 100644 --- a/api/vendor/illuminate/auth/Console/stubs/make/views/layouts/app.stub +++ b/api/vendor/illuminate/auth/Console/stubs/make/views/layouts/app.stub @@ -1,5 +1,5 @@ - + @@ -12,13 +12,6 @@ - - -
    diff --git a/api/vendor/illuminate/auth/DatabaseUserProvider.php b/api/vendor/illuminate/auth/DatabaseUserProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/EloquentUserProvider.php b/api/vendor/illuminate/auth/EloquentUserProvider.php old mode 100644 new mode 100755 index 423594e..0d5cad9 --- a/api/vendor/illuminate/auth/EloquentUserProvider.php +++ b/api/vendor/illuminate/auth/EloquentUserProvider.php @@ -44,7 +44,11 @@ class EloquentUserProvider implements UserProvider */ public function retrieveById($identifier) { - return $this->createModel()->newQuery()->find($identifier); + $model = $this->createModel(); + + return $model->newQuery() + ->where($model->getAuthIdentifierName(), $identifier) + ->first(); } /** diff --git a/api/vendor/illuminate/auth/GenericUser.php b/api/vendor/illuminate/auth/GenericUser.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/Notifications/ResetPassword.php b/api/vendor/illuminate/auth/Notifications/ResetPassword.php index a329c08..cd1ca86 100644 --- a/api/vendor/illuminate/auth/Notifications/ResetPassword.php +++ b/api/vendor/illuminate/auth/Notifications/ResetPassword.php @@ -46,7 +46,7 @@ class ResetPassword extends Notification { return (new MailMessage) ->line('You are receiving this email because we received a password reset request for your account.') - ->action('Reset Password', route('password.reset', $this->token)) + ->action('Reset Password', url(config('app.url').route('password.reset', $this->token, false))) ->line('If you did not request a password reset, no further action is required.'); } } diff --git a/api/vendor/illuminate/auth/Passwords/DatabaseTokenRepository.php b/api/vendor/illuminate/auth/Passwords/DatabaseTokenRepository.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/Passwords/PasswordBroker.php b/api/vendor/illuminate/auth/Passwords/PasswordBroker.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/Passwords/PasswordBrokerManager.php b/api/vendor/illuminate/auth/Passwords/PasswordBrokerManager.php index 0f3f262..1a9498f 100644 --- a/api/vendor/illuminate/auth/Passwords/PasswordBrokerManager.php +++ b/api/vendor/illuminate/auth/Passwords/PasswordBrokerManager.php @@ -6,6 +6,9 @@ use Illuminate\Support\Str; use InvalidArgumentException; use Illuminate\Contracts\Auth\PasswordBrokerFactory as FactoryContract; +/** + * @mixin \Illuminate\Contracts\Auth\PasswordBroker + */ class PasswordBrokerManager implements FactoryContract { /** diff --git a/api/vendor/illuminate/auth/Passwords/PasswordResetServiceProvider.php b/api/vendor/illuminate/auth/Passwords/PasswordResetServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/Passwords/TokenRepositoryInterface.php b/api/vendor/illuminate/auth/Passwords/TokenRepositoryInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/auth/RequestGuard.php b/api/vendor/illuminate/auth/RequestGuard.php index 30b3a1d..d1a18c0 100644 --- a/api/vendor/illuminate/auth/RequestGuard.php +++ b/api/vendor/illuminate/auth/RequestGuard.php @@ -4,10 +4,11 @@ namespace Illuminate\Auth; use Illuminate\Http\Request; use Illuminate\Contracts\Auth\Guard; +use Illuminate\Support\Traits\Macroable; class RequestGuard implements Guard { - use GuardHelpers; + use GuardHelpers, Macroable; /** * The guard callback. diff --git a/api/vendor/illuminate/auth/composer.json b/api/vendor/illuminate/auth/composer.json index 528c125..54525eb 100644 --- a/api/vendor/illuminate/auth/composer.json +++ b/api/vendor/illuminate/auth/composer.json @@ -17,6 +17,7 @@ "php": ">=5.6.4", "illuminate/contracts": "5.4.*", "illuminate/http": "5.4.*", + "illuminate/queue": "5.4.*", "illuminate/support": "5.4.*", "nesbot/carbon": "~1.20" }, diff --git a/api/vendor/illuminate/broadcasting/BroadcastEvent.php b/api/vendor/illuminate/broadcasting/BroadcastEvent.php index e9ce38e..bfb7454 100644 --- a/api/vendor/illuminate/broadcasting/BroadcastEvent.php +++ b/api/vendor/illuminate/broadcasting/BroadcastEvent.php @@ -69,6 +69,8 @@ class BroadcastEvent implements ShouldQueue $payload[$property->getName()] = $this->formatProperty($property->getValue($event)); } + unset($payload['broadcastQueue']); + return $payload; } diff --git a/api/vendor/illuminate/broadcasting/BroadcastManager.php b/api/vendor/illuminate/broadcasting/BroadcastManager.php index 1fa1366..5eaedf1 100644 --- a/api/vendor/illuminate/broadcasting/BroadcastManager.php +++ b/api/vendor/illuminate/broadcasting/BroadcastManager.php @@ -14,6 +14,9 @@ use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster; use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster; use Illuminate\Contracts\Broadcasting\Factory as FactoryContract; +/** + * @mixin \Illuminate\Contracts\Broadcasting\Broadcaster + */ class BroadcastManager implements FactoryContract { /** @@ -113,7 +116,9 @@ class BroadcastManager implements FactoryContract $queue = null; - if (isset($event->broadcastQueue)) { + if (method_exists($event, 'broadcastQueue')) { + $queue = $event->broadcastQueue(); + } elseif (isset($event->broadcastQueue)) { $queue = $event->broadcastQueue; } elseif (isset($event->queue)) { $queue = $event->queue; diff --git a/api/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php b/api/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php index 77cbe13..44e7e4d 100644 --- a/api/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php +++ b/api/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php @@ -63,12 +63,12 @@ class PusherBroadcaster extends Broadcaster return $this->decodePusherResponse( $this->pusher->socket_auth($request->channel_name, $request->socket_id) ); - } else { - return $this->decodePusherResponse( - $this->pusher->presence_auth( - $request->channel_name, $request->socket_id, $request->user()->getAuthIdentifier(), $result) - ); } + + return $this->decodePusherResponse( + $this->pusher->presence_auth( + $request->channel_name, $request->socket_id, $request->user()->getAuthIdentifier(), $result) + ); } /** diff --git a/api/vendor/illuminate/cache/ApcStore.php b/api/vendor/illuminate/cache/ApcStore.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/ApcWrapper.php b/api/vendor/illuminate/cache/ApcWrapper.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/ArrayStore.php b/api/vendor/illuminate/cache/ArrayStore.php index d2f9140..8901a48 100644 --- a/api/vendor/illuminate/cache/ArrayStore.php +++ b/api/vendor/illuminate/cache/ArrayStore.php @@ -50,7 +50,8 @@ class ArrayStore extends TaggableStore implements Store */ public function increment($key, $value = 1) { - $this->storage[$key] = ((int) $this->storage[$key]) + $value; + $this->storage[$key] = ! isset($this->storage[$key]) + ? $value : ((int) $this->storage[$key]) + $value; return $this->storage[$key]; } diff --git a/api/vendor/illuminate/cache/CacheManager.php b/api/vendor/illuminate/cache/CacheManager.php old mode 100644 new mode 100755 index dfe64b5..79dfea8 --- a/api/vendor/illuminate/cache/CacheManager.php +++ b/api/vendor/illuminate/cache/CacheManager.php @@ -9,6 +9,9 @@ use Illuminate\Contracts\Cache\Store; use Illuminate\Contracts\Cache\Factory as FactoryContract; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; +/** + * @mixin \Illuminate\Contracts\Cache\Repository + */ class CacheManager implements FactoryContract { /** diff --git a/api/vendor/illuminate/cache/CacheServiceProvider.php b/api/vendor/illuminate/cache/CacheServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/Console/ClearCommand.php b/api/vendor/illuminate/cache/Console/ClearCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/Console/ForgetCommand.php b/api/vendor/illuminate/cache/Console/ForgetCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/DatabaseStore.php b/api/vendor/illuminate/cache/DatabaseStore.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/FileStore.php b/api/vendor/illuminate/cache/FileStore.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/MemcachedConnector.php b/api/vendor/illuminate/cache/MemcachedConnector.php old mode 100644 new mode 100755 index d152476..ebfb28c --- a/api/vendor/illuminate/cache/MemcachedConnector.php +++ b/api/vendor/illuminate/cache/MemcachedConnector.php @@ -3,7 +3,6 @@ namespace Illuminate\Cache; use Memcached; -use RuntimeException; class MemcachedConnector { @@ -15,8 +14,6 @@ class MemcachedConnector * @param array $options * @param array $credentials * @return \Memcached - * - * @throws \RuntimeException */ public function connect(array $servers, $connectionId = null, array $options = [], array $credentials = []) { @@ -35,7 +32,7 @@ class MemcachedConnector } } - return $this->validateConnection($memcached); + return $memcached; } /** @@ -87,25 +84,4 @@ class MemcachedConnector $memcached->setSaslAuthData($username, $password); } - - /** - * Validate the given Memcached connection. - * - * @param \Memcached $memcached - * @return \Memcached - */ - protected function validateConnection($memcached) - { - $status = $memcached->getVersion(); - - if (! is_array($status)) { - throw new RuntimeException('No Memcached servers added.'); - } - - if (in_array('255.255.255', $status) && count(array_unique($status)) === 1) { - throw new RuntimeException('Could not establish Memcached connection.'); - } - - return $memcached; - } } diff --git a/api/vendor/illuminate/cache/MemcachedStore.php b/api/vendor/illuminate/cache/MemcachedStore.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/NullStore.php b/api/vendor/illuminate/cache/NullStore.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/cache/RateLimiter.php b/api/vendor/illuminate/cache/RateLimiter.php index 8a277fd..810092b 100644 --- a/api/vendor/illuminate/cache/RateLimiter.php +++ b/api/vendor/illuminate/cache/RateLimiter.php @@ -73,9 +73,15 @@ class RateLimiter */ public function hit($key, $decayMinutes = 1) { - $this->cache->add($key, 0, $decayMinutes); + $added = $this->cache->add($key, 0, $decayMinutes); - return (int) $this->cache->increment($key); + $hits = (int) $this->cache->increment($key); + + if (! $added && $hits == 1) { + $this->cache->put($key, 1, $decayMinutes); + } + + return $hits; } /** diff --git a/api/vendor/illuminate/cache/RedisStore.php b/api/vendor/illuminate/cache/RedisStore.php old mode 100644 new mode 100755 index 6c7b30b..100af0d --- a/api/vendor/illuminate/cache/RedisStore.php +++ b/api/vendor/illuminate/cache/RedisStore.php @@ -73,7 +73,7 @@ class RedisStore extends TaggableStore implements Store }, $keys)); foreach ($values as $index => $value) { - $results[$keys[$index]] = $this->unserialize($value); + $results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null; } return $results; diff --git a/api/vendor/illuminate/cache/Repository.php b/api/vendor/illuminate/cache/Repository.php old mode 100644 new mode 100755 index 8498d9f..7ee1484 --- a/api/vendor/illuminate/cache/Repository.php +++ b/api/vendor/illuminate/cache/Repository.php @@ -16,6 +16,9 @@ use Illuminate\Cache\Events\KeyForgotten; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Cache\Repository as CacheContract; +/** + * @mixin \Illuminate\Contracts\Cache\Store + */ class Repository implements CacheContract, ArrayAccess { use Macroable { diff --git a/api/vendor/illuminate/cache/composer.json b/api/vendor/illuminate/cache/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/config/composer.json b/api/vendor/illuminate/config/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/console/Application.php b/api/vendor/illuminate/console/Application.php old mode 100644 new mode 100755 index d004c74..820b16e --- a/api/vendor/illuminate/console/Application.php +++ b/api/vendor/illuminate/console/Application.php @@ -112,7 +112,7 @@ class Application extends SymfonyApplication implements ApplicationContract } } - /* + /** * Clear the console application bootstrappers. * * @return void diff --git a/api/vendor/illuminate/console/Command.php b/api/vendor/illuminate/console/Command.php old mode 100644 new mode 100755 index 0ae9662..d0f09b3 --- a/api/vendor/illuminate/console/Command.php +++ b/api/vendor/illuminate/console/Command.php @@ -228,7 +228,7 @@ class Command extends SymfonyCommand /** * Get the value of a command argument. * - * @param string $key + * @param string|null $key * @return string|array */ public function argument($key = null) diff --git a/api/vendor/illuminate/console/Scheduling/CacheMutex.php b/api/vendor/illuminate/console/Scheduling/CacheMutex.php index 6ad96cf..f698ff2 100644 --- a/api/vendor/illuminate/console/Scheduling/CacheMutex.php +++ b/api/vendor/illuminate/console/Scheduling/CacheMutex.php @@ -32,7 +32,9 @@ class CacheMutex implements Mutex */ public function create(Event $event) { - return $this->cache->add($event->mutexName(), true, 1440); + return $this->cache->add( + $event->mutexName(), true, $event->expiresAt + ); } /** diff --git a/api/vendor/illuminate/console/Scheduling/CallbackEvent.php b/api/vendor/illuminate/console/Scheduling/CallbackEvent.php index aabe357..50bfc13 100644 --- a/api/vendor/illuminate/console/Scheduling/CallbackEvent.php +++ b/api/vendor/illuminate/console/Scheduling/CallbackEvent.php @@ -55,10 +55,15 @@ class CallbackEvent extends Event */ public function run(Container $container) { - if ($this->description) { - $this->mutex->create($this); + if ($this->description && $this->withoutOverlapping && + ! $this->mutex->create($this)) { + return; } + register_shutdown_function(function () { + $this->removeMutex(); + }); + try { $response = $container->call($this->callback, $this->parameters); } finally { @@ -71,7 +76,7 @@ class CallbackEvent extends Event } /** - * Remove the mutex file from disk. + * Clear the mutex for the event. * * @return void */ @@ -85,11 +90,10 @@ class CallbackEvent extends Event /** * Do not allow the event to overlap each other. * + * @param int $expiresAt * @return $this - * - * @throws \LogicException */ - public function withoutOverlapping() + public function withoutOverlapping($expiresAt = 1440) { if (! isset($this->description)) { throw new LogicException( @@ -97,6 +101,10 @@ class CallbackEvent extends Event ); } + $this->withoutOverlapping = true; + + $this->expiresAt = $expiresAt; + return $this->skip(function () { return $this->mutex->exists($this); }); diff --git a/api/vendor/illuminate/console/Scheduling/CommandBuilder.php b/api/vendor/illuminate/console/Scheduling/CommandBuilder.php index 20c65c5..acf60dd 100644 --- a/api/vendor/illuminate/console/Scheduling/CommandBuilder.php +++ b/api/vendor/illuminate/console/Scheduling/CommandBuilder.php @@ -38,7 +38,7 @@ class CommandBuilder } /** - * Build the command for running the event in the foreground. + * Build the command for running the event in the background. * * @param \Illuminate\Console\Scheduling\Event $event * @return string diff --git a/api/vendor/illuminate/console/Scheduling/Event.php b/api/vendor/illuminate/console/Scheduling/Event.php index 105db23..bce490e 100644 --- a/api/vendor/illuminate/console/Scheduling/Event.php +++ b/api/vendor/illuminate/console/Scheduling/Event.php @@ -64,6 +64,13 @@ class Event */ public $withoutOverlapping = false; + /** + * The amount of time the mutex should be valid. + * + * @var int + */ + public $expiresAt = 1440; + /** * Indicates if the command should run in background. * @@ -363,7 +370,7 @@ class Event { $this->ensureOutputIsBeingCapturedForEmail(); - $addresses = is_array($addresses) ? $addresses : func_get_args(); + $addresses = is_array($addresses) ? $addresses : [$addresses]; return $this->then(function (Mailer $mailer) use ($addresses, $onlyIfOutputExists) { $this->emailOutput($mailer, $addresses, $onlyIfOutputExists); @@ -509,12 +516,15 @@ class Event /** * Do not allow the event to overlap each other. * + * @param int $expiresAt * @return $this */ - public function withoutOverlapping() + public function withoutOverlapping($expiresAt = 1440) { $this->withoutOverlapping = true; + $this->expiresAt = $expiresAt; + return $this->then(function () { $this->mutex->forget($this); })->skip(function () { @@ -623,6 +633,21 @@ class Event return $this->buildCommand(); } + /** + * Determine the next due date for an event. + * + * @param \DateTime|string $currentTime + * @param int $nth + * @param bool $allowCurrentDate + * @return \Carbon\Carbon + */ + public function nextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) + { + return Carbon::instance($nextDue = CronExpression::factory( + $this->getExpression() + )->getNextRunDate($currentTime, $nth, $allowCurrentDate)); + } + /** * Get the Cron expression for the event. * diff --git a/api/vendor/illuminate/console/Scheduling/ManagesFrequencies.php b/api/vendor/illuminate/console/Scheduling/ManagesFrequencies.php index b80f6d9..4606db9 100644 --- a/api/vendor/illuminate/console/Scheduling/ManagesFrequencies.php +++ b/api/vendor/illuminate/console/Scheduling/ManagesFrequencies.php @@ -53,9 +53,11 @@ trait ManagesFrequencies private function inTimeInterval($startTime, $endTime) { return function () use ($startTime, $endTime) { - $now = Carbon::now()->getTimestamp(); - - return $now >= strtotime($startTime) && $now <= strtotime($endTime); + return Carbon::now($this->timezone)->between( + Carbon::parse($startTime, $this->timezone), + Carbon::parse($endTime, $this->timezone), + true + ); }; } @@ -273,6 +275,22 @@ trait ManagesFrequencies return $this->spliceIntoPosition(3, $day); } + /** + * Schedule the event to run twice monthly. + * + * @param int $first + * @param int $second + * @return $this + */ + public function twiceMonthly($first = 1, $second = 16) + { + $days = $first.','.$second; + + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(3, $days); + } + /** * Schedule the event to run quarterly. * diff --git a/api/vendor/illuminate/console/Scheduling/Schedule.php b/api/vendor/illuminate/console/Scheduling/Schedule.php index d27d3f0..b54aff3 100644 --- a/api/vendor/illuminate/console/Scheduling/Schedule.php +++ b/api/vendor/illuminate/console/Scheduling/Schedule.php @@ -11,7 +11,7 @@ class Schedule /** * All of the events on the schedule. * - * @var array + * @var \Illuminate\Console\Scheduling\Event[] */ protected $events = []; @@ -23,7 +23,7 @@ class Schedule protected $mutex; /** - * Create a new event instance. + * Create a new schedule instance. * * @return void */ @@ -41,7 +41,7 @@ class Schedule * * @param string|callable $callback * @param array $parameters - * @return \Illuminate\Console\Scheduling\Event + * @return \Illuminate\Console\Scheduling\CallbackEvent */ public function call($callback, array $parameters = []) { @@ -74,7 +74,7 @@ class Schedule * Add a new job callback event to the schedule. * * @param object|string $job - * @return \Illuminate\Console\Scheduling\Event + * @return \Illuminate\Console\Scheduling\CallbackEvent */ public function job($job) { @@ -136,7 +136,7 @@ class Schedule /** * Get all of the events on the schedule. * - * @return array + * @return \Illuminate\Console\Scheduling\Event[] */ public function events() { diff --git a/api/vendor/illuminate/console/composer.json b/api/vendor/illuminate/console/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/container/Container.php b/api/vendor/illuminate/container/Container.php old mode 100644 new mode 100755 index 1b2bad9..0945cb0 --- a/api/vendor/illuminate/container/Container.php +++ b/api/vendor/illuminate/container/Container.php @@ -241,9 +241,11 @@ class Container implements ArrayAccess, ContainerContract protected function getClosure($abstract, $concrete) { return function ($container, $parameters = []) use ($abstract, $concrete) { - $method = ($abstract == $concrete) ? 'build' : 'make'; + if ($abstract == $concrete) { + return $container->build($concrete); + } - return $container->$method($concrete, $parameters); + return $container->makeWith($concrete, $parameters); }; } @@ -341,6 +343,10 @@ class Container implements ArrayAccess, ContainerContract $this->rebound($abstract); } else { $this->extenders[$abstract][] = $closure; + + if ($this->resolved($abstract)) { + $this->rebound($abstract); + } } } @@ -355,6 +361,8 @@ class Container implements ArrayAccess, ContainerContract { $this->removeAbstractAlias($abstract); + $isBound = $this->bound($abstract); + unset($this->aliases[$abstract]); // We'll check to determine if this type has been bound before, and if it has @@ -362,7 +370,7 @@ class Container implements ArrayAccess, ContainerContract // can be updated with consuming classes that have gotten resolved here. $this->instances[$abstract] = $instance; - if ($this->bound($abstract)) { + if ($isBound) { $this->rebound($abstract); } } @@ -576,8 +584,10 @@ class Container implements ArrayAccess, ContainerContract */ protected function resolve($abstract, $parameters = []) { + $abstract = $this->getAlias($abstract); + $needsContextualBuild = ! empty($parameters) || ! is_null( - $this->getContextualConcrete($abstract = $this->getAlias($abstract)) + $this->getContextualConcrete($abstract) ); // If an instance of the type is currently being managed as a singleton we'll @@ -713,7 +723,7 @@ class Container implements ArrayAccess, ContainerContract // hand back the results of the functions, which allows functions to be // used as resolvers for more fine-tuned resolution of these objects. if ($concrete instanceof Closure) { - return $concrete($this, end($this->with)); + return $concrete($this, $this->getLastParameterOverride()); } $reflector = new ReflectionClass($concrete); @@ -791,7 +801,9 @@ class Container implements ArrayAccess, ContainerContract */ protected function hasParameterOverride($dependency) { - return array_key_exists($dependency->name, end($this->with)); + return array_key_exists( + $dependency->name, $this->getLastParameterOverride() + ); } /** @@ -802,7 +814,17 @@ class Container implements ArrayAccess, ContainerContract */ protected function getParameterOverride($dependency) { - return end($this->with)[$dependency->name]; + return $this->getLastParameterOverride()[$dependency->name]; + } + + /** + * Get the last parameter override. + * + * @return array + */ + protected function getLastParameterOverride() + { + return count($this->with) ? end($this->with) : []; } /** @@ -1046,6 +1068,17 @@ class Container implements ArrayAccess, ContainerContract return []; } + /** + * Remove all of the extender callbacks for a given type. + * + * @param string $abstract + * @return void + */ + public function forgetExtenders($abstract) + { + unset($this->extenders[$this->getAlias($abstract)]); + } + /** * Drop all of the stale instances and aliases. * diff --git a/api/vendor/illuminate/container/composer.json b/api/vendor/illuminate/container/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/contracts/Console/Kernel.php b/api/vendor/illuminate/contracts/Console/Kernel.php index 17120f0..4cf7986 100644 --- a/api/vendor/illuminate/contracts/Console/Kernel.php +++ b/api/vendor/illuminate/contracts/Console/Kernel.php @@ -27,7 +27,7 @@ interface Kernel * * @param string $command * @param array $parameters - * @return int + * @return \Illuminate\Foundation\Bus\PendingDispatch */ public function queue($command, array $parameters = []); diff --git a/api/vendor/illuminate/contracts/Foundation/Application.php b/api/vendor/illuminate/contracts/Foundation/Application.php index d888c8c..84ce820 100644 --- a/api/vendor/illuminate/contracts/Foundation/Application.php +++ b/api/vendor/illuminate/contracts/Foundation/Application.php @@ -55,7 +55,7 @@ interface Application extends Container * Register a deferred provider and service. * * @param string $provider - * @param string $service + * @param string|null $service * @return void */ public function registerDeferredProvider($provider, $service = null); diff --git a/api/vendor/illuminate/contracts/Queue/Job.php b/api/vendor/illuminate/contracts/Queue/Job.php index 47c88d4..1cd1b51 100644 --- a/api/vendor/illuminate/contracts/Queue/Job.php +++ b/api/vendor/illuminate/contracts/Queue/Job.php @@ -99,10 +99,10 @@ interface Job */ public function getQueue(); - /** - * Get the raw body string for the job. - * - * @return string - */ - public function getRawBody(); + /** + * Get the raw body string for the job. + * + * @return string + */ + public function getRawBody(); } diff --git a/api/vendor/illuminate/contracts/Routing/Registrar.php b/api/vendor/illuminate/contracts/Routing/Registrar.php index bf1c50a..25f210b 100644 --- a/api/vendor/illuminate/contracts/Routing/Registrar.php +++ b/api/vendor/illuminate/contracts/Routing/Registrar.php @@ -9,7 +9,7 @@ interface Registrar * * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function get($uri, $action); @@ -18,7 +18,7 @@ interface Registrar * * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function post($uri, $action); @@ -27,7 +27,7 @@ interface Registrar * * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function put($uri, $action); @@ -36,7 +36,7 @@ interface Registrar * * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function delete($uri, $action); @@ -45,7 +45,7 @@ interface Registrar * * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function patch($uri, $action); @@ -54,7 +54,7 @@ interface Registrar * * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function options($uri, $action); @@ -64,7 +64,7 @@ interface Registrar * @param array|string $methods * @param string $uri * @param \Closure|array|string $action - * @return void + * @return \Illuminate\Routing\Route */ public function match($methods, $uri, $action); diff --git a/api/vendor/illuminate/contracts/Support/Arrayable.php b/api/vendor/illuminate/contracts/Support/Arrayable.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/contracts/Support/Jsonable.php b/api/vendor/illuminate/contracts/Support/Jsonable.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/contracts/Support/MessageBag.php b/api/vendor/illuminate/contracts/Support/MessageBag.php index 2d71bed..296cae7 100644 --- a/api/vendor/illuminate/contracts/Support/MessageBag.php +++ b/api/vendor/illuminate/contracts/Support/MessageBag.php @@ -2,7 +2,7 @@ namespace Illuminate\Contracts\Support; -interface MessageBag +interface MessageBag extends Arrayable { /** * Get the keys present in the message bag. @@ -90,11 +90,4 @@ interface MessageBag * @return int */ public function count(); - - /** - * Get the instance as an array. - * - * @return array - */ - public function toArray(); } diff --git a/api/vendor/illuminate/contracts/Support/MessageProvider.php b/api/vendor/illuminate/contracts/Support/MessageProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/contracts/Support/Renderable.php b/api/vendor/illuminate/contracts/Support/Renderable.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Capsule/Manager.php b/api/vendor/illuminate/database/Capsule/Manager.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Concerns/BuildsQueries.php b/api/vendor/illuminate/database/Concerns/BuildsQueries.php index e56e020..d1d1d2e 100644 --- a/api/vendor/illuminate/database/Concerns/BuildsQueries.php +++ b/api/vendor/illuminate/database/Concerns/BuildsQueries.php @@ -2,6 +2,10 @@ namespace Illuminate\Database\Concerns; +use Illuminate\Container\Container; +use Illuminate\Pagination\Paginator; +use Illuminate\Pagination\LengthAwarePaginator; + trait BuildsQueries { /** @@ -64,7 +68,7 @@ trait BuildsQueries * Execute the query and get the first result. * * @param array $columns - * @return mixed + * @return \Illuminate\Database\Eloquent\Model|static|null */ public function first($columns = ['*']) { @@ -75,8 +79,8 @@ trait BuildsQueries * Apply the callback's query changes if the given "value" is true. * * @param mixed $value - * @param \Closure $callback - * @param \Closure $default + * @param callable $callback + * @param callable $default * @return mixed */ public function when($value, $callback, $default = null) @@ -89,4 +93,67 @@ trait BuildsQueries return $this; } + + /** + * Pass the query to a given callback. + * + * @param \Closure $callback + * @return \Illuminate\Database\Query\Builder + */ + public function tap($callback) + { + return $this->when(true, $callback); + } + + /** + * Apply the callback's query changes if the given "value" is false. + * + * @param mixed $value + * @param callable $callback + * @param callable $default + * @return mixed + */ + public function unless($value, $callback, $default = null) + { + if (! $value) { + return $callback($this, $value) ?: $this; + } elseif ($default) { + return $default($this, $value) ?: $this; + } + + return $this; + } + + /** + * Create a new length-aware paginator instance. + * + * @param \Illuminate\Support\Collection $items + * @param int $total + * @param int $perPage + * @param int $currentPage + * @param array $options + * @return \Illuminate\Pagination\LengthAwarePaginator + */ + protected function paginator($items, $total, $perPage, $currentPage, $options) + { + return Container::getInstance()->makeWith(LengthAwarePaginator::class, compact( + 'items', 'total', 'perPage', 'currentPage', 'options' + )); + } + + /** + * Create a new simple paginator instance. + * + * @param \Illuminate\Support\Collection $items + * @param int $perPage + * @param int $currentPage + * @param array $options + * @return \Illuminate\Pagination\Paginator + */ + protected function simplePaginator($items, $perPage, $currentPage, $options) + { + return Container::getInstance()->makeWith(Paginator::class, compact( + 'items', 'perPage', 'currentPage', 'options' + )); + } } diff --git a/api/vendor/illuminate/database/Connection.php b/api/vendor/illuminate/database/Connection.php old mode 100644 new mode 100755 index 0a55bb4..8c744eb --- a/api/vendor/illuminate/database/Connection.php +++ b/api/vendor/illuminate/database/Connection.php @@ -27,14 +27,14 @@ class Connection implements ConnectionInterface /** * The active PDO connection. * - * @var PDO + * @var \PDO|\Closure */ protected $pdo; /** * The active PDO connection used for reads. * - * @var PDO + * @var \PDO|\Closure */ protected $readPdo; @@ -490,7 +490,7 @@ class Connection implements ConnectionInterface return true; } - return (bool) $this->getPdo()->exec($query); + return $this->getPdo()->exec($query) === false ? false : true; }); } @@ -688,6 +688,7 @@ class Connection implements ConnectionInterface * @param array $bindings * @param \Closure $callback * @return mixed + * @throws \Exception */ protected function handleQueryException($e, $query, $bindings, Closure $callback) { @@ -777,7 +778,7 @@ class Connection implements ConnectionInterface * Fire an event for this connection. * * @param string $event - * @return void + * @return array|null */ protected function fireConnectionEvent($event) { @@ -906,7 +907,7 @@ class Connection implements ConnectionInterface /** * Set the PDO connection. * - * @param \PDO|null $pdo + * @param \PDO|\Closure|null $pdo * @return $this */ public function setPdo($pdo) @@ -921,7 +922,7 @@ class Connection implements ConnectionInterface /** * Set the PDO connection used for reading. * - * @param \PDO|null $pdo + * @param \PDO||\Closure|null $pdo * @return $this */ public function setReadPdo($pdo) diff --git a/api/vendor/illuminate/database/ConnectionInterface.php b/api/vendor/illuminate/database/ConnectionInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/ConnectionResolver.php b/api/vendor/illuminate/database/ConnectionResolver.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/ConnectionResolverInterface.php b/api/vendor/illuminate/database/ConnectionResolverInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Connectors/ConnectionFactory.php b/api/vendor/illuminate/database/Connectors/ConnectionFactory.php old mode 100644 new mode 100755 index dabf8d6..98fb701 --- a/api/vendor/illuminate/database/Connectors/ConnectionFactory.php +++ b/api/vendor/illuminate/database/Connectors/ConnectionFactory.php @@ -138,7 +138,7 @@ class ConnectionFactory protected function getReadWriteConfig(array $config, $type) { return isset($config[$type][0]) - ? $config[$type][array_rand($config[$type])] + ? Arr::random($config[$type]) : $config[$type]; } diff --git a/api/vendor/illuminate/database/Connectors/Connector.php b/api/vendor/illuminate/database/Connectors/Connector.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Connectors/ConnectorInterface.php b/api/vendor/illuminate/database/Connectors/ConnectorInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Connectors/MySqlConnector.php b/api/vendor/illuminate/database/Connectors/MySqlConnector.php old mode 100644 new mode 100755 index 8741fcc..3b12b30 --- a/api/vendor/illuminate/database/Connectors/MySqlConnector.php +++ b/api/vendor/illuminate/database/Connectors/MySqlConnector.php @@ -65,7 +65,7 @@ class MySqlConnector extends Connector implements ConnectorInterface */ protected function getCollation(array $config) { - return ! is_null($config['collation']) ? " collate '{$config['collation']}'" : ''; + return isset($config['collation']) ? " collate '{$config['collation']}'" : ''; } /** diff --git a/api/vendor/illuminate/database/Connectors/PostgresConnector.php b/api/vendor/illuminate/database/Connectors/PostgresConnector.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Connectors/SQLiteConnector.php b/api/vendor/illuminate/database/Connectors/SQLiteConnector.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Connectors/SqlServerConnector.php b/api/vendor/illuminate/database/Connectors/SqlServerConnector.php old mode 100644 new mode 100755 index a1b8447..02883d5 --- a/api/vendor/illuminate/database/Connectors/SqlServerConnector.php +++ b/api/vendor/illuminate/database/Connectors/SqlServerConnector.php @@ -126,6 +126,10 @@ class SqlServerConnector extends Connector implements ConnectorInterface $arguments['TrustServerCertificate'] = $config['trust_server_certificate']; } + if (isset($config['multiple_active_result_sets']) && $config['multiple_active_result_sets'] === false) { + $arguments['MultipleActiveResultSets'] = 'false'; + } + return $this->buildConnectString('sqlsrv', $arguments); } diff --git a/api/vendor/illuminate/database/Console/Migrations/BaseCommand.php b/api/vendor/illuminate/database/Console/Migrations/BaseCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Console/Migrations/InstallCommand.php b/api/vendor/illuminate/database/Console/Migrations/InstallCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Console/Migrations/MigrateCommand.php b/api/vendor/illuminate/database/Console/Migrations/MigrateCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Console/Migrations/RefreshCommand.php b/api/vendor/illuminate/database/Console/Migrations/RefreshCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Console/Migrations/ResetCommand.php b/api/vendor/illuminate/database/Console/Migrations/ResetCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Console/Migrations/RollbackCommand.php b/api/vendor/illuminate/database/Console/Migrations/RollbackCommand.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/DatabaseManager.php b/api/vendor/illuminate/database/DatabaseManager.php old mode 100644 new mode 100755 index cc9c8db..d60b23a --- a/api/vendor/illuminate/database/DatabaseManager.php +++ b/api/vendor/illuminate/database/DatabaseManager.php @@ -8,6 +8,9 @@ use Illuminate\Support\Str; use InvalidArgumentException; use Illuminate\Database\Connectors\ConnectionFactory; +/** + * @mixin \Illuminate\Database\Connection + */ class DatabaseManager implements ConnectionResolverInterface { /** diff --git a/api/vendor/illuminate/database/DatabaseServiceProvider.php b/api/vendor/illuminate/database/DatabaseServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/DetectsDeadlocks.php b/api/vendor/illuminate/database/DetectsDeadlocks.php index dcbbd00..ee034b6 100644 --- a/api/vendor/illuminate/database/DetectsDeadlocks.php +++ b/api/vendor/illuminate/database/DetectsDeadlocks.php @@ -25,6 +25,7 @@ trait DetectsDeadlocks 'database table is locked', 'A table in the database is locked', 'has been chosen as the deadlock victim', + 'Lock wait timeout exceeded; try restarting transaction', ]); } } diff --git a/api/vendor/illuminate/database/DetectsLostConnections.php b/api/vendor/illuminate/database/DetectsLostConnections.php index bee3482..034fbe6 100644 --- a/api/vendor/illuminate/database/DetectsLostConnections.php +++ b/api/vendor/illuminate/database/DetectsLostConnections.php @@ -28,6 +28,7 @@ trait DetectsLostConnections 'SSL connection has been closed unexpectedly', 'Error writing data to the connection', 'Resource deadlock avoided', + 'Transaction() on null', ]); } } diff --git a/api/vendor/illuminate/database/Eloquent/Builder.php b/api/vendor/illuminate/database/Eloquent/Builder.php old mode 100644 new mode 100755 index c7f4a39..9582fe0 --- a/api/vendor/illuminate/database/Eloquent/Builder.php +++ b/api/vendor/illuminate/database/Eloquent/Builder.php @@ -9,7 +9,6 @@ use Illuminate\Support\Str; use Illuminate\Pagination\Paginator; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Concerns\BuildsQueries; -use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; @@ -97,6 +96,17 @@ class Builder $this->query = $query; } + /** + * Create and return an un-saved model instance. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function make(array $attributes = []) + { + return $this->newModelInstance($attributes); + } + /** * Register a new global scope. * @@ -183,7 +193,7 @@ class Builder /** * Add a basic where clause to the query. * - * @param string|\Closure $column + * @param string|array|\Closure $column * @param string $operator * @param mixed $value * @param string $boolean @@ -207,7 +217,7 @@ class Builder /** * Add an "or where" clause to the query. * - * @param string|\Closure $column + * @param string|array|\Closure $column * @param string $operator * @param mixed $value * @return \Illuminate\Database\Eloquent\Builder|static @@ -255,7 +265,7 @@ class Builder */ public function find($id, $columns = ['*']) { - if (is_array($id)) { + if (is_array($id) || $id instanceof Arrayable) { return $this->findMany($id, $columns); } @@ -680,7 +690,7 @@ class Builder ? $this->forPage($page, $perPage)->get($columns) : $this->model->newCollection(); - return new LengthAwarePaginator($results, $total, $perPage, $page, [ + return $this->paginator($results, $total, $perPage, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, ]); @@ -706,7 +716,7 @@ class Builder // paginator instances for these results with the given page and per page. $this->skip(($page - 1) * $perPage)->take($perPage + 1); - return new Paginator($this->get($columns), $perPage, $page, [ + return $this->simplePaginator($this->get($columns), $perPage, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, ]); @@ -716,7 +726,7 @@ class Builder * Save a new model and return the instance. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model|$this */ public function create(array $attributes = []) { @@ -729,7 +739,7 @@ class Builder * Save a new model and return the instance. Allow mass-assignment. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model|$this */ public function forceCreate(array $attributes) { @@ -877,7 +887,11 @@ class Builder $builder = clone $this; - foreach ($this->scopes as $scope) { + foreach ($this->scopes as $identifier => $scope) { + if (! isset($builder->scopes[$identifier])) { + continue; + } + $builder->callScope(function (Builder $builder) use ($scope) { // If the scope is a Closure we will just go ahead and call the scope with the // builder instance. The "callScope" method will properly group the clauses @@ -914,11 +928,12 @@ class Builder // We will keep track of how many wheres are on the query before running the // scope so that we can properly group the added scope constraints in the // query as their own isolated nested where statement and avoid issues. - $originalWhereCount = count($query->wheres); + $originalWhereCount = is_null($query->wheres) + ? 0 : count($query->wheres); $result = $scope(...array_values($parameters)) ?: $this; - if (count($query->wheres) > $originalWhereCount) { + if (count((array) $query->wheres) > $originalWhereCount) { $this->addNewWheresWithinGroup($query, $originalWhereCount); } diff --git a/api/vendor/illuminate/database/Eloquent/Collection.php b/api/vendor/illuminate/database/Eloquent/Collection.php old mode 100644 new mode 100755 index f6a3b12..5c679c2 --- a/api/vendor/illuminate/database/Eloquent/Collection.php +++ b/api/vendor/illuminate/database/Eloquent/Collection.php @@ -83,7 +83,11 @@ class Collection extends BaseCollection implements QueueableCollection return parent::contains(...func_get_args()); } - $key = $key instanceof Model ? $key->getKey() : $key; + if ($key instanceof Model) { + return parent::contains(function ($model) use ($key) { + return $model->is($key); + }); + } return parent::contains(function ($model) use ($key) { return $model->getKey() == $key; @@ -123,7 +127,7 @@ class Collection extends BaseCollection implements QueueableCollection * Run a map over each of the items. * * @param callable $callback - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection|static */ public function map(callable $callback) { @@ -134,6 +138,31 @@ class Collection extends BaseCollection implements QueueableCollection }) ? $result->toBase() : $result; } + /** + * Reload a fresh model instance from the database for all the entities. + * + * @param array|string $with + * @return static + */ + public function fresh($with = []) + { + if ($this->isEmpty()) { + return new static; + } + + $model = $this->first(); + + $freshModels = $model->newQueryWithoutScopes() + ->with(is_string($with) ? func_get_args() : $with) + ->whereIn($model->getKeyName(), $this->modelKeys()) + ->get() + ->getDictionary(); + + return $this->map(function ($model) use ($freshModels) { + return $model->exists ? $freshModels[$model->getKey()] : null; + }); + } + /** * Diff the collection with the given items. * diff --git a/api/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php b/api/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php index 1654e39..ae42b7d 100644 --- a/api/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php +++ b/api/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php @@ -679,9 +679,9 @@ trait HasAttributes return $value; } - // If the value is already a DateTime instance, we will just skip the rest of - // these checks since they will be a waste of time, and hinder performance - // when checking the field. We will just return the DateTime right away. + // If the value is already a DateTime instance, we will just skip the rest of + // these checks since they will be a waste of time, and hinder performance + // when checking the field. We will just return the DateTime right away. if ($value instanceof DateTimeInterface) { return new Carbon( $value->format('Y-m-d H:i:s.u'), $value->getTimezone() @@ -765,7 +765,9 @@ trait HasAttributes { $defaults = [static::CREATED_AT, static::UPDATED_AT]; - return $this->usesTimestamps() ? array_merge($this->dates, $defaults) : $this->dates; + return $this->usesTimestamps() + ? array_unique(array_merge($this->dates, $defaults)) + : $this->dates; } /** diff --git a/api/vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php b/api/vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php index 038740b..703a3fc 100644 --- a/api/vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php +++ b/api/vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php @@ -192,7 +192,7 @@ trait HasRelationships */ public static function getActualClassNameForMorph($class) { - return Arr::get(Relation::morphMap(), $class, $class); + return Arr::get(Relation::morphMap() ?: [], $class, $class); } /** diff --git a/api/vendor/illuminate/database/Eloquent/Concerns/QueriesRelationships.php b/api/vendor/illuminate/database/Eloquent/Concerns/QueriesRelationships.php index f7d5a0a..ffae137 100644 --- a/api/vendor/illuminate/database/Eloquent/Concerns/QueriesRelationships.php +++ b/api/vendor/illuminate/database/Eloquent/Concerns/QueriesRelationships.php @@ -107,6 +107,17 @@ trait QueriesRelationships return $this->has($relation, '<', 1, $boolean, $callback); } + /** + * Add a relationship count / exists condition to the query with an "or". + * + * @param string $relation + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orDoesntHave($relation) + { + return $this->doesntHave($relation, 'or'); + } + /** * Add a relationship count / exists condition to the query with where clauses. * @@ -147,6 +158,18 @@ trait QueriesRelationships return $this->doesntHave($relation, 'and', $callback); } + /** + * Add a relationship count / exists condition to the query with where clauses and an "or". + * + * @param string $relation + * @param \Closure $callback + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orWhereDoesntHave($relation, Closure $callback = null) + { + return $this->doesntHave($relation, 'or', $callback); + } + /** * Add subselect queries to count the relations. * @@ -155,6 +178,10 @@ trait QueriesRelationships */ public function withCount($relations) { + if (empty($relations)) { + return $this; + } + if (is_null($this->query->columns)) { $this->query->select([$this->query->from.'.*']); } diff --git a/api/vendor/illuminate/database/Eloquent/FactoryBuilder.php b/api/vendor/illuminate/database/Eloquent/FactoryBuilder.php index f3ebcd1..ffa4789 100644 --- a/api/vendor/illuminate/database/Eloquent/FactoryBuilder.php +++ b/api/vendor/illuminate/database/Eloquent/FactoryBuilder.php @@ -2,12 +2,14 @@ namespace Illuminate\Database\Eloquent; -use Closure; use Faker\Generator as Faker; use InvalidArgumentException; +use Illuminate\Support\Traits\Macroable; class FactoryBuilder { + use Macroable; + /** * The model definitions in the container. * @@ -92,7 +94,7 @@ class FactoryBuilder /** * Set the states to be applied to the model. * - * @param array|dynamic $states + * @param array|mixed $states * @return $this */ public function states($states) @@ -102,6 +104,19 @@ class FactoryBuilder return $this; } + /** + * Create a model and persist it in the database if requested. + * + * @param array $attributes + * @return \Closure + */ + public function lazy(array $attributes = []) + { + return function () use ($attributes) { + return $this->create($attributes); + }; + } + /** * Create a collection of models and persist them to the database. * @@ -113,14 +128,29 @@ class FactoryBuilder $results = $this->make($attributes); if ($results instanceof Model) { - $results->save(); + $this->store(collect([$results])); } else { - $results->each->save(); + $this->store($results); } return $results; } + /** + * Set the connection name on the results and store them. + * + * @param \Illuminate\Support\Collection $results + * @return void + */ + protected function store($results) + { + $results->each(function ($model) { + $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName()); + + $model->save(); + }); + } + /** * Create a collection of models. * @@ -176,7 +206,7 @@ class FactoryBuilder $this->faker, $attributes ); - return $this->callClosureAttributes( + return $this->expandAttributes( array_merge($this->applyStates($definition, $attributes), $attributes) ); } @@ -226,19 +256,25 @@ class FactoryBuilder } /** - * Evaluate any Closure attributes on the attribute array. + * Expand all attributes to their underlying values. * * @param array $attributes * @return array */ - protected function callClosureAttributes(array $attributes) + protected function expandAttributes(array $attributes) { foreach ($attributes as &$attribute) { - $attribute = $attribute instanceof Closure - ? $attribute($attributes) : $attribute; + if (is_callable($attribute) && ! is_string($attribute)) { + $attribute = $attribute($attributes); + } - $attribute = $attribute instanceof Model - ? $attribute->getKey() : $attribute; + if ($attribute instanceof static) { + $attribute = $attribute->create()->getKey(); + } + + if ($attribute instanceof Model) { + $attribute = $attribute->getKey(); + } } return $attributes; diff --git a/api/vendor/illuminate/database/Eloquent/MassAssignmentException.php b/api/vendor/illuminate/database/Eloquent/MassAssignmentException.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/Model.php b/api/vendor/illuminate/database/Eloquent/Model.php index 116ed47..563628b 100644 --- a/api/vendor/illuminate/database/Eloquent/Model.php +++ b/api/vendor/illuminate/database/Eloquent/Model.php @@ -15,6 +15,10 @@ use Illuminate\Database\Eloquent\Relations\Pivot; use Illuminate\Database\Query\Builder as QueryBuilder; use Illuminate\Database\ConnectionResolverInterface as Resolver; +/** + * @mixin \Illuminate\Database\Eloquent\Builder + * @mixin \Illuminate\Database\Query\Builder + */ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable { use Concerns\HasAttributes, @@ -67,6 +71,13 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab */ protected $with = []; + /** + * The relationship counts that should be eager loaded on every query. + * + * @var array + */ + protected $withCount = []; + /** * The number of models to return for pagination. * @@ -809,7 +820,9 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab // Once we have the query builders, we will set the model instances so the // builder can easily access any information it may need from the model // while it is constructing and executing various queries against it. - return $builder->setModel($this)->with($this->with); + return $builder->setModel($this) + ->with($this->with) + ->withCount($this->withCount); } /** @@ -934,6 +947,24 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab ->first(); } + /** + * Reload the current model instance with fresh attributes from the database. + * + * @return $this + */ + public function refresh() + { + if (! $this->exists) { + return $this; + } + + $this->load(array_keys($this->relations)); + + $this->setRawAttributes(static::findOrFail($this->getKey())->attributes); + + return $this; + } + /** * Clone the model into a new, non-existing instance. * @@ -972,6 +1003,17 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab $this->getConnectionName() === $model->getConnectionName(); } + /** + * Determine if two models are not the same. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return bool + */ + public function isNot(Model $model) + { + return ! $this->is($model); + } + /** * Get the database connection for the model. * diff --git a/api/vendor/illuminate/database/Eloquent/ModelNotFoundException.php b/api/vendor/illuminate/database/Eloquent/ModelNotFoundException.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/RelationNotFoundException.php b/api/vendor/illuminate/database/Eloquent/RelationNotFoundException.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/Relations/BelongsTo.php b/api/vendor/illuminate/database/Eloquent/Relations/BelongsTo.php old mode 100644 new mode 100755 index e6dce10..26c4fba --- a/api/vendor/illuminate/database/Eloquent/Relations/BelongsTo.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/BelongsTo.php @@ -5,9 +5,15 @@ namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; +use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; +/** + * @mixin \Illuminate\Database\Eloquent\Builder + */ class BelongsTo extends Relation { + use SupportsDefaultModels; + /** * The child model instance of the relation. */ @@ -72,7 +78,7 @@ class BelongsTo extends Relation */ public function getResults() { - return $this->query->first(); + return $this->query->first() ?: $this->getDefaultFor($this->parent); } /** @@ -127,11 +133,11 @@ class BelongsTo extends Relation } } - // If there are no keys that were not null we will just return an array with either - // null or 0 in (depending on if incrementing keys are in use) so the query wont - // fail plus returns zero results, which should be what the developer expects. + // If there are no keys that were not null we will just return an array with null + // so this query wont fail plus returns zero results, which should be what the + // developer expects to happen in this situation. Otherwise we'll sort them. if (count($keys) === 0) { - return [$this->relationHasIncrementingId() ? 0 : null]; + return [null]; } sort($keys); @@ -149,7 +155,7 @@ class BelongsTo extends Relation public function initRelation(array $models, $relation) { foreach ($models as $model) { - $model->setRelation($relation, null); + $model->setRelation($relation, $this->getDefaultFor($model)); } return $models; @@ -293,6 +299,17 @@ class BelongsTo extends Relation $this->related->getKeyType() === 'int'; } + /** + * Make a new related instance for the given model. + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @return \Illuminate\Database\Eloquent\Model + */ + protected function newRelatedInstanceFor(Model $parent) + { + return $this->related->newInstance(); + } + /** * Get the foreign key of the relationship. * diff --git a/api/vendor/illuminate/database/Eloquent/Relations/BelongsToMany.php b/api/vendor/illuminate/database/Eloquent/Relations/BelongsToMany.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/api/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php index 7e79bc1..9d4c73f 100644 --- a/api/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php @@ -23,7 +23,7 @@ trait InteractsWithPivotTable 'attached' => [], 'detached' => [], ]; - $records = $this->formatRecordsList((array) $this->parseIds($ids)); + $records = $this->formatRecordsList($this->parseIds($ids)); // Next, we will determine which IDs should get removed from the join table by // checking which of the given ID/records is in the list of current records @@ -93,7 +93,7 @@ trait InteractsWithPivotTable )->all(); $detach = array_diff($current, array_keys( - $records = $this->formatRecordsList((array) $this->parseIds($ids)) + $records = $this->formatRecordsList($this->parseIds($ids)) )); // Next, we will take the differences of the currents and given IDs and detach @@ -211,7 +211,7 @@ trait InteractsWithPivotTable // inserted the records, we will touch the relationships if necessary and the // function will return. We can parse the IDs before inserting the records. $this->newPivotStatement()->insert($this->formatAttachRecords( - (array) $this->parseIds($id), $attributes + $this->parseIds($id), $attributes )); if ($touch) { @@ -348,12 +348,14 @@ trait InteractsWithPivotTable // If associated IDs were passed to the method we will only delete those // associations, otherwise all of the association ties will be broken. // We'll return the numbers of affected rows when we do the deletes. - if (! is_null($ids = $this->parseIds($ids))) { - if (count($ids) === 0) { + if (! is_null($ids)) { + $ids = $this->parseIds($ids); + + if (empty($ids)) { return 0; } - $query->whereIn($this->relatedKey, (array) $ids); + $query->whereIn($this->relatedKey, $ids); } // Once we have all of the conditions set on the statement, we are ready @@ -460,7 +462,7 @@ trait InteractsWithPivotTable protected function parseIds($value) { if ($value instanceof Model) { - return $value->getKey(); + return [$value->getKey()]; } if ($value instanceof Collection) { @@ -471,7 +473,7 @@ trait InteractsWithPivotTable return $value->toArray(); } - return $value; + return (array) $value; } /** diff --git a/api/vendor/illuminate/database/Eloquent/Relations/Concerns/SupportsDefaultModels.php b/api/vendor/illuminate/database/Eloquent/Relations/Concerns/SupportsDefaultModels.php new file mode 100644 index 0000000..00efd50 --- /dev/null +++ b/api/vendor/illuminate/database/Eloquent/Relations/Concerns/SupportsDefaultModels.php @@ -0,0 +1,63 @@ +withDefault = $callback; + + return $this; + } + + /** + * Get the default value for this relation. + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @return \Illuminate\Database\Eloquent\Model|null + */ + protected function getDefaultFor(Model $parent) + { + if (! $this->withDefault) { + return; + } + + $instance = $this->newRelatedInstanceFor($parent); + + if (is_callable($this->withDefault)) { + return call_user_func($this->withDefault, $instance) ?: $instance; + } + + if (is_array($this->withDefault)) { + $instance->forceFill($this->withDefault); + } + + return $instance; + } +} diff --git a/api/vendor/illuminate/database/Eloquent/Relations/HasMany.php b/api/vendor/illuminate/database/Eloquent/Relations/HasMany.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/Relations/HasOne.php b/api/vendor/illuminate/database/Eloquent/Relations/HasOne.php old mode 100644 new mode 100755 index a118f29..858e5d0 --- a/api/vendor/illuminate/database/Eloquent/Relations/HasOne.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/HasOne.php @@ -4,17 +4,11 @@ namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Collection; +use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; class HasOne extends HasOneOrMany { - /** - * Indicates if a default model instance should be used. - * - * Alternatively, may be a Closure or array. - * - * @var \Closure|array|bool - */ - protected $withDefault; + use SupportsDefaultModels; /** * Get the results of the relationship. @@ -42,33 +36,6 @@ class HasOne extends HasOneOrMany return $models; } - /** - * Get the default value for this relation. - * - * @param \Illuminate\Database\Eloquent\Model $model - * @return \Illuminate\Database\Eloquent\Model|null - */ - protected function getDefaultFor(Model $model) - { - if (! $this->withDefault) { - return; - } - - $instance = $this->related->newInstance()->setAttribute( - $this->getForeignKeyName(), $model->getAttribute($this->localKey) - ); - - if (is_callable($this->withDefault)) { - return call_user_func($this->withDefault, $instance) ?: $instance; - } - - if (is_array($this->withDefault)) { - $instance->forceFill($this->withDefault); - } - - return $instance; - } - /** * Match the eagerly loaded results to their parents. * @@ -83,15 +50,15 @@ class HasOne extends HasOneOrMany } /** - * Return a new model instance in case the relationship does not exist. + * Make a new related instance for the given model. * - * @param \Closure|array|bool $callback - * @return $this + * @param \Illuminate\Database\Eloquent\Model $parent + * @return \Illuminate\Database\Eloquent\Model */ - public function withDefault($callback = true) + public function newRelatedInstanceFor(Model $parent) { - $this->withDefault = $callback; - - return $this; + return $this->related->newInstance()->setAttribute( + $this->getForeignKeyName(), $parent->{$this->localKey} + ); } } diff --git a/api/vendor/illuminate/database/Eloquent/Relations/HasOneOrMany.php b/api/vendor/illuminate/database/Eloquent/Relations/HasOneOrMany.php old mode 100644 new mode 100755 index d115e8d..c6e1ba8 --- a/api/vendor/illuminate/database/Eloquent/Relations/HasOneOrMany.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/HasOneOrMany.php @@ -46,6 +46,19 @@ abstract class HasOneOrMany extends Relation parent::__construct($query, $parent); } + /** + * Create and return an un-saved instance of the related model. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function make(array $attributes = []) + { + return tap($this->related->newInstance($attributes), function ($instance) { + $instance->setAttribute($this->getForeignKeyName(), $this->getParentKey()); + }); + } + /** * Set the base constraints on the relation query. * diff --git a/api/vendor/illuminate/database/Eloquent/Relations/MorphMany.php b/api/vendor/illuminate/database/Eloquent/Relations/MorphMany.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/Relations/MorphOne.php b/api/vendor/illuminate/database/Eloquent/Relations/MorphOne.php old mode 100644 new mode 100755 index 339a68c..520a7ec --- a/api/vendor/illuminate/database/Eloquent/Relations/MorphOne.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/MorphOne.php @@ -2,10 +2,14 @@ namespace Illuminate\Database\Eloquent\Relations; +use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Collection; +use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; class MorphOne extends MorphOneOrMany { + use SupportsDefaultModels; + /** * Get the results of the relationship. * @@ -13,7 +17,7 @@ class MorphOne extends MorphOneOrMany */ public function getResults() { - return $this->query->first(); + return $this->query->first() ?: $this->getDefaultFor($this->parent); } /** @@ -26,7 +30,7 @@ class MorphOne extends MorphOneOrMany public function initRelation(array $models, $relation) { foreach ($models as $model) { - $model->setRelation($relation, null); + $model->setRelation($relation, $this->getDefaultFor($model)); } return $models; @@ -44,4 +48,17 @@ class MorphOne extends MorphOneOrMany { return $this->matchOne($models, $results, $relation); } + + /** + * Make a new related instance for the given model. + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @return \Illuminate\Database\Eloquent\Model + */ + public function newRelatedInstanceFor(Model $parent) + { + return $this->related->newInstance() + ->setAttribute($this->getForeignKeyName(), $parent->{$this->localKey}) + ->setAttribute($this->getMorphType(), $this->morphClass); + } } diff --git a/api/vendor/illuminate/database/Eloquent/Relations/MorphOneOrMany.php b/api/vendor/illuminate/database/Eloquent/Relations/MorphOneOrMany.php old mode 100644 new mode 100755 index 361f2ae..42f1239 --- a/api/vendor/illuminate/database/Eloquent/Relations/MorphOneOrMany.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/MorphOneOrMany.php @@ -40,6 +40,22 @@ abstract class MorphOneOrMany extends HasOneOrMany parent::__construct($query, $parent, $id, $localKey); } + /** + * Create and return an un-saved instance of the related model. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function make(array $attributes = []) + { + return tap($this->related->newInstance($attributes), function ($instance) { + // When saving a polymorphic relationship, we need to set not only the foreign + // key, but also the foreign key type, which is typically the class name of + // the parent model. This makes the polymorphic item unique in the table. + $this->setForeignAttributesForCreate($instance); + }); + } + /** * Set the base constraints on the relation query. * diff --git a/api/vendor/illuminate/database/Eloquent/Relations/MorphTo.php b/api/vendor/illuminate/database/Eloquent/Relations/MorphTo.php index 93a1a17..2739786 100644 --- a/api/vendor/illuminate/database/Eloquent/Relations/MorphTo.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/MorphTo.php @@ -7,6 +7,9 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; +/** + * @mixin \Illuminate\Database\Eloquent\Builder + */ class MorphTo extends BelongsTo { /** diff --git a/api/vendor/illuminate/database/Eloquent/Relations/Pivot.php b/api/vendor/illuminate/database/Eloquent/Relations/Pivot.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Eloquent/Relations/Relation.php b/api/vendor/illuminate/database/Eloquent/Relations/Relation.php old mode 100644 new mode 100755 index acbfbed..b4f6271 --- a/api/vendor/illuminate/database/Eloquent/Relations/Relation.php +++ b/api/vendor/illuminate/database/Eloquent/Relations/Relation.php @@ -10,6 +10,9 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\Expression; use Illuminate\Database\Eloquent\Collection; +/** + * @mixin \Illuminate\Database\Eloquent\Builder + */ abstract class Relation { use Macroable { @@ -324,6 +327,19 @@ abstract class Relation }, $models), $models); } + /** + * Get the model associated with a custom polymorphic type. + * + * @param string $alias + * @return string|null + */ + public static function getMorphedModel($alias) + { + return array_key_exists($alias, self::$morphMap) + ? self::$morphMap[$alias] + : null; + } + /** * Handle dynamic method calls to the relationship. * diff --git a/api/vendor/illuminate/database/Eloquent/SoftDeletes.php b/api/vendor/illuminate/database/Eloquent/SoftDeletes.php index fdca75c..d6c31ba 100644 --- a/api/vendor/illuminate/database/Eloquent/SoftDeletes.php +++ b/api/vendor/illuminate/database/Eloquent/SoftDeletes.php @@ -60,9 +60,19 @@ trait SoftDeletes { $query = $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey()); - $this->{$this->getDeletedAtColumn()} = $time = $this->freshTimestamp(); + $time = $this->freshTimestamp(); - $query->update([$this->getDeletedAtColumn() => $this->fromDateTime($time)]); + $columns = [$this->getDeletedAtColumn() => $this->fromDateTime($time)]; + + $this->{$this->getDeletedAtColumn()} = $time; + + if ($this->timestamps) { + $this->{$this->getUpdatedAtColumn()} = $time; + + $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time); + } + + $query->update($columns); } /** diff --git a/api/vendor/illuminate/database/Eloquent/SoftDeletingScope.php b/api/vendor/illuminate/database/Eloquent/SoftDeletingScope.php index cf5ded1..6de963d 100644 --- a/api/vendor/illuminate/database/Eloquent/SoftDeletingScope.php +++ b/api/vendor/illuminate/database/Eloquent/SoftDeletingScope.php @@ -52,7 +52,7 @@ class SoftDeletingScope implements Scope */ protected function getDeletedAtColumn(Builder $builder) { - if (count($builder->getQuery()->joins) > 0) { + if (count((array) $builder->getQuery()->joins) > 0) { return $builder->getModel()->getQualifiedDeletedAtColumn(); } diff --git a/api/vendor/illuminate/database/Grammar.php b/api/vendor/illuminate/database/Grammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/MigrationServiceProvider.php b/api/vendor/illuminate/database/MigrationServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Migrations/DatabaseMigrationRepository.php b/api/vendor/illuminate/database/Migrations/DatabaseMigrationRepository.php old mode 100644 new mode 100755 index b0e4a28..726cbda --- a/api/vendor/illuminate/database/Migrations/DatabaseMigrationRepository.php +++ b/api/vendor/illuminate/database/Migrations/DatabaseMigrationRepository.php @@ -161,7 +161,7 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface */ protected function table() { - return $this->getConnection()->table($this->table); + return $this->getConnection()->table($this->table)->useWritePdo(); } /** diff --git a/api/vendor/illuminate/database/Migrations/Migration.php b/api/vendor/illuminate/database/Migrations/Migration.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Migrations/MigrationCreator.php b/api/vendor/illuminate/database/Migrations/MigrationCreator.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Migrations/MigrationRepositoryInterface.php b/api/vendor/illuminate/database/Migrations/MigrationRepositoryInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Migrations/Migrator.php b/api/vendor/illuminate/database/Migrations/Migrator.php old mode 100644 new mode 100755 index f73e17a..18c30f4 --- a/api/vendor/illuminate/database/Migrations/Migrator.php +++ b/api/vendor/illuminate/database/Migrations/Migrator.php @@ -244,11 +244,17 @@ class Migrator foreach ($migrations as $migration) { $migration = (object) $migration; - $rolledBack[] = $files[$migration->migration]; + if (! $file = Arr::get($files, $migration->migration)) { + $this->note("Migration not found: {$migration->migration}"); + + continue; + } + + $rolledBack[] = $file; $this->runDown( - $files[$migration->migration], - $migration, Arr::get($options, 'pretend', false) + $file, $migration, + Arr::get($options, 'pretend', false) ); } diff --git a/api/vendor/illuminate/database/Migrations/stubs/blank.stub b/api/vendor/illuminate/database/Migrations/stubs/blank.stub old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Migrations/stubs/create.stub b/api/vendor/illuminate/database/Migrations/stubs/create.stub old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Migrations/stubs/update.stub b/api/vendor/illuminate/database/Migrations/stubs/update.stub old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/MySqlConnection.php b/api/vendor/illuminate/database/MySqlConnection.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/PostgresConnection.php b/api/vendor/illuminate/database/PostgresConnection.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Builder.php b/api/vendor/illuminate/database/Query/Builder.php old mode 100644 new mode 100755 index c1a55c0..c57d73d --- a/api/vendor/illuminate/database/Query/Builder.php +++ b/api/vendor/illuminate/database/Query/Builder.php @@ -15,8 +15,8 @@ use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\ConnectionInterface; use Illuminate\Database\Concerns\BuildsQueries; use Illuminate\Database\Query\Grammars\Grammar; -use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Database\Query\Processors\Processor; +use Illuminate\Database\Eloquent\Builder as EloquentBuilder; class Builder { @@ -99,7 +99,7 @@ class Builder * * @var array */ - public $wheres; + public $wheres = []; /** * The groupings for the query. @@ -177,7 +177,7 @@ class Builder * @var array */ public $operators = [ - '=', '<', '>', '<=', '>=', '<>', '!=', + '=', '<', '>', '<=', '>=', '<>', '!=', '<=>', 'like', 'like binary', 'not like', 'between', 'ilike', '&', '|', '^', '<<', '>>', 'rlike', 'regexp', 'not regexp', @@ -279,6 +279,8 @@ class Builder protected function parseSubSelect($query) { if ($query instanceof self) { + $query->columns = [$query->columns[0]]; + return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; @@ -458,17 +460,6 @@ class Builder return $this; } - /** - * Pass the query to a given callback. - * - * @param \Closure $callback - * @return \Illuminate\Database\Query\Builder - */ - public function tap($callback) - { - return $this->when(true, $callback); - } - /** * Merge an array of where clauses and bindings. * @@ -478,7 +469,7 @@ class Builder */ public function mergeWheres($wheres, $bindings) { - $this->wheres = array_merge((array) $this->wheres, (array) $wheres); + $this->wheres = array_merge($this->wheres, (array) $wheres); $this->bindings['where'] = array_values( array_merge($this->bindings['where'], (array) $bindings) @@ -571,12 +562,12 @@ class Builder */ protected function addArrayOfWheres($column, $boolean, $method = 'where') { - return $this->whereNested(function ($query) use ($column, $method) { + return $this->whereNested(function ($query) use ($column, $method, $boolean) { foreach ($column as $key => $value) { if (is_numeric($key) && is_array($value)) { $query->{$method}(...array_values($value)); } else { - $query->$method($key, '=', $value); + $query->$method($key, '=', $value, $boolean); } } }, $boolean); @@ -633,7 +624,7 @@ class Builder /** * Add an "or where" clause to the query. * - * @param \Closure|string $column + * @param string|array|\Closure $column * @param string $operator * @param mixed $value * @return \Illuminate\Database\Query\Builder|static @@ -714,10 +705,10 @@ class Builder * Add a raw or where clause to the query. * * @param string $sql - * @param array $bindings + * @param mixed $bindings * @return \Illuminate\Database\Query\Builder|static */ - public function orWhereRaw($sql, array $bindings = []) + public function orWhereRaw($sql, $bindings = []) { return $this->whereRaw($sql, $bindings, 'or'); } @@ -735,10 +726,14 @@ class Builder { $type = $not ? 'NotIn' : 'In'; + if ($values instanceof EloquentBuilder) { + $values = $values->getQuery(); + } + // If the value is a query builder instance we will assume the developer wants to // look for any values that exists within this given query. So we will add the // query accordingly so that this query is properly executed when it is run. - if ($values instanceof static) { + if ($values instanceof self) { return $this->whereInExistingQuery( $column, $values, $boolean, $not ); @@ -1561,7 +1556,7 @@ class Builder } /** - * Get an array orders with all orders for an given column removed. + * Get an array with all orders with a given column removed. * * @param string $column * @return array @@ -1570,7 +1565,8 @@ class Builder { return Collection::make($this->orders) ->reject(function ($order) use ($column) { - return $order['column'] === $column; + return isset($order['column']) + ? $order['column'] === $column : false; })->values()->all(); } @@ -1727,7 +1723,7 @@ class Builder $results = $total ? $this->forPage($page, $perPage)->get($columns) : collect(); - return new LengthAwarePaginator($results, $total, $perPage, $page, [ + return $this->paginator($results, $total, $perPage, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, ]); @@ -1750,7 +1746,7 @@ class Builder $this->skip(($page - 1) * $perPage)->take($perPage + 1); - return new Paginator($this->get($columns), $perPage, $page, [ + return $this->simplePaginator($this->get($columns), $perPage, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, ]); @@ -2073,6 +2069,12 @@ class Builder { $this->aggregate = compact('function', 'columns'); + if (empty($this->groups)) { + $this->orders = null; + + $this->bindings['order'] = []; + } + return $this; } diff --git a/api/vendor/illuminate/database/Query/Expression.php b/api/vendor/illuminate/database/Query/Expression.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Grammars/Grammar.php b/api/vendor/illuminate/database/Query/Grammars/Grammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Grammars/MySqlGrammar.php b/api/vendor/illuminate/database/Query/Grammars/MySqlGrammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php b/api/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php old mode 100644 new mode 100755 index fa7f673..77123fe --- a/api/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php +++ b/api/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php @@ -65,6 +65,18 @@ class PostgresGrammar extends Grammar return $value; } + /** + * {@inheritdoc} + */ + public function compileInsert(Builder $query, array $values) + { + $table = $this->wrapTable($query->from); + + return empty($values) + ? "insert into {$table} DEFAULT VALUES" + : parent::compileInsert($query, $values); + } + /** * Compile an insert and get ID statement into SQL. * @@ -214,6 +226,40 @@ class PostgresGrammar extends Grammar ); } + /** + * Compile a delete statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileDelete(Builder $query) + { + $table = $this->wrapTable($query->from); + + return isset($query->joins) + ? $this->compileDeleteWithJoins($query, $table) + : parent::compileDelete($query); + } + + /** + * Compile a delete query that uses joins. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $table + * @param array $where + * @return string + */ + protected function compileDeleteWithJoins($query, $table) + { + $using = ' USING '.collect($query->joins)->map(function ($join) { + return $this->wrapTable($join->table); + })->implode(', '); + + $where = count($query->wheres) > 0 ? ' '.$this->compileUpdateWheres($query) : ''; + + return trim("delete from {$table}{$using}{$where}"); + } + /** * Compile a truncate table statement into SQL. * diff --git a/api/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php b/api/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php old mode 100644 new mode 100755 index 6f5e9c3..03dfd51 --- a/api/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php +++ b/api/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php @@ -153,7 +153,9 @@ class SQLiteGrammar extends Grammar // grammar insert builder because no special syntax is needed for the single // row inserts in SQLite. However, if there are multiples, we'll continue. if (count($values) == 1) { - return parent::compileInsert($query, reset($values)); + return empty(reset($values)) + ? "insert into $table default values" + : parent::compileInsert($query, reset($values)); } $names = $this->columnize(array_keys(reset($values))); diff --git a/api/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php b/api/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php old mode 100644 new mode 100755 index 7fa2050..858fd46 --- a/api/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php +++ b/api/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php @@ -368,7 +368,29 @@ class SqlServerGrammar extends Grammar */ public function supportsSavepoints() { - return false; + return true; + } + + /** + * Compile the SQL statement to define a savepoint. + * + * @param string $name + * @return string + */ + public function compileSavepoint($name) + { + return 'SAVE TRANSACTION '.$name; + } + + /** + * Compile the SQL statement to execute a savepoint rollback. + * + * @param string $name + * @return string + */ + public function compileSavepointRollBack($name) + { + return 'ROLLBACK TRANSACTION '.$name; } /** diff --git a/api/vendor/illuminate/database/Query/JoinClause.php b/api/vendor/illuminate/database/Query/JoinClause.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Processors/PostgresProcessor.php b/api/vendor/illuminate/database/Query/Processors/PostgresProcessor.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Processors/Processor.php b/api/vendor/illuminate/database/Query/Processors/Processor.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Query/Processors/SqlServerProcessor.php b/api/vendor/illuminate/database/Query/Processors/SqlServerProcessor.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/README.md b/api/vendor/illuminate/database/README.md old mode 100644 new mode 100755 index e7cdeed..b3014b0 --- a/api/vendor/illuminate/database/README.md +++ b/api/vendor/illuminate/database/README.md @@ -51,8 +51,7 @@ $results = Capsule::select('select * from users where id = ?', array(1)); **Using The Schema Builder** ```PHP -Capsule::schema()->create('users', function($table) -{ +Capsule::schema()->create('users', function ($table) { $table->increments('id'); $table->string('email')->unique(); $table->timestamps(); diff --git a/api/vendor/illuminate/database/SQLiteConnection.php b/api/vendor/illuminate/database/SQLiteConnection.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/Blueprint.php b/api/vendor/illuminate/database/Schema/Blueprint.php old mode 100644 new mode 100755 index 695d1cc..e327410 --- a/api/vendor/illuminate/database/Schema/Blueprint.php +++ b/api/vendor/illuminate/database/Schema/Blueprint.php @@ -5,10 +5,13 @@ namespace Illuminate\Database\Schema; use Closure; use Illuminate\Support\Fluent; use Illuminate\Database\Connection; +use Illuminate\Support\Traits\Macroable; use Illuminate\Database\Schema\Grammars\Grammar; class Blueprint { + use Macroable; + /** * The table the blueprint describes. * @@ -674,6 +677,21 @@ class Blueprint return $this->addColumn('decimal', $column, compact('total', 'places')); } + /** + * Create a new unsigned decimal column on the table. + * + * @param string $column + * @param int $total + * @param int $places + * @return \Illuminate\Support\Fluent + */ + public function unsignedDecimal($column, $total = 8, $places = 2) + { + return $this->addColumn('decimal', $column, [ + 'total' => $total, 'places' => $places, 'unsigned' => true, + ]); + } + /** * Create a new boolean column on the table. * @@ -835,11 +853,12 @@ class Blueprint /** * Add a "deleted at" timestamp for the table. * + * @param string $column * @return \Illuminate\Support\Fluent */ - public function softDeletes() + public function softDeletes($column = 'deleted_at') { - return $this->timestamp('deleted_at')->nullable(); + return $this->timestamp($column)->nullable(); } /** diff --git a/api/vendor/illuminate/database/Schema/Builder.php b/api/vendor/illuminate/database/Schema/Builder.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/Grammars/Grammar.php b/api/vendor/illuminate/database/Schema/Grammars/Grammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php b/api/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php old mode 100644 new mode 100755 index eba8b03..4f8d6b3 --- a/api/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php +++ b/api/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php @@ -808,7 +808,7 @@ class MySqlGrammar extends Grammar protected function modifyComment(Blueprint $blueprint, Fluent $column) { if (! is_null($column->comment)) { - return " comment '".$column->comment."'"; + return " comment '".addslashes($column->comment)."'"; } } diff --git a/api/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php b/api/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/Grammars/SQLiteGrammar.php b/api/vendor/illuminate/database/Schema/Grammars/SQLiteGrammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/Grammars/SqlServerGrammar.php b/api/vendor/illuminate/database/Schema/Grammars/SqlServerGrammar.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/MySqlBuilder.php b/api/vendor/illuminate/database/Schema/MySqlBuilder.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Schema/PostgresBuilder.php b/api/vendor/illuminate/database/Schema/PostgresBuilder.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/database/Seeder.php b/api/vendor/illuminate/database/Seeder.php old mode 100644 new mode 100755 index bb33876..6f7c735 --- a/api/vendor/illuminate/database/Seeder.php +++ b/api/vendor/illuminate/database/Seeder.php @@ -37,6 +37,17 @@ abstract class Seeder $this->resolve($class)->__invoke(); } + /** + * Silently seed the given connection from the given path. + * + * @param string $class + * @return void + */ + public function callSilent($class) + { + $this->resolve($class)->__invoke(); + } + /** * Resolve an instance of the given seeder class. * diff --git a/api/vendor/illuminate/database/SqlServerConnection.php b/api/vendor/illuminate/database/SqlServerConnection.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/encryption/Encrypter.php b/api/vendor/illuminate/encryption/Encrypter.php old mode 100644 new mode 100755 index f7256c7..5f266a0 --- a/api/vendor/illuminate/encryption/Encrypter.php +++ b/api/vendor/illuminate/encryption/Encrypter.php @@ -84,9 +84,9 @@ class Encrypter implements EncrypterContract throw new EncryptException('Could not encrypt the data.'); } - // Once we have the encrypted value we will go ahead base64_encode the input - // vector and create the MAC for the encrypted value so we can verify its - // authenticity. Then, we'll JSON encode the data in a "payload" array. + // Once we get the encrypted value we'll go ahead and base64_encode the input + // vector and create the MAC for the encrypted value so we can then verify + // its authenticity. Then, we'll JSON the data into the "payload" array. $mac = $this->hash($iv = base64_encode($iv), $value); $json = json_encode(compact('iv', 'value', 'mac')); diff --git a/api/vendor/illuminate/encryption/EncryptionServiceProvider.php b/api/vendor/illuminate/encryption/EncryptionServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/events/Dispatcher.php b/api/vendor/illuminate/events/Dispatcher.php old mode 100644 new mode 100755 index 3cab2b8..841f332 --- a/api/vendor/illuminate/events/Dispatcher.php +++ b/api/vendor/illuminate/events/Dispatcher.php @@ -242,7 +242,21 @@ class Dispatcher implements DispatcherContract */ protected function shouldBroadcast(array $payload) { - return isset($payload[0]) && $payload[0] instanceof ShouldBroadcast; + return isset($payload[0]) && + $payload[0] instanceof ShouldBroadcast && + $this->broadcastWhen($payload[0]); + } + + /** + * Check if event should be broadcasted by condition. + * + * @param mixed $event + * @return bool + */ + protected function broadcastWhen($event) + { + return method_exists($event, 'broadcastWhen') + ? $event->broadcastWhen() : true; } /** @@ -319,7 +333,7 @@ class Dispatcher implements DispatcherContract * * @param string|\Closure $listener * @param bool $wildcard - * @return mixed + * @return \Closure */ public function makeListener($listener, $wildcard = false) { diff --git a/api/vendor/illuminate/events/EventServiceProvider.php b/api/vendor/illuminate/events/EventServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/events/composer.json b/api/vendor/illuminate/events/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/filesystem/Filesystem.php b/api/vendor/illuminate/filesystem/Filesystem.php index 6dbf335..9589c0f 100644 --- a/api/vendor/illuminate/filesystem/Filesystem.php +++ b/api/vendor/illuminate/filesystem/Filesystem.php @@ -98,6 +98,17 @@ class Filesystem require_once $file; } + /** + * Get the MD5 hash of the file at the given path. + * + * @param string $path + * @return string + */ + public function hash($path) + { + return md5_file($path); + } + /** * Write the contents of a file. * @@ -374,7 +385,7 @@ class Filesystem */ public function files($directory) { - $glob = glob($directory.'/*'); + $glob = glob($directory.DIRECTORY_SEPARATOR.'*'); if ($glob === false) { return []; diff --git a/api/vendor/illuminate/filesystem/FilesystemAdapter.php b/api/vendor/illuminate/filesystem/FilesystemAdapter.php index 12cd5d5..410b02e 100644 --- a/api/vendor/illuminate/filesystem/FilesystemAdapter.php +++ b/api/vendor/illuminate/filesystem/FilesystemAdapter.php @@ -18,6 +18,9 @@ use Illuminate\Contracts\Filesystem\Cloud as CloudFilesystemContract; use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract; use Illuminate\Contracts\Filesystem\FileNotFoundException as ContractFileNotFoundException; +/** + * @mixin \League\Flysystem\FilesystemInterface + */ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract { /** @@ -75,6 +78,17 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract return $this->driver->has($path); } + /** + * Get the full path for the file at the given "short" path. + * + * @param string $path + * @return string + */ + public function path($path) + { + return $this->driver->getAdapter()->getPathPrefix().$path; + } + /** * Get the contents of a file. * @@ -123,7 +137,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract * Store the uploaded file on the disk. * * @param string $path - * @param \Illuminate\Http\UploadedFile $file + * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file * @param array $options * @return string|false */ @@ -366,6 +380,36 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract } } + /** + * Get a temporary URL for the file at the given path. + * + * @param string $path + * @param \DateTimeInterface $expiration + * @param array $options + * @return string + */ + public function temporaryUrl($path, $expiration, array $options = []) + { + $adapter = $this->driver->getAdapter(); + + if (method_exists($adapter, 'getTemporaryUrl')) { + return $adapter->getTemporaryUrl($path, $expiration, $options); + } elseif (! $adapter instanceof AwsS3Adapter) { + throw new RuntimeException('This driver does not support creating temporary URLs.'); + } + + $client = $adapter->getClient(); + + $command = $client->getCommand('GetObject', array_merge([ + 'Bucket' => $adapter->getBucket(), + 'Key' => $adapter->getPathPrefix().$path, + ], $options)); + + return (string) $client->createPresignedRequest( + $command, $expiration + )->getUri(); + } + /** * Get an array of all files in a directory. * diff --git a/api/vendor/illuminate/filesystem/FilesystemManager.php b/api/vendor/illuminate/filesystem/FilesystemManager.php index db19429..9979bfd 100644 --- a/api/vendor/illuminate/filesystem/FilesystemManager.php +++ b/api/vendor/illuminate/filesystem/FilesystemManager.php @@ -16,6 +16,9 @@ use League\Flysystem\Adapter\Local as LocalAdapter; use League\Flysystem\AwsS3v3\AwsS3Adapter as S3Adapter; use Illuminate\Contracts\Filesystem\Factory as FactoryContract; +/** + * @mixin \Illuminate\Contracts\Filesystem\Filesystem + */ class FilesystemManager implements FactoryContract { /** diff --git a/api/vendor/illuminate/hashing/BcryptHasher.php b/api/vendor/illuminate/hashing/BcryptHasher.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/hashing/HashServiceProvider.php b/api/vendor/illuminate/hashing/HashServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/hashing/composer.json b/api/vendor/illuminate/hashing/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/http/JsonResponse.php b/api/vendor/illuminate/http/JsonResponse.php old mode 100644 new mode 100755 index 9992bf9..65bbecb --- a/api/vendor/illuminate/http/JsonResponse.php +++ b/api/vendor/illuminate/http/JsonResponse.php @@ -67,13 +67,26 @@ class JsonResponse extends BaseJsonResponse $this->data = json_encode($data, $this->encodingOptions); } - if (JSON_ERROR_NONE !== json_last_error()) { + if (! $this->hasValidJson(json_last_error())) { throw new InvalidArgumentException(json_last_error_msg()); } return $this->update(); } + /** + * Determine if an error occurred during JSON encoding. + * + * @param int $jsonError + * @return bool + */ + protected function hasValidJson($jsonError) + { + return $jsonError === JSON_ERROR_NONE || + ($jsonError === JSON_ERROR_UNSUPPORTED_TYPE && + $this->hasEncodingOption(JSON_PARTIAL_OUTPUT_ON_ERROR)); + } + /** * {@inheritdoc} */ @@ -83,4 +96,15 @@ class JsonResponse extends BaseJsonResponse return $this->setData($this->getData()); } + + /** + * Determine if a JSON encoding option is set. + * + * @param int $option + * @return bool + */ + public function hasEncodingOption($option) + { + return (bool) ($this->encodingOptions & $option); + } } diff --git a/api/vendor/illuminate/http/RedirectResponse.php b/api/vendor/illuminate/http/RedirectResponse.php old mode 100644 new mode 100755 index 0c71743..0a462ff --- a/api/vendor/illuminate/http/RedirectResponse.php +++ b/api/vendor/illuminate/http/RedirectResponse.php @@ -132,8 +132,14 @@ class RedirectResponse extends BaseRedirectResponse { $value = $this->parseErrors($provider); + $errors = $this->session->get('errors', new ViewErrorBag); + + if (! $errors instanceof ViewErrorBag) { + $errors = new ViewErrorBag; + } + $this->session->flash( - 'errors', $this->session->get('errors', new ViewErrorBag)->put($key, $value) + 'errors', $errors->put($key, $value) ); return $this; diff --git a/api/vendor/illuminate/http/Request.php b/api/vendor/illuminate/http/Request.php index 0d0f725..799c7fc 100644 --- a/api/vendor/illuminate/http/Request.php +++ b/api/vendor/illuminate/http/Request.php @@ -192,6 +192,17 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess return false; } + /** + * Check if the route name matches the given string. + * + * @param string $name + * @return bool + */ + public function routeIs($name) + { + return $this->route() && $this->route()->named($name); + } + /** * Determine if the current request URL and query string matches a pattern. * @@ -241,7 +252,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess } /** - * Returns the client IP address. + * Get the client IP address. * * @return string */ @@ -251,7 +262,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess } /** - * Returns the client IP addresses. + * Get the client IP addresses. * * @return array */ @@ -260,6 +271,16 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess return $this->getClientIps(); } + /** + * Get the client user agent. + * + * @return string + */ + public function userAgent() + { + return $this->headers->get('User-Agent'); + } + /** * Merge new input into the current request's input array. * @@ -426,9 +447,9 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess if (is_null($route) || is_null($param)) { return $route; - } else { - return $route->parameter($param); } + + return $route->parameter($param); } /** diff --git a/api/vendor/illuminate/http/Response.php b/api/vendor/illuminate/http/Response.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/http/Testing/MimeType.php b/api/vendor/illuminate/http/Testing/MimeType.php index 61f0c2b..470614a 100644 --- a/api/vendor/illuminate/http/Testing/MimeType.php +++ b/api/vendor/illuminate/http/Testing/MimeType.php @@ -600,6 +600,7 @@ class MimeType 'adp' => 'audio/adpcm', 'au' => 'audio/basic', 'mid' => 'audio/midi', + 'mp3' => 'audio/mpeg', 'mp4a' => 'audio/mp4', 'mpga' => 'audio/mpeg', 'oga' => 'audio/ogg', diff --git a/api/vendor/illuminate/http/UploadedFile.php b/api/vendor/illuminate/http/UploadedFile.php index f07e326..8ed7e7f 100644 --- a/api/vendor/illuminate/http/UploadedFile.php +++ b/api/vendor/illuminate/http/UploadedFile.php @@ -26,7 +26,7 @@ class UploadedFile extends SymfonyUploadedFile * Store the uploaded file on a filesystem disk. * * @param string $path - * @param array $options + * @param array|string $options * @return string|false */ public function store($path, $options = []) @@ -38,7 +38,7 @@ class UploadedFile extends SymfonyUploadedFile * Store the uploaded file on a filesystem disk with public visibility. * * @param string $path - * @param array $options + * @param array|string $options * @return string|false */ public function storePublicly($path, $options = []) @@ -55,7 +55,7 @@ class UploadedFile extends SymfonyUploadedFile * * @param string $path * @param string $name - * @param array $options + * @param array|string $options * @return string|false */ public function storePubliclyAs($path, $name, $options = []) @@ -72,7 +72,7 @@ class UploadedFile extends SymfonyUploadedFile * * @param string $path * @param string $name - * @param array $options + * @param array|string $options * @return string|false */ public function storeAs($path, $name, $options = []) diff --git a/api/vendor/illuminate/http/composer.json b/api/vendor/illuminate/http/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/pagination/AbstractPaginator.php b/api/vendor/illuminate/pagination/AbstractPaginator.php index 0e239ba..ebaf1ff 100644 --- a/api/vendor/illuminate/pagination/AbstractPaginator.php +++ b/api/vendor/illuminate/pagination/AbstractPaginator.php @@ -8,6 +8,9 @@ use Illuminate\Support\Str; use Illuminate\Support\Collection; use Illuminate\Contracts\Support\Htmlable; +/** + * @mixin \Illuminate\Support\Collection + */ abstract class AbstractPaginator implements Htmlable { /** @@ -60,7 +63,7 @@ abstract class AbstractPaginator implements Htmlable protected $pageName = 'page'; /** - * The current page resolver callback. + * The current path resolver callback. * * @var \Closure */ diff --git a/api/vendor/illuminate/pagination/LengthAwarePaginator.php b/api/vendor/illuminate/pagination/LengthAwarePaginator.php index 67a04a9..e0cd317 100644 --- a/api/vendor/illuminate/pagination/LengthAwarePaginator.php +++ b/api/vendor/illuminate/pagination/LengthAwarePaginator.php @@ -161,15 +161,16 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array public function toArray() { return [ - 'total' => $this->total(), - 'per_page' => $this->perPage(), 'current_page' => $this->currentPage(), + 'data' => $this->items->toArray(), + 'from' => $this->firstItem(), 'last_page' => $this->lastPage(), 'next_page_url' => $this->nextPageUrl(), + 'path' => $this->path, + 'per_page' => $this->perPage(), 'prev_page_url' => $this->previousPageUrl(), - 'from' => $this->firstItem(), 'to' => $this->lastItem(), - 'data' => $this->items->toArray(), + 'total' => $this->total(), ]; } diff --git a/api/vendor/illuminate/pagination/PaginationServiceProvider.php b/api/vendor/illuminate/pagination/PaginationServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/pagination/Paginator.php b/api/vendor/illuminate/pagination/Paginator.php index 61cef77..61f33e9 100644 --- a/api/vendor/illuminate/pagination/Paginator.php +++ b/api/vendor/illuminate/pagination/Paginator.php @@ -142,13 +142,14 @@ class Paginator extends AbstractPaginator implements Arrayable, ArrayAccess, Cou public function toArray() { return [ - 'per_page' => $this->perPage(), 'current_page' => $this->currentPage(), - 'next_page_url' => $this->nextPageUrl(), - 'prev_page_url' => $this->previousPageUrl(), - 'from' => $this->firstItem(), - 'to' => $this->lastItem(), 'data' => $this->items->toArray(), + 'from' => $this->firstItem(), + 'next_page_url' => $this->nextPageUrl(), + 'path' => $this->path, + 'per_page' => $this->perPage(), + 'prev_page_url' => $this->previousPageUrl(), + 'to' => $this->lastItem(), ]; } diff --git a/api/vendor/illuminate/pagination/composer.json b/api/vendor/illuminate/pagination/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/BeanstalkdQueue.php b/api/vendor/illuminate/queue/BeanstalkdQueue.php old mode 100644 new mode 100755 index 24dc9c0..54e8e42 --- a/api/vendor/illuminate/queue/BeanstalkdQueue.php +++ b/api/vendor/illuminate/queue/BeanstalkdQueue.php @@ -55,7 +55,7 @@ class BeanstalkdQueue extends Queue implements QueueContract { $queue = $this->getQueue($queue); - return (int) $this->pheanstalk->statsTube($queue)->total_jobs; + return (int) $this->pheanstalk->statsTube($queue)->current_jobs_ready; } /** diff --git a/api/vendor/illuminate/queue/Capsule/Manager.php b/api/vendor/illuminate/queue/Capsule/Manager.php index 9c32fe3..b611812 100644 --- a/api/vendor/illuminate/queue/Capsule/Manager.php +++ b/api/vendor/illuminate/queue/Capsule/Manager.php @@ -7,6 +7,10 @@ use Illuminate\Container\Container; use Illuminate\Queue\QueueServiceProvider; use Illuminate\Support\Traits\CapsuleManagerTrait; +/** + * @mixin \Illuminate\Queue\QueueManager + * @mixin \Illuminate\Contracts\Queue\Queue + */ class Manager { use CapsuleManagerTrait; diff --git a/api/vendor/illuminate/queue/Connectors/BeanstalkdConnector.php b/api/vendor/illuminate/queue/Connectors/BeanstalkdConnector.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Connectors/ConnectorInterface.php b/api/vendor/illuminate/queue/Connectors/ConnectorInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Connectors/SqsConnector.php b/api/vendor/illuminate/queue/Connectors/SqsConnector.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Connectors/SyncConnector.php b/api/vendor/illuminate/queue/Connectors/SyncConnector.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Console/ListenCommand.php b/api/vendor/illuminate/queue/Console/ListenCommand.php old mode 100644 new mode 100755 index 3d6d1b0..11f4ab4 --- a/api/vendor/illuminate/queue/Console/ListenCommand.php +++ b/api/vendor/illuminate/queue/Console/ListenCommand.php @@ -15,7 +15,7 @@ class ListenCommand extends Command */ protected $signature = 'queue:listen {connection? : The name of connection} - {--delay=0 : Amount of time to delay failed jobs} + {--delay=0 : The number of seconds to delay failed jobs} {--force : Force the worker to run even in maintenance mode} {--memory=128 : The memory limit in megabytes} {--queue= : The queue to listen on} diff --git a/api/vendor/illuminate/queue/Console/WorkCommand.php b/api/vendor/illuminate/queue/Console/WorkCommand.php index c430881..8b38ac5 100644 --- a/api/vendor/illuminate/queue/Console/WorkCommand.php +++ b/api/vendor/illuminate/queue/Console/WorkCommand.php @@ -23,7 +23,7 @@ class WorkCommand extends Command {--queue= : The names of the queues to work} {--daemon : Run the worker in daemon mode (Deprecated)} {--once : Only process the next job on the queue} - {--delay=0 : Amount of time to delay failed jobs} + {--delay=0 : The number of seconds to delay failed jobs} {--force : Force the worker to run even in maintenance mode} {--memory=128 : The memory limit in megabytes} {--sleep=3 : Number of seconds to sleep when no job is available} @@ -45,7 +45,7 @@ class WorkCommand extends Command protected $worker; /** - * Create a new queue listen command. + * Create a new queue work command. * * @param \Illuminate\Queue\Worker $worker * @return void diff --git a/api/vendor/illuminate/queue/Console/stubs/jobs.stub b/api/vendor/illuminate/queue/Console/stubs/jobs.stub index 347ac2e..8d9265d 100644 --- a/api/vendor/illuminate/queue/Console/stubs/jobs.stub +++ b/api/vendor/illuminate/queue/Console/stubs/jobs.stub @@ -17,7 +17,7 @@ class Create{{tableClassName}}Table extends Migration $table->bigIncrements('id'); $table->string('queue'); $table->longText('payload'); - $table->tinyInteger('attempts')->unsigned(); + $table->unsignedTinyInteger('attempts'); $table->unsignedInteger('reserved_at')->nullable(); $table->unsignedInteger('available_at'); $table->unsignedInteger('created_at'); diff --git a/api/vendor/illuminate/queue/Jobs/BeanstalkdJob.php b/api/vendor/illuminate/queue/Jobs/BeanstalkdJob.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Jobs/Job.php b/api/vendor/illuminate/queue/Jobs/Job.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Jobs/SqsJob.php b/api/vendor/illuminate/queue/Jobs/SqsJob.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Jobs/SyncJob.php b/api/vendor/illuminate/queue/Jobs/SyncJob.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Listener.php b/api/vendor/illuminate/queue/Listener.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Queue.php b/api/vendor/illuminate/queue/Queue.php old mode 100644 new mode 100755 index c53dcf3..6175326 --- a/api/vendor/illuminate/queue/Queue.php +++ b/api/vendor/illuminate/queue/Queue.php @@ -86,7 +86,9 @@ abstract class Queue $payload = json_encode($this->createPayloadArray($job, $data, $queue)); if (JSON_ERROR_NONE !== json_last_error()) { - throw new InvalidPayloadException; + throw new InvalidPayloadException( + 'Unable to JSON encode payload. Error code: '.json_last_error() + ); } return $payload; diff --git a/api/vendor/illuminate/queue/QueueManager.php b/api/vendor/illuminate/queue/QueueManager.php old mode 100644 new mode 100755 index b8fcb3c..f9bb7f6 --- a/api/vendor/illuminate/queue/QueueManager.php +++ b/api/vendor/illuminate/queue/QueueManager.php @@ -7,6 +7,9 @@ use InvalidArgumentException; use Illuminate\Contracts\Queue\Factory as FactoryContract; use Illuminate\Contracts\Queue\Monitor as MonitorContract; +/** + * @mixin \Illuminate\Contracts\Queue\Queue + */ class QueueManager implements FactoryContract, MonitorContract { /** diff --git a/api/vendor/illuminate/queue/QueueServiceProvider.php b/api/vendor/illuminate/queue/QueueServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/RedisQueue.php b/api/vendor/illuminate/queue/RedisQueue.php index 9dad241..7767a1f 100644 --- a/api/vendor/illuminate/queue/RedisQueue.php +++ b/api/vendor/illuminate/queue/RedisQueue.php @@ -135,7 +135,7 @@ class RedisQueue extends Queue implements QueueContract * @param string $job * @param mixed $data * @param string $queue - * @return string + * @return array */ protected function createPayloadArray($job, $data = '', $queue = null) { diff --git a/api/vendor/illuminate/queue/SqsQueue.php b/api/vendor/illuminate/queue/SqsQueue.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/SyncQueue.php b/api/vendor/illuminate/queue/SyncQueue.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/queue/Worker.php b/api/vendor/illuminate/queue/Worker.php index 782a863..4f29580 100644 --- a/api/vendor/illuminate/queue/Worker.php +++ b/api/vendor/illuminate/queue/Worker.php @@ -5,12 +5,15 @@ namespace Illuminate\Queue; use Exception; use Throwable; use Illuminate\Contracts\Events\Dispatcher; +use Illuminate\Database\DetectsLostConnections; use Illuminate\Contracts\Debug\ExceptionHandler; use Symfony\Component\Debug\Exception\FatalThrowableError; use Illuminate\Contracts\Cache\Repository as CacheContract; class Worker { + use DetectsLostConnections; + /** * The queue manager instance. * @@ -128,7 +131,7 @@ class Worker */ protected function registerTimeoutHandler($job, WorkerOptions $options) { - if ($options->timeout > 0 && $this->supportsAsyncSignals()) { + if ($this->supportsAsyncSignals()) { // We will register a signal handler for the alarm signal so that we can kill this // process if it is running too long because it has frozen. This uses the async // signals supported in recent versions of PHP to accomplish it conveniently. @@ -136,7 +139,9 @@ class Worker $this->kill(1); }); - pcntl_alarm($this->timeoutForJob($job, $options) + $options->sleep); + pcntl_alarm( + max($this->timeoutForJob($job, $options), 0) + ); } } @@ -239,8 +244,12 @@ class Worker } } catch (Exception $e) { $this->exceptions->report($e); + + $this->stopWorkerIfLostConnection($e); } catch (Throwable $e) { - $this->exceptions->report(new FatalThrowableError($e)); + $this->exceptions->report($e = new FatalThrowableError($e)); + + $this->stopWorkerIfLostConnection($e); } } @@ -258,8 +267,25 @@ class Worker return $this->process($connectionName, $job, $options); } catch (Exception $e) { $this->exceptions->report($e); + + $this->stopWorkerIfLostConnection($e); } catch (Throwable $e) { - $this->exceptions->report(new FatalThrowableError($e)); + $this->exceptions->report($e = new FatalThrowableError($e)); + + $this->stopWorkerIfLostConnection($e); + } + } + + /** + * Stop the worker if we have lost connection to a database. + * + * @param \Exception $e + * @return void + */ + protected function stopWorkerIfLostConnection($e) + { + if ($this->causedByLostConnection($e)) { + $this->shouldQuit = true; } } @@ -317,9 +343,11 @@ class Worker // First, we will go ahead and mark the job as failed if it will exceed the maximum // attempts it is allowed to run the next time we process it. If so we will just // go ahead and mark it as failed now so we do not have to release this again. - $this->markJobAsFailedIfWillExceedMaxAttempts( - $connectionName, $job, (int) $options->maxTries, $e - ); + if (! $job->hasFailed()) { + $this->markJobAsFailedIfWillExceedMaxAttempts( + $connectionName, $job, (int) $options->maxTries, $e + ); + } $this->raiseExceptionOccurredJobEvent( $connectionName, $job, $e diff --git a/api/vendor/illuminate/queue/composer.json b/api/vendor/illuminate/queue/composer.json index 40a774a..29f970a 100644 --- a/api/vendor/illuminate/queue/composer.json +++ b/api/vendor/illuminate/queue/composer.json @@ -18,6 +18,7 @@ "illuminate/console": "5.4.*", "illuminate/container": "5.4.*", "illuminate/contracts": "5.4.*", + "illuminate/database": "5.4.*", "illuminate/filesystem": "5.4.*", "illuminate/support": "5.4.*", "nesbot/carbon": "~1.20", diff --git a/api/vendor/illuminate/session/CacheBasedSessionHandler.php b/api/vendor/illuminate/session/CacheBasedSessionHandler.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/Console/stubs/database.stub b/api/vendor/illuminate/session/Console/stubs/database.stub old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/CookieSessionHandler.php b/api/vendor/illuminate/session/CookieSessionHandler.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/SessionManager.php b/api/vendor/illuminate/session/SessionManager.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/SessionServiceProvider.php b/api/vendor/illuminate/session/SessionServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/Store.php b/api/vendor/illuminate/session/Store.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/TokenMismatchException.php b/api/vendor/illuminate/session/TokenMismatchException.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/session/composer.json b/api/vendor/illuminate/session/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Arr.php b/api/vendor/illuminate/support/Arr.php old mode 100644 new mode 100755 index 5f5302d..4b3e447 --- a/api/vendor/illuminate/support/Arr.php +++ b/api/vendor/illuminate/support/Arr.php @@ -3,6 +3,7 @@ namespace Illuminate\Support; use ArrayAccess; +use InvalidArgumentException; use Illuminate\Support\Traits\Macroable; class Arr @@ -60,6 +61,33 @@ class Arr return $results; } + /** + * Cross join the given arrays, returning all possible permutations. + * + * @param array ...$arrays + * @return array + */ + public static function crossJoin(...$arrays) + { + $results = [[]]; + + foreach ($arrays as $index => $array) { + $append = []; + + foreach ($results as $product) { + foreach ($array as $item) { + $product[$index] = $item; + + $append[] = $product; + } + } + + $results = $append; + } + + return $results; + } + /** * Divide an array into two arrays. One with keys and the other with values. * @@ -362,6 +390,10 @@ class Arr } else { $itemKey = data_get($item, $key); + if (is_object($itemKey) && method_exists($itemKey, '__toString')) { + $itemKey = (string) $itemKey; + } + $results[$itemKey] = $itemValue; } } @@ -421,6 +453,46 @@ class Arr return $value; } + /** + * Get one or a specified number of random values from an array. + * + * @param array $array + * @param int|null $number + * @return mixed + * + * @throws \InvalidArgumentException + */ + public static function random($array, $number = null) + { + $requested = is_null($number) ? 1 : $number; + + $count = count($array); + + if ($requested > $count) { + throw new InvalidArgumentException( + "You requested {$requested} items, but there are only {$count} items available." + ); + } + + if (is_null($number)) { + return $array[array_rand($array)]; + } + + if ((int) $number === 0) { + return []; + } + + $keys = array_rand($array, $number); + + $results = []; + + foreach ((array) $keys as $key) { + $results[] = $array[$key]; + } + + return $results; + } + /** * Set an array item to a given value using "dot" notation. * diff --git a/api/vendor/illuminate/support/Collection.php b/api/vendor/illuminate/support/Collection.php index f978c52..fa7a850 100644 --- a/api/vendor/illuminate/support/Collection.php +++ b/api/vendor/illuminate/support/Collection.php @@ -10,7 +10,6 @@ use ArrayIterator; use CachingIterator; use JsonSerializable; use IteratorAggregate; -use InvalidArgumentException; use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; @@ -32,7 +31,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate * @var array */ protected static $proxies = [ - 'contains', 'each', 'every', 'filter', 'first', 'flatMap', + 'average', 'avg', 'contains', 'each', 'every', 'filter', 'first', 'flatMap', 'map', 'partition', 'reject', 'sortBy', 'sortByDesc', 'sum', ]; @@ -59,19 +58,23 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } /** - * Create a new collection by invoking the callback a given amount of times. + * Create a new collection by invoking the callback a given number of times. * - * @param int $amount + * @param int $number * @param callable $callback * @return static */ - public static function times($amount, callable $callback) + public static function times($number, callable $callback = null) { - if ($amount < 1) { + if ($number < 1) { return new static; } - return (new static(range(1, $amount)))->map($callback); + if (is_null($callback)) { + return new static(range(1, $number)); + } + + return (new static(range(1, $number)))->map($callback); } /** @@ -226,6 +229,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return in_array($key, $this->items, true); } + /** + * Cross join with the given lists, returning all possible permutations. + * + * @param mixed ...$lists + * @return static + */ + public function crossJoin(...$lists) + { + return new static(Arr::crossJoin( + $this->items, ...array_map([$this, 'getArrayableItems'], $lists) + )); + } + /** * Get the items in the collection that are not present in the given items. * @@ -237,6 +253,17 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_diff($this->items, $this->getArrayableItems($items))); } + /** + * Get the items in the collection whose keys and values are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diffAssoc($items) + { + return new static(array_diff_assoc($this->items, $this->getArrayableItems($items))); + } + /** * Get the items in the collection whose keys are not present in the given items. * @@ -265,6 +292,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return $this; } + /** + * Execute a callback over each nested chunk of items. + * + * @param callable $callback + * @return static + */ + public function eachSpread(callable $callback) + { + return $this->each(function ($chunk) use ($callback) { + return $callback(...$chunk); + }); + } + /** * Determine if all items in the collection pass the given test. * @@ -343,6 +383,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return $this; } + /** + * Apply the callback if the value is falsy. + * + * @param bool $value + * @param callable $callback + * @param callable $default + * @return mixed + */ + public function unless($value, callable $callback, callable $default = null) + { + return $this->when(! $value, $callback, $default); + } + /** * Filter items by the given key value pair. * @@ -624,6 +677,17 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_intersect($this->items, $this->getArrayableItems($items))); } + /** + * Intersect the collection with the given items by key. + * + * @param mixed $items + * @return static + */ + public function intersectKey($items) + { + return new static(array_intersect_key($this->items, $this->getArrayableItems($items))); + } + /** * Determine if the collection is empty or not. * @@ -704,6 +768,38 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_combine($keys, $items)); } + /** + * Run a map over each nested chunk of items. + * + * @param callable $callback + * @return static + */ + public function mapSpread(callable $callback) + { + return $this->map(function ($chunk) use ($callback) { + return $callback(...$chunk); + }); + } + + /** + * Run a grouping map over the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapToGroups(callable $callback) + { + $groups = $this->map($callback)->reduce(function ($groups, $pair) { + $groups[key($pair)][] = reset($pair); + + return $groups; + }, []); + + return (new static($groups))->map([$this, 'make']); + } + /** * Run an associative map over each of the items. * @@ -929,6 +1025,23 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return $this; } + /** + * Push all of the given items onto the collection. + * + * @param \Traversable $source + * @return self + */ + public function concat($source) + { + $result = new static($this); + + foreach ($source as $item) { + $result->push($item); + } + + return $result; + } + /** * Get and remove an item from the collection. * @@ -956,28 +1069,20 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } /** - * Get one or more items randomly from the collection. + * Get one or a specified number of items randomly from the collection. * - * @param int|null $amount + * @param int|null $number * @return mixed * * @throws \InvalidArgumentException */ - public function random($amount = 1) + public function random($number = null) { - if ($amount > ($count = $this->count())) { - throw new InvalidArgumentException("You requested {$amount} items, but there are only {$count} items in the collection."); + if (is_null($number)) { + return Arr::random($this->items); } - $keys = array_rand($this->items, $amount); - - if (count(func_get_args()) == 0) { - return $this->items[$keys]; - } - - $keys = array_wrap($keys); - - return new static(array_intersect_key($this->items, array_flip($keys))); + return new static(Arr::random($this->items, $number)); } /** diff --git a/api/vendor/illuminate/support/Facades/App.php b/api/vendor/illuminate/support/Facades/App.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Artisan.php b/api/vendor/illuminate/support/Facades/Artisan.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Auth.php b/api/vendor/illuminate/support/Facades/Auth.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Blade.php b/api/vendor/illuminate/support/Facades/Blade.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Cache.php b/api/vendor/illuminate/support/Facades/Cache.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Config.php b/api/vendor/illuminate/support/Facades/Config.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Cookie.php b/api/vendor/illuminate/support/Facades/Cookie.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Crypt.php b/api/vendor/illuminate/support/Facades/Crypt.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/DB.php b/api/vendor/illuminate/support/Facades/DB.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Event.php b/api/vendor/illuminate/support/Facades/Event.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Facade.php b/api/vendor/illuminate/support/Facades/Facade.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/File.php b/api/vendor/illuminate/support/Facades/File.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Hash.php b/api/vendor/illuminate/support/Facades/Hash.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Input.php b/api/vendor/illuminate/support/Facades/Input.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Lang.php b/api/vendor/illuminate/support/Facades/Lang.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Log.php b/api/vendor/illuminate/support/Facades/Log.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Mail.php b/api/vendor/illuminate/support/Facades/Mail.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Password.php b/api/vendor/illuminate/support/Facades/Password.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Queue.php b/api/vendor/illuminate/support/Facades/Queue.php old mode 100644 new mode 100755 index 9de3293..647312f --- a/api/vendor/illuminate/support/Facades/Queue.php +++ b/api/vendor/illuminate/support/Facades/Queue.php @@ -17,7 +17,7 @@ class Queue extends Facade */ public static function fake() { - static::swap(new QueueFake); + static::swap(new QueueFake(static::getFacadeApplication())); } /** diff --git a/api/vendor/illuminate/support/Facades/Redirect.php b/api/vendor/illuminate/support/Facades/Redirect.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Redis.php b/api/vendor/illuminate/support/Facades/Redis.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Request.php b/api/vendor/illuminate/support/Facades/Request.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Response.php b/api/vendor/illuminate/support/Facades/Response.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Route.php b/api/vendor/illuminate/support/Facades/Route.php old mode 100644 new mode 100755 index 590f634..3f2f08a --- a/api/vendor/illuminate/support/Facades/Route.php +++ b/api/vendor/illuminate/support/Facades/Route.php @@ -3,16 +3,19 @@ namespace Illuminate\Support\Facades; /** - * @method static \Illuminate\Routing\Route get(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route post(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route put(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route delete(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route patch(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route options(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route any(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route match(array|string $methods, string $uri, \Closure|array|string $action) + * @method static \Illuminate\Routing\Route get(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route post(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route put(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route delete(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route patch(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route options(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route any(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route match(array|string $methods, string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route prefix(string $prefix) * @method static void resource(string $name, string $controller, array $options = []) - * @method static void group(array $attributes, \Closure $callback) + * @method static void apiResource(string $name, string $controller, array $options = []) + * @method static void group(array $attributes, \Closure|string $callback) + * @method static \Illuminate\Routing\Route middleware(array|string|null $middleware) * @method static \Illuminate\Routing\Route substituteBindings(\Illuminate\Routing\Route $route) * @method static void substituteImplicitBindings(\Illuminate\Routing\Route $route) * diff --git a/api/vendor/illuminate/support/Facades/Schema.php b/api/vendor/illuminate/support/Facades/Schema.php old mode 100644 new mode 100755 index 3a92dc7..0cf1ee9 --- a/api/vendor/illuminate/support/Facades/Schema.php +++ b/api/vendor/illuminate/support/Facades/Schema.php @@ -3,6 +3,11 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Database\Schema\Builder create(string $table, \Closure $callback) + * @method static \Illuminate\Database\Schema\Builder drop(string $table) + * @method static \Illuminate\Database\Schema\Builder dropIfExists(string $table) + * @method static \Illuminate\Database\Schema\Builder table(string $table, \Closure $callback) + * * @see \Illuminate\Database\Schema\Builder */ class Schema extends Facade diff --git a/api/vendor/illuminate/support/Facades/Session.php b/api/vendor/illuminate/support/Facades/Session.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Storage.php b/api/vendor/illuminate/support/Facades/Storage.php index 485abaa..e5460ff 100644 --- a/api/vendor/illuminate/support/Facades/Storage.php +++ b/api/vendor/illuminate/support/Facades/Storage.php @@ -10,9 +10,10 @@ use Illuminate\Filesystem\Filesystem; class Storage extends Facade { /** - * Replace the given disk with a local, testing disk. + * Replace the given disk with a local testing disk. * * @param string $disk + * * @return void */ public static function fake($disk) @@ -24,6 +25,19 @@ class Storage extends Facade static::set($disk, self::createLocalDriver(['root' => $root])); } + /** + * Replace the given disk with a persistent local testing disk. + * + * @param string $disk + * @return void + */ + public static function persistentFake($disk) + { + static::set($disk, self::createLocalDriver([ + 'root' => storage_path('framework/testing/disks/'.$disk), + ])); + } + /** * Get the registered name of the component. * diff --git a/api/vendor/illuminate/support/Facades/URL.php b/api/vendor/illuminate/support/Facades/URL.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/Validator.php b/api/vendor/illuminate/support/Facades/Validator.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Facades/View.php b/api/vendor/illuminate/support/Facades/View.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Fluent.php b/api/vendor/illuminate/support/Fluent.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/HigherOrderCollectionProxy.php b/api/vendor/illuminate/support/HigherOrderCollectionProxy.php index f902431..7a781a0 100644 --- a/api/vendor/illuminate/support/HigherOrderCollectionProxy.php +++ b/api/vendor/illuminate/support/HigherOrderCollectionProxy.php @@ -2,6 +2,9 @@ namespace Illuminate\Support; +/** + * @mixin \Illuminate\Support\Collection + */ class HigherOrderCollectionProxy { /** diff --git a/api/vendor/illuminate/support/HigherOrderTapProxy.php b/api/vendor/illuminate/support/HigherOrderTapProxy.php new file mode 100644 index 0000000..bbf9b2e --- /dev/null +++ b/api/vendor/illuminate/support/HigherOrderTapProxy.php @@ -0,0 +1,38 @@ +target = $target; + } + + /** + * Dynamically pass method calls to the target. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + $this->target->{$method}(...$parameters); + + return $this->target; + } +} diff --git a/api/vendor/illuminate/support/Manager.php b/api/vendor/illuminate/support/Manager.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/MessageBag.php b/api/vendor/illuminate/support/MessageBag.php old mode 100644 new mode 100755 index 6a49c56..657b8ac --- a/api/vendor/illuminate/support/MessageBag.php +++ b/api/vendor/illuminate/support/MessageBag.php @@ -121,11 +121,13 @@ class MessageBag implements Arrayable, Countable, Jsonable, JsonSerializable, Me /** * Determine if messages exist for any of the given keys. * - * @param array $keys + * @param array|string $keys * @return bool */ public function hasAny($keys = []) { + $keys = is_array($keys) ? $keys : func_get_args(); + foreach ($keys as $key) { if ($this->has($key)) { return true; diff --git a/api/vendor/illuminate/support/NamespacedItemResolver.php b/api/vendor/illuminate/support/NamespacedItemResolver.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/support/Pluralizer.php b/api/vendor/illuminate/support/Pluralizer.php old mode 100644 new mode 100755 index fc580c9..4d845aa --- a/api/vendor/illuminate/support/Pluralizer.php +++ b/api/vendor/illuminate/support/Pluralizer.php @@ -34,6 +34,7 @@ class Pluralizer 'metadata', 'money', 'moose', + 'news', 'nutrition', 'offspring', 'plankton', diff --git a/api/vendor/illuminate/support/ServiceProvider.php b/api/vendor/illuminate/support/ServiceProvider.php old mode 100644 new mode 100755 index 67a3284..acb1a83 --- a/api/vendor/illuminate/support/ServiceProvider.php +++ b/api/vendor/illuminate/support/ServiceProvider.php @@ -9,7 +9,7 @@ abstract class ServiceProvider /** * The application instance. * - * @var \Illuminate\Foundation\Application + * @var \Illuminate\Contracts\Foundation\Application */ protected $app; @@ -37,7 +37,7 @@ abstract class ServiceProvider /** * Create a new service provider instance. * - * @param \Illuminate\Foundation\Application $app + * @param \Illuminate\Contracts\Foundation\Application $app * @return void */ public function __construct($app) @@ -203,7 +203,7 @@ abstract class ServiceProvider } /** - * Get the paths for the provdider and group. + * Get the paths for the provider and group. * * @param string $provider * @param string $group diff --git a/api/vendor/illuminate/support/Str.php b/api/vendor/illuminate/support/Str.php index 41a8d60..3b5b33c 100644 --- a/api/vendor/illuminate/support/Str.php +++ b/api/vendor/illuminate/support/Str.php @@ -29,6 +29,28 @@ class Str */ protected static $studlyCache = []; + /** + * Return the remainder of a string after a given value. + * + * @param string $subject + * @param string $search + * @return string + */ + public static function after($subject, $search) + { + if ($search == '') { + return $subject; + } + + $pos = strpos($subject, $search); + + if ($pos === false) { + return $subject; + } + + return substr($subject, $pos + strlen($search)); + } + /** * Transliterate a UTF-8 value to ASCII. * @@ -147,10 +169,15 @@ class Str * Return the length of the given string. * * @param string $value + * @param string $encoding * @return int */ - public static function length($value) + public static function length($value, $encoding = null) { + if ($encoding) { + return mb_strlen($value, $encoding); + } + return mb_strlen($value); } @@ -294,6 +321,10 @@ class Str */ public static function replaceFirst($search, $replace, $subject) { + if ($search == '') { + return $subject; + } + $position = strpos($subject, $search); if ($position !== false) { @@ -322,6 +353,20 @@ class Str return $subject; } + /** + * Begin a string with a single instance of a given value. + * + * @param string $value + * @param string $prefix + * @return string + */ + public static function start($value, $prefix) + { + $quoted = preg_quote($prefix, '/'); + + return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value); + } + /** * Convert the given string to upper-case. * diff --git a/api/vendor/illuminate/support/Testing/Fakes/BusFake.php b/api/vendor/illuminate/support/Testing/Fakes/BusFake.php index 305e894..a90fedb 100644 --- a/api/vendor/illuminate/support/Testing/Fakes/BusFake.php +++ b/api/vendor/illuminate/support/Testing/Fakes/BusFake.php @@ -3,7 +3,7 @@ namespace Illuminate\Support\Testing\Fakes; use Illuminate\Contracts\Bus\Dispatcher; -use PHPUnit_Framework_Assert as PHPUnit; +use PHPUnit\Framework\Assert as PHPUnit; class BusFake implements Dispatcher { diff --git a/api/vendor/illuminate/support/Testing/Fakes/EventFake.php b/api/vendor/illuminate/support/Testing/Fakes/EventFake.php index 700b251..e21f666 100644 --- a/api/vendor/illuminate/support/Testing/Fakes/EventFake.php +++ b/api/vendor/illuminate/support/Testing/Fakes/EventFake.php @@ -2,7 +2,7 @@ namespace Illuminate\Support\Testing\Fakes; -use PHPUnit_Framework_Assert as PHPUnit; +use PHPUnit\Framework\Assert as PHPUnit; use Illuminate\Contracts\Events\Dispatcher; class EventFake implements Dispatcher @@ -192,6 +192,6 @@ class EventFake implements Dispatcher */ public function until($event, $payload = []) { - // + return $this->dispatch($event, $payload, true); } } diff --git a/api/vendor/illuminate/support/Testing/Fakes/MailFake.php b/api/vendor/illuminate/support/Testing/Fakes/MailFake.php index b024781..338f219 100644 --- a/api/vendor/illuminate/support/Testing/Fakes/MailFake.php +++ b/api/vendor/illuminate/support/Testing/Fakes/MailFake.php @@ -4,7 +4,7 @@ namespace Illuminate\Support\Testing\Fakes; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Contracts\Mail\Mailable; -use PHPUnit_Framework_Assert as PHPUnit; +use PHPUnit\Framework\Assert as PHPUnit; class MailFake implements Mailer { diff --git a/api/vendor/illuminate/support/Testing/Fakes/NotificationFake.php b/api/vendor/illuminate/support/Testing/Fakes/NotificationFake.php index 97afe00..63050c5 100644 --- a/api/vendor/illuminate/support/Testing/Fakes/NotificationFake.php +++ b/api/vendor/illuminate/support/Testing/Fakes/NotificationFake.php @@ -4,7 +4,7 @@ namespace Illuminate\Support\Testing\Fakes; use Ramsey\Uuid\Uuid; use Illuminate\Support\Collection; -use PHPUnit_Framework_Assert as PHPUnit; +use PHPUnit\Framework\Assert as PHPUnit; use Illuminate\Contracts\Notifications\Factory as NotificationFactory; class NotificationFake implements NotificationFactory diff --git a/api/vendor/illuminate/support/Testing/Fakes/QueueFake.php b/api/vendor/illuminate/support/Testing/Fakes/QueueFake.php index 45e60f0..4da24c8 100644 --- a/api/vendor/illuminate/support/Testing/Fakes/QueueFake.php +++ b/api/vendor/illuminate/support/Testing/Fakes/QueueFake.php @@ -2,10 +2,11 @@ namespace Illuminate\Support\Testing\Fakes; +use Illuminate\Queue\QueueManager; use Illuminate\Contracts\Queue\Queue; -use PHPUnit_Framework_Assert as PHPUnit; +use PHPUnit\Framework\Assert as PHPUnit; -class QueueFake implements Queue +class QueueFake extends QueueManager implements Queue { /** * All of the jobs that have been pushed. @@ -128,7 +129,7 @@ class QueueFake implements Queue */ public function push($job, $data = '', $queue = null) { - $this->jobs[get_class($job)][] = [ + $this->jobs[is_object($job) ? get_class($job) : $job][] = [ 'job' => $job, 'queue' => $queue, ]; diff --git a/api/vendor/illuminate/support/ViewErrorBag.php b/api/vendor/illuminate/support/ViewErrorBag.php index d5e9c7e..89e6a05 100644 --- a/api/vendor/illuminate/support/ViewErrorBag.php +++ b/api/vendor/illuminate/support/ViewErrorBag.php @@ -5,6 +5,9 @@ namespace Illuminate\Support; use Countable; use Illuminate\Contracts\Support\MessageBag as MessageBagContract; +/** + * @mixin \Illuminate\Contracts\Support\MessageBag + */ class ViewErrorBag implements Countable { /** diff --git a/api/vendor/illuminate/support/composer.json b/api/vendor/illuminate/support/composer.json index 56d92d4..0aac0b4 100644 --- a/api/vendor/illuminate/support/composer.json +++ b/api/vendor/illuminate/support/composer.json @@ -16,7 +16,7 @@ "require": { "php": ">=5.6.4", "ext-mbstring": "*", - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "illuminate/contracts": "5.4.*", "paragonie/random_compat": "~1.4|~2.0" }, diff --git a/api/vendor/illuminate/support/helpers.php b/api/vendor/illuminate/support/helpers.php old mode 100644 new mode 100755 index f70f8f0..2656fe2 --- a/api/vendor/illuminate/support/helpers.php +++ b/api/vendor/illuminate/support/helpers.php @@ -5,6 +5,7 @@ use Illuminate\Support\Str; use Illuminate\Support\Collection; use Illuminate\Support\Debug\Dumper; use Illuminate\Contracts\Support\Htmlable; +use Illuminate\Support\HigherOrderTapProxy; if (! function_exists('append_config')) { /** @@ -244,6 +245,20 @@ if (! function_exists('array_pull')) { } } +if (! function_exists('array_random')) { + /** + * Get a random value from an array. + * + * @param array $array + * @param int|null $num + * @return mixed + */ + function array_random($array, $num = null) + { + return Arr::random($array, $num); + } +} + if (! function_exists('array_set')) { /** * Set an array item to a given value using "dot" notation. @@ -263,13 +278,13 @@ if (! function_exists('array_set')) { if (! function_exists('array_sort')) { /** - * Sort the array using the given callback. + * Sort the array by the given callback or attribute name. * * @param array $array - * @param callable $callback + * @param callable|string $callback * @return array */ - function array_sort($array, callable $callback) + function array_sort($array, $callback) { return Arr::sort($array, $callback); } @@ -547,6 +562,45 @@ if (! function_exists('ends_with')) { } } +if (! function_exists('env')) { + /** + * Gets the value of an environment variable. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + function env($key, $default = null) + { + $value = getenv($key); + + if ($value === false) { + return value($default); + } + + switch (strtolower($value)) { + case 'true': + case '(true)': + return true; + case 'false': + case '(false)': + return false; + case 'empty': + case '(empty)': + return ''; + case 'null': + case '(null)': + return; + } + + if (strlen($value) > 1 && Str::startsWith($value, '"') && Str::endsWith($value, '"')) { + return substr($value, 1, -1); + } + + return $value; + } +} + if (! function_exists('head')) { /** * Get the first element of an array. Useful for method chaining. @@ -694,6 +748,20 @@ if (! function_exists('starts_with')) { } } +if (! function_exists('str_after')) { + /** + * Return the remainder of a string after a given value. + * + * @param string $subject + * @param string $search + * @return string + */ + function str_after($subject, $search) + { + return Str::after($subject, $search); + } +} + if (! function_exists('str_contains')) { /** * Determine if a given string contains a given substring. @@ -852,6 +920,20 @@ if (! function_exists('str_slug')) { } } +if (! function_exists('str_start')) { + /** + * Begin a string with a single instance of a given value. + * + * @param string $value + * @param string $prefix + * @return string + */ + function str_start($value, $prefix) + { + return Str::start($value, $prefix); + } +} + if (! function_exists('studly_case')) { /** * Convert a value to studly caps case. @@ -870,11 +952,15 @@ if (! function_exists('tap')) { * Call the given Closure with the given value then return the value. * * @param mixed $value - * @param callable $callback + * @param callable|null $callback * @return mixed */ - function tap($value, $callback) + function tap($value, $callback = null) { + if (is_null($callback)) { + return new HigherOrderTapProxy($value); + } + $callback($value); return $value; diff --git a/api/vendor/illuminate/translation/FileLoader.php b/api/vendor/illuminate/translation/FileLoader.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/translation/LoaderInterface.php b/api/vendor/illuminate/translation/LoaderInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/translation/MessageSelector.php b/api/vendor/illuminate/translation/MessageSelector.php old mode 100644 new mode 100755 index 0456688..3ac3386 --- a/api/vendor/illuminate/translation/MessageSelector.php +++ b/api/vendor/illuminate/translation/MessageSelector.php @@ -111,116 +111,299 @@ class MessageSelector { switch ($locale) { case 'az': + case 'az_AZ': case 'bo': + case 'bo_CN': + case 'bo_IN': case 'dz': + case 'dz_BT': case 'id': + case 'id_ID': case 'ja': + case 'ja_JP': case 'jv': case 'ka': + case 'ka_GE': case 'km': + case 'km_KH': case 'kn': + case 'kn_IN': case 'ko': + case 'ko_KR': case 'ms': + case 'ms_MY': case 'th': + case 'th_TH': case 'tr': + case 'tr_CY': + case 'tr_TR': case 'vi': + case 'vi_VN': case 'zh': + case 'zh_CN': + case 'zh_HK': + case 'zh_SG': + case 'zh_TW': return 0; - break; case 'af': + case 'af_ZA': case 'bn': + case 'bn_BD': + case 'bn_IN': case 'bg': + case 'bg_BG': case 'ca': + case 'ca_AD': + case 'ca_ES': + case 'ca_FR': + case 'ca_IT': case 'da': + case 'da_DK': case 'de': + case 'de_AT': + case 'de_BE': + case 'de_CH': + case 'de_DE': + case 'de_LI': + case 'de_LU': case 'el': + case 'el_CY': + case 'el_GR': case 'en': + case 'en_AG': + case 'en_AU': + case 'en_BW': + case 'en_CA': + case 'en_DK': + case 'en_GB': + case 'en_HK': + case 'en_IE': + case 'en_IN': + case 'en_NG': + case 'en_NZ': + case 'en_PH': + case 'en_SG': + case 'en_US': + case 'en_ZA': + case 'en_ZM': + case 'en_ZW': case 'eo': + case 'eo_US': case 'es': + case 'es_AR': + case 'es_BO': + case 'es_CL': + case 'es_CO': + case 'es_CR': + case 'es_CU': + case 'es_DO': + case 'es_EC': + case 'es_ES': + case 'es_GT': + case 'es_HN': + case 'es_MX': + case 'es_NI': + case 'es_PA': + case 'es_PE': + case 'es_PR': + case 'es_PY': + case 'es_SV': + case 'es_US': + case 'es_UY': + case 'es_VE': case 'et': + case 'et_EE': case 'eu': + case 'eu_ES': + case 'eu_FR': case 'fa': + case 'fa_IR': case 'fi': + case 'fi_FI': case 'fo': + case 'fo_FO': case 'fur': + case 'fur_IT': case 'fy': + case 'fy_DE': + case 'fy_NL': case 'gl': + case 'gl_ES': case 'gu': + case 'gu_IN': case 'ha': + case 'ha_NG': case 'he': + case 'he_IL': case 'hu': + case 'hu_HU': case 'is': + case 'is_IS': case 'it': + case 'it_CH': + case 'it_IT': case 'ku': + case 'ku_TR': case 'lb': + case 'lb_LU': case 'ml': + case 'ml_IN': case 'mn': + case 'mn_MN': case 'mr': + case 'mr_IN': case 'nah': case 'nb': + case 'nb_NO': case 'ne': + case 'ne_NP': case 'nl': + case 'nl_AW': + case 'nl_BE': + case 'nl_NL': case 'nn': + case 'nn_NO': case 'no': case 'om': + case 'om_ET': + case 'om_KE': case 'or': + case 'or_IN': case 'pa': + case 'pa_IN': + case 'pa_PK': case 'pap': + case 'pap_AN': + case 'pap_AW': + case 'pap_CW': case 'ps': + case 'ps_AF': case 'pt': + case 'pt_BR': + case 'pt_PT': case 'so': + case 'so_DJ': + case 'so_ET': + case 'so_KE': + case 'so_SO': case 'sq': + case 'sq_AL': + case 'sq_MK': case 'sv': + case 'sv_FI': + case 'sv_SE': case 'sw': + case 'sw_KE': + case 'sw_TZ': case 'ta': + case 'ta_IN': + case 'ta_LK': case 'te': + case 'te_IN': case 'tk': + case 'tk_TM': case 'ur': + case 'ur_IN': + case 'ur_PK': case 'zu': + case 'zu_ZA': return ($number == 1) ? 0 : 1; case 'am': + case 'am_ET': case 'bh': case 'fil': + case 'fil_PH': case 'fr': + case 'fr_BE': + case 'fr_CA': + case 'fr_CH': + case 'fr_FR': + case 'fr_LU': case 'gun': case 'hi': + case 'hi_IN': case 'hy': + case 'hy_AM': case 'ln': + case 'ln_CD': case 'mg': + case 'mg_MG': case 'nso': - case 'xbr': + case 'nso_ZA': case 'ti': + case 'ti_ER': + case 'ti_ET': case 'wa': + case 'wa_BE': + case 'xbr': return (($number == 0) || ($number == 1)) ? 0 : 1; case 'be': + case 'be_BY': case 'bs': + case 'bs_BA': case 'hr': + case 'hr_HR': case 'ru': + case 'ru_RU': + case 'ru_UA': case 'sr': + case 'sr_ME': + case 'sr_RS': case 'uk': + case 'uk_UA': return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); case 'cs': + case 'cs_CZ': case 'sk': + case 'sk_SK': return ($number == 1) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); case 'ga': + case 'ga_IE': return ($number == 1) ? 0 : (($number == 2) ? 1 : 2); case 'lt': + case 'lt_LT': return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); case 'sl': + case 'sl_SI': return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3)); case 'mk': + case 'mk_MK': return ($number % 10 == 1) ? 0 : 1; case 'mt': + case 'mt_MT': return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); case 'lv': + case 'lv_LV': return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2); case 'pl': + case 'pl_PL': return ($number == 1) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); case 'cy': + case 'cy_GB': return ($number == 1) ? 0 : (($number == 2) ? 1 : ((($number == 8) || ($number == 11)) ? 2 : 3)); case 'ro': + case 'ro_RO': return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); case 'ar': + case 'ar_AE': + case 'ar_BH': + case 'ar_DZ': + case 'ar_EG': + case 'ar_IN': + case 'ar_IQ': + case 'ar_JO': + case 'ar_KW': + case 'ar_LB': + case 'ar_LY': + case 'ar_MA': + case 'ar_OM': + case 'ar_QA': + case 'ar_SA': + case 'ar_SD': + case 'ar_SS': + case 'ar_SY': + case 'ar_TN': + case 'ar_YE': return ($number == 0) ? 0 : (($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); default: return 0; diff --git a/api/vendor/illuminate/translation/TranslationServiceProvider.php b/api/vendor/illuminate/translation/TranslationServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/translation/Translator.php b/api/vendor/illuminate/translation/Translator.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/translation/composer.json b/api/vendor/illuminate/translation/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/validation/Concerns/FormatsMessages.php b/api/vendor/illuminate/validation/Concerns/FormatsMessages.php index ea5b608..3784511 100644 --- a/api/vendor/illuminate/validation/Concerns/FormatsMessages.php +++ b/api/vendor/illuminate/validation/Concerns/FormatsMessages.php @@ -11,20 +11,6 @@ trait FormatsMessages { use ReplacesAttributes; - /** - * The size related validation rules. - * - * @var array - */ - protected $sizeRules = ['Size', 'Between', 'Min', 'Max']; - - /** - * The numeric related validation rules. - * - * @var array - */ - protected $numericRules = ['Numeric', 'Integer']; - /** * Get the validation message for an attribute and rule. * @@ -82,7 +68,7 @@ trait FormatsMessages * * @param string $attribute * @param string $lowerRule - * @param array $source + * @param array|null $source * @return string|null */ protected function getFromLocalArray($attribute, $lowerRule, $source = null) @@ -205,7 +191,7 @@ trait FormatsMessages ); if (isset($this->replacers[Str::snake($rule)])) { - return $this->callReplacer($message, $attribute, Str::snake($rule), $parameters); + return $this->callReplacer($message, $attribute, Str::snake($rule), $parameters, $this); } elseif (method_exists($this, $replacer = "replace{$rule}")) { return $this->$replacer($message, $attribute, $rule, $parameters); } @@ -219,7 +205,7 @@ trait FormatsMessages * @param string $attribute * @return string */ - protected function getDisplayableAttribute($attribute) + public function getDisplayableAttribute($attribute) { $primaryAttribute = $this->getPrimaryAttribute($attribute); @@ -328,16 +314,17 @@ trait FormatsMessages * @param string $attribute * @param string $rule * @param array $parameters + * @param \Illuminate\Validation\Validator $validator * @return string|null */ - protected function callReplacer($message, $attribute, $rule, $parameters) + protected function callReplacer($message, $attribute, $rule, $parameters, $validator) { $callback = $this->replacers[$rule]; if ($callback instanceof Closure) { return call_user_func_array($callback, func_get_args()); } elseif (is_string($callback)) { - return $this->callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters); + return $this->callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters, $validator); } } @@ -349,9 +336,10 @@ trait FormatsMessages * @param string $attribute * @param string $rule * @param array $parameters + * @param \Illuminate\Validation\Validator $validator * @return string */ - protected function callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters) + protected function callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters, $validator) { list($class, $method) = Str::parseCallback($callback, 'replace'); diff --git a/api/vendor/illuminate/validation/Concerns/ValidatesAttributes.php b/api/vendor/illuminate/validation/Concerns/ValidatesAttributes.php index 4de6c38..ff0429a 100644 --- a/api/vendor/illuminate/validation/Concerns/ValidatesAttributes.php +++ b/api/vendor/illuminate/validation/Concerns/ValidatesAttributes.php @@ -358,7 +358,9 @@ trait ValidatesAttributes return false; } - $date = DateTime::createFromFormat($parameters[0], $value); + $format = $parameters[0] == 'Y-m' ? '!Y-m' : $parameters[0]; + + $date = DateTime::createFromFormat($format, $value); return $date && $date->format($parameters[0]) == $value; } @@ -375,9 +377,15 @@ trait ValidatesAttributes { $this->requireParameterCount(1, $parameters, 'different'); - $other = Arr::get($this->data, $parameters[0]); + foreach ($parameters as $parameter) { + $other = Arr::get($this->data, $parameter); - return isset($other) && $value !== $other; + if (is_null($other) || $value === $other) { + return false; + } + } + + return true; } /** @@ -478,7 +486,9 @@ trait ValidatesAttributes [1, 1], array_filter(sscanf($parameters['ratio'], '%f/%d')) ); - return abs($numerator / $denominator - $width / $height) > 0.000001; + $precision = 1 / max($width, $height); + + return abs($numerator / $denominator - $width / $height) > $precision; } /** @@ -909,6 +919,10 @@ trait ValidatesAttributes return false; } + if ($this->shouldBlockPhpUpload($value, $parameters)) { + return false; + } + return $value->getPath() != '' && in_array($value->guessExtension(), $parameters); } @@ -926,11 +940,33 @@ trait ValidatesAttributes return false; } + if ($this->shouldBlockPhpUpload($value, $parameters)) { + return false; + } + return $value->getPath() != '' && (in_array($value->getMimeType(), $parameters) || in_array(explode('/', $value->getMimeType())[0].'/*', $parameters)); } + /** + * Check if PHP uploads are explicitly allowed. + * + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function shouldBlockPhpUpload($value, $parameters) + { + if (in_array('php', $parameters)) { + return false; + } + + return ($value instanceof UploadedFile) + ? strtolower($value->getClientOriginalExtension()) === 'php' + : strtolower($value->getExtension()) === 'php'; + } + /** * Validate the size of an attribute is greater than a minimum value. * diff --git a/api/vendor/illuminate/validation/DatabasePresenceVerifier.php b/api/vendor/illuminate/validation/DatabasePresenceVerifier.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/validation/Factory.php b/api/vendor/illuminate/validation/Factory.php old mode 100644 new mode 100755 index d11fa99..c31ee4a --- a/api/vendor/illuminate/validation/Factory.php +++ b/api/vendor/illuminate/validation/Factory.php @@ -211,7 +211,7 @@ class Factory implements FactoryContract } /** - * Register a custom implicit validator extension. + * Register a custom dependent validator extension. * * @param string $rule * @param \Closure|string $extension @@ -228,7 +228,7 @@ class Factory implements FactoryContract } /** - * Register a custom implicit validator message replacer. + * Register a custom validator message replacer. * * @param string $rule * @param \Closure|string $replacer diff --git a/api/vendor/illuminate/validation/PresenceVerifierInterface.php b/api/vendor/illuminate/validation/PresenceVerifierInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/validation/Rule.php b/api/vendor/illuminate/validation/Rule.php index da469ea..0bd7738 100644 --- a/api/vendor/illuminate/validation/Rule.php +++ b/api/vendor/illuminate/validation/Rule.php @@ -34,23 +34,23 @@ class Rule /** * Get an in constraint builder instance. * - * @param array $values + * @param array|string $values * @return \Illuminate\Validation\Rules\In */ - public static function in(array $values) + public static function in($values) { - return new Rules\In($values); + return new Rules\In(is_array($values) ? $values : func_get_args()); } /** * Get a not_in constraint builder instance. * - * @param array $values + * @param array|string $values * @return \Illuminate\Validation\Rules\NotIn */ - public static function notIn(array $values) + public static function notIn($values) { - return new Rules\NotIn($values); + return new Rules\NotIn(is_array($values) ? $values : func_get_args()); } /** diff --git a/api/vendor/illuminate/validation/ValidationServiceProvider.php b/api/vendor/illuminate/validation/ValidationServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/validation/Validator.php b/api/vendor/illuminate/validation/Validator.php old mode 100644 new mode 100755 index 9a95c5d..dfcedc7 --- a/api/vendor/illuminate/validation/Validator.php +++ b/api/vendor/illuminate/validation/Validator.php @@ -169,6 +169,20 @@ class Validator implements ValidatorContract 'Before', 'After', 'BeforeOrEqual', 'AfterOrEqual', ]; + /** + * The size related validation rules. + * + * @var array + */ + protected $sizeRules = ['Size', 'Between', 'Min', 'Max']; + + /** + * The numeric related validation rules. + * + * @var array + */ + protected $numericRules = ['Numeric', 'Integer']; + /** * Create a new Validator instance. * diff --git a/api/vendor/illuminate/validation/composer.json b/api/vendor/illuminate/validation/composer.json old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/Compilers/Compiler.php b/api/vendor/illuminate/view/Compilers/Compiler.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/Compilers/CompilerInterface.php b/api/vendor/illuminate/view/Compilers/CompilerInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php b/api/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php index 22977a0..31b8fe7 100644 --- a/api/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php +++ b/api/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php @@ -15,6 +15,52 @@ trait CompilesConditionals return "yieldContent{$expression}))): ?>"; } + /** + * Compile the if-auth statements into valid PHP. + * + * @param string|null $guard + * @return string + */ + protected function compileAuth($guard = null) + { + $guard = is_null($guard) ? '()' : $guard; + + return "guard{$guard}->check()): ?>"; + } + + /** + * Compile the end-auth statements into valid PHP. + * + * @return string + */ + protected function compileEndAuth() + { + return ''; + } + + /** + * Compile the if-guest statements into valid PHP. + * + * @param string|null $guard + * @return string + */ + protected function compileGuest($guard = null) + { + $guard = is_null($guard) ? '()' : $guard; + + return "guard{$guard}->guest()): ?>"; + } + + /** + * Compile the end-guest statements into valid PHP. + * + * @return string + */ + protected function compileEndGuest() + { + return ''; + } + /** * Compile the if statements into valid PHP. * diff --git a/api/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php b/api/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php index a7b4887..018f90b 100644 --- a/api/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php +++ b/api/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php @@ -100,6 +100,6 @@ trait CompilesEchos */ public function compileEchoDefaults($value) { - return preg_replace('/^(?=\$)(.+?)(?:\s+or\s+)(.+?)$/s', 'isset($1) ? $1 : $2', $value); + return preg_replace('/^(?=\$)(.+?)(?:\s+or\s+)(.+?)$/si', 'isset($1) ? $1 : $2', $value); } } diff --git a/api/vendor/illuminate/view/Concerns/ManagesLayouts.php b/api/vendor/illuminate/view/Concerns/ManagesLayouts.php index cd494f8..b3b4aef 100644 --- a/api/vendor/illuminate/view/Concerns/ManagesLayouts.php +++ b/api/vendor/illuminate/view/Concerns/ManagesLayouts.php @@ -3,6 +3,7 @@ namespace Illuminate\View\Concerns; use InvalidArgumentException; +use Illuminate\Contracts\View\View; trait ManagesLayouts { @@ -41,7 +42,7 @@ trait ManagesLayouts $this->sectionStack[] = $section; } } else { - $this->extendSection($section, e($content)); + $this->extendSection($section, $content instanceof View ? $content : e($content)); } } @@ -143,7 +144,7 @@ trait ManagesLayouts */ public function yieldContent($section, $default = '') { - $sectionContent = $default; + $sectionContent = $default instanceof View ? $default : e($default); if (isset($this->sections[$section])) { $sectionContent = $this->sections[$section]; @@ -182,6 +183,18 @@ trait ManagesLayouts return array_key_exists($name, $this->sections); } + /** + * Get the contents of a section. + * + * @param string $name + * @param string $default + * @return mixed + */ + public function getSection($name, $default = null) + { + return isset($this->getSections()[$name]) ? $this->getSections()[$name] : $default; + } + /** * Get the entire array of sections. * diff --git a/api/vendor/illuminate/view/Engines/CompilerEngine.php b/api/vendor/illuminate/view/Engines/CompilerEngine.php old mode 100644 new mode 100755 index c71cdab..2f7f84b --- a/api/vendor/illuminate/view/Engines/CompilerEngine.php +++ b/api/vendor/illuminate/view/Engines/CompilerEngine.php @@ -70,7 +70,7 @@ class CompilerEngine extends PhpEngine * @param int $obLevel * @return void * - * @throws $e + * @throws \Exception */ protected function handleViewException(Exception $e, $obLevel) { diff --git a/api/vendor/illuminate/view/Engines/Engine.php b/api/vendor/illuminate/view/Engines/Engine.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/Engines/EngineInterface.php b/api/vendor/illuminate/view/Engines/EngineInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/Engines/EngineResolver.php b/api/vendor/illuminate/view/Engines/EngineResolver.php old mode 100644 new mode 100755 index 3a9f2e1..3c5276b --- a/api/vendor/illuminate/view/Engines/EngineResolver.php +++ b/api/vendor/illuminate/view/Engines/EngineResolver.php @@ -38,7 +38,7 @@ class EngineResolver } /** - * Resolver an engine instance by name. + * Resolve an engine instance by name. * * @param string $engine * @return \Illuminate\View\Engines\EngineInterface diff --git a/api/vendor/illuminate/view/Engines/PhpEngine.php b/api/vendor/illuminate/view/Engines/PhpEngine.php old mode 100644 new mode 100755 index afe4e56..1b2a383 --- a/api/vendor/illuminate/view/Engines/PhpEngine.php +++ b/api/vendor/illuminate/view/Engines/PhpEngine.php @@ -56,7 +56,7 @@ class PhpEngine implements EngineInterface * @param int $obLevel * @return void * - * @throws $e + * @throws \Exception */ protected function handleViewException(Exception $e, $obLevel) { diff --git a/api/vendor/illuminate/view/Factory.php b/api/vendor/illuminate/view/Factory.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/FileViewFinder.php b/api/vendor/illuminate/view/FileViewFinder.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/View.php b/api/vendor/illuminate/view/View.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/ViewFinderInterface.php b/api/vendor/illuminate/view/ViewFinderInterface.php old mode 100644 new mode 100755 diff --git a/api/vendor/illuminate/view/ViewServiceProvider.php b/api/vendor/illuminate/view/ViewServiceProvider.php old mode 100644 new mode 100755 diff --git a/api/vendor/kylekatarnls/update-helper/LICENSE b/api/vendor/kylekatarnls/update-helper/LICENSE new file mode 100644 index 0000000..d55dee5 --- /dev/null +++ b/api/vendor/kylekatarnls/update-helper/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2017 https://github.com/pug-php +Copyright (c) 2017 https://github.com/kylekatarnls + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/api/vendor/kylekatarnls/update-helper/composer.json b/api/vendor/kylekatarnls/update-helper/composer.json new file mode 100644 index 0000000..ced8527 --- /dev/null +++ b/api/vendor/kylekatarnls/update-helper/composer.json @@ -0,0 +1,50 @@ +{ + "name": "kylekatarnls/update-helper", + "description": "Update helper", + "type": "composer-plugin", + "license": "MIT", + "minimum-stability": "dev", + "prefer-stable": true, + "authors": [ + { + "name": "Kyle", + "email": "kylekatarnls@gmail.com" + } + ], + "require": { + "php": ">=5.3.0", + "composer-plugin-api": "^1.1.0 || ^2.0.0" + }, + "require-dev": { + "composer/composer": "2.0.x-dev || ^2.0.0-dev", + "phpunit/phpunit": ">=4.8.35 <6.0", + "codeclimate/php-test-reporter": "dev-master" + }, + "autoload": { + "psr-0": { + "UpdateHelper\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "UpdateHelper\\Tests\\": "tests/UpdateHelper/" + } + }, + "scripts": { + "post-install-cmd": [ + "UpdateHelper\\UpdateHelper::check" + ], + "post-update-cmd": [ + "UpdateHelper\\UpdateHelper::check" + ], + "post-package-install": [ + "UpdateHelper\\UpdateHelper::check" + ], + "post-package-update": [ + "UpdateHelper\\UpdateHelper::check" + ] + }, + "extra": { + "class": "UpdateHelper\\ComposerPlugin" + } +} diff --git a/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php b/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php new file mode 100644 index 0000000..26d394b --- /dev/null +++ b/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php @@ -0,0 +1,47 @@ +io = $io; + } + + public function deactivate(Composer $composer, IOInterface $io) + { + // Not needed + } + + public function uninstall(Composer $composer, IOInterface $io) + { + // Not needed + } + + public static function getSubscribedEvents() + { + return array( + 'post-autoload-dump' => array( + array('onAutoloadDump', 0), + ), + ); + } + + public function onAutoloadDump(Event $event) + { + if (!class_exists('UpdateHelper\\UpdateHelper')) { + return; + } + + UpdateHelper::check($event); + } +} diff --git a/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/NotUpdateInterfaceInstanceException.php b/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/NotUpdateInterfaceInstanceException.php new file mode 100644 index 0000000..8213b5e --- /dev/null +++ b/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/NotUpdateInterfaceInstanceException.php @@ -0,0 +1,9 @@ +read(); + } catch (Exception $e) { + $dependencyConfig = null; + } + + if (is_array($dependencyConfig) && isset($dependencyConfig['extra'], $dependencyConfig['extra'][$key])) { + $classes[$file] = $dependencyConfig['extra'][$key]; + } + } + + protected static function getUpdateHelperConfig(Composer $composer, $key = null) + { + $vendorDir = $composer->getConfig()->get('vendor-dir'); + + $npm = array(); + + foreach (scandir($vendorDir) as $namespace) { + if ($namespace === '.' || $namespace === '..' || !is_dir($directory = $vendorDir.DIRECTORY_SEPARATOR.$namespace)) { + continue; + } + + foreach (scandir($directory) as $dependency) { + if ($dependency === '.' || $dependency === '..' || !is_dir($subDirectory = $directory.DIRECTORY_SEPARATOR.$dependency)) { + continue; + } + + static::appendConfig($npm, $subDirectory, $key); + } + } + + static::appendConfig($npm, dirname($vendorDir), $key); + + return $npm; + } + + /** + * @param Event $event + * @param IOInterface $io + * @param Composer $composer + * @param string[] $subClasses + */ + protected static function checkHelper($event, IOInterface $io, $composer, $class) + { + if (!is_string($class) || !class_exists($class)) { + throw new NotUpdateInterfaceInstanceException(); + } + + try { + $helper = new $class(); + } catch (Exception $e) { + throw new InvalidArgumentException($e->getMessage(), 1000, $e); + } catch (Throwable $e) { + throw new InvalidArgumentException($e->getMessage(), 1000, $e); + } + + if (!($helper instanceof UpdateHelperInterface)) { + throw new NotUpdateInterfaceInstanceException(); + } + + $helper->check(new static($event, $io, $composer)); + } + + /** + * @param string $file + * @param Event $event + * @param IOInterface $io + * @param Composer $composer + * @param string[] $subClasses + */ + protected static function checkFileHelpers($file, $event, IOInterface $io, $composer, array $subClasses) + { + foreach ($subClasses as $class) { + try { + static::checkHelper($event, $io, $composer, $class); + } catch (InvalidArgumentException $exception) { + $io->writeError(static::getErrorMessage($exception, $file, $class)); + continue; + } + } + } + + protected static function getErrorMessage(InvalidArgumentException $exception, $file, $class) + { + if ($exception instanceof NotUpdateInterfaceInstanceException) { + return 'UpdateHelper error in '.$file.":\n".JsonFile::encode($class).' is not an instance of UpdateHelperInterface.'; + } + + return 'UpdateHelper error: '.$exception->getPrevious()->getMessage(). + "\nFile: ".$exception->getPrevious()->getFile(). + "\nLine:".$exception->getPrevious()->getLine(). + "\n\n".$exception->getPrevious()->getTraceAsString(); + } + + public static function check(Event $event) + { + if (!($event instanceof ScriptEvent) && !($event instanceof PackageEvent)) { + return; + } + + $io = $event->getIO(); + $composer = $event->getComposer(); + $autoload = $composer->getConfig()->get('vendor-dir').'/autoload.php'; + + if (file_exists($autoload)) { + include_once $autoload; + } + + $classes = static::getUpdateHelperConfig($composer); + + foreach ($classes as $file => $subClasses) { + static::checkFileHelpers($file, $event, $io, $composer, (array) $subClasses); + } + } + + public function __construct(Event $event, IOInterface $io = null, Composer $composer = null) + { + $this->event = $event; + $this->io = $io ?: (method_exists($event, 'getIO') ? $event->getIO() : null); + $this->composer = $composer ?: (method_exists($event, 'getComposer') ? $event->getComposer() : null); + + if ($this->composer && + ($directory = $this->composer->getConfig()->get('archive-dir')) && + file_exists($file = $directory.'/composer.json') + ) { + $this->composerFilePath = $file; + $this->file = new JsonFile($this->composerFilePath); + $this->dependencies = $this->file->read(); + } + } + + /** + * @return JsonFile + */ + public function getFile() + { + return $this->file; + } + + /** + * @return string + */ + public function getComposerFilePath() + { + return $this->composerFilePath; + } + + /** + * @return Composer + */ + public function getComposer() + { + return $this->composer; + } + + /** + * @return Event + */ + public function getEvent() + { + return $this->event; + } + + /** + * @return IOInterface|null + */ + public function getIo() + { + return $this->io; + } + + /** + * @return array + */ + public function getDependencies() + { + return $this->dependencies; + } + + /** + * @return array + */ + public function getDevDependencies() + { + return isset($this->dependencies['require-dev']) ? $this->dependencies['require-dev'] : array(); + } + + /** + * @return array + */ + public function getProdDependencies() + { + return isset($this->dependencies['require']) ? $this->dependencies['require'] : array(); + } + + /** + * @return array + */ + public function getFlattenDependencies() + { + return array_merge($this->getDevDependencies(), $this->getProdDependencies()); + } + + /** + * @param string $dependency + * + * @return bool + */ + public function hasAsDevDependency($dependency) + { + return isset($this->dependencies['require-dev'][$dependency]); + } + + /** + * @param string $dependency + * + * @return bool + */ + public function hasAsProdDependency($dependency) + { + return isset($this->dependencies['require'][$dependency]); + } + + /** + * @param string $dependency + * + * @return bool + */ + public function hasAsDependency($dependency) + { + return $this->hasAsDevDependency($dependency) || $this->hasAsProdDependency($dependency); + } + + /** + * @param string $dependency + * @param string $version + * + * @return bool + */ + public function isDependencyAtLeast($dependency, $version) + { + if ($this->hasAsProdDependency($dependency)) { + return Semver::satisfies($version, $this->dependencies['require'][$dependency]); + } + + if ($this->hasAsDevDependency($dependency)) { + return Semver::satisfies($version, $this->dependencies['require-dev'][$dependency]); + } + + return false; + } + + /** + * @param string $dependency + * @param string $version + * + * @return bool + */ + public function isDependencyLesserThan($dependency, $version) + { + return !$this->isDependencyAtLeast($dependency, $version); + } + + /** + * @param string $dependency + * @param string $version + * @param array $environments + * + * @throws Exception + * + * @return $this + */ + public function setDependencyVersion($dependency, $version, $environments = array('require', 'require-dev')) + { + return $this->setDependencyVersions(array($dependency => $version), $environments); + } + + /** + * @param array $dependencies + * @param array $environments + * + * @throws Exception + * + * @return $this + */ + public function setDependencyVersions($dependencies, $environments = array('require', 'require-dev')) + { + if (!$this->composerFilePath) { + throw new RuntimeException('No composer instance detected.'); + } + + $touched = false; + + foreach ($environments as $environment) { + foreach ($dependencies as $dependency => $version) { + if (isset($this->dependencies[$environment], $this->dependencies[$environment][$dependency])) { + $this->dependencies[$environment][$dependency] = $version; + $touched = true; + } + } + } + + if ($touched) { + if (!$this->composerFilePath) { + throw new RuntimeException('composer.json not found (custom vendor-dir are not yet supported).'); + } + + $file = new JsonFile($this->composerFilePath); + $file->write($this->dependencies); + } + + return $this; + } + + /** + * @return $this + */ + public function update() + { + $output = shell_exec('composer update --no-scripts'); + + if (!empty($output)) { + $this->write($output); + } + + return $this; + } + + /** + * @param string|array $text + */ + public function write($text) + { + if ($this->io) { + $this->io->write($text); + + return; + } + + if (is_array($text)) { + $text = implode("\n", $text); + } + + echo $text; + } + + /** + * @return bool + */ + public function isInteractive() + { + return $this->io && $this->io->isInteractive(); + } +} diff --git a/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php b/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php new file mode 100644 index 0000000..3809dc0 --- /dev/null +++ b/api/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php @@ -0,0 +1,8 @@ + +Copyright (c) Taylor Otwell 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/api/vendor/laravel/lumen-framework/readme.md b/api/vendor/laravel/lumen-framework/README.md similarity index 100% rename from api/vendor/laravel/lumen-framework/readme.md rename to api/vendor/laravel/lumen-framework/README.md diff --git a/api/vendor/laravel/lumen-framework/composer.json b/api/vendor/laravel/lumen-framework/composer.json index 6f51dd9..eb1b93f 100644 --- a/api/vendor/laravel/lumen-framework/composer.json +++ b/api/vendor/laravel/lumen-framework/composer.json @@ -3,7 +3,7 @@ "description": "The Laravel Lumen Framework.", "keywords": ["framework", "laravel", "lumen"], "license": "MIT", - "homepage": "http://laravel.com", + "homepage": "https://lumen.laravel.com", "support": { "issues": "https://github.com/laravel/lumen-framework/issues", "source": "https://github.com/laravel/lumen-framework" diff --git a/api/vendor/laravel/lumen-framework/config/queue.php b/api/vendor/laravel/lumen-framework/config/queue.php index 652b0e1..5e89b4d 100644 --- a/api/vendor/laravel/lumen-framework/config/queue.php +++ b/api/vendor/laravel/lumen-framework/config/queue.php @@ -58,7 +58,7 @@ return [ 'redis' => [ 'driver' => 'redis', - 'connection' => 'default', + 'connection' => env('QUEUE_REDIS_CONNECTION', 'default'), 'queue' => 'default', 'retry_after' => 60, ], diff --git a/api/vendor/laravel/lumen-framework/phpunit.php b/api/vendor/laravel/lumen-framework/phpunit.php deleted file mode 100644 index 7e0cfdd..0000000 --- a/api/vendor/laravel/lumen-framework/phpunit.php +++ /dev/null @@ -1,30 +0,0 @@ - - - - - ./tests - - - - - ./src - - - diff --git a/api/vendor/laravel/lumen-framework/src/Application.php b/api/vendor/laravel/lumen-framework/src/Application.php index 643a376..6e81721 100644 --- a/api/vendor/laravel/lumen-framework/src/Application.php +++ b/api/vendor/laravel/lumen-framework/src/Application.php @@ -80,7 +80,9 @@ class Application extends Container */ public function __construct($basePath = null) { - date_default_timezone_set(env('APP_TIMEZONE', 'UTC')); + if (! empty(env('APP_TIMEZONE'))) { + date_default_timezone_set(env('APP_TIMEZONE', 'UTC')); + } $this->basePath = $basePath; @@ -112,7 +114,7 @@ class Application extends Container */ public function version() { - return 'Lumen (5.4.6) (Laravel Components 5.4.*)'; + return 'Lumen (5.4.7) (Laravel Components 5.4.*)'; } /** @@ -133,7 +135,7 @@ class Application extends Container */ public function environment() { - $env = env('APP_ENV', 'production'); + $env = env('APP_ENV', config('app.env', 'production')); if (func_num_args() > 0) { $patterns = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args(); diff --git a/api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php b/api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php index 2ced544..767d000 100644 --- a/api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php +++ b/api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php @@ -553,7 +553,7 @@ trait RoutesRequests $this->instance(Request::class, $this->prepareRequest($request)); - return [$request->getMethod(), $request->getPathInfo()]; + return [$request->getMethod(), '/'.trim($request->getPathInfo(), '/')]; } /** diff --git a/api/vendor/laravel/lumen-framework/src/Exceptions/Handler.php b/api/vendor/laravel/lumen-framework/src/Exceptions/Handler.php index f68ad25..55a495d 100644 --- a/api/vendor/laravel/lumen-framework/src/Exceptions/Handler.php +++ b/api/vendor/laravel/lumen-framework/src/Exceptions/Handler.php @@ -94,7 +94,7 @@ class Handler implements ExceptionHandler $fe = FlattenException::create($e); - $handler = new SymfonyExceptionHandler(env('APP_DEBUG', false)); + $handler = new SymfonyExceptionHandler(env('APP_DEBUG', config('app.debug', false))); $decorated = $this->decorate($handler->getContent($fe), $handler->getStylesheet($fe)); diff --git a/api/vendor/laravel/lumen-framework/src/Testing/Concerns/MakesHttpRequests.php b/api/vendor/laravel/lumen-framework/src/Testing/Concerns/MakesHttpRequests.php index 1cc5b63..c943e13 100644 --- a/api/vendor/laravel/lumen-framework/src/Testing/Concerns/MakesHttpRequests.php +++ b/api/vendor/laravel/lumen-framework/src/Testing/Concerns/MakesHttpRequests.php @@ -283,7 +283,7 @@ trait MakesHttpRequests foreach (array_sort_recursive($data) as $key => $value) { $expected = $this->formatToExpectedJson($key, $value); - call_user_func(['PHPUnit_Framework_Assert', $method], + PHPUnit::{$method}( Str::contains($actual, $expected), ($negate ? 'Found unexpected' : 'Unable to find')." JSON fragment [{$expected}] within [{$actual}]." ); diff --git a/api/vendor/laravel/lumen-framework/src/Testing/DatabaseTransactions.php b/api/vendor/laravel/lumen-framework/src/Testing/DatabaseTransactions.php index cfcd835..c2ae5b0 100644 --- a/api/vendor/laravel/lumen-framework/src/Testing/DatabaseTransactions.php +++ b/api/vendor/laravel/lumen-framework/src/Testing/DatabaseTransactions.php @@ -5,16 +5,33 @@ namespace Laravel\Lumen\Testing; trait DatabaseTransactions { /** - * Begin a database transaction. + * Handle database transactions on the specified connections. * * @return void */ public function beginDatabaseTransaction() { - $this->app->make('db')->beginTransaction(); + $database = $this->app->make('db'); - $this->beforeApplicationDestroyed(function () { - $this->app->make('db')->rollBack(); + foreach ($this->connectionsToTransact() as $name) { + $database->connection($name)->beginTransaction(); + } + + $this->beforeApplicationDestroyed(function () use ($database) { + foreach ($this->connectionsToTransact() as $name) { + $database->connection($name)->rollBack(); + } }); } + + /** + * The database connections that should have transactions. + * + * @return array + */ + protected function connectionsToTransact() + { + return property_exists($this, 'connectionsToTransact') + ? $this->connectionsToTransact : [null]; + } } diff --git a/api/vendor/laravel/lumen-framework/src/helpers.php b/api/vendor/laravel/lumen-framework/src/helpers.php index 2880a11..d27ae57 100644 --- a/api/vendor/laravel/lumen-framework/src/helpers.php +++ b/api/vendor/laravel/lumen-framework/src/helpers.php @@ -327,6 +327,22 @@ if (! function_exists('trans')) { } } +if (! function_exists('trans_choice')) { + /** + * Translates the given message based on a count. + * + * @param string $id + * @param int|array|\Countable $number + * @param array $replace + * @param string $locale + * @return string + */ + function trans_choice($id, $number, array $replace = [], $locale = null) + { + return app('translator')->transChoice($id, $number, $replace, $locale); + } +} + if (! function_exists('url')) { /** * Generate a url for the application. diff --git a/api/vendor/laravel/lumen-framework/storage/logs/.gitignore b/api/vendor/laravel/lumen-framework/storage/logs/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/api/vendor/laravel/lumen-framework/storage/logs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/api/vendor/laravel/lumen-framework/tests/FullApplicationTest.php b/api/vendor/laravel/lumen-framework/tests/FullApplicationTest.php deleted file mode 100644 index 332ef6b..0000000 --- a/api/vendor/laravel/lumen-framework/tests/FullApplicationTest.php +++ /dev/null @@ -1,700 +0,0 @@ -get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - } - - public function testBasicSymfonyRequest() - { - $app = new Application; - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(SymfonyRequest::create('/', 'GET')); - $this->assertEquals(200, $response->getStatusCode()); - } - - public function testAddRouteMultipleMethodRequest() - { - $app = new Application; - - $app->addRoute(['GET', 'POST'], '/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - - $response = $app->handle(Request::create('/', 'POST')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - } - - public function testRequestWithParameters() - { - $app = new Application; - - $app->get('/foo/{bar}/{baz}', function ($bar, $baz) { - return response($bar.$baz); - }); - - $response = $app->handle(Request::create('/foo/1/2', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('12', $response->getContent()); - } - - public function testCallbackRouteWithDefaultParameter() - { - $app = new Application; - $app->get('/foo-bar/{baz}', function ($baz = 'default-value') { - return response($baz); - }); - - $response = $app->handle(Request::create('/foo-bar/something', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('something', $response->getContent()); - } - - public function testGlobalMiddleware() - { - $app = new Application; - - $app->middleware(['LumenTestMiddleware']); - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware', $response->getContent()); - } - - public function testRouteMiddleware() - { - $app = new Application; - - $app->routeMiddleware(['foo' => 'LumenTestMiddleware', 'passing' => 'LumenTestPlainMiddleware']); - - $app->get('/', function () { - return response('Hello World'); - }); - - $app->get('/foo', ['middleware' => 'foo', function () { - return response('Hello World'); - }]); - - $app->get('/bar', ['middleware' => ['foo'], function () { - return response('Hello World'); - }]); - - $app->get('/fooBar', ['middleware' => 'passing|foo', function () { - return response('Hello World'); - }]); - - $response = $app->handle(Request::create('/', 'GET')); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - - $response = $app->handle(Request::create('/foo', 'GET')); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware', $response->getContent()); - - $response = $app->handle(Request::create('/bar', 'GET')); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware', $response->getContent()); - - $response = $app->handle(Request::create('/fooBar', 'GET')); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware', $response->getContent()); - } - - public function testGlobalMiddlewareParameters() - { - $app = new Application; - - $app->middleware(['LumenTestParameterizedMiddleware:foo,bar']); - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware - foo - bar', $response->getContent()); - } - - public function testRouteMiddlewareParameters() - { - $app = new Application; - - $app->routeMiddleware(['foo' => 'LumenTestParameterizedMiddleware', 'passing' => 'LumenTestPlainMiddleware']); - - $app->get('/', ['middleware' => 'passing|foo:bar,boom', function () { - return response('Hello World'); - }]); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware - bar - boom', $response->getContent()); - } - - public function testWithMiddlewareDisabled() - { - $app = new Application; - - $app->middleware(['LumenTestMiddleware']); - $app->instance('middleware.disable', true); - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - } - - public function testTerminableGlobalMiddleware() - { - $app = new Application; - - $app->middleware(['LumenTestTerminateMiddleware']); - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('TERMINATED', $response->getContent()); - } - - public function testTerminateWithMiddlewareDisabled() - { - $app = new Application; - - $app->middleware(['LumenTestTerminateMiddleware']); - $app->instance('middleware.disable', true); - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - } - - public function testNotFoundResponse() - { - $app = new Application; - $app->instance('Illuminate\Contracts\Debug\ExceptionHandler', $mock = m::mock('Laravel\Lumen\Exceptions\Handler[report]')); - $mock->shouldIgnoreMissing(); - - $app->get('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/foo', 'GET')); - - $this->assertEquals(404, $response->getStatusCode()); - } - - public function testMethodNotAllowedResponse() - { - $app = new Application; - $app->instance('Illuminate\Contracts\Debug\ExceptionHandler', $mock = m::mock('Laravel\Lumen\Exceptions\Handler[report]')); - $mock->shouldIgnoreMissing(); - - $app->post('/', function () { - return response('Hello World'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(405, $response->getStatusCode()); - } - - public function testUncaughtExceptionResponse() - { - $app = new Application; - $app->instance('Illuminate\Contracts\Debug\ExceptionHandler', $mock = m::mock('Laravel\Lumen\Exceptions\Handler[report]')); - $mock->shouldIgnoreMissing(); - - $app->get('/', function () { - throw new \RuntimeException('app exception'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - $this->assertInstanceOf('Illuminate\Http\Response', $response); - } - - public function testGeneratingUrls() - { - $app = new Application; - $app->instance('request', Request::create('http://lumen.laravel.com', 'GET')); - unset($app->availableBindings['request']); - - $app->get('/foo-bar', ['as' => 'foo', function () { - // - }]); - - $app->get('/foo-bar/{baz}/{boom}', ['as' => 'bar', function () { - // - }]); - - $this->assertEquals('http://lumen.laravel.com/something', url('something')); - $this->assertEquals('http://lumen.laravel.com/foo-bar', route('foo')); - $this->assertEquals('http://lumen.laravel.com/foo-bar/1/2', route('bar', ['baz' => 1, 'boom' => 2])); - $this->assertEquals('http://lumen.laravel.com/foo-bar?baz=1&boom=2', route('foo', ['baz' => 1, 'boom' => 2])); - } - - public function testGeneratingUrlsForRegexParameters() - { - $app = new Application; - $app->instance('request', Request::create('http://lumen.laravel.com', 'GET')); - unset($app->availableBindings['request']); - - $app->get('/foo-bar', ['as' => 'foo', function () { - // - }]); - - $app->get('/foo-bar/{baz:[0-9]+}/{boom}', ['as' => 'bar', function () { - // - }]); - - $app->get('/foo-bar/{baz:[0-9]+}/{boom:[0-9]+}', ['as' => 'baz', function () { - // - }]); - - $app->get('/foo-bar/{baz:[0-9]{2,5}}', ['as' => 'boom', function () { - // - }]); - - $this->assertEquals('http://lumen.laravel.com/something', url('something')); - $this->assertEquals('http://lumen.laravel.com/foo-bar', route('foo')); - $this->assertEquals('http://lumen.laravel.com/foo-bar/1/2', route('bar', ['baz' => 1, 'boom' => 2])); - $this->assertEquals('http://lumen.laravel.com/foo-bar/1/2', route('baz', ['baz' => 1, 'boom' => 2])); - $this->assertEquals('http://lumen.laravel.com/foo-bar/{baz:[0-9]+}/{boom:[0-9]+}?ba=1&bo=2', route('baz', ['ba' => 1, 'bo' => 2])); - $this->assertEquals('http://lumen.laravel.com/foo-bar/5', route('boom', ['baz' => 5])); - } - - public function testRegisterServiceProvider() - { - $app = new Application; - $provider = new LumenTestServiceProvider($app); - $app->register($provider); - } - - public function testUsingCustomDispatcher() - { - $routes = new FastRoute\RouteCollector(new FastRoute\RouteParser\Std, new FastRoute\DataGenerator\GroupCountBased); - - $routes->addRoute('GET', '/', [function () { - return response('Hello World'); - }]); - - $app = new Application; - - $app->setDispatcher(new FastRoute\Dispatcher\GroupCountBased($routes->getData())); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - } - - public function testMiddlewareReceiveResponsesEvenWhenStringReturned() - { - unset($_SERVER['__middleware.response']); - - $app = new Application; - - $app->routeMiddleware(['foo' => 'LumenTestPlainMiddleware']); - - $app->get('/', ['middleware' => 'foo', function () { - return 'Hello World'; - }]); - - $response = $app->handle(Request::create('/', 'GET')); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Hello World', $response->getContent()); - $this->assertEquals(true, $_SERVER['__middleware.response']); - } - - public function testBasicControllerDispatching() - { - $app = new Application; - - $app->get('/show/{id}', 'LumenTestController@show'); - - $response = $app->handle(Request::create('/show/25', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('25', $response->getContent()); - } - - public function testBasicControllerDispatchingWithGroup() - { - $app = new Application; - $app->routeMiddleware(['test' => LumenTestMiddleware::class]); - - $app->group(['middleware' => 'test'], function ($app) { - $app->get('/show/{id}', 'LumenTestController@show'); - }); - - $response = $app->handle(Request::create('/show/25', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware', $response->getContent()); - } - - public function testBasicControllerDispatchingWithGroupSuffix() - { - $app = new Application; - $app->routeMiddleware(['test' => LumenTestMiddleware::class]); - - $app->group(['suffix' => '.{format:json|xml}'], function ($app) { - $app->get('/show/{id}', 'LumenTestController@show'); - }); - - $response = $app->handle(Request::create('/show/25.xml', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('25', $response->getContent()); - } - - public function testBasicControllerDispatchingWithGroupAndSuffixWithPath() - { - $app = new Application; - $app->routeMiddleware(['test' => LumenTestMiddleware::class]); - - $app->group(['suffix' => '/{format:json|xml}'], function ($app) { - $app->get('/show/{id}', 'LumenTestController@show'); - }); - - $response = $app->handle(Request::create('/show/test/json', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('test', $response->getContent()); - } - - public function testBasicControllerDispatchingWithMiddlewareIntercept() - { - $app = new Application; - $app->routeMiddleware(['test' => LumenTestMiddleware::class]); - $app->get('/show/{id}', 'LumenTestControllerWithMiddleware@show'); - - $response = $app->handle(Request::create('/show/25', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('Middleware', $response->getContent()); - } - - public function testBasicInvokableActionDispatching() - { - $app = new Application; - - $app->get('/action/{id}', 'LumenTestAction'); - - $response = $app->handle(Request::create('/action/199', 'GET')); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('199', $response->getContent()); - } - - public function testEnvironmentDetection() - { - $app = new Application; - - $this->assertEquals('production', $app->environment()); - $this->assertTrue($app->environment('production')); - $this->assertTrue($app->environment(['production'])); - } - - public function testNamespaceDetection() - { - $app = new Application; - $this->setExpectedException('RuntimeException'); - $app->getNamespace(); - } - - public function testRunningUnitTestsDetection() - { - $app = new Application; - - $this->assertEquals(false, $app->runningUnitTests()); - } - - public function testValidationHelpers() - { - $app = new Application; - - $app->get('/', function (Illuminate\Http\Request $request) { - $this->validate($request, ['name' => 'required']); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(422, $response->getStatusCode()); - } - - public function testRedirectResponse() - { - $app = new Application; - - $app->get('/', function (Illuminate\Http\Request $request) { - return redirect('home'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(302, $response->getStatusCode()); - } - - public function testRedirectToNamedRoute() - { - $app = new Application; - - $app->get('login', ['as' => 'login', function (Illuminate\Http\Request $request) { - return 'login'; - }]); - - $app->get('/', function (Illuminate\Http\Request $request) { - return redirect()->route('login'); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertEquals(302, $response->getStatusCode()); - } - - public function testRequestUser() - { - $app = new Application(); - - $app['auth']->viaRequest('api', function ($request) { - return new \Illuminate\Auth\GenericUser(['id' => 1234]); - }); - - $app->get('/', function (Illuminate\Http\Request $request) { - return $request->user()->getAuthIdentifier(); - }); - - $response = $app->handle(Request::create('/', 'GET')); - - $this->assertSame('1234', $response->getContent()); - } - - public function testCanResolveValidationFactoryFromContract() - { - $app = new Application(); - - $validator = $app['Illuminate\Contracts\Validation\Factory']; - - $this->assertInstanceOf('Illuminate\Contracts\Validation\Factory', $validator); - } - - public function testCanMergeUserProvidedFacadesWithDefaultOnes() - { - $app = new Application(); - - $aliases = [ - UserFacade::class => 'Foo', - ]; - - $app->withFacades(true, $aliases); - - $this->assertTrue(class_exists('Foo')); - } - - public function testNestedGroupMiddlewaresRequest() - { - $app = new Application(); - - $app->group(['middleware' => 'middleware1'], function ($app) { - $app->group(['middleware' => 'middleware2|middleware3'], function ($app) { - $app->get('test', 'LumenTestController@show'); - }); - }); - - $route = $app->getRoutes()['GET/test']; - - $this->assertEquals([ - 'middleware1', - 'middleware2', - 'middleware3', - ], $route['action']['middleware']); - } - - public function testNestedGroupNamespaceRequest() - { - $app = new Application(); - - $app->group(['namespace' => 'Hello'], function ($app) { - $app->group(['namespace' => 'World'], function ($app) { - $app->get('/world', 'Class@method'); - }); - }); - - $routes = $app->getRoutes(); - - $route = $routes['GET/world']; - - $this->assertEquals('Hello\\World\\Class@method', $route['action']['uses']); - } - - public function testNestedGroupPrefixRequest() - { - $app = new Application(); - - $app->group(['prefix' => 'hello'], function ($app) { - $app->group(['prefix' => 'world'], function ($app) { - $app->get('/world', 'Class@method'); - }); - }); - - $routes = $app->getRoutes(); - - $this->assertArrayHasKey('GET/hello/world/world', $routes); - } - - public function testNestedGroupAsRequest() - { - $app = new Application(); - - $app->group(['as' => 'hello'], function ($app) { - $app->group(['as' => 'world'], function ($app) { - $app->get('/world', 'Class@method'); - }); - }); - - $this->assertArrayHasKey('hello.world', $app->namedRoutes); - $this->assertEquals('/world', $app->namedRoutes['hello.world']); - } -} - -class LumenTestService -{ -} - -class LumenTestServiceProvider extends Illuminate\Support\ServiceProvider -{ - public function register() - { - } -} - -class LumenTestController -{ - public function __construct(LumenTestService $service) - { - // - } - - public function show($id) - { - return $id; - } -} - -class LumenTestControllerWithMiddleware extends Laravel\Lumen\Routing\Controller -{ - public function __construct(LumenTestService $service) - { - $this->middleware('test'); - } - - public function show($id) - { - return $id; - } -} - -class LumenTestMiddleware -{ - public function handle($request, $next) - { - return response('Middleware'); - } -} - -class LumenTestPlainMiddleware -{ - public function handle($request, $next) - { - $response = $next($request); - $_SERVER['__middleware.response'] = $response instanceof Illuminate\Http\Response; - - return $response; - } -} - -class LumenTestParameterizedMiddleware -{ - public function handle($request, $next, $parameter1, $parameter2) - { - return response("Middleware - $parameter1 - $parameter2"); - } -} - -class LumenTestAction -{ - public function __invoke($id) - { - return $id; - } -} - -class UserFacade -{ -} - -class LumenTestTerminateMiddleware -{ - public function handle($request, $next) - { - return $next($request); - } - - public function terminate($request, Illuminate\Http\Response $response) - { - $response->setContent('TERMINATED'); - } -} diff --git a/api/vendor/laravel/lumen-framework/tests/Http/ResponseFactoryTest.php b/api/vendor/laravel/lumen-framework/tests/Http/ResponseFactoryTest.php deleted file mode 100644 index 356b95e..0000000 --- a/api/vendor/laravel/lumen-framework/tests/Http/ResponseFactoryTest.php +++ /dev/null @@ -1,63 +0,0 @@ -make($content); - $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response); - $this->assertEquals($content, $response->getContent()); - $this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); - } - - public function testJsonDefaultResponse() - { - $content = ['hello' => 'world']; - $responseFactory = new ResponseFactory(); - $response = $responseFactory->json($content); - - $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response); - $this->assertEquals('{"hello":"world"}', $response->getContent()); - $this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); - } - - public function testDownloadDefaultResponse() - { - $temp = tempnam(sys_get_temp_dir(), 'fixture'); - $fh = fopen($temp, 'w+'); - fwrite($fh, 'writing to tempfile'); - fclose($fh); - - $responseFactory = new ResponseFactory(); - $response = $responseFactory->download($temp); - - $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response); - $this->assertEquals(false, $response->getContent()); - $this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); - - unlink($temp); - } - - public function testJsonResponseFromArrayableInterface() - { - // mock one Arrayable object - $content = $this->getMockBuilder('Illuminate\Contracts\Support\Arrayable') - ->setMethods(['toArray']) - ->getMock(); - $content->expects($this->once()) - ->method('toArray') - ->willReturn(['hello' => 'world']); - - $responseFactory = new ResponseFactory(); - $response = $responseFactory->json($content); - - $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response); - $this->assertEquals('{"hello":"world"}', $response->getContent()); - $this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); - } -} diff --git a/api/vendor/mockery/mockery/CHANGELOG.md b/api/vendor/mockery/mockery/CHANGELOG.md index 2a216dc..187dfe3 100644 --- a/api/vendor/mockery/mockery/CHANGELOG.md +++ b/api/vendor/mockery/mockery/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log -## 0.9.4 (XXXX-XX-XX) +## 0.9.11 (2019-02-12) + +* Set property values on all related mocks #944 + +## 0.9.4 (2015-04-02) * `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods` config diff --git a/api/vendor/mockery/mockery/README.md b/api/vendor/mockery/mockery/README.md index 9483ff1..b224443 100644 --- a/api/vendor/mockery/mockery/README.md +++ b/api/vendor/mockery/mockery/README.md @@ -1,7 +1,7 @@ Mockery ======= -[![Build Status](https://travis-ci.org/padraic/mockery.png?branch=master)](http://travis-ci.org/padraic/mockery) +[![Build Status](https://travis-ci.org/mockery/mockery.png?branch=0.9)](http://travis-ci.org/mockery/mockery) [![Latest Stable Version](https://poser.pugx.org/mockery/mockery/v/stable.png)](https://packagist.org/packages/mockery/mockery) [![Total Downloads](https://poser.pugx.org/mockery/mockery/downloads.png)](https://packagist.org/packages/mockery/mockery) diff --git a/api/vendor/mockery/mockery/library/Mockery.php b/api/vendor/mockery/mockery/library/Mockery.php index f2c6b56..09b6098 100644 --- a/api/vendor/mockery/mockery/library/Mockery.php +++ b/api/vendor/mockery/mockery/library/Mockery.php @@ -67,6 +67,16 @@ class Mockery */ private static $_filesToCleanUp = array(); + /** + * Defines the global helper functions + * + * @return void + */ + public static function globalHelpers() + { + require_once __DIR__.'/helpers.php'; + } + /** * Static shortcut to \Mockery\Container::mock(). * diff --git a/api/vendor/mockery/mockery/library/Mockery/Expectation.php b/api/vendor/mockery/mockery/library/Mockery/Expectation.php index bccf82e..fc10ad7 100644 --- a/api/vendor/mockery/mockery/library/Mockery/Expectation.php +++ b/api/vendor/mockery/mockery/library/Mockery/Expectation.php @@ -192,10 +192,17 @@ class Expectation implements ExpectationInterface */ protected function _setValues() { + $mockClass = get_class($this->_mock); + $container = $this->_mock->mockery_getContainer(); + $mocks = $container->getMocks(); foreach ($this->_setQueue as $name => &$values) { if (count($values) > 0) { $value = array_shift($values); - $this->_mock->{$name} = $value; + foreach ($mocks as $mock) { + if (is_a($mock, $mockClass)) { + $mock->{$name} = $value; + } + } } } } @@ -232,7 +239,8 @@ class Expectation implements ExpectationInterface case 'callable': case 'Closure': - return function () {}; + return function () { + }; case 'Traversable': case 'Generator': @@ -310,7 +318,8 @@ class Expectation implements ExpectationInterface if (empty($this->_expectedArgs) && !$this->_noArgsExpectation) { return true; } - if (count($args) !== count($this->_expectedArgs)) { + $expected = is_array($this->_expectedArgs) ? count($this->_expectedArgs) : 0; + if (count($args) !== $expected) { return false; } $argCount = count($args); @@ -340,7 +349,8 @@ class Expectation implements ExpectationInterface } if (is_string($expected) && !is_array($actual) && !is_object($actual)) { # push/pop an error handler here to to make sure no error/exception thrown if $expected is not a regex - set_error_handler(function () {}); + set_error_handler(function () { + }); $result = preg_match($expected, (string) $actual); restore_error_handler(); diff --git a/api/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php b/api/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php index 8a4139a..8b87629 100644 --- a/api/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php +++ b/api/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php @@ -82,6 +82,7 @@ class MethodDefinitionPass implements Pass private function renderMethodBody($method, $config) { + /** @var \ReflectionMethod $method */ $invoke = $method->isStatic() ? 'static::_mockery_handleStaticMethodCall' : '$this->_mockery_handleMethodCall'; $body = <<container); + $m = $this->container->mock('overload:MyNamespace\MyClass13'); + $m->shouldReceive('foo')->andSet('bar', 'baz'); + $instance = new MyNamespace\MyClass13; + $instance->foo(); + $this->assertEquals('baz', $m->bar); + $this->assertEquals('baz', $instance->bar); + Mockery::resetContainer(); + } + public function testMethodParamsPassedByReferenceHaveReferencePreserved() { $m = $this->container->mock('MockeryTestRef1'); $m->shouldReceive('foo')->with( - Mockery::on(function (&$a) {$a += 1;return true;}), + Mockery::on(function (&$a) { + $a += 1; + return true; + }), Mockery::any() ); $a = 1; @@ -758,7 +776,10 @@ class ContainerTest extends MockeryTestCase @$m = $this->container->mock('DateTime'); $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed, remove @ error suppresion to debug"); $m->shouldReceive('modify')->with( - Mockery::on(function (&$string) {$string = 'foo'; return true;}) + Mockery::on(function (&$string) { + $string = 'foo'; + return true; + }) ); $data ='bar'; $m->modify($data); @@ -784,7 +805,10 @@ class ContainerTest extends MockeryTestCase @$m = $this->container->mock('MongoCollection'); $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed, remove @ error suppresion to debug"); $m->shouldReceive('insert')->with( - Mockery::on(function (&$data) {$data['_id'] = 123; return true;}), + Mockery::on(function (&$data) { + $data['_id'] = 123; + return true; + }), Mockery::type('array') ); $data = array('a'=>1,'b'=>2); diff --git a/api/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php b/api/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php index 9767f1e..deed5ee 100644 --- a/api/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php +++ b/api/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php @@ -28,7 +28,7 @@ class DemeterChainTest extends MockeryTestCase public function setUp() { - $this->mock = $this->mock = Mockery::mock('object')->shouldIgnoreMissing(); + $this->mock = $this->mock = Mockery::mock('stdClass')->shouldIgnoreMissing(); } public function tearDown() diff --git a/api/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php b/api/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php index c3c3199..6d1ddf4 100644 --- a/api/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php +++ b/api/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php @@ -1238,7 +1238,7 @@ class ExpectationTest extends MockeryTestCase public function testObjectConstraintMatchesArgument() { - $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once(); + $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once(); $this->mock->foo(new stdClass); $this->container->mockery_verify(); } @@ -1246,7 +1246,7 @@ class ExpectationTest extends MockeryTestCase public function testObjectConstraintNonMatchingCase() { $this->mock->shouldReceive('foo')->times(3); - $this->mock->shouldReceive('foo')->with(1, Mockery::type('object`'))->never(); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('stdClass`'))->never(); $this->mock->foo(); $this->mock->foo(1); $this->mock->foo(1, 2, 3); @@ -1258,7 +1258,7 @@ class ExpectationTest extends MockeryTestCase */ public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched() { - $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once(); + $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once(); $this->mock->foo('f'); $this->container->mockery_verify(); } diff --git a/api/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php b/api/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php new file mode 100644 index 0000000..57c667c --- /dev/null +++ b/api/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php @@ -0,0 +1,63 @@ +assertInstanceOf('Mockery\MockInterface', $double); + $this->setExpectedException('Exception'); + $double->foo(); + } + + /** @test */ + public function spy_creates_a_spy() + { + $double = spy(); + + $this->assertInstanceOf('Mockery\MockInterface', $double); + $double->foo(); + } + + /** @test */ + public function named_mock_creates_a_named_mock() + { + $className = "Class".uniqid(); + $double = namedMock($className); + + $this->assertInstanceOf('Mockery\MockInterface', $double); + $this->assertInstanceOf($className, $double); + } +} diff --git a/api/vendor/mockery/mockery/tests/Mockery/MockingInternalModuleClassWithOptionalParameterByReferenceTest.php b/api/vendor/mockery/mockery/tests/Mockery/MockingInternalModuleClassWithOptionalParameterByReferenceTest.php new file mode 100644 index 0000000..11c3ae5 --- /dev/null +++ b/api/vendor/mockery/mockery/tests/Mockery/MockingInternalModuleClassWithOptionalParameterByReferenceTest.php @@ -0,0 +1,69 @@ +markTestSkipped('ext/memcache not installed'); + } + parent::setUp(); + } + + protected function tearDown() + { + static::closeMockery(); + parent::tearDown(); + } + + /** + * Regression for {@see https://github.com/mockery/mockery/issues/757 issue#757} + * + * @test + */ + public function mockingInternalModuleClassWithOptionalParameterByReferenceMayNotBreakCodeGeneration() + { + // this works for macOS + \Mockery::getConfiguration() + ->setInternalClassMethodParamMap('Memcache', 'get', array('$id', '&$flags = null')); + // strange thing is, the reflected class under linux is MemcachePool not Memcache + \Mockery::getConfiguration() + ->setInternalClassMethodParamMap('MemcachePool', 'get', array('$id', '&$flags = null')); + $memcache = \Mockery::mock('Memcache'); + $memcache->shouldReceive('get') + ->with( + $id = 'foobar', + \Mockery::on( + function (&$flags) { + $valid = null === $flags; + $flags = 255; + return $valid; + } + ) + ) + ->once() + ->andReturn($expected = time()); + $paramFlags = null; + $this->assertSame($expected, $memcache->get($id, $paramFlags)); + \Mockery::close(); + $this->assertSame(255, $paramFlags); + } +} diff --git a/api/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php b/api/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php index 2892007..28dd2fd 100644 --- a/api/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php +++ b/api/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php @@ -33,11 +33,11 @@ class NamedMockTest extends MockeryTestCase /** @test */ public function itCreatesPassesFurtherArgumentsJustLikeMock() { - $mock = Mockery::namedMock("Mockery\Dave456", "DateTime", array( + $mock = Mockery::namedMock("Mockery\Dave456", "DateTimeZone", array( "getDave" => "dave" )); - $this->assertInstanceOf("DateTime", $mock); + $this->assertInstanceOf("DateTimeZone", $mock); $this->assertEquals("dave", $mock->getDave()); } diff --git a/api/vendor/mockery/mockery/travis/after_success.sh b/api/vendor/mockery/mockery/travis/after_success.sh old mode 100644 new mode 100755 diff --git a/api/vendor/mockery/mockery/travis/before_script.sh b/api/vendor/mockery/mockery/travis/before_script.sh old mode 100644 new mode 100755 diff --git a/api/vendor/mockery/mockery/travis/extra.ini b/api/vendor/mockery/mockery/travis/extra.ini index 897166d..16e0ef2 100644 --- a/api/vendor/mockery/mockery/travis/extra.ini +++ b/api/vendor/mockery/mockery/travis/extra.ini @@ -1,2 +1,3 @@ extension = "mongo.so" -extension = "redis.so" \ No newline at end of file +extension = "redis.so" +extension = "memcache.so" \ No newline at end of file diff --git a/api/vendor/mockery/mockery/travis/install.sh b/api/vendor/mockery/mockery/travis/install.sh old mode 100644 new mode 100755 diff --git a/api/vendor/mockery/mockery/travis/script.sh b/api/vendor/mockery/mockery/travis/script.sh old mode 100644 new mode 100755 diff --git a/api/vendor/monolog/monolog/.php_cs b/api/vendor/monolog/monolog/.php_cs deleted file mode 100644 index 366ccd0..0000000 --- a/api/vendor/monolog/monolog/.php_cs +++ /dev/null @@ -1,59 +0,0 @@ - - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. -EOF; - -$finder = Symfony\CS\Finder::create() - ->files() - ->name('*.php') - ->exclude('Fixtures') - ->in(__DIR__.'/src') - ->in(__DIR__.'/tests') -; - -return Symfony\CS\Config::create() - ->setUsingCache(true) - //->setUsingLinter(false) - ->setRiskyAllowed(true) - ->setRules(array( - '@PSR2' => true, - 'binary_operator_spaces' => true, - 'blank_line_before_return' => true, - 'header_comment' => array('header' => $header), - 'include' => true, - 'long_array_syntax' => true, - 'method_separation' => true, - 'no_blank_lines_after_class_opening' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_blank_lines_between_uses' => true, - 'no_duplicate_semicolons' => true, - 'no_extra_consecutive_blank_lines' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_unused_imports' => true, - 'object_operator_without_whitespace' => true, - 'phpdoc_align' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_scalar' => true, - 'phpdoc_trim' => true, - 'phpdoc_type_to_var' => true, - 'psr0' => true, - 'single_blank_line_before_namespace' => true, - 'spaces_cast' => true, - 'standardize_not_equals' => true, - 'ternary_operator_spaces' => true, - 'trailing_comma_in_multiline_array' => true, - 'whitespacy_lines' => true, - )) - ->finder($finder) -; diff --git a/api/vendor/monolog/monolog/CHANGELOG.md b/api/vendor/monolog/monolog/CHANGELOG.md index 1153c62..a92155e 100644 --- a/api/vendor/monolog/monolog/CHANGELOG.md +++ b/api/vendor/monolog/monolog/CHANGELOG.md @@ -1,3 +1,102 @@ +### 1.27.1 (2022-06-09) + + * Fixed MandrillHandler support for SwiftMailer 6 (#1676) + * Fixed StreamHandler chunk size (backport from #1552) + +### 1.27.0 (2022-03-13) + + * Added $maxDepth / setMaxDepth to NormalizerFormatter / JsonFormatter to configure the maximum depth if the default of 9 does not work for you (#1633) + +### 1.26.1 (2021-05-28) + + * Fixed PHP 8.1 deprecation warning + +### 1.26.0 (2020-12-14) + + * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x) + +### 1.25.5 (2020-07-23) + + * Fixed array access on null in RavenHandler + * Fixed unique_id in WebProcessor not being disableable + +### 1.25.4 (2020-05-22) + + * Fixed GitProcessor type error when there is no git repo present + * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" + * Fixed support for relative paths in RotatingFileHandler + +### 1.25.3 (2019-12-20) + + * Fixed formatting of resources in JsonFormatter + * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) + * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it + * Fixed Turkish locale messing up the conversion of level names to their constant values + +### 1.25.2 (2019-11-13) + + * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable + * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler and SamplingHandler + * Fixed BrowserConsoleHandler formatting when using multiple styles + * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings + * Fixed normalization of SoapFault objects containing non-strings as "detail" + * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding + +### 1.25.1 (2019-09-06) + + * Fixed forward-compatible interfaces to be compatible with Monolog 1.x too. + +### 1.25.0 (2019-09-06) + + * Deprecated SlackbotHandler, use SlackWebhookHandler or SlackHandler instead + * Deprecated RavenHandler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead + * Deprecated HipChatHandler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead + * Added forward-compatible interfaces and traits FormattableHandlerInterface, FormattableHandlerTrait, ProcessableHandlerInterface, ProcessableHandlerTrait. If you use modern PHP and want to make code compatible with Monolog 1 and 2 this can help. You will have to require at least Monolog 1.25 though. + * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler + * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records + * Fixed issue in SignalHandler restarting syscalls functionality + * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases + * Fixed ZendMonitorHandler to work with the latest Zend Server versions + * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). + +### 1.24.0 (2018-11-05) + + * BC Notice: If you are extending any of the Monolog's Formatters' `normalize` method, make sure you add the new `$depth = 0` argument to your function signature to avoid strict PHP warnings. + * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors + * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers) + * Added a way to log signals being received using Monolog\SignalHandler + * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler + * Added InsightOpsHandler to migrate users of the LogEntriesHandler + * Added protection to NormalizerHandler against circular and very deep structures, it now stops normalizing at a depth of 9 + * Added capture of stack traces to ErrorHandler when logging PHP errors + * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts + * Added forwarding of context info to FluentdFormatter + * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example + * Added ability to extend/override BrowserConsoleHandler + * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility + * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility + * Dropped official support for HHVM in test builds + * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain + * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases + * Fixed HipChatHandler bug where slack dropped messages randomly + * Fixed normalization of objects in Slack handlers + * Fixed support for PHP7's Throwable in NewRelicHandler + * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory + * Fixed table row styling issues in HtmlFormatter + * Fixed RavenHandler dropping the message when logging exception + * Fixed WhatFailureGroupHandler skipping processors when using handleBatch + and implement it where possible + * Fixed display of anonymous class names + +### 1.23.0 (2017-06-19) + + * Improved SyslogUdpHandler's support for RFC5424 and added optional `$ident` argument + * Fixed GelfHandler truncation to be per field and not per message + * Fixed compatibility issue with PHP <5.3.6 + * Fixed support for headless Chrome in ChromePHPHandler + * Fixed support for latest Aws SDK in DynamoDbHandler + * Fixed support for SwiftMailer 6.0+ in SwiftMailerHandler + ### 1.22.1 (2017-03-13) * Fixed lots of minor issues in the new Slack integrations diff --git a/api/vendor/monolog/monolog/README.md b/api/vendor/monolog/monolog/README.md index 7d8ade5..a578eb2 100644 --- a/api/vendor/monolog/monolog/README.md +++ b/api/vendor/monolog/monolog/README.md @@ -2,7 +2,6 @@ [![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) [![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) -[![Reference Status](https://www.versioneye.com/php/monolog:monolog/reference_badge.svg)](https://www.versioneye.com/php/monolog:monolog/references) Monolog sends your logs to files, sockets, inboxes, databases and various @@ -91,5 +90,5 @@ Monolog is licensed under the MIT License - see the `LICENSE` file for details ### Acknowledgements -This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/) +This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) library, although most concepts have been adjusted to fit to the PHP world. diff --git a/api/vendor/monolog/monolog/composer.json b/api/vendor/monolog/monolog/composer.json index f74b7b9..aecc40f 100644 --- a/api/vendor/monolog/monolog/composer.json +++ b/api/vendor/monolog/monolog/composer.json @@ -24,12 +24,10 @@ "doctrine/couchdb": "~1.0@dev", "aws/aws-sdk-php": "^2.4.9 || ^3.0", "php-amqplib/php-amqplib": "~2.4", - "swiftmailer/swiftmailer": "~5.3", + "swiftmailer/swiftmailer": "^5.3|^6.0", "php-console/php-console": "^3.1.3", - "phpunit/phpunit-mock-objects": "2.3.0", - "jakub-onderka/php-parallel-lint": "0.9" + "phpstan/phpstan": "^0.12.59" }, - "_": "phpunit/phpunit-mock-objects required in 2.3.0 due to https://github.com/sebastianbergmann/phpunit-mock-objects/issues/223 - needs hhvm 3.8+ on travis", "suggest": { "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "sentry/sentry": "Allow sending log messages to a Sentry server", @@ -52,15 +50,11 @@ "provide": { "psr/log-implementation": "1.0.0" }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "scripts": { - "test": [ - "parallel-lint . --exclude vendor", - "phpunit" - ] + "test": "vendor/bin/phpunit", + "phpstan": "vendor/bin/phpstan analyse" + }, + "config": { + "lock": false } } diff --git a/api/vendor/monolog/monolog/doc/01-usage.md b/api/vendor/monolog/monolog/doc/01-usage.md deleted file mode 100644 index 8e2551f..0000000 --- a/api/vendor/monolog/monolog/doc/01-usage.md +++ /dev/null @@ -1,231 +0,0 @@ -# Using Monolog - -- [Installation](#installation) -- [Core Concepts](#core-concepts) -- [Log Levels](#log-levels) -- [Configuring a logger](#configuring-a-logger) -- [Adding extra data in the records](#adding-extra-data-in-the-records) -- [Leveraging channels](#leveraging-channels) -- [Customizing the log format](#customizing-the-log-format) - -## Installation - -Monolog is available on Packagist ([monolog/monolog](http://packagist.org/packages/monolog/monolog)) -and as such installable via [Composer](http://getcomposer.org/). - -```bash -composer require monolog/monolog -``` - -If you do not use Composer, you can grab the code from GitHub, and use any -PSR-0 compatible autoloader (e.g. the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader)) -to load Monolog classes. - -## Core Concepts - -Every `Logger` instance has a channel (name) and a stack of handlers. Whenever -you add a record to the logger, it traverses the handler stack. Each handler -decides whether it fully handled the record, and if so, the propagation of the -record ends there. - -This allows for flexible logging setups, for example having a `StreamHandler` at -the bottom of the stack that will log anything to disk, and on top of that add -a `MailHandler` that will send emails only when an error message is logged. -Handlers also have a `$bubble` property which defines whether they block the -record or not if they handled it. In this example, setting the `MailHandler`'s -`$bubble` argument to false means that records handled by the `MailHandler` will -not propagate to the `StreamHandler` anymore. - -You can create many `Logger`s, each defining a channel (e.g.: db, request, -router, ..) and each of them combining various handlers, which can be shared -or not. The channel is reflected in the logs and allows you to easily see or -filter records. - -Each Handler also has a Formatter, a default one with settings that make sense -will be created if you don't set one. The formatters normalize and format -incoming records so that they can be used by the handlers to output useful -information. - -Custom severity levels are not available. Only the eight -[RFC 5424](http://tools.ietf.org/html/rfc5424) levels (debug, info, notice, -warning, error, critical, alert, emergency) are present for basic filtering -purposes, but for sorting and other use cases that would require -flexibility, you should add Processors to the Logger that can add extra -information (tags, user ip, ..) to the records before they are handled. - -## Log Levels - -Monolog supports the logging levels described by [RFC 5424](http://tools.ietf.org/html/rfc5424). - -- **DEBUG** (100): Detailed debug information. - -- **INFO** (200): Interesting events. Examples: User logs in, SQL logs. - -- **NOTICE** (250): Normal but significant events. - -- **WARNING** (300): Exceptional occurrences that are not errors. Examples: - Use of deprecated APIs, poor use of an API, undesirable things that are not - necessarily wrong. - -- **ERROR** (400): Runtime errors that do not require immediate action but - should typically be logged and monitored. - -- **CRITICAL** (500): Critical conditions. Example: Application component - unavailable, unexpected exception. - -- **ALERT** (550): Action must be taken immediately. Example: Entire website - down, database unavailable, etc. This should trigger the SMS alerts and wake - you up. - -- **EMERGENCY** (600): Emergency: system is unusable. - -## Configuring a logger - -Here is a basic setup to log to a file and to firephp on the DEBUG level: - -```php -pushHandler(new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG)); -$logger->pushHandler(new FirePHPHandler()); - -// You can now use your logger -$logger->addInfo('My logger is now ready'); -``` - -Let's explain it. The first step is to create the logger instance which will -be used in your code. The argument is a channel name, which is useful when -you use several loggers (see below for more details about it). - -The logger itself does not know how to handle a record. It delegates it to -some handlers. The code above registers two handlers in the stack to allow -handling records in two different ways. - -Note that the FirePHPHandler is called first as it is added on top of the -stack. This allows you to temporarily add a logger with bubbling disabled if -you want to override other configured loggers. - -> If you use Monolog standalone and are looking for an easy way to -> configure many handlers, the [theorchard/monolog-cascade](https://github.com/theorchard/monolog-cascade) -> can help you build complex logging configs via PHP arrays, yaml or json configs. - -## Adding extra data in the records - -Monolog provides two different ways to add extra informations along the simple -textual message. - -### Using the logging context - -The first way is the context, allowing to pass an array of data along the -record: - -```php -addInfo('Adding a new user', array('username' => 'Seldaek')); -``` - -Simple handlers (like the StreamHandler for instance) will simply format -the array to a string but richer handlers can take advantage of the context -(FirePHP is able to display arrays in pretty way for instance). - -### Using processors - -The second way is to add extra data for all records by using a processor. -Processors can be any callable. They will get the record as parameter and -must return it after having eventually changed the `extra` part of it. Let's -write a processor adding some dummy data in the record: - -```php -pushProcessor(function ($record) { - $record['extra']['dummy'] = 'Hello world!'; - - return $record; -}); -``` - -Monolog provides some built-in processors that can be used in your project. -Look at the [dedicated chapter](https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md#processors) for the list. - -> Tip: processors can also be registered on a specific handler instead of - the logger to apply only for this handler. - -## Leveraging channels - -Channels are a great way to identify to which part of the application a record -is related. This is useful in big applications (and is leveraged by -MonologBundle in Symfony2). - -Picture two loggers sharing a handler that writes to a single log file. -Channels would allow you to identify the logger that issued every record. -You can easily grep through the log files filtering this or that channel. - -```php -pushHandler($stream); -$logger->pushHandler($firephp); - -// Create a logger for the security-related stuff with a different channel -$securityLogger = new Logger('security'); -$securityLogger->pushHandler($stream); -$securityLogger->pushHandler($firephp); - -// Or clone the first one to only change the channel -$securityLogger = $logger->withName('security'); -``` - -## Customizing the log format - -In Monolog it's easy to customize the format of the logs written into files, -sockets, mails, databases and other handlers. Most of the handlers use the - -```php -$record['formatted'] -``` - -value to be automatically put into the log device. This value depends on the -formatter settings. You can choose between predefined formatter classes or -write your own (e.g. a multiline text file for human-readable output). - -To configure a predefined formatter class, just set it as the handler's field: - -```php -// the default date format is "Y-m-d H:i:s" -$dateFormat = "Y n j, g:i a"; -// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n" -$output = "%datetime% > %level_name% > %message% %context% %extra%\n"; -// finally, create a formatter -$formatter = new LineFormatter($output, $dateFormat); - -// Create a handler -$stream = new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG); -$stream->setFormatter($formatter); -// bind it to a logger object -$securityLogger = new Logger('security'); -$securityLogger->pushHandler($stream); -``` - -You may also reuse the same formatter between multiple handlers and share those -handlers between multiple loggers. - -[Handlers, Formatters and Processors](02-handlers-formatters-processors.md) → diff --git a/api/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md b/api/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md deleted file mode 100644 index bea968a..0000000 --- a/api/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md +++ /dev/null @@ -1,157 +0,0 @@ -# Handlers, Formatters and Processors - -- [Handlers](#handlers) - - [Log to files and syslog](#log-to-files-and-syslog) - - [Send alerts and emails](#send-alerts-and-emails) - - [Log specific servers and networked logging](#log-specific-servers-and-networked-logging) - - [Logging in development](#logging-in-development) - - [Log to databases](#log-to-databases) - - [Wrappers / Special Handlers](#wrappers--special-handlers) -- [Formatters](#formatters) -- [Processors](#processors) -- [Third Party Packages](#third-party-packages) - -## Handlers - -### Log to files and syslog - -- _StreamHandler_: Logs records into any PHP stream, use this for log files. -- _RotatingFileHandler_: Logs records to a file and creates one logfile per day. - It will also delete files older than `$maxFiles`. You should use - [logrotate](http://linuxcommand.org/man_pages/logrotate8.html) for high profile - setups though, this is just meant as a quick and dirty solution. -- _SyslogHandler_: Logs records to the syslog. -- _ErrorLogHandler_: Logs records to PHP's - [`error_log()`](http://docs.php.net/manual/en/function.error-log.php) function. - -### Send alerts and emails - -- _NativeMailerHandler_: Sends emails using PHP's - [`mail()`](http://php.net/manual/en/function.mail.php) function. -- _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance. -- _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API. -- _HipChatHandler_: Logs records to a [HipChat](http://hipchat.com) chat room using its API. -- _FlowdockHandler_: Logs records to a [Flowdock](https://www.flowdock.com/) account. -- _SlackHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slack API. -- _SlackbotHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slackbot incoming hook. -- _SlackWebhookHandler_: Logs records to a [Slack](https://www.slack.com/) account using Slack Webhooks. -- _MandrillHandler_: Sends emails via the Mandrill API using a [`Swift_Message`](http://swiftmailer.org/) instance. -- _FleepHookHandler_: Logs records to a [Fleep](https://fleep.io/) conversation using Webhooks. -- _IFTTTHandler_: Notifies an [IFTTT](https://ifttt.com/maker) trigger with the log channel, level name and message. - -### Log specific servers and networked logging - -- _SocketHandler_: Logs records to [sockets](http://php.net/fsockopen), use this - for UNIX and TCP sockets. See an [example](sockets.md). -- _AmqpHandler_: Logs records to an [amqp](http://www.amqp.org/) compatible - server. Requires the [php-amqp](http://pecl.php.net/package/amqp) extension (1.0+). -- _GelfHandler_: Logs records to a [Graylog2](http://www.graylog2.org) server. -- _CubeHandler_: Logs records to a [Cube](http://square.github.com/cube/) server. -- _RavenHandler_: Logs records to a [Sentry](http://getsentry.com/) server using - [raven](https://packagist.org/packages/raven/raven). -- _ZendMonitorHandler_: Logs records to the Zend Monitor present in Zend Server. -- _NewRelicHandler_: Logs records to a [NewRelic](http://newrelic.com/) application. -- _LogglyHandler_: Logs records to a [Loggly](http://www.loggly.com/) account. -- _RollbarHandler_: Logs records to a [Rollbar](https://rollbar.com/) account. -- _SyslogUdpHandler_: Logs records to a remote [Syslogd](http://www.rsyslog.com/) server. -- _LogEntriesHandler_: Logs records to a [LogEntries](http://logentries.com/) account. - -### Logging in development - -- _FirePHPHandler_: Handler for [FirePHP](http://www.firephp.org/), providing - inline `console` messages within [FireBug](http://getfirebug.com/). -- _ChromePHPHandler_: Handler for [ChromePHP](http://www.chromephp.com/), providing - inline `console` messages within Chrome. -- _BrowserConsoleHandler_: Handler to send logs to browser's Javascript `console` with - no browser extension required. Most browsers supporting `console` API are supported. -- _PHPConsoleHandler_: Handler for [PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef), providing - inline `console` and notification popup messages within Chrome. - -### Log to databases - -- _RedisHandler_: Logs records to a [redis](http://redis.io) server. -- _MongoDBHandler_: Handler to write records in MongoDB via a - [Mongo](http://pecl.php.net/package/mongo) extension connection. -- _CouchDBHandler_: Logs records to a CouchDB server. -- _DoctrineCouchDBHandler_: Logs records to a CouchDB server via the Doctrine CouchDB ODM. -- _ElasticSearchHandler_: Logs records to an Elastic Search server. -- _DynamoDbHandler_: Logs records to a DynamoDB table with the [AWS SDK](https://github.com/aws/aws-sdk-php). - -### Wrappers / Special Handlers - -- _FingersCrossedHandler_: A very interesting wrapper. It takes a logger as - parameter and will accumulate log records of all levels until a record - exceeds the defined severity level. At which point it delivers all records, - including those of lower severity, to the handler it wraps. This means that - until an error actually happens you will not see anything in your logs, but - when it happens you will have the full information, including debug and info - records. This provides you with all the information you need, but only when - you need it. -- _DeduplicationHandler_: Useful if you are sending notifications or emails - when critical errors occur. It takes a logger as parameter and will - accumulate log records of all levels until the end of the request (or - `flush()` is called). At that point it delivers all records to the handler - it wraps, but only if the records are unique over a given time period - (60seconds by default). If the records are duplicates they are simply - discarded. The main use of this is in case of critical failure like if your - database is unreachable for example all your requests will fail and that - can result in a lot of notifications being sent. Adding this handler reduces - the amount of notifications to a manageable level. -- _WhatFailureGroupHandler_: This handler extends the _GroupHandler_ ignoring - exceptions raised by each child handler. This allows you to ignore issues - where a remote tcp connection may have died but you do not want your entire - application to crash and may wish to continue to log to other handlers. -- _BufferHandler_: This handler will buffer all the log records it receives - until `close()` is called at which point it will call `handleBatch()` on the - handler it wraps with all the log messages at once. This is very useful to - send an email with all records at once for example instead of having one mail - for every log record. -- _GroupHandler_: This handler groups other handlers. Every record received is - sent to all the handlers it is configured with. -- _FilterHandler_: This handler only lets records of the given levels through - to the wrapped handler. -- _SamplingHandler_: Wraps around another handler and lets you sample records - if you only want to store some of them. -- _NullHandler_: Any record it can handle will be thrown away. This can be used - to put on top of an existing handler stack to disable it temporarily. -- _PsrHandler_: Can be used to forward log records to an existing PSR-3 logger -- _TestHandler_: Used for testing, it records everything that is sent to it and - has accessors to read out the information. -- _HandlerWrapper_: A simple handler wrapper you can inherit from to create - your own wrappers easily. - -## Formatters - -- _LineFormatter_: Formats a log record into a one-line string. -- _HtmlFormatter_: Used to format log records into a human readable html table, mainly suitable for emails. -- _NormalizerFormatter_: Normalizes objects/resources down to strings so a record can easily be serialized/encoded. -- _ScalarFormatter_: Used to format log records into an associative array of scalar values. -- _JsonFormatter_: Encodes a log record into json. -- _WildfireFormatter_: Used to format log records into the Wildfire/FirePHP protocol, only useful for the FirePHPHandler. -- _ChromePHPFormatter_: Used to format log records into the ChromePHP format, only useful for the ChromePHPHandler. -- _GelfMessageFormatter_: Used to format log records into Gelf message instances, only useful for the GelfHandler. -- _LogstashFormatter_: Used to format log records into [logstash](http://logstash.net/) event json, useful for any handler listed under inputs [here](http://logstash.net/docs/latest). -- _ElasticaFormatter_: Used to format log records into an Elastica\Document object, only useful for the ElasticSearchHandler. -- _LogglyFormatter_: Used to format log records into Loggly messages, only useful for the LogglyHandler. -- _FlowdockFormatter_: Used to format log records into Flowdock messages, only useful for the FlowdockHandler. -- _MongoDBFormatter_: Converts \DateTime instances to \MongoDate and objects recursively to arrays, only useful with the MongoDBHandler. - -## Processors - -- _PsrLogMessageProcessor_: Processes a log record's message according to PSR-3 rules, replacing `{foo}` with the value from `$context['foo']`. -- _IntrospectionProcessor_: Adds the line/file/class/method from which the log call originated. -- _WebProcessor_: Adds the current request URI, request method and client IP to a log record. -- _MemoryUsageProcessor_: Adds the current memory usage to a log record. -- _MemoryPeakUsageProcessor_: Adds the peak memory usage to a log record. -- _ProcessIdProcessor_: Adds the process id to a log record. -- _UidProcessor_: Adds a unique identifier to a log record. -- _GitProcessor_: Adds the current git branch and commit to a log record. -- _TagProcessor_: Adds an array of predefined tags to a log record. - -## Third Party Packages - -Third party handlers, formatters and processors are -[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You -can also add your own there if you publish one. - -← [Usage](01-usage.md) | [Utility classes](03-utilities.md) → diff --git a/api/vendor/monolog/monolog/doc/03-utilities.md b/api/vendor/monolog/monolog/doc/03-utilities.md deleted file mode 100644 index c62aa41..0000000 --- a/api/vendor/monolog/monolog/doc/03-utilities.md +++ /dev/null @@ -1,13 +0,0 @@ -# Utilities - -- _Registry_: The `Monolog\Registry` class lets you configure global loggers that you - can then statically access from anywhere. It is not really a best practice but can - help in some older codebases or for ease of use. -- _ErrorHandler_: The `Monolog\ErrorHandler` class allows you to easily register - a Logger instance as an exception handler, error handler or fatal error handler. -- _ErrorLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain log - level is reached. -- _ChannelLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain - log level is reached, depending on which channel received the log record. - -← [Handlers, Formatters and Processors](02-handlers-formatters-processors.md) | [Extending Monolog](04-extending.md) → diff --git a/api/vendor/monolog/monolog/doc/04-extending.md b/api/vendor/monolog/monolog/doc/04-extending.md deleted file mode 100644 index ebd9104..0000000 --- a/api/vendor/monolog/monolog/doc/04-extending.md +++ /dev/null @@ -1,76 +0,0 @@ -# Extending Monolog - -Monolog is fully extensible, allowing you to adapt your logger to your needs. - -## Writing your own handler - -Monolog provides many built-in handlers. But if the one you need does not -exist, you can write it and use it in your logger. The only requirement is -to implement `Monolog\Handler\HandlerInterface`. - -Let's write a PDOHandler to log records to a database. We will extend the -abstract class provided by Monolog to keep things DRY. - -```php -pdo = $pdo; - parent::__construct($level, $bubble); - } - - protected function write(array $record) - { - if (!$this->initialized) { - $this->initialize(); - } - - $this->statement->execute(array( - 'channel' => $record['channel'], - 'level' => $record['level'], - 'message' => $record['formatted'], - 'time' => $record['datetime']->format('U'), - )); - } - - private function initialize() - { - $this->pdo->exec( - 'CREATE TABLE IF NOT EXISTS monolog ' - .'(channel VARCHAR(255), level INTEGER, message LONGTEXT, time INTEGER UNSIGNED)' - ); - $this->statement = $this->pdo->prepare( - 'INSERT INTO monolog (channel, level, message, time) VALUES (:channel, :level, :message, :time)' - ); - - $this->initialized = true; - } -} -``` - -You can now use this handler in your logger: - -```php -pushHandler(new PDOHandler(new PDO('sqlite:logs.sqlite'))); - -// You can now use your logger -$logger->addInfo('My logger is now ready'); -``` - -The `Monolog\Handler\AbstractProcessingHandler` class provides most of the -logic needed for the handler, including the use of processors and the formatting -of the record (which is why we use ``$record['formatted']`` instead of ``$record['message']``). - -← [Utility classes](03-utilities.md) diff --git a/api/vendor/monolog/monolog/doc/sockets.md b/api/vendor/monolog/monolog/doc/sockets.md deleted file mode 100644 index ea9cf0e..0000000 --- a/api/vendor/monolog/monolog/doc/sockets.md +++ /dev/null @@ -1,39 +0,0 @@ -Sockets Handler -=============== - -This handler allows you to write your logs to sockets using [fsockopen](http://php.net/fsockopen) -or [pfsockopen](http://php.net/pfsockopen). - -Persistent sockets are mainly useful in web environments where you gain some performance not closing/opening -the connections between requests. - -You can use a `unix://` prefix to access unix sockets and `udp://` to open UDP sockets instead of the default TCP. - -Basic Example -------------- - -```php -setPersistent(true); - -// Now add the handler -$logger->pushHandler($handler, Logger::DEBUG); - -// You can now use your logger -$logger->addInfo('My logger is now ready'); - -``` - -In this example, using syslog-ng, you should see the log on the log server: - - cweb1 [2012-02-26 00:12:03] my_logger.INFO: My logger is now ready [] [] - diff --git a/api/vendor/monolog/monolog/phpstan.neon.dist b/api/vendor/monolog/monolog/phpstan.neon.dist new file mode 100644 index 0000000..1fe45df --- /dev/null +++ b/api/vendor/monolog/monolog/phpstan.neon.dist @@ -0,0 +1,16 @@ +parameters: + level: 3 + + paths: + - src/ +# - tests/ + + + ignoreErrors: + - '#zend_monitor_|ZEND_MONITOR_#' + - '#RollbarNotifier#' + - '#Predis\\Client#' + - '#^Cannot call method ltrim\(\) on int\|false.$#' + - '#^Access to an undefined property Raven_Client::\$context.$#' + - '#MongoDB\\(Client|Collection)#' + - '#Gelf\\IMessagePublisher#' diff --git a/api/vendor/monolog/monolog/phpunit.xml.dist b/api/vendor/monolog/monolog/phpunit.xml.dist deleted file mode 100644 index 20d82b6..0000000 --- a/api/vendor/monolog/monolog/phpunit.xml.dist +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - tests/Monolog/ - - - - - - src/Monolog/ - - - - - - - diff --git a/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php index 7bfcd83..5121c2c 100644 --- a/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -38,6 +38,7 @@ class ErrorHandler private $hasFatalErrorHandler; private $fatalLevel; private $reservedMemory; + private $lastFatalTrace; private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR); public function __construct(LoggerInterface $logger) @@ -61,6 +62,7 @@ class ErrorHandler //Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929 class_exists('\\Psr\\Log\\LogLevel', true); + /** @phpstan-ignore-next-line */ $handler = new static($logger); if ($errorLevelMap !== false) { $handler->registerErrorHandler($errorLevelMap); @@ -132,7 +134,7 @@ class ErrorHandler { $this->logger->log( $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel, - sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()), + sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), array('exception' => $e) ); @@ -156,6 +158,13 @@ class ErrorHandler if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) { $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL; $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line)); + } else { + // http://php.net/manual/en/function.debug-backtrace.php + // As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. + // Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. + $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); + array_shift($trace); // Exclude handleError from trace + $this->lastFatalTrace = $trace; } if ($this->previousErrorHandler === true) { @@ -177,7 +186,7 @@ class ErrorHandler $this->logger->log( $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel, 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line']) + array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace) ); if ($this->logger instanceof Logger) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php index 02632bb..f8ead47 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php @@ -11,6 +11,8 @@ namespace Monolog\Formatter; +use Monolog\Utils; + /** * Class FluentdFormatter * @@ -62,6 +64,7 @@ class FluentdFormatter implements FormatterInterface $message = array( 'message' => $record['message'], + 'context' => $record['context'], 'extra' => $record['extra'], ); @@ -70,7 +73,7 @@ class FluentdFormatter implements FormatterInterface $message['level_name'] = $record['level_name']; } - return json_encode(array($tag, $record['datetime']->getTimestamp(), $message)); + return Utils::jsonEncode(array($tag, $record['datetime']->getTimestamp(), $message)); } public function formatBatch(array $records) diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php index 64e7665..2c1b0e8 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -22,7 +22,7 @@ use Gelf\Message; */ class GelfMessageFormatter extends NormalizerFormatter { - const MAX_LENGTH = 32766; + const DEFAULT_MAX_LENGTH = 32766; /** * @var string the name of the system for the Gelf log message @@ -39,6 +39,11 @@ class GelfMessageFormatter extends NormalizerFormatter */ protected $contextPrefix; + /** + * @var int max length per field + */ + protected $maxLength; + /** * Translates Monolog log levels to Graylog2 log priorities. */ @@ -53,7 +58,7 @@ class GelfMessageFormatter extends NormalizerFormatter Logger::EMERGENCY => 0, ); - public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_') + public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = null) { parent::__construct('U.u'); @@ -61,6 +66,7 @@ class GelfMessageFormatter extends NormalizerFormatter $this->extraPrefix = $extraPrefix; $this->contextPrefix = $contextPrefix; + $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength; } /** @@ -81,35 +87,30 @@ class GelfMessageFormatter extends NormalizerFormatter ->setHost($this->systemName) ->setLevel($this->logLevels[$record['level']]); - // start count with message length + system name length + 200 for padding / metadata + // message length + system name length + 200 for padding / metadata $len = 200 + strlen((string) $record['message']) + strlen($this->systemName); - if ($len > self::MAX_LENGTH) { - $message->setShortMessage(substr($record['message'], 0, self::MAX_LENGTH - 200)); - - return $message; + if ($len > $this->maxLength) { + $message->setShortMessage(substr($record['message'], 0, $this->maxLength)); } if (isset($record['channel'])) { $message->setFacility($record['channel']); - $len += strlen($record['channel']); } if (isset($record['extra']['line'])) { $message->setLine($record['extra']['line']); - $len += 10; unset($record['extra']['line']); } if (isset($record['extra']['file'])) { $message->setFile($record['extra']['file']); - $len += strlen($record['extra']['file']); unset($record['extra']['file']); } foreach ($record['extra'] as $key => $val) { $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len += strlen($this->extraPrefix . $key . $val); - if ($len > self::MAX_LENGTH) { - $message->setAdditional($this->extraPrefix . $key, substr($val, 0, self::MAX_LENGTH - $len)); + $len = strlen($this->extraPrefix . $key . $val); + if ($len > $this->maxLength) { + $message->setAdditional($this->extraPrefix . $key, substr($val, 0, $this->maxLength)); break; } $message->setAdditional($this->extraPrefix . $key, $val); @@ -117,9 +118,9 @@ class GelfMessageFormatter extends NormalizerFormatter foreach ($record['context'] as $key => $val) { $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len += strlen($this->contextPrefix . $key . $val); - if ($len > self::MAX_LENGTH) { - $message->setAdditional($this->contextPrefix . $key, substr($val, 0, self::MAX_LENGTH - $len)); + $len = strlen($this->contextPrefix . $key . $val); + if ($len > $this->maxLength) { + $message->setAdditional($this->contextPrefix . $key, substr($val, 0, $this->maxLength)); break; } $message->setAdditional($this->contextPrefix . $key, $val); diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php index 3eec95f..9e8d2d0 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php @@ -11,6 +11,7 @@ namespace Monolog\Formatter; use Monolog\Logger; +use Monolog\Utils; /** * Formats incoming records into an HTML table @@ -58,7 +59,7 @@ class HtmlFormatter extends NormalizerFormatter $td = '
    '.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
    '; } - return "\n$th:\n".$td."\n"; + return "\n$th:\n".$td."\n"; } /** @@ -133,9 +134,9 @@ class HtmlFormatter extends NormalizerFormatter $data = $this->normalize($data); if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + return Utils::jsonEncode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, true); } - return str_replace('\\/', '/', json_encode($data)); + return str_replace('\\/', '/', Utils::jsonEncode($data, null, true)); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php index 4b2be77..4c5422d 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -12,6 +12,7 @@ namespace Monolog\Formatter; use Exception; +use Monolog\Utils; use Throwable; /** @@ -28,6 +29,7 @@ class JsonFormatter extends NormalizerFormatter protected $batchMode; protected $appendNewline; + /** * @var bool */ @@ -35,9 +37,12 @@ class JsonFormatter extends NormalizerFormatter /** * @param int $batchMode + * @param bool $appendNewline + * @param int $maxDepth */ - public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true) + public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true, $maxDepth = 9) { + parent::__construct(null, $maxDepth); $this->batchMode = $batchMode; $this->appendNewline = $appendNewline; } @@ -136,18 +141,23 @@ class JsonFormatter extends NormalizerFormatter * * @return mixed */ - protected function normalize($data) + protected function normalize($data, $depth = 0) { - if (is_array($data) || $data instanceof \Traversable) { + if ($depth > $this->maxDepth) { + return 'Over '.$this->maxDepth.' levels deep, aborting normalization'; + } + + if (is_array($data)) { $normalized = array(); $count = 1; foreach ($data as $key => $value) { - if ($count++ >= 1000) { - $normalized['...'] = 'Over 1000 items, aborting normalization'; + if ($count++ > 1000) { + $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; break; } - $normalized[$key] = $this->normalize($value); + + $normalized[$key] = $this->normalize($value, $depth+1); } return $normalized; @@ -157,6 +167,10 @@ class JsonFormatter extends NormalizerFormatter return $this->normalizeException($data); } + if (is_resource($data)) { + return parent::normalize($data); + } + return $data; } @@ -172,13 +186,13 @@ class JsonFormatter extends NormalizerFormatter { // TODO 2.0 only check for Throwable if (!$e instanceof Exception && !$e instanceof Throwable) { - throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e)); + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); } $data = array( - 'class' => get_class($e), + 'class' => Utils::getClass($e), 'message' => $e->getMessage(), - 'code' => $e->getCode(), + 'code' => (int) $e->getCode(), 'file' => $e->getFile().':'.$e->getLine(), ); @@ -187,12 +201,6 @@ class JsonFormatter extends NormalizerFormatter foreach ($trace as $frame) { if (isset($frame['file'])) { $data['trace'][] = $frame['file'].':'.$frame['line']; - } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { - // We should again normalize the frames, because it might contain invalid items - $data['trace'][] = $frame['function']; - } else { - // We should again normalize the frames, because it might contain invalid items - $data['trace'][] = $this->normalize($frame); } } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php index d3e209e..acc1fd3 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -11,6 +11,8 @@ namespace Monolog\Formatter; +use Monolog\Utils; + /** * Formats incoming records into a one-line string * @@ -129,17 +131,17 @@ class LineFormatter extends NormalizerFormatter { // TODO 2.0 only check for Throwable if (!$e instanceof \Exception && !$e instanceof \Throwable) { - throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e)); + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); } $previousText = ''; if ($previous = $e->getPrevious()) { do { - $previousText .= ', '.get_class($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); + $previousText .= ', '.Utils::getClass($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); } while ($previous = $previous->getPrevious()); } - $str = '[object] ('.get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; + $str = '[object] ('.Utils::getClass($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; if ($this->includeStacktraces) { $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n"; } @@ -161,7 +163,7 @@ class LineFormatter extends NormalizerFormatter return $this->toJson($data, true); } - return str_replace('\\/', '/', @json_encode($data)); + return str_replace('\\/', '/', $this->toJson($data, true)); } protected function replaceNewlines($str) diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php index eb067bb..bd9e4c0 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php @@ -11,6 +11,8 @@ namespace Monolog\Formatter; +use Monolog\Utils; + /** * Formats a record for use with the MongoDBHandler. * @@ -75,7 +77,7 @@ class MongoDBFormatter implements FormatterInterface protected function formatObject($value, $nestingLevel) { $objectVars = get_object_vars($value); - $objectVars['class'] = get_class($value); + $objectVars['class'] = Utils::getClass($value); return $this->formatArray($objectVars, $nestingLevel); } @@ -83,9 +85,9 @@ class MongoDBFormatter implements FormatterInterface protected function formatException(\Exception $exception, $nestingLevel) { $formattedException = array( - 'class' => get_class($exception), + 'class' => Utils::getClass($exception), 'message' => $exception->getMessage(), - 'code' => $exception->getCode(), + 'code' => (int) $exception->getCode(), 'file' => $exception->getFile() . ':' . $exception->getLine(), ); diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php index d441488..010466b 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -12,6 +12,7 @@ namespace Monolog\Formatter; use Exception; +use Monolog\Utils; /** * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets @@ -23,13 +24,16 @@ class NormalizerFormatter implements FormatterInterface const SIMPLE_DATE = "Y-m-d H:i:s"; protected $dateFormat; + protected $maxDepth; /** * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + * @param int $maxDepth */ - public function __construct($dateFormat = null) + public function __construct($dateFormat = null, $maxDepth = 9) { $this->dateFormat = $dateFormat ?: static::SIMPLE_DATE; + $this->maxDepth = $maxDepth; if (!function_exists('json_encode')) { throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); } @@ -55,8 +59,28 @@ class NormalizerFormatter implements FormatterInterface return $records; } - protected function normalize($data) + /** + * @return int + */ + public function getMaxDepth() { + return $this->maxDepth; + } + + /** + * @param int $maxDepth + */ + public function setMaxDepth($maxDepth) + { + $this->maxDepth = $maxDepth; + } + + protected function normalize($data, $depth = 0) + { + if ($depth > $this->maxDepth) { + return 'Over '.$this->maxDepth.' levels deep, aborting normalization'; + } + if (null === $data || is_scalar($data)) { if (is_float($data)) { if (is_infinite($data)) { @@ -75,11 +99,12 @@ class NormalizerFormatter implements FormatterInterface $count = 1; foreach ($data as $key => $value) { - if ($count++ >= 1000) { + if ($count++ > 1000) { $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; break; } - $normalized[$key] = $this->normalize($value); + + $normalized[$key] = $this->normalize($value, $depth+1); } return $normalized; @@ -103,7 +128,7 @@ class NormalizerFormatter implements FormatterInterface $value = $this->toJson($data, true); } - return sprintf("[object] (%s: %s)", get_class($data), $value); + return sprintf("[object] (%s: %s)", Utils::getClass($data), $value); } if (is_resource($data)) { @@ -117,13 +142,13 @@ class NormalizerFormatter implements FormatterInterface { // TODO 2.0 only check for Throwable if (!$e instanceof Exception && !$e instanceof \Throwable) { - throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e)); + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); } $data = array( - 'class' => get_class($e), + 'class' => Utils::getClass($e), 'message' => $e->getMessage(), - 'code' => $e->getCode(), + 'code' => (int) $e->getCode(), 'file' => $e->getFile().':'.$e->getLine(), ); @@ -137,7 +162,11 @@ class NormalizerFormatter implements FormatterInterface } if (isset($e->detail)) { - $data['detail'] = $e->detail; + if (is_string($e->detail)) { + $data['detail'] = $e->detail; + } elseif (is_object($e->detail) || is_array($e->detail)) { + $data['detail'] = $this->toJson($e->detail, true); + } } } @@ -145,12 +174,6 @@ class NormalizerFormatter implements FormatterInterface foreach ($trace as $frame) { if (isset($frame['file'])) { $data['trace'][] = $frame['file'].':'.$frame['line']; - } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { - // We should again normalize the frames, because it might contain invalid items - $data['trace'][] = $frame['function']; - } else { - // We should again normalize the frames, because it might contain invalid items - $data['trace'][] = $this->toJson($this->normalize($frame), true); } } @@ -171,127 +194,6 @@ class NormalizerFormatter implements FormatterInterface */ protected function toJson($data, $ignoreErrors = false) { - // suppress json_encode errors since it's twitchy with some inputs - if ($ignoreErrors) { - return @$this->jsonEncode($data); - } - - $json = $this->jsonEncode($data); - - if ($json === false) { - $json = $this->handleJsonError(json_last_error(), $data); - } - - return $json; + return Utils::jsonEncode($data, null, $ignoreErrors); } - - /** - * @param mixed $data - * @return string JSON encoded data or null on failure - */ - private function jsonEncode($data) - { - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - } - - return json_encode($data); - } - - /** - * Handle a json_encode failure. - * - * If the failure is due to invalid string encoding, try to clean the - * input and encode again. If the second encoding attempt fails, the - * inital error is not encoding related or the input can't be cleaned then - * raise a descriptive exception. - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException if failure can't be corrected - * @return string JSON encoded data after error correction - */ - private function handleJsonError($code, $data) - { - if ($code !== JSON_ERROR_UTF8) { - $this->throwEncodeError($code, $data); - } - - if (is_string($data)) { - $this->detectAndCleanUtf8($data); - } elseif (is_array($data)) { - array_walk_recursive($data, array($this, 'detectAndCleanUtf8')); - } else { - $this->throwEncodeError($code, $data); - } - - $json = $this->jsonEncode($data); - - if ($json === false) { - $this->throwEncodeError(json_last_error(), $data); - } - - return $json; - } - - /** - * Throws an exception according to a given code with a customized message - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException - */ - private function throwEncodeError($code, $data) - { - switch ($code) { - case JSON_ERROR_DEPTH: - $msg = 'Maximum stack depth exceeded'; - break; - case JSON_ERROR_STATE_MISMATCH: - $msg = 'Underflow or the modes mismatch'; - break; - case JSON_ERROR_CTRL_CHAR: - $msg = 'Unexpected control character found'; - break; - case JSON_ERROR_UTF8: - $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; - break; - default: - $msg = 'Unknown error'; - } - - throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); - } - - /** - * Detect invalid UTF-8 string characters and convert to valid UTF-8. - * - * Valid UTF-8 input will be left unmodified, but strings containing - * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed - * original encoding of ISO-8859-15. This conversion may result in - * incorrect output if the actual encoding was not ISO-8859-15, but it - * will be clean UTF-8 output and will not rely on expensive and fragile - * detection algorithms. - * - * Function converts the input in place in the passed variable so that it - * can be used as a callback for array_walk_recursive. - * - * @param mixed &$data Input to check and convert if needed - * @private - */ - public function detectAndCleanUtf8(&$data) - { - if (is_string($data) && !preg_match('//u', $data)) { - $data = preg_replace_callback( - '/[\x80-\xFF]+/', - function ($m) { return utf8_encode($m[0]); }, - $data - ); - $data = str_replace( - array('¤', '¦', '¨', '´', '¸', '¼', '½', '¾'), - array('€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'), - $data - ); - } - } -} +} \ No newline at end of file diff --git a/api/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/api/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php index 654710a..65dba99 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +++ b/api/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php @@ -102,12 +102,12 @@ class WildfireFormatter extends NormalizerFormatter throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); } - protected function normalize($data) + protected function normalize($data, $depth = 0) { if (is_object($data) && !$data instanceof \DateTime) { return $data; } - return parent::normalize($data); + return parent::normalize($data, $depth); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php index 758a425..cdd9f7d 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php @@ -11,16 +11,17 @@ namespace Monolog\Handler; -use Monolog\Logger; use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\LineFormatter; +use Monolog\Logger; +use Monolog\ResettableInterface; /** * Base Handler class providing the Handler structure * * @author Jordi Boggiano */ -abstract class AbstractHandler implements HandlerInterface +abstract class AbstractHandler implements HandlerInterface, ResettableInterface { protected $level = Logger::DEBUG; protected $bubble = true; @@ -32,8 +33,8 @@ abstract class AbstractHandler implements HandlerInterface protected $processors = array(); /** - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param int|string $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($level = Logger::DEBUG, $bubble = true) { @@ -141,8 +142,8 @@ abstract class AbstractHandler implements HandlerInterface /** * Sets the bubbling behavior. * - * @param Boolean $bubble true means that this handler allows bubbling. - * false means that bubbling is not permitted. + * @param bool $bubble true means that this handler allows bubbling. + * false means that bubbling is not permitted. * @return self */ public function setBubble($bubble) @@ -155,8 +156,8 @@ abstract class AbstractHandler implements HandlerInterface /** * Gets the bubbling behavior. * - * @return Boolean true means that this handler allows bubbling. - * false means that bubbling is not permitted. + * @return bool true means that this handler allows bubbling. + * false means that bubbling is not permitted. */ public function getBubble() { @@ -174,6 +175,15 @@ abstract class AbstractHandler implements HandlerInterface } } + public function reset() + { + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } + /** * Gets the default formatter. * diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php index 6f18f72..e1e8953 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php @@ -11,6 +11,8 @@ namespace Monolog\Handler; +use Monolog\ResettableInterface; + /** * Base Handler class providing the Handler structure * diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php index e2b2832..8c76aca 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php @@ -53,9 +53,9 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler ); /** - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php index b3a21bd..68feb48 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -43,11 +43,11 @@ class BrowserConsoleHandler extends AbstractProcessingHandler protected function write(array $record) { // Accumulate records - self::$records[] = $record; + static::$records[] = $record; // Register shutdown handler if not already done - if (!self::$initialized) { - self::$initialized = true; + if (!static::$initialized) { + static::$initialized = true; $this->registerShutdownFunction(); } } @@ -58,27 +58,37 @@ class BrowserConsoleHandler extends AbstractProcessingHandler */ public static function send() { - $format = self::getResponseFormat(); + $format = static::getResponseFormat(); if ($format === 'unknown') { return; } - if (count(self::$records)) { + if (count(static::$records)) { if ($format === 'html') { - self::writeOutput(''); + static::writeOutput(''); } elseif ($format === 'js') { - self::writeOutput(self::generateScript()); + static::writeOutput(static::generateScript()); } - self::reset(); + static::resetStatic(); } } + public function close() + { + self::resetStatic(); + } + + public function reset() + { + self::resetStatic(); + } + /** * Forget all logged records */ - public static function reset() + public static function resetStatic() { - self::$records = array(); + static::$records = array(); } /** @@ -133,18 +143,18 @@ class BrowserConsoleHandler extends AbstractProcessingHandler private static function generateScript() { $script = array(); - foreach (self::$records as $record) { - $context = self::dump('Context', $record['context']); - $extra = self::dump('Extra', $record['extra']); + foreach (static::$records as $record) { + $context = static::dump('Context', $record['context']); + $extra = static::dump('Extra', $record['extra']); if (empty($context) && empty($extra)) { - $script[] = self::call_array('log', self::handleStyles($record['formatted'])); + $script[] = static::call_array('log', static::handleStyles($record['formatted'])); } else { $script = array_merge($script, - array(self::call_array('groupCollapsed', self::handleStyles($record['formatted']))), + array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))), $context, $extra, - array(self::call('groupEnd')) + array(static::call('groupEnd')) ); } } @@ -154,21 +164,22 @@ class BrowserConsoleHandler extends AbstractProcessingHandler private static function handleStyles($formatted) { - $args = array(self::quote('font-weight: normal')); + $args = array(); $format = '%c' . $formatted; preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); foreach (array_reverse($matches) as $match) { - $args[] = self::quote(self::handleCustomStyles($match[2][0], $match[1][0])); $args[] = '"font-weight: normal"'; + $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); $pos = $match[0][1]; $format = substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . substr($format, $pos + strlen($match[0][0])); } - array_unshift($args, self::quote($format)); + $args[] = static::quote('font-weight: normal'); + $args[] = static::quote($format); - return $args; + return array_reverse($args); } private static function handleCustomStyles($style, $string) @@ -198,13 +209,13 @@ class BrowserConsoleHandler extends AbstractProcessingHandler if (empty($dict)) { return $script; } - $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); + $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title)); foreach ($dict as $key => $value) { $value = json_encode($value); if (empty($value)) { - $value = self::quote(''); + $value = static::quote(''); } - $script[] = self::call('log', self::quote('%s: %o'), self::quote($key), $value); + $script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value); } return $script; @@ -220,7 +231,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler $args = func_get_args(); $method = array_shift($args); - return self::call_array($method, $args); + return static::call_array($method, $args); } private static function call_array($method, array $args) diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php index 72f8953..0957e55 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php @@ -12,6 +12,8 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; /** * Buffers all records until closing the handler and then pass them as batch. @@ -34,8 +36,8 @@ class BufferHandler extends AbstractHandler * @param HandlerInterface $handler Handler. * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded */ public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) { @@ -114,4 +116,33 @@ class BufferHandler extends AbstractHandler $this->bufferSize = 0; $this->buffer = array(); } + + public function reset() + { + $this->flush(); + + parent::reset(); + + if ($this->handler instanceof ResettableInterface) { + $this->handler->reset(); + } + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->handler->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->handler->getFormatter(); + } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php index b00fa84..47120e5 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -13,6 +13,7 @@ namespace Monolog\Handler; use Monolog\Formatter\ChromePHPFormatter; use Monolog\Logger; +use Monolog\Utils; /** * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) @@ -32,20 +33,20 @@ class ChromePHPHandler extends AbstractProcessingHandler * Header name */ const HEADER_NAME = 'X-ChromeLogger-Data'; - + /** * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) */ - const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; + const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; protected static $initialized = false; /** * Tracks whether we sent too much data * - * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending + * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending * - * @var Boolean + * @var bool */ protected static $overflowed = false; @@ -58,8 +59,8 @@ class ChromePHPHandler extends AbstractProcessingHandler protected static $sendHeaders = true; /** - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($level = Logger::DEBUG, $bubble = true) { @@ -134,9 +135,9 @@ class ChromePHPHandler extends AbstractProcessingHandler self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; } - $json = @json_encode(self::$json); + $json = Utils::jsonEncode(self::$json, null, true); $data = base64_encode(utf8_encode($json)); - if (strlen($data) > 240 * 1024) { + if (strlen($data) > 3 * 1024) { self::$overflowed = true; $record = array( @@ -149,7 +150,7 @@ class ChromePHPHandler extends AbstractProcessingHandler 'extra' => array(), ); self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = @json_encode(self::$json); + $json = Utils::jsonEncode(self::$json, null, true); $data = base64_encode(utf8_encode($json)); } @@ -174,7 +175,7 @@ class ChromePHPHandler extends AbstractProcessingHandler /** * Verifies if the headers are accepted by the current user agent * - * @return Boolean + * @return bool */ protected function headersAccepted() { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php index 96b3ca0..44928ef 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; /** * Logs to Cube. @@ -119,9 +120,9 @@ class CubeHandler extends AbstractProcessingHandler $data['data']['level'] = $record['level']; if ($this->scheme === 'http') { - $this->writeHttp(json_encode($data)); + $this->writeHttp(Utils::jsonEncode($data)); } else { - $this->writeUdp(json_encode($data)); + $this->writeUdp(Utils::jsonEncode($data)); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php index 7778c22..35b55cb 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php @@ -60,7 +60,7 @@ class DeduplicationHandler extends BufferHandler * @param string $deduplicationStore The file/path where the deduplication log should be kept * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php index ad1011d..8846e0a 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php @@ -11,7 +11,7 @@ namespace Monolog\Handler; -use Aws\Common\Aws; +use Aws\Sdk; use Aws\DynamoDb\DynamoDbClient; use Aws\DynamoDb\Marshaler; use Monolog\Formatter\ScalarFormatter; @@ -55,7 +55,7 @@ class DynamoDbHandler extends AbstractProcessingHandler */ public function __construct(DynamoDbClient $client, $table, $level = Logger::DEBUG, $bubble = true) { - if (defined('Aws\Common\Aws::VERSION') && version_compare(Aws::VERSION, '3.0', '>=')) { + if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) { $this->version = 3; $this->marshaler = new Marshaler; } else { @@ -77,6 +77,7 @@ class DynamoDbHandler extends AbstractProcessingHandler if ($this->version === 3) { $formatted = $this->marshaler->marshalItem($filtered); } else { + /** @phpstan-ignore-next-line */ $formatted = $this->client->formatAttributes($filtered); } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php index 8196740..bb0f83e 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php @@ -46,10 +46,10 @@ class ElasticSearchHandler extends AbstractProcessingHandler protected $options = array(); /** - * @param Client $client Elastica Client object - * @param array $options Handler configuration - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param Client $client Elastica Client object + * @param array $options Handler configuration + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php index 1447a58..b2986b0 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -28,10 +28,10 @@ class ErrorLogHandler extends AbstractProcessingHandler protected $expandNewlines; /** - * @param int $messageType Says where the error should go. - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries + * @param int $messageType Says where the error should go. + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries */ public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php index 2a0f7fd..949f227 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Formatter\FormatterInterface; /** * Simple handler wrapper that filters records based on a list of levels @@ -40,15 +41,15 @@ class FilterHandler extends AbstractHandler /** * Whether the messages that are handled can bubble up the stack or not * - * @var Boolean + * @var bool */ protected $bubble; /** - * @param callable|HandlerInterface $handler Handler or factory callable($record, $this). + * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $filterHandler). * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) { @@ -104,21 +105,13 @@ class FilterHandler extends AbstractHandler return false; } - // The same logic as in FingersCrossedHandler - if (!$this->handler instanceof HandlerInterface) { - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - if ($this->processors) { foreach ($this->processors as $processor) { $record = call_user_func($processor, $record); } } - $this->handler->handle($record); + $this->getHandler($record)->handle($record); return false === $this->bubble; } @@ -135,6 +128,45 @@ class FilterHandler extends AbstractHandler } } - $this->handler->handleBatch($filtered); + if (count($filtered) > 0) { + $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered); + } + } + + /** + * Return the nested handler + * + * If the handler was provided as a factory callable, this will trigger the handler's instantiation. + * + * @return HandlerInterface + */ + public function getHandler(array $record = null) + { + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + return $this->handler; + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->getHandler()->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->getHandler()->getFormatter(); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php index c3e42ef..aaca12c 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -22,7 +22,7 @@ interface ActivationStrategyInterface * Returns whether the given record activates the handler. * * @param array $record - * @return Boolean + * @return bool */ public function isHandlerActivated(array $record); } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php index d1dcaac..cdabc44 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -14,6 +14,8 @@ namespace Monolog\Handler; use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; use Monolog\Logger; +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; /** * Buffers all records until a certain level is reached @@ -38,11 +40,11 @@ class FingersCrossedHandler extends AbstractHandler protected $passthruLevel; /** - * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler). * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $stopBuffering Whether the handler should stop buffering after being triggered (default true) + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered */ public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = null) @@ -87,15 +89,7 @@ class FingersCrossedHandler extends AbstractHandler if ($this->stopBuffering) { $this->buffering = false; } - if (!$this->handler instanceof HandlerInterface) { - $record = end($this->buffer) ?: null; - - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - $this->handler->handleBatch($this->buffer); + $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); $this->buffer = array(); } @@ -119,7 +113,7 @@ class FingersCrossedHandler extends AbstractHandler $this->activate(); } } else { - $this->handler->handle($record); + $this->getHandler($record)->handle($record); } return false === $this->bubble; @@ -130,24 +124,18 @@ class FingersCrossedHandler extends AbstractHandler */ public function close() { - if (null !== $this->passthruLevel) { - $level = $this->passthruLevel; - $this->buffer = array_filter($this->buffer, function ($record) use ($level) { - return $record['level'] >= $level; - }); - if (count($this->buffer) > 0) { - $this->handler->handleBatch($this->buffer); - $this->buffer = array(); - } - } + $this->flushBuffer(); } - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ public function reset() { - $this->buffering = true; + $this->flushBuffer(); + + parent::reset(); + + if ($this->getHandler() instanceof ResettableInterface) { + $this->getHandler()->reset(); + } } /** @@ -160,4 +148,60 @@ class FingersCrossedHandler extends AbstractHandler $this->buffer = array(); $this->reset(); } + + /** + * Resets the state of the handler. Stops forwarding records to the wrapped handler. + */ + private function flushBuffer() + { + if (null !== $this->passthruLevel) { + $level = $this->passthruLevel; + $this->buffer = array_filter($this->buffer, function ($record) use ($level) { + return $record['level'] >= $level; + }); + if (count($this->buffer) > 0) { + $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); + } + } + + $this->buffer = array(); + $this->buffering = true; + } + + /** + * Return the nested handler + * + * If the handler was provided as a factory callable, this will trigger the handler's instantiation. + * + * @return HandlerInterface + */ + public function getHandler(array $record = null) + { + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + return $this->handler; + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->getHandler()->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->getHandler()->getFormatter(); + } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php index fee4795..2a171bd 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php @@ -72,7 +72,7 @@ class FirePHPHandler extends AbstractProcessingHandler * * @see createHeader() * @param array $record - * @return string + * @return array */ protected function createRecordHeader(array $record) { @@ -158,7 +158,7 @@ class FirePHPHandler extends AbstractProcessingHandler /** * Verifies if the headers are accepted by the current user agent * - * @return Boolean + * @return bool */ protected function headersAccepted() { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php index dd9a361..f0f010c 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; use Monolog\Formatter\FlowdockFormatter; use Monolog\Formatter\FormatterInterface; @@ -105,7 +106,7 @@ class FlowdockHandler extends SocketHandler */ private function buildContent($record) { - return json_encode($record['formatted']['flowdock']); + return Utils::jsonEncode($record['formatted']['flowdock']); } /** diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php new file mode 100644 index 0000000..3e2f1b2 --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; + +/** + * Interface to describe loggers that have a formatter + * + * This interface is present in monolog 1.x to ease forward compatibility. + * + * @author Jordi Boggiano + */ +interface FormattableHandlerInterface +{ + /** + * Sets the formatter. + * + * @param FormatterInterface $formatter + * @return HandlerInterface self + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface; + + /** + * Gets the formatter. + * + * @return FormatterInterface + */ + public function getFormatter(): FormatterInterface; +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/api/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php new file mode 100644 index 0000000..e9ec5e7 --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; + +/** + * Helper trait for implementing FormattableInterface + * + * This trait is present in monolog 1.x to ease forward compatibility. + * + * @author Jordi Boggiano + */ +trait FormattableHandlerTrait +{ + /** + * @var FormatterInterface + */ + protected $formatter; + + /** + * {@inheritdoc} + * @suppress PhanTypeMismatchReturn + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + $this->formatter = $formatter; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter(): FormatterInterface + { + if (!$this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + + return $this->formatter; + } + + /** + * Gets the default formatter. + * + * Overwrite this if the LineFormatter is not a good default for your handler. + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter(); + } +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php index d3847d8..b6cde7c 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php @@ -27,7 +27,7 @@ use Monolog\Formatter\GelfMessageFormatter; class GelfHandler extends AbstractProcessingHandler { /** - * @var Publisher the publisher object that sends the message to the server + * @var Publisher|PublisherInterface|IMessagePublisher the publisher object that sends the message to the server */ protected $publisher; @@ -47,14 +47,6 @@ class GelfHandler extends AbstractProcessingHandler $this->publisher = $publisher; } - /** - * {@inheritdoc} - */ - public function close() - { - $this->publisher = null; - } - /** * {@inheritdoc} */ diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php index 663f5a9..0d461f9 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Formatter\FormatterInterface; +use Monolog\ResettableInterface; /** * Forwards records to multiple handlers @@ -23,8 +24,8 @@ class GroupHandler extends AbstractHandler protected $handlers; /** - * @param array $handlers Array of Handlers. - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param array $handlers Array of Handlers. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(array $handlers, $bubble = true) { @@ -79,8 +80,9 @@ class GroupHandler extends AbstractHandler $processed = array(); foreach ($records as $record) { foreach ($this->processors as $processor) { - $processed[] = call_user_func($processor, $record); + $record = call_user_func($processor, $record); } + $processed[] = $record; } $records = $processed; } @@ -90,6 +92,17 @@ class GroupHandler extends AbstractHandler } } + public function reset() + { + parent::reset(); + + foreach ($this->handlers as $handler) { + if ($handler instanceof ResettableInterface) { + $handler->reset(); + } + } + } + /** * {@inheritdoc} */ diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php index d920c4b..8d5a4a0 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php @@ -31,7 +31,7 @@ interface HandlerInterface * * @param array $record Partial log record containing only a level key * - * @return Boolean + * @return bool */ public function isHandling(array $record); @@ -46,7 +46,7 @@ interface HandlerInterface * calling further handlers in the stack with a given log record. * * @param array $record The record to handle - * @return Boolean true means that this handler handled the record, and that bubbling is not permitted. + * @return bool true means that this handler handled the record, and that bubbling is not permitted. * false means the record was either not processed or that this handler allows bubbling. */ public function handle(array $record); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php index 56bc270..55e6498 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php @@ -11,24 +11,27 @@ namespace Monolog\Handler; +use Monolog\ResettableInterface; use Monolog\Formatter\FormatterInterface; /** * This simple wrapper class can be used to extend handlers functionality. * - * Example: A filtering handle. Inherit from this class, override isHandling() like this + * Example: A custom filtering that can be applied to any handler. * - * public function isHandling(array $record) - * { - * if ($record meets certain conditions) { - * return false; - * } - * return $this->handler->isHandling($record); - * } + * Inherit from this class and override handle() like this: + * + * public function handle(array $record) + * { + * if ($record meets certain conditions) { + * return false; + * } + * return $this->handler->handle($record); + * } * * @author Alexey Karapetov */ -class HandlerWrapper implements HandlerInterface +class HandlerWrapper implements HandlerInterface, ResettableInterface { /** * @var HandlerInterface @@ -103,4 +106,11 @@ class HandlerWrapper implements HandlerInterface { return $this->handler->getFormatter(); } + + public function reset() + { + if ($this->handler instanceof ResettableInterface) { + return $this->handler->reset(); + } + } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php index 73049f3..30258e3 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php @@ -97,6 +97,8 @@ class HipChatHandler extends SocketHandler */ public function __construct($token, $room, $name = 'Monolog', $notify = false, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $format = 'text', $host = 'api.hipchat.com', $version = self::API_V1) { + @trigger_error('The Monolog\Handler\HipChatHandler class is deprecated. You should migrate to Slack and the SlackWebhookHandler / SlackbotHandler, see https://www.atlassian.com/partnerships/slack', E_USER_DEPRECATED); + if ($version == self::API_V1 && !$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) { throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.'); } @@ -219,6 +221,21 @@ class HipChatHandler extends SocketHandler protected function write(array $record) { parent::write($record); + $this->finalizeWrite(); + } + + /** + * Finalizes the request by reading some bytes and then closing the socket + * + * If we do not read some but close the socket too early, hipchat sometimes + * drops the request entirely. + */ + protected function finalizeWrite() + { + $res = $this->getResource(); + if (is_resource($res)) { + @fread($res, 2048); + } $this->closeSocket(); } @@ -253,10 +270,10 @@ class HipChatHandler extends SocketHandler * will be the highest level from the given records. Datetime will be taken * from the first record. * - * @param $records + * @param array $records * @return array */ - private function combineRecords($records) + private function combineRecords(array $records) { $batchRecord = null; $batchRecords = array(); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php index d60a3c8..f4d3b97 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; /** * IFTTTHandler uses cURL to trigger IFTTT Maker actions @@ -30,10 +31,10 @@ class IFTTTHandler extends AbstractProcessingHandler private $secretKey; /** - * @param string $eventName The name of the IFTTT Maker event that should be triggered - * @param string $secretKey A valid IFTTT secret key - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $eventName The name of the IFTTT Maker event that should be triggered + * @param string $secretKey A valid IFTTT secret key + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true) { @@ -53,7 +54,7 @@ class IFTTTHandler extends AbstractProcessingHandler "value2" => $record["level_name"], "value3" => $record["message"], ); - $postString = json_encode($postData); + $postString = Utils::jsonEncode($postData); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php new file mode 100644 index 0000000..8f683dc --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + namespace Monolog\Handler; + + use Monolog\Logger; + +/** + * Inspired on LogEntriesHandler. + * + * @author Robert Kaufmann III + * @author Gabriel Machado + */ +class InsightOpsHandler extends SocketHandler +{ + /** + * @var string + */ + protected $logToken; + + /** + * @param string $token Log token supplied by InsightOps + * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. + * @param bool $useSSL Whether or not SSL encryption should be used + * @param int $level The minimum logging level to trigger this handler + * @param bool $bubble Whether or not messages that are handled should bubble up the stack. + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct($token, $region = 'us', $useSSL = true, $level = Logger::DEBUG, $bubble = true) + { + if ($useSSL && !extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); + } + + $endpoint = $useSSL + ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' + : $region . '.data.logs.insight.rapid7.com:80'; + + parent::__construct($endpoint, $level, $bubble); + $this->logToken = $token; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + return $this->logToken . ' ' . $record['formatted']; + } +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php index 494c605..ea89fb3 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php @@ -31,13 +31,13 @@ class LogEntriesHandler extends SocketHandler * * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing */ - public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true) + public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true, $host = 'data.logentries.com') { if ($useSSL && !extension_loaded('openssl')) { throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); } - $endpoint = $useSSL ? 'ssl://data.logentries.com:443' : 'data.logentries.com:80'; + $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; parent::__construct($endpoint, $level, $bubble); $this->logToken = $token; } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php index ab95924..de039a8 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php @@ -27,7 +27,7 @@ class MandrillHandler extends MailHandler * @param string $apiKey A valid Mandrill API key * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true) { @@ -50,7 +50,11 @@ class MandrillHandler extends MailHandler { $message = clone $this->message; $message->setBody($content); - $message->setDate(time()); + if (version_compare(\Swift::VERSION, '6.0.0', '>=')) { + $message->setDate(new \DateTimeImmutable()); + } else { + $message->setDate(time()); + } $ch = curl_init(); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php index 6718e9e..64dc138 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -12,12 +12,15 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; use Monolog\Formatter\NormalizerFormatter; /** * Class to record a log on a NewRelic application. * Enabling New Relic High Security mode may prevent capture of useful information. * + * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted'] + * * @see https://docs.newrelic.com/docs/agents/php-agent * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security */ @@ -84,7 +87,7 @@ class NewRelicHandler extends AbstractProcessingHandler unset($record['formatted']['context']['transaction_name']); } - if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) { + if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { newrelic_notice_error($record['message'], $record['context']['exception']); unset($record['formatted']['context']['exception']); } else { @@ -188,7 +191,7 @@ class NewRelicHandler extends AbstractProcessingHandler if (null === $value || is_scalar($value)) { newrelic_add_custom_parameter($key, $value); } else { - newrelic_add_custom_parameter($key, @json_encode($value)); + newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php index 1f2076a..d0a8b43 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -14,6 +14,7 @@ namespace Monolog\Handler; use Exception; use Monolog\Formatter\LineFormatter; use Monolog\Logger; +use Monolog\Utils; use PhpConsole\Connector; use PhpConsole\Handler; use PhpConsole\Helper; @@ -188,7 +189,7 @@ class PHPConsoleHandler extends AbstractProcessingHandler $tags = $this->getRecordTags($record); $message = $record['message']; if ($record['context']) { - $message .= ' ' . json_encode($this->connector->getDumper()->dump(array_filter($record['context']))); + $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($record['context'])), null, true); } $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/api/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php new file mode 100644 index 0000000..66a3d83 --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Processor\ProcessorInterface; + +/** + * Interface to describe loggers that have processors + * + * This interface is present in monolog 1.x to ease forward compatibility. + * + * @author Jordi Boggiano + */ +interface ProcessableHandlerInterface +{ + /** + * Adds a processor in the stack. + * + * @param ProcessorInterface|callable $callback + * @return HandlerInterface self + */ + public function pushProcessor($callback): HandlerInterface; + + /** + * Removes the processor on top of the stack and returns it. + * + * @throws \LogicException In case the processor stack is empty + * @return callable + */ + public function popProcessor(): callable; +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/api/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php new file mode 100644 index 0000000..09f32a1 --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\ResettableInterface; + +/** + * Helper trait for implementing ProcessableInterface + * + * This trait is present in monolog 1.x to ease forward compatibility. + * + * @author Jordi Boggiano + */ +trait ProcessableHandlerTrait +{ + /** + * @var callable[] + */ + protected $processors = []; + + /** + * {@inheritdoc} + * @suppress PhanTypeMismatchReturn + */ + public function pushProcessor($callback): HandlerInterface + { + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor(): callable + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * Processes a record. + */ + protected function processRecord(array $record): array + { + foreach ($this->processors as $processor) { + $record = $processor($record); + } + + return $record; + } + + protected function resetProcessors(): void + { + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php index 1ae8584..a99e6ab 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php @@ -31,7 +31,7 @@ class PsrHandler extends AbstractHandler /** * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php index bba7200..f27bb3d 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php @@ -69,8 +69,8 @@ class PushoverHandler extends SocketHandler * @param string|array $users Pushover user id or array of ids the message will be sent to * @param string $title Title sent to the Pushover API * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $useSSL Whether to connect via SSL. Required when pushing messages to users that are not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not * the pushover.net app owner. OpenSSL is required for this option. * @param int $highPriorityLevel The minimum logging level at which this handler will start * sending "high priority" requests to the Pushover API @@ -180,6 +180,6 @@ class PushoverHandler extends SocketHandler */ public function useFormattedMessage($value) { - $this->useFormattedMessage = (boolean) $value; + $this->useFormattedMessage = (bool) $value; } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php index 53a8b39..b0298fa 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php @@ -18,7 +18,7 @@ use Raven_Client; /** * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server - * using raven-php (https://github.com/getsentry/raven-php) + * using sentry-php (https://github.com/getsentry/sentry-php) * * @author Marc Abramowitz */ @@ -27,7 +27,7 @@ class RavenHandler extends AbstractProcessingHandler /** * Translates Monolog log levels to Raven log levels. */ - private $logLevels = array( + protected $logLevels = array( Logger::DEBUG => Raven_Client::DEBUG, Logger::INFO => Raven_Client::INFO, Logger::NOTICE => Raven_Client::INFO, @@ -42,7 +42,7 @@ class RavenHandler extends AbstractProcessingHandler * @var string should represent the current version of the calling * software. Can be any string (git commit, version number) */ - private $release; + protected $release; /** * @var Raven_Client the client object that sends the message to the server @@ -50,17 +50,19 @@ class RavenHandler extends AbstractProcessingHandler protected $ravenClient; /** - * @var LineFormatter The formatter to use for the logs generated via handleBatch() + * @var FormatterInterface The formatter to use for the logs generated via handleBatch() */ protected $batchFormatter; /** * @param Raven_Client $ravenClient * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) { + @trigger_error('The Monolog\Handler\RavenHandler class is deprecated. You should rather upgrade to the sentry/sentry 2.x and use Sentry\Monolog\Handler, see https://github.com/getsentry/sentry-php/blob/master/src/Monolog/Handler.php', E_USER_DEPRECATED); + parent::__construct($level, $bubble); $this->ravenClient = $ravenClient; @@ -84,7 +86,7 @@ class RavenHandler extends AbstractProcessingHandler // the record with the highest severity is the "main" one $record = array_reduce($records, function ($highest, $record) { - if ($record['level'] > $highest['level']) { + if (null === $highest || $record['level'] > $highest['level']) { return $record; } @@ -180,7 +182,7 @@ class RavenHandler extends AbstractProcessingHandler } if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { - $options['extra']['message'] = $record['formatted']; + $options['message'] = $record['formatted']; $this->ravenClient->captureException($record['context']['exception'], $options); } else { $this->ravenClient->captureMessage($record['formatted'], array(), $options); @@ -216,7 +218,7 @@ class RavenHandler extends AbstractProcessingHandler */ protected function getExtraParameters() { - return array('checksum', 'release', 'event_id'); + return array('contexts', 'checksum', 'release', 'event_id'); } /** diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php index 590f996..3725db2 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -36,7 +36,7 @@ class RedisHandler extends AbstractProcessingHandler * @param string $key The key name to push records to * @param int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int $capSize Number of entries to limit list size to + * @param int|false $capSize Number of entries to limit list size to */ public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false) { @@ -73,7 +73,8 @@ class RedisHandler extends AbstractProcessingHandler protected function writeCapped(array $record) { if ($this->redisClient instanceof \Redis) { - $this->redisClient->multi() + $mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1; + $this->redisClient->multi($mode) ->rpush($this->redisKey, $record["formatted"]) ->ltrim($this->redisKey, -$this->capSize, -1) ->exec(); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php index 0d9de1a..65073ff 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php @@ -97,6 +97,7 @@ class RollbarHandler extends AbstractProcessingHandler )); if (isset($context['exception']) && $context['exception'] instanceof Exception) { + $payload['level'] = $context['level']; $exception = $context['exception']; unset($context['exception']); @@ -128,4 +129,16 @@ class RollbarHandler extends AbstractProcessingHandler { $this->flush(); } + + /** + * {@inheritdoc} + */ + public function reset() + { + $this->flush(); + + parent::reset(); + } + + } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php index 3b60b3d..b8253ba 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; /** * Stores logs to files that are rotated every day and a limited number of files are kept. @@ -39,13 +40,13 @@ class RotatingFileHandler extends StreamHandler * @param string $filename * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param Boolean $useLocking Try to lock log file before doing any writes + * @param bool $useLocking Try to lock log file before doing any writes */ public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) { - $this->filename = $filename; + $this->filename = Utils::canonicalizePath($filename); $this->maxFiles = (int) $maxFiles; $this->nextRotation = new \DateTime('tomorrow'); $this->filenameFormat = '{filename}-{date}'; @@ -66,6 +67,18 @@ class RotatingFileHandler extends StreamHandler } } + /** + * {@inheritdoc} + */ + public function reset() + { + parent::reset(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + public function setFilenameFormat($filenameFormat, $dateFormat) { if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { @@ -166,7 +179,7 @@ class RotatingFileHandler extends StreamHandler $fileInfo = pathinfo($this->filename); $glob = str_replace( array('{filename}', '{date}'), - array($fileInfo['filename'], '*'), + array($fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'), $fileInfo['dirname'] . '/' . $this->filenameFormat ); if (!empty($fileInfo['extension'])) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php index 9509ae3..b547ed7 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -11,6 +11,8 @@ namespace Monolog\Handler; +use Monolog\Formatter\FormatterInterface; + /** * Sampling handler * @@ -38,7 +40,7 @@ class SamplingHandler extends AbstractHandler protected $factor; /** - * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $samplingHandler). * @param int $factor Sample factor */ public function __construct($handler, $factor) @@ -54,29 +56,58 @@ class SamplingHandler extends AbstractHandler public function isHandling(array $record) { - return $this->handler->isHandling($record); + return $this->getHandler($record)->isHandling($record); } public function handle(array $record) { if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { - // The same logic as in FingersCrossedHandler - if (!$this->handler instanceof HandlerInterface) { - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - if ($this->processors) { foreach ($this->processors as $processor) { $record = call_user_func($processor, $record); } } - $this->handler->handle($record); + $this->getHandler($record)->handle($record); } return false === $this->bubble; } + + /** + * Return the nested handler + * + * If the handler was provided as a factory callable, this will trigger the handler's instantiation. + * + * @return HandlerInterface + */ + public function getHandler(array $record = null) + { + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + return $this->handler; + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->getHandler()->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->getHandler()->getFormatter(); + } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/api/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php index 38bc838..3945550 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -12,6 +12,7 @@ namespace Monolog\Handler\Slack; use Monolog\Logger; +use Monolog\Utils; use Monolog\Formatter\NormalizerFormatter; use Monolog\Formatter\FormatterInterface; @@ -146,7 +147,7 @@ class SlackRecord if ($this->useShortAttachment) { $attachment['fields'][] = $this->generateAttachmentField( - ucfirst($key), + $key, $record[$key] ); } else { @@ -207,13 +208,17 @@ class SlackRecord { $normalized = $this->normalizerFormatter->format($fields); $prettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; + $flags = 0; + if (PHP_VERSION_ID >= 50400) { + $flags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; + } $hasSecondDimension = count(array_filter($normalized, 'is_array')); $hasNonNumericKeys = !count(array_filter(array_keys($normalized), 'is_numeric')); return $hasSecondDimension || $hasNonNumericKeys - ? json_encode($normalized, $prettyPrintFlag) - : json_encode($normalized); + ? Utils::jsonEncode($normalized, $prettyPrintFlag | $flags) + : Utils::jsonEncode($normalized, $flags); } /** @@ -229,8 +234,8 @@ class SlackRecord /** * Generates attachment field * - * @param string $title - * @param string|array $value\ + * @param string $title + * @param string|array $value * * @return array */ @@ -241,7 +246,7 @@ class SlackRecord : $value; return array( - 'title' => $title, + 'title' => ucfirst($title), 'value' => $value, 'short' => false ); @@ -257,7 +262,7 @@ class SlackRecord private function generateAttachmentFields(array $data) { $fields = array(); - foreach ($data as $key => $value) { + foreach ($this->normalizerFormatter->format($data) as $key => $value) { $fields[] = $this->generateAttachmentField($key, $value); } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php index 9324fc9..88c4c4d 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php @@ -13,6 +13,7 @@ namespace Monolog\Handler; use Monolog\Formatter\FormatterInterface; use Monolog\Logger; +use Monolog\Utils; use Monolog\Handler\Slack\SlackRecord; /** @@ -75,6 +76,11 @@ class SlackHandler extends SocketHandler return $this->slackRecord; } + public function getToken() + { + return $this->token; + } + /** * {@inheritdoc} * @@ -113,7 +119,7 @@ class SlackHandler extends SocketHandler $dataArray['token'] = $this->token; if (!empty($dataArray['attachments'])) { - $dataArray['attachments'] = json_encode($dataArray['attachments']); + $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); } return $dataArray; @@ -144,6 +150,17 @@ class SlackHandler extends SocketHandler protected function write(array $record) { parent::write($record); + $this->finalizeWrite(); + } + + /** + * Finalizes the request by reading some bytes and then closing the socket + * + * If we do not read some but close the socket too early, slack sometimes + * drops the request entirely. + */ + protected function finalizeWrite() + { $res = $this->getResource(); if (is_resource($res)) { @fread($res, 2048); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php index 0d3e3ea..b87be99 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php @@ -13,6 +13,7 @@ namespace Monolog\Handler; use Monolog\Formatter\FormatterInterface; use Monolog\Logger; +use Monolog\Utils; use Monolog\Handler\Slack\SlackRecord; /** @@ -70,6 +71,11 @@ class SlackWebhookHandler extends AbstractProcessingHandler return $this->slackRecord; } + public function getWebhookUrl() + { + return $this->webhookUrl; + } + /** * {@inheritdoc} * @@ -78,16 +84,21 @@ class SlackWebhookHandler extends AbstractProcessingHandler protected function write(array $record) { $postData = $this->slackRecord->getSlackData($record); - $postString = json_encode($postData); + $postString = Utils::jsonEncode($postData); $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $this->webhookUrl); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $options = array( + CURLOPT_URL => $this->webhookUrl, + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => array('Content-type: application/json'), + CURLOPT_POSTFIELDS => $postString + ); if (defined('CURLOPT_SAFE_UPLOAD')) { - curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true); + $options[CURLOPT_SAFE_UPLOAD] = true; } - curl_setopt($ch, CURLOPT_POSTFIELDS, array('payload' => $postString)); + + curl_setopt_array($ch, $options); Curl\Util::execute($ch); } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php index baead52..d3352ea 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php @@ -16,8 +16,11 @@ use Monolog\Logger; /** * Sends notifications through Slack's Slackbot * - * @author Haralan Dobrev - * @see https://slack.com/apps/A0F81R8ET-slackbot + * @author Haralan Dobrev + * @see https://slack.com/apps/A0F81R8ET-slackbot + * @deprecated According to Slack the API used on this handler it is deprecated. + * Therefore this handler will be removed on 2.x + * Slack suggests to use webhooks instead. Please contact slack for more information. */ class SlackbotHandler extends AbstractProcessingHandler { @@ -48,6 +51,7 @@ class SlackbotHandler extends AbstractProcessingHandler */ public function __construct($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true) { + @trigger_error('SlackbotHandler is deprecated and will be removed on 2.x', E_USER_DEPRECATED); parent::__construct($level, $bubble); $this->slackTeam = $slackTeam; diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php index 7a61bf4..db50d97 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php @@ -27,15 +27,16 @@ class SocketHandler extends AbstractProcessingHandler private $timeout = 0; private $writingTimeout = 10; private $lastSentBytes = null; + private $chunkSize = null; private $persistent = false; private $errno; private $errstr; private $lastWritingAt; /** - * @param string $connectionString Socket connection string - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $connectionString Socket connection string + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) { @@ -87,7 +88,7 @@ class SocketHandler extends AbstractProcessingHandler */ public function setPersistent($persistent) { - $this->persistent = (boolean) $persistent; + $this->persistent = (bool) $persistent; } /** @@ -127,6 +128,16 @@ class SocketHandler extends AbstractProcessingHandler $this->writingTimeout = (float) $seconds; } + /** + * Set chunk size. Only has effect during connection in the writing cycle. + * + * @param float $bytes + */ + public function setChunkSize($bytes) + { + $this->chunkSize = $bytes; + } + /** * Get current connection string * @@ -177,6 +188,16 @@ class SocketHandler extends AbstractProcessingHandler return $this->writingTimeout; } + /** + * Get current chunk size + * + * @return float + */ + public function getChunkSize() + { + return $this->chunkSize; + } + /** * Check to see if the socket is currently available. * @@ -219,6 +240,16 @@ class SocketHandler extends AbstractProcessingHandler return stream_set_timeout($this->resource, $seconds, $microseconds); } + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-chunk-size.php + */ + protected function streamSetChunkSize() + { + return stream_set_chunk_size($this->resource, $this->chunkSize); + } + /** * Wrapper to allow mocking */ @@ -268,6 +299,7 @@ class SocketHandler extends AbstractProcessingHandler { $this->createSocketResource(); $this->setSocketTimeout(); + $this->setStreamChunkSize(); } private function createSocketResource() @@ -290,6 +322,13 @@ class SocketHandler extends AbstractProcessingHandler } } + private function setStreamChunkSize() + { + if ($this->chunkSize && !$this->streamSetChunkSize()) { + throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); + } + } + private function writeToSocket($data) { $length = strlen($data); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php index 09a1573..74a613c 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; /** * Stores to any stream resource @@ -22,6 +23,10 @@ use Monolog\Logger; */ class StreamHandler extends AbstractProcessingHandler { + /** @private 512KB */ + const CHUNK_SIZE = 524288; + + /** @var resource|null */ protected $stream; protected $url; private $errorMessage; @@ -32,9 +37,9 @@ class StreamHandler extends AbstractProcessingHandler /** * @param resource|string $stream * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param Boolean $useLocking Try to lock log file before doing any writes + * @param bool $useLocking Try to lock log file before doing any writes * * @throws \Exception If a missing directory is not buildable * @throws \InvalidArgumentException If stream is not a resource or string @@ -44,8 +49,9 @@ class StreamHandler extends AbstractProcessingHandler parent::__construct($level, $bubble); if (is_resource($stream)) { $this->stream = $stream; + $this->streamSetChunkSize(); } elseif (is_string($stream)) { - $this->url = $stream; + $this->url = Utils::canonicalizePath($stream); } else { throw new \InvalidArgumentException('A stream must either be a resource or a string.'); } @@ -63,6 +69,7 @@ class StreamHandler extends AbstractProcessingHandler fclose($this->stream); } $this->stream = null; + $this->dirCreated = null; } /** @@ -104,8 +111,10 @@ class StreamHandler extends AbstractProcessingHandler restore_error_handler(); if (!is_resource($this->stream)) { $this->stream = null; - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url)); + + throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $this->url)); } + $this->streamSetChunkSize(); } if ($this->useLocking) { @@ -130,6 +139,15 @@ class StreamHandler extends AbstractProcessingHandler fwrite($stream, (string) $record['formatted']); } + protected function streamSetChunkSize() + { + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return stream_set_chunk_size($this->stream, self::CHUNK_SIZE); + } + + return false; + } + private function customErrorHandler($code, $msg) { $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); @@ -151,7 +169,7 @@ class StreamHandler extends AbstractProcessingHandler return dirname(substr($stream, 7)); } - return; + return null; } private function createDir() @@ -167,7 +185,7 @@ class StreamHandler extends AbstractProcessingHandler set_error_handler(array($this, 'customErrorHandler')); $status = mkdir($dir, 0777, true); restore_error_handler(); - if (false === $status) { + if (false === $status && !is_dir($dir)) { throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php index aba1396..ac7b16f 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php @@ -12,7 +12,9 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\LineFormatter; +use Swift; /** * SwiftMailerHandler uses Swift_Mailer to send the emails @@ -28,7 +30,7 @@ class SwiftMailerHandler extends MailHandler * @param \Swift_Mailer $mailer The mailer to use * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) { @@ -46,6 +48,17 @@ class SwiftMailerHandler extends MailHandler $this->mailer->send($this->buildMessage($content, $records)); } + /** + * Gets the formatter for the Swift_Message subject. + * + * @param string $format The format of the subject + * @return FormatterInterface + */ + protected function getSubjectFormatter($format) + { + return new LineFormatter($format); + } + /** * Creates instance of Swift_Message to be sent * @@ -68,12 +81,16 @@ class SwiftMailerHandler extends MailHandler } if ($records) { - $subjectFormatter = new LineFormatter($message->getSubject()); + $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); } $message->setBody($content); - $message->setDate(time()); + if (version_compare(Swift::VERSION, '6.0.0', '>=')) { + $message->setDate(new \DateTimeImmutable()); + } else { + $message->setDate(time()); + } return $message; } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php index 376bc3b..f770c80 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php @@ -32,11 +32,11 @@ class SyslogHandler extends AbstractSyslogHandler protected $logopts; /** - * @param string $ident - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID + * @param string $ident + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID */ public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php index 74d946a..4dfd5f5 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php @@ -18,22 +18,38 @@ use Monolog\Handler\SyslogUdp\UdpSocket; * A Handler for logging to a remote syslogd server. * * @author Jesper Skovgaard Nielsen + * @author Dominik Kukacka */ class SyslogUdpHandler extends AbstractSyslogHandler { + const RFC3164 = 0; + const RFC5424 = 1; + + private $dateFormats = array( + self::RFC3164 => 'M d H:i:s', + self::RFC5424 => \DateTime::RFC3339, + ); + protected $socket; + protected $ident; + protected $rfc; /** - * @param string $host - * @param int $port - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $host + * @param int $port + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $ident Program name or tag for each log message. + * @param int $rfc RFC to format the message for. */ - public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) + public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php', $rfc = self::RFC5424) { parent::__construct($facility, $level, $bubble); + $this->ident = $ident; + $this->rfc = $rfc; + $this->socket = new UdpSocket($host, $port ?: 514); } @@ -63,13 +79,39 @@ class SyslogUdpHandler extends AbstractSyslogHandler } /** - * Make common syslog header (see rfc5424) + * Make common syslog header (see rfc5424 or rfc3164) */ protected function makeCommonSyslogHeader($severity) { $priority = $severity + $this->facility; - return "<$priority>1 "; + if (!$pid = getmypid()) { + $pid = '-'; + } + + if (!$hostname = gethostname()) { + $hostname = '-'; + } + + $date = $this->getDateTime(); + + if ($this->rfc === self::RFC3164) { + return "<$priority>" . + $date . " " . + $hostname . " " . + $this->ident . "[" . $pid . "]: "; + } else { + return "<$priority>1 " . + $date . " " . + $hostname . " " . + $this->ident . " " . + $pid . " - - "; + } + } + + protected function getDateTime() + { + return date($this->dateFormats[$this->rfc]); } /** diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php index e39cfc6..478db0a 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php @@ -67,6 +67,7 @@ class TestHandler extends AbstractProcessingHandler { protected $records = array(); protected $recordsByLevel = array(); + private $skipReset = false; public function getRecords() { @@ -79,19 +80,41 @@ class TestHandler extends AbstractProcessingHandler $this->recordsByLevel = array(); } + public function reset() + { + if (!$this->skipReset) { + $this->clear(); + } + } + + public function setSkipReset($skipReset) + { + $this->skipReset = $skipReset; + } + public function hasRecords($level) { return isset($this->recordsByLevel[$level]); } + /** + * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records + * @param int $level Logger::LEVEL constant value + */ public function hasRecord($record, $level) { - if (is_array($record)) { - $record = $record['message']; + if (is_string($record)) { + $record = array('message' => $record); } return $this->hasRecordThatPasses(function ($rec) use ($record) { - return $rec['message'] === $record; + if ($rec['message'] !== $record['message']) { + return false; + } + if (isset($record['context']) && $rec['context'] !== $record['context']) { + return false; + } + return true; }, $level); } diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php index 2732ba3..7d7622a 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -48,6 +48,17 @@ class WhatFailureGroupHandler extends GroupHandler */ public function handleBatch(array $records) { + if ($this->processors) { + $processed = array(); + foreach ($records as $record) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + $processed[] = $record; + } + $records = $processed; + } + foreach ($this->handlers as $handler) { try { $handler->handleBatch($records); diff --git a/api/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/api/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php index f22cf21..a20aeae 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ b/api/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php @@ -17,6 +17,7 @@ use Monolog\Logger; * Handler sending logs to Zend Monitor * * @author Christian Bergau + * @author Jason Davis */ class ZendMonitorHandler extends AbstractProcessingHandler { @@ -25,16 +26,7 @@ class ZendMonitorHandler extends AbstractProcessingHandler * * @var array */ - protected $levelMap = array( - Logger::DEBUG => 1, - Logger::INFO => 2, - Logger::NOTICE => 3, - Logger::WARNING => 4, - Logger::ERROR => 5, - Logger::CRITICAL => 6, - Logger::ALERT => 7, - Logger::EMERGENCY => 0, - ); + protected $levelMap = array(); /** * Construct @@ -46,8 +38,21 @@ class ZendMonitorHandler extends AbstractProcessingHandler public function __construct($level = Logger::DEBUG, $bubble = true) { if (!function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException('You must have Zend Server installed in order to use this handler'); + throw new MissingExtensionException( + 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' + ); } + //zend monitor constants are not defined if zend monitor is not enabled. + $this->levelMap = array( + Logger::DEBUG => \ZEND_MONITOR_EVENT_SEVERITY_INFO, + Logger::INFO => \ZEND_MONITOR_EVENT_SEVERITY_INFO, + Logger::NOTICE => \ZEND_MONITOR_EVENT_SEVERITY_INFO, + Logger::WARNING => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, + Logger::ERROR => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + Logger::CRITICAL => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + Logger::ALERT => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + Logger::EMERGENCY => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + ); parent::__construct($level, $bubble); } @@ -57,22 +62,23 @@ class ZendMonitorHandler extends AbstractProcessingHandler protected function write(array $record) { $this->writeZendMonitorCustomEvent( - $this->levelMap[$record['level']], + Logger::getLevelName($record['level']), $record['message'], - $record['formatted'] + $record['formatted'], + $this->levelMap[$record['level']] ); } /** - * Write a record to Zend Monitor - * - * @param int $level - * @param string $message - * @param array $formatted + * Write to Zend Monitor Events + * @param string $type Text displayed in "Class Name (custom)" field + * @param string $message Text displayed in "Error String" + * @param mixed $formatted Displayed in Custom Variables tab + * @param int $severity Set the event severity level (-1,0,1) */ - protected function writeZendMonitorCustomEvent($level, $message, $formatted) + protected function writeZendMonitorCustomEvent($type, $message, $formatted, $severity) { - zend_monitor_custom_event($level, $message, $formatted); + zend_monitor_custom_event($type, $message, $formatted, $severity); } /** diff --git a/api/vendor/monolog/monolog/src/Monolog/Logger.php b/api/vendor/monolog/monolog/src/Monolog/Logger.php index 49d00af..7d26b29 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Logger.php +++ b/api/vendor/monolog/monolog/src/Monolog/Logger.php @@ -15,6 +15,7 @@ use Monolog\Handler\HandlerInterface; use Monolog\Handler\StreamHandler; use Psr\Log\LoggerInterface; use Psr\Log\InvalidArgumentException; +use Exception; /** * Monolog log channel @@ -24,7 +25,7 @@ use Psr\Log\InvalidArgumentException; * * @author Jordi Boggiano */ -class Logger implements LoggerInterface +class Logger implements LoggerInterface, ResettableInterface { /** * Detailed debug information @@ -133,6 +134,11 @@ class Logger implements LoggerInterface */ protected $microsecondTimestamps = true; + /** + * @var callable + */ + protected $exceptionHandler; + /** * @param string $name The logging channel * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. @@ -141,7 +147,7 @@ class Logger implements LoggerInterface public function __construct($name, array $handlers = array(), array $processors = array()) { $this->name = $name; - $this->handlers = $handlers; + $this->setHandlers($handlers); $this->processors = $processors; } @@ -281,7 +287,7 @@ class Logger implements LoggerInterface * @param int $level The logging level * @param string $message The log message * @param array $context The log context - * @return Boolean Whether the record has been processed + * @return bool Whether the record has been processed */ public function addRecord($level, $message, array $context = array()) { @@ -315,7 +321,7 @@ class Logger implements LoggerInterface if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) { $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone); } else { - $ts = new \DateTime(null, static::$timezone); + $ts = new \DateTime('now', static::$timezone); } $ts->setTimezone(static::$timezone); @@ -329,27 +335,75 @@ class Logger implements LoggerInterface 'extra' => array(), ); - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - - while ($handler = current($this->handlers)) { - if (true === $handler->handle($record)) { - break; + try { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); } - next($this->handlers); + while ($handler = current($this->handlers)) { + if (true === $handler->handle($record)) { + break; + } + + next($this->handlers); + } + } catch (Exception $e) { + $this->handleException($e, $record); } return true; } + /** + * Ends a log cycle and frees all resources used by handlers. + * + * Closing a Handler means flushing all buffers and freeing any open resources/handles. + * Handlers that have been closed should be able to accept log records again and re-open + * themselves on demand, but this may not always be possible depending on implementation. + * + * This is useful at the end of a request and will be called automatically on every handler + * when they get destructed. + */ + public function close() + { + foreach ($this->handlers as $handler) { + if (method_exists($handler, 'close')) { + $handler->close(); + } + } + } + + /** + * Ends a log cycle and resets all handlers and processors to their initial state. + * + * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal + * state, and getting it back to a state in which it can receive log records again. + * + * This is useful in case you want to avoid logs leaking between two requests or jobs when you + * have a long running process like a worker or an application server serving multiple requests + * in one process. + */ + public function reset() + { + foreach ($this->handlers as $handler) { + if ($handler instanceof ResettableInterface) { + $handler->reset(); + } + } + + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } + /** * Adds a log record at the DEBUG level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addDebug($message, array $context = array()) { @@ -359,9 +413,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the INFO level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addInfo($message, array $context = array()) { @@ -371,9 +425,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the NOTICE level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addNotice($message, array $context = array()) { @@ -383,9 +437,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the WARNING level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addWarning($message, array $context = array()) { @@ -395,9 +449,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the ERROR level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addError($message, array $context = array()) { @@ -407,9 +461,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the CRITICAL level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addCritical($message, array $context = array()) { @@ -419,9 +473,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the ALERT level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addAlert($message, array $context = array()) { @@ -431,9 +485,9 @@ class Logger implements LoggerInterface /** * Adds a log record at the EMERGENCY level. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function addEmergency($message, array $context = array()) { @@ -468,13 +522,18 @@ class Logger implements LoggerInterface /** * Converts PSR-3 levels to Monolog ones if necessary * - * @param string|int Level number (monolog) or name (PSR-3) + * @param string|int $level Level number (monolog) or name (PSR-3) * @return int */ public static function toMonologLevel($level) { - if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) { - return constant(__CLASS__.'::'.strtoupper($level)); + if (is_string($level)) { + // Contains chars of all log levels and avoids using strtoupper() which may have + // strange results depending on locale (for example, "i" will become "İ") + $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY'); + if (defined(__CLASS__.'::'.$upper)) { + return constant(__CLASS__ . '::' . $upper); + } } return $level; @@ -484,7 +543,7 @@ class Logger implements LoggerInterface * Checks whether the Logger has a handler that listens on the given level * * @param int $level - * @return Boolean + * @return bool */ public function isHandling($level) { @@ -501,15 +560,52 @@ class Logger implements LoggerInterface return false; } + /** + * Set a custom exception handler + * + * @param callable $callback + * @return $this + */ + public function setExceptionHandler($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + $this->exceptionHandler = $callback; + + return $this; + } + + /** + * @return callable + */ + public function getExceptionHandler() + { + return $this->exceptionHandler; + } + + /** + * Delegates exception management to the custom exception handler, + * or throws the exception if no custom handler is set. + */ + protected function handleException(Exception $e, array $record) + { + if (!$this->exceptionHandler) { + throw $e; + } + + call_user_func($this->exceptionHandler, $e, $record); + } + /** * Adds a log record at an arbitrary level. * * This method allows for compatibility with common interfaces. * * @param mixed $level The log level - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function log($level, $message, array $context = array()) { @@ -523,9 +619,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function debug($message, array $context = array()) { @@ -537,9 +633,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function info($message, array $context = array()) { @@ -551,9 +647,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function notice($message, array $context = array()) { @@ -565,9 +661,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function warn($message, array $context = array()) { @@ -579,9 +675,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function warning($message, array $context = array()) { @@ -593,9 +689,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function err($message, array $context = array()) { @@ -607,9 +703,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function error($message, array $context = array()) { @@ -621,9 +717,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function crit($message, array $context = array()) { @@ -635,9 +731,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function critical($message, array $context = array()) { @@ -649,9 +745,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function alert($message, array $context = array()) { @@ -663,9 +759,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function emerg($message, array $context = array()) { @@ -677,9 +773,9 @@ class Logger implements LoggerInterface * * This method allows for compatibility with common interfaces. * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed */ public function emergency($message, array $context = array()) { diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php index 1899400..cdf5ec7 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php @@ -19,7 +19,7 @@ use Monolog\Logger; * @author Nick Otter * @author Jordi Boggiano */ -class GitProcessor +class GitProcessor implements ProcessorInterface { private $level; private static $cache; @@ -52,7 +52,7 @@ class GitProcessor } $branches = `git branch -v --no-abbrev`; - if (preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { + if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { return self::$cache = array( 'branch' => $matches[1], 'commit' => $matches[2], diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php index 2691630..6ae192a 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php @@ -24,7 +24,7 @@ use Monolog\Logger; * * @author Jordi Boggiano */ -class IntrospectionProcessor +class IntrospectionProcessor implements ProcessorInterface { private $level; @@ -55,7 +55,12 @@ class IntrospectionProcessor return $record; } - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + /* + * http://php.net/manual/en/function.debug-backtrace.php + * As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. + * Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. + */ + $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); // skip first since it's always the current method array_shift($trace); diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php index 85f9dc5..2a379a3 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php @@ -16,7 +16,7 @@ namespace Monolog\Processor; * * @author Rob Jensen */ -abstract class MemoryProcessor +abstract class MemoryProcessor implements ProcessorInterface { /** * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. @@ -34,8 +34,8 @@ abstract class MemoryProcessor */ public function __construct($realUsage = true, $useFormatting = true) { - $this->realUsage = (boolean) $realUsage; - $this->useFormatting = (boolean) $useFormatting; + $this->realUsage = (bool) $realUsage; + $this->useFormatting = (bool) $useFormatting; } /** diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php index 7c07a7e..2f5b326 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php @@ -18,7 +18,7 @@ use Monolog\Logger; * * @author Jonathan A. Schweder */ -class MercurialProcessor +class MercurialProcessor implements ProcessorInterface { private $level; private static $cache; diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php index 9d3f559..66b80fb 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php @@ -16,7 +16,7 @@ namespace Monolog\Processor; * * @author Andreas Hörnicke */ -class ProcessIdProcessor +class ProcessIdProcessor implements ProcessorInterface { /** * @param array $record diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php new file mode 100644 index 0000000..7e64d4d --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * An optional interface to allow labelling Monolog processors. + * + * @author Nicolas Grekas + */ +interface ProcessorInterface +{ + /** + * @return array The processed records + */ + public function __invoke(array $records); +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php index c2686ce..a318af7 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -11,6 +11,8 @@ namespace Monolog\Processor; +use Monolog\Utils; + /** * Processes a record's message according to PSR-3 rules * @@ -18,8 +20,26 @@ namespace Monolog\Processor; * * @author Jordi Boggiano */ -class PsrLogMessageProcessor +class PsrLogMessageProcessor implements ProcessorInterface { + const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; + + /** @var string|null */ + private $dateFormat; + + /** @var bool */ + private $removeUsedContextFields; + + /** + * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format + * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset + */ + public function __construct($dateFormat = null, $removeUsedContextFields = false) + { + $this->dateFormat = $dateFormat; + $this->removeUsedContextFields = $removeUsedContextFields; + } + /** * @param array $record * @return array @@ -32,12 +52,25 @@ class PsrLogMessageProcessor $replacements = array(); foreach ($record['context'] as $key => $val) { + $placeholder = '{' . $key . '}'; + if (strpos($record['message'], $placeholder) === false) { + continue; + } + if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { - $replacements['{'.$key.'}'] = $val; + $replacements[$placeholder] = $val; + } elseif ($val instanceof \DateTime) { + $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); } elseif (is_object($val)) { - $replacements['{'.$key.'}'] = '[object '.get_class($val).']'; + $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; + } elseif (is_array($val)) { + $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); } else { - $replacements['{'.$key.'}'] = '['.gettype($val).']'; + $replacements[$placeholder] = '['.gettype($val).']'; + } + + if ($this->removeUsedContextFields) { + unset($record['context'][$key]); } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php index 7e2df2a..615a4d9 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -16,7 +16,7 @@ namespace Monolog\Processor; * * @author Martijn Riemers */ -class TagProcessor +class TagProcessor implements ProcessorInterface { private $tags; diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php index 812707c..d1f708c 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php @@ -11,12 +11,14 @@ namespace Monolog\Processor; +use Monolog\ResettableInterface; + /** * Adds a unique identifier into records * * @author Simon Mönch */ -class UidProcessor +class UidProcessor implements ProcessorInterface, ResettableInterface { private $uid; @@ -26,7 +28,8 @@ class UidProcessor throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); } - $this->uid = substr(hash('md5', uniqid('', true)), 0, $length); + + $this->uid = $this->generateUid($length); } public function __invoke(array $record) @@ -43,4 +46,14 @@ class UidProcessor { return $this->uid; } + + public function reset() + { + $this->uid = $this->generateUid(strlen($this->uid)); + } + + private function generateUid($length) + { + return substr(hash('md5', uniqid('', true)), 0, $length); + } } diff --git a/api/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/api/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php index ea1d897..2e8dfae 100644 --- a/api/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ b/api/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -16,7 +16,7 @@ namespace Monolog\Processor; * * @author Jordi Boggiano */ -class WebProcessor +class WebProcessor implements ProcessorInterface { /** * @var array|\ArrayAccess @@ -52,6 +52,10 @@ class WebProcessor throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); } + if (isset($this->serverData['UNIQUE_ID'])) { + $this->extraFields['unique_id'] = 'UNIQUE_ID'; + } + if (null !== $extraFields) { if (isset($extraFields[0])) { foreach (array_keys($this->extraFields) as $fieldName) { @@ -104,10 +108,6 @@ class WebProcessor $extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null; } - if (isset($this->serverData['UNIQUE_ID'])) { - $extra['unique_id'] = $this->serverData['UNIQUE_ID']; - } - return $extra; } } diff --git a/api/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/api/vendor/monolog/monolog/src/Monolog/ResettableInterface.php new file mode 100644 index 0000000..635bc77 --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/ResettableInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +/** + * Handler or Processor implementing this interface will be reset when Logger::reset() is called. + * + * Resetting ends a log cycle gets them back to their initial state. + * + * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal + * state, and getting it back to a state in which it can receive log records again. + * + * This is useful in case you want to avoid logs leaking between two requests or jobs when you + * have a long running process like a worker or an application server serving multiple requests + * in one process. + * + * @author Grégoire Pineau + */ +interface ResettableInterface +{ + public function reset(); +} diff --git a/api/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/api/vendor/monolog/monolog/src/Monolog/SignalHandler.php new file mode 100644 index 0000000..d87018f --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/SignalHandler.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; +use ReflectionExtension; + +/** + * Monolog POSIX signal handler + * + * @author Robert Gust-Bardon + */ +class SignalHandler +{ + private $logger; + + private $previousSignalHandler = array(); + private $signalLevelMap = array(); + private $signalRestartSyscalls = array(); + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + public function registerSignalHandler($signo, $level = LogLevel::CRITICAL, $callPrevious = true, $restartSyscalls = true, $async = true) + { + if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) { + return $this; + } + + if ($callPrevious) { + if (function_exists('pcntl_signal_get_handler')) { + $handler = pcntl_signal_get_handler($signo); + if ($handler === false) { + return $this; + } + $this->previousSignalHandler[$signo] = $handler; + } else { + $this->previousSignalHandler[$signo] = true; + } + } else { + unset($this->previousSignalHandler[$signo]); + } + $this->signalLevelMap[$signo] = $level; + $this->signalRestartSyscalls[$signo] = $restartSyscalls; + + if (function_exists('pcntl_async_signals') && $async !== null) { + pcntl_async_signals($async); + } + + pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); + + return $this; + } + + public function handleSignal($signo, array $siginfo = null) + { + static $signals = array(); + + if (!$signals && extension_loaded('pcntl')) { + $pcntl = new ReflectionExtension('pcntl'); + $constants = $pcntl->getConstants(); + if (!$constants) { + // HHVM 3.24.2 returns an empty array. + $constants = get_defined_constants(true); + $constants = $constants['Core']; + } + foreach ($constants as $name => $value) { + if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) { + $signals[$value] = $name; + } + } + unset($constants); + } + + $level = isset($this->signalLevelMap[$signo]) ? $this->signalLevelMap[$signo] : LogLevel::CRITICAL; + $signal = isset($signals[$signo]) ? $signals[$signo] : $signo; + $context = isset($siginfo) ? $siginfo : array(); + $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); + + if (!isset($this->previousSignalHandler[$signo])) { + return; + } + + if ($this->previousSignalHandler[$signo] === true || $this->previousSignalHandler[$signo] === SIG_DFL) { + if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch') + && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill')) { + $restartSyscalls = isset($this->signalRestartSyscalls[$signo]) ? $this->signalRestartSyscalls[$signo] : true; + pcntl_signal($signo, SIG_DFL, $restartSyscalls); + pcntl_sigprocmask(SIG_UNBLOCK, array($signo), $oldset); + posix_kill(posix_getpid(), $signo); + pcntl_signal_dispatch(); + pcntl_sigprocmask(SIG_SETMASK, $oldset); + pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); + } + } elseif (is_callable($this->previousSignalHandler[$signo])) { + if (PHP_VERSION_ID >= 70100) { + $this->previousSignalHandler[$signo]($signo, $siginfo); + } else { + $this->previousSignalHandler[$signo]($signo); + } + } + } +} diff --git a/api/vendor/monolog/monolog/src/Monolog/Utils.php b/api/vendor/monolog/monolog/src/Monolog/Utils.php new file mode 100644 index 0000000..7f1ba12 --- /dev/null +++ b/api/vendor/monolog/monolog/src/Monolog/Utils.php @@ -0,0 +1,189 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +class Utils +{ + /** + * @internal + */ + public static function getClass($object) + { + $class = \get_class($object); + + return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class; + } + + /** + * Makes sure if a relative path is passed in it is turned into an absolute path + * + * @param string $streamUrl stream URL or path without protocol + * + * @return string + */ + public static function canonicalizePath($streamUrl) + { + $prefix = ''; + if ('file://' === substr($streamUrl, 0, 7)) { + $streamUrl = substr($streamUrl, 7); + $prefix = 'file://'; + } + + // other type of stream, not supported + if (false !== strpos($streamUrl, '://')) { + return $streamUrl; + } + + // already absolute + if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { + return $prefix.$streamUrl; + } + + $streamUrl = getcwd() . '/' . $streamUrl; + + return $prefix.$streamUrl; + } + + /** + * Return the JSON representation of a value + * + * @param mixed $data + * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE + * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null + * @throws \RuntimeException if encoding fails and errors are not ignored + * @return string + */ + public static function jsonEncode($data, $encodeFlags = null, $ignoreErrors = false) + { + if (null === $encodeFlags && version_compare(PHP_VERSION, '5.4.0', '>=')) { + $encodeFlags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; + } + + if ($ignoreErrors) { + $json = @json_encode($data, $encodeFlags); + if (false === $json) { + return 'null'; + } + + return $json; + } + + $json = json_encode($data, $encodeFlags); + if (false === $json) { + $json = self::handleJsonError(json_last_error(), $data); + } + + return $json; + } + + /** + * Handle a json_encode failure. + * + * If the failure is due to invalid string encoding, try to clean the + * input and encode again. If the second encoding attempt fails, the + * inital error is not encoding related or the input can't be cleaned then + * raise a descriptive exception. + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE + * @throws \RuntimeException if failure can't be corrected + * @return string JSON encoded data after error correction + */ + public static function handleJsonError($code, $data, $encodeFlags = null) + { + if ($code !== JSON_ERROR_UTF8) { + self::throwEncodeError($code, $data); + } + + if (is_string($data)) { + self::detectAndCleanUtf8($data); + } elseif (is_array($data)) { + array_walk_recursive($data, array('Monolog\Utils', 'detectAndCleanUtf8')); + } else { + self::throwEncodeError($code, $data); + } + + if (null === $encodeFlags && version_compare(PHP_VERSION, '5.4.0', '>=')) { + $encodeFlags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; + } + + $json = json_encode($data, $encodeFlags); + + if ($json === false) { + self::throwEncodeError(json_last_error(), $data); + } + + return $json; + } + + /** + * Throws an exception according to a given code with a customized message + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @throws \RuntimeException + */ + private static function throwEncodeError($code, $data) + { + switch ($code) { + case JSON_ERROR_DEPTH: + $msg = 'Maximum stack depth exceeded'; + break; + case JSON_ERROR_STATE_MISMATCH: + $msg = 'Underflow or the modes mismatch'; + break; + case JSON_ERROR_CTRL_CHAR: + $msg = 'Unexpected control character found'; + break; + case JSON_ERROR_UTF8: + $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; + break; + default: + $msg = 'Unknown error'; + } + + throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); + } + + /** + * Detect invalid UTF-8 string characters and convert to valid UTF-8. + * + * Valid UTF-8 input will be left unmodified, but strings containing + * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed + * original encoding of ISO-8859-15. This conversion may result in + * incorrect output if the actual encoding was not ISO-8859-15, but it + * will be clean UTF-8 output and will not rely on expensive and fragile + * detection algorithms. + * + * Function converts the input in place in the passed variable so that it + * can be used as a callback for array_walk_recursive. + * + * @param mixed $data Input to check and convert if needed, passed by ref + * @private + */ + public static function detectAndCleanUtf8(&$data) + { + if (is_string($data) && !preg_match('//u', $data)) { + $data = preg_replace_callback( + '/[\x80-\xFF]+/', + function ($m) { return utf8_encode($m[0]); }, + $data + ); + $data = str_replace( + array('¤', '¦', '¨', '´', '¸', '¼', '½', '¾'), + array('€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'), + $data + ); + } + } +} diff --git a/api/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php deleted file mode 100644 index a9a3f30..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Handler\TestHandler; - -class ErrorHandlerTest extends \PHPUnit_Framework_TestCase -{ - public function testHandleError() - { - $logger = new Logger('test', array($handler = new TestHandler)); - $errHandler = new ErrorHandler($logger); - - $errHandler->registerErrorHandler(array(E_USER_NOTICE => Logger::EMERGENCY), false); - trigger_error('Foo', E_USER_ERROR); - $this->assertCount(1, $handler->getRecords()); - $this->assertTrue($handler->hasErrorRecords()); - trigger_error('Foo', E_USER_NOTICE); - $this->assertCount(2, $handler->getRecords()); - $this->assertTrue($handler->hasEmergencyRecords()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php deleted file mode 100644 index 71c4204..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Formatter\ChromePHPFormatter::format - */ - public function testDefaultFormat() - { - $formatter = new ChromePHPFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1'), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertEquals( - array( - 'meh', - array( - 'message' => 'log', - 'context' => array('from' => 'logger'), - 'extra' => array('ip' => '127.0.0.1'), - ), - 'unknown', - 'error', - ), - $message - ); - } - - /** - * @covers Monolog\Formatter\ChromePHPFormatter::format - */ - public function testFormatWithFileAndLine() - { - $formatter = new ChromePHPFormatter(); - $record = array( - 'level' => Logger::CRITICAL, - 'level_name' => 'CRITICAL', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertEquals( - array( - 'meh', - array( - 'message' => 'log', - 'context' => array('from' => 'logger'), - 'extra' => array('ip' => '127.0.0.1'), - ), - 'test : 14', - 'error', - ), - $message - ); - } - - /** - * @covers Monolog\Formatter\ChromePHPFormatter::format - */ - public function testFormatWithoutContext() - { - $formatter = new ChromePHPFormatter(); - $record = array( - 'level' => Logger::DEBUG, - 'level_name' => 'DEBUG', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertEquals( - array( - 'meh', - 'log', - 'unknown', - 'log', - ), - $message - ); - } - - /** - * @covers Monolog\Formatter\ChromePHPFormatter::formatBatch - */ - public function testBatchFormatThrowException() - { - $formatter = new ChromePHPFormatter(); - $records = array( - array( - 'level' => Logger::INFO, - 'level_name' => 'INFO', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ), - array( - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'foo', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log2', - ), - ); - - $this->assertEquals( - array( - array( - 'meh', - 'log', - 'unknown', - 'info', - ), - array( - 'foo', - 'log2', - 'unknown', - 'warn', - ), - ), - $formatter->formatBatch($records) - ); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php deleted file mode 100644 index 90cc48d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class ElasticaFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function setUp() - { - if (!class_exists("Elastica\Document")) { - $this->markTestSkipped("ruflin/elastica not installed"); - } - } - - /** - * @covers Monolog\Formatter\ElasticaFormatter::__construct - * @covers Monolog\Formatter\ElasticaFormatter::format - * @covers Monolog\Formatter\ElasticaFormatter::getDocument - */ - public function testFormat() - { - // test log message - $msg = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('foo' => 7, 'bar', 'class' => new \stdClass), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - // expected values - $expected = $msg; - $expected['datetime'] = '1970-01-01T00:00:00.000000+00:00'; - $expected['context'] = array( - 'class' => '[object] (stdClass: {})', - 'foo' => 7, - 0 => 'bar', - ); - - // format log message - $formatter = new ElasticaFormatter('my_index', 'doc_type'); - $doc = $formatter->format($msg); - $this->assertInstanceOf('Elastica\Document', $doc); - - // Document parameters - $params = $doc->getParams(); - $this->assertEquals('my_index', $params['_index']); - $this->assertEquals('doc_type', $params['_type']); - - // Document data values - $data = $doc->getData(); - foreach (array_keys($expected) as $key) { - $this->assertEquals($expected[$key], $data[$key]); - } - } - - /** - * @covers Monolog\Formatter\ElasticaFormatter::getIndex - * @covers Monolog\Formatter\ElasticaFormatter::getType - */ - public function testGetters() - { - $formatter = new ElasticaFormatter('my_index', 'doc_type'); - $this->assertEquals('my_index', $formatter->getIndex()); - $this->assertEquals('doc_type', $formatter->getType()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php deleted file mode 100644 index 1b2fd97..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\TestCase; - -class FlowdockFormatterTest extends TestCase -{ - /** - * @covers Monolog\Formatter\FlowdockFormatter::format - */ - public function testFormat() - { - $formatter = new FlowdockFormatter('test_source', 'source@test.com'); - $record = $this->getRecord(); - - $expected = array( - 'source' => 'test_source', - 'from_address' => 'source@test.com', - 'subject' => 'in test_source: WARNING - test', - 'content' => 'test', - 'tags' => array('#logs', '#warning', '#test'), - 'project' => 'test_source', - ); - $formatted = $formatter->format($record); - - $this->assertEquals($expected, $formatted['flowdock']); - } - - /** - * @ covers Monolog\Formatter\FlowdockFormatter::formatBatch - */ - public function testFormatBatch() - { - $formatter = new FlowdockFormatter('test_source', 'source@test.com'); - $records = array( - $this->getRecord(Logger::WARNING), - $this->getRecord(Logger::DEBUG), - ); - $formatted = $formatter->formatBatch($records); - - $this->assertArrayHasKey('flowdock', $formatted[0]); - $this->assertArrayHasKey('flowdock', $formatted[1]); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php deleted file mode 100644 index 622b2ba..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\TestCase; - -class FluentdFormatterTest extends TestCase -{ - /** - * @covers Monolog\Formatter\FluentdFormatter::__construct - * @covers Monolog\Formatter\FluentdFormatter::isUsingLevelsInTag - */ - public function testConstruct() - { - $formatter = new FluentdFormatter(); - $this->assertEquals(false, $formatter->isUsingLevelsInTag()); - $formatter = new FluentdFormatter(false); - $this->assertEquals(false, $formatter->isUsingLevelsInTag()); - $formatter = new FluentdFormatter(true); - $this->assertEquals(true, $formatter->isUsingLevelsInTag()); - } - - /** - * @covers Monolog\Formatter\FluentdFormatter::format - */ - public function testFormat() - { - $record = $this->getRecord(Logger::WARNING); - $record['datetime'] = new \DateTime("@0"); - - $formatter = new FluentdFormatter(); - $this->assertEquals( - '["test",0,{"message":"test","extra":[],"level":300,"level_name":"WARNING"}]', - $formatter->format($record) - ); - } - - /** - * @covers Monolog\Formatter\FluentdFormatter::format - */ - public function testFormatWithTag() - { - $record = $this->getRecord(Logger::ERROR); - $record['datetime'] = new \DateTime("@0"); - - $formatter = new FluentdFormatter(true); - $this->assertEquals( - '["test.error",0,{"message":"test","extra":[]}]', - $formatter->format($record) - ); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php deleted file mode 100644 index e6bd309..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function setUp() - { - if (!class_exists('\Gelf\Message')) { - $this->markTestSkipped("graylog2/gelf-php or mlehner/gelf-php is not installed"); - } - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testDefaultFormatter() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - $this->assertEquals(0, $message->getTimestamp()); - $this->assertEquals('log', $message->getShortMessage()); - $this->assertEquals('meh', $message->getFacility()); - $this->assertEquals(null, $message->getLine()); - $this->assertEquals(null, $message->getFile()); - $this->assertEquals($this->isLegacy() ? 3 : 'error', $message->getLevel()); - $this->assertNotEmpty($message->getHost()); - - $formatter = new GelfMessageFormatter('mysystem'); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - $this->assertEquals('mysystem', $message->getHost()); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithFileAndLine() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - $this->assertEquals('test', $message->getFile()); - $this->assertEquals(14, $message->getLine()); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - * @expectedException InvalidArgumentException - */ - public function testFormatInvalidFails() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - ); - - $formatter->format($record); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithContext() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_ctxt_from', $message_array); - $this->assertEquals('logger', $message_array['_ctxt_from']); - - // Test with extraPrefix - $formatter = new GelfMessageFormatter(null, null, 'CTX'); - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_CTXfrom', $message_array); - $this->assertEquals('logger', $message_array['_CTXfrom']); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithContextContainingException() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger', 'exception' => array( - 'class' => '\Exception', - 'file' => '/some/file/in/dir.php:56', - 'trace' => array('/some/file/1.php:23', '/some/file/2.php:3'), - )), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $this->assertEquals("/some/file/in/dir.php", $message->getFile()); - $this->assertEquals("56", $message->getLine()); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithExtra() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_key', $message_array); - $this->assertEquals('pair', $message_array['_key']); - - // Test with extraPrefix - $formatter = new GelfMessageFormatter(null, 'EXT'); - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_EXTkey', $message_array); - $this->assertEquals('pair', $message_array['_EXTkey']); - } - - public function testFormatWithLargeData() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('exception' => str_repeat(' ', 32767)), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => str_repeat(' ', 32767)), - 'message' => 'log' - ); - $message = $formatter->format($record); - $messageArray = $message->toArray(); - - // 200 for padding + metadata - $length = 200; - - foreach ($messageArray as $key => $value) { - if (!in_array($key, array('level', 'timestamp'))) { - $length += strlen($value); - } - } - - // in graylog2/gelf-php before 1.4.1 empty strings are filtered and won't be included in the message - // though it should be sufficient to ensure that the entire message length does not exceed the maximum - // length being allowed - $this->assertLessThanOrEqual(32766, $length, 'The message length is no longer than the maximum allowed length'); - } - - private function isLegacy() - { - return interface_exists('\Gelf\IMessagePublisher'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php deleted file mode 100644 index c9445f3..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\TestCase; - -class JsonFormatterTest extends TestCase -{ - /** - * @covers Monolog\Formatter\JsonFormatter::__construct - * @covers Monolog\Formatter\JsonFormatter::getBatchMode - * @covers Monolog\Formatter\JsonFormatter::isAppendingNewlines - */ - public function testConstruct() - { - $formatter = new JsonFormatter(); - $this->assertEquals(JsonFormatter::BATCH_MODE_JSON, $formatter->getBatchMode()); - $this->assertEquals(true, $formatter->isAppendingNewlines()); - $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_NEWLINES, false); - $this->assertEquals(JsonFormatter::BATCH_MODE_NEWLINES, $formatter->getBatchMode()); - $this->assertEquals(false, $formatter->isAppendingNewlines()); - } - - /** - * @covers Monolog\Formatter\JsonFormatter::format - */ - public function testFormat() - { - $formatter = new JsonFormatter(); - $record = $this->getRecord(); - $this->assertEquals(json_encode($record)."\n", $formatter->format($record)); - - $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - $record = $this->getRecord(); - $this->assertEquals(json_encode($record), $formatter->format($record)); - } - - /** - * @covers Monolog\Formatter\JsonFormatter::formatBatch - * @covers Monolog\Formatter\JsonFormatter::formatBatchJson - */ - public function testFormatBatch() - { - $formatter = new JsonFormatter(); - $records = array( - $this->getRecord(Logger::WARNING), - $this->getRecord(Logger::DEBUG), - ); - $this->assertEquals(json_encode($records), $formatter->formatBatch($records)); - } - - /** - * @covers Monolog\Formatter\JsonFormatter::formatBatch - * @covers Monolog\Formatter\JsonFormatter::formatBatchNewlines - */ - public function testFormatBatchNewlines() - { - $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_NEWLINES); - $records = $expected = array( - $this->getRecord(Logger::WARNING), - $this->getRecord(Logger::DEBUG), - ); - array_walk($expected, function (&$value, $key) { - $value = json_encode($value); - }); - $this->assertEquals(implode("\n", $expected), $formatter->formatBatch($records)); - } - - public function testDefFormatWithException() - { - $formatter = new JsonFormatter(); - $exception = new \RuntimeException('Foo'); - $formattedException = $this->formatException($exception); - - $message = $this->formatRecordWithExceptionInContext($formatter, $exception); - - $this->assertContextContainsFormattedException($formattedException, $message); - } - - public function testDefFormatWithPreviousException() - { - $formatter = new JsonFormatter(); - $exception = new \RuntimeException('Foo', 0, new \LogicException('Wut?')); - $formattedPrevException = $this->formatException($exception->getPrevious()); - $formattedException = $this->formatException($exception, $formattedPrevException); - - $message = $this->formatRecordWithExceptionInContext($formatter, $exception); - - $this->assertContextContainsFormattedException($formattedException, $message); - } - - public function testDefFormatWithThrowable() - { - if (!class_exists('Error') || !is_subclass_of('Error', 'Throwable')) { - $this->markTestSkipped('Requires PHP >=7'); - } - - $formatter = new JsonFormatter(); - $throwable = new \Error('Foo'); - $formattedThrowable = $this->formatException($throwable); - - $message = $this->formatRecordWithExceptionInContext($formatter, $throwable); - - $this->assertContextContainsFormattedException($formattedThrowable, $message); - } - - /** - * @param string $expected - * @param string $actual - * - * @internal param string $exception - */ - private function assertContextContainsFormattedException($expected, $actual) - { - $this->assertEquals( - '{"level_name":"CRITICAL","channel":"core","context":{"exception":'.$expected.'},"datetime":null,"extra":[],"message":"foobar"}'."\n", - $actual - ); - } - - /** - * @param JsonFormatter $formatter - * @param \Exception|\Throwable $exception - * - * @return string - */ - private function formatRecordWithExceptionInContext(JsonFormatter $formatter, $exception) - { - $message = $formatter->format(array( - 'level_name' => 'CRITICAL', - 'channel' => 'core', - 'context' => array('exception' => $exception), - 'datetime' => null, - 'extra' => array(), - 'message' => 'foobar', - )); - return $message; - } - - /** - * @param \Exception|\Throwable $exception - * - * @return string - */ - private function formatExceptionFilePathWithLine($exception) - { - $options = 0; - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } - $path = substr(json_encode($exception->getFile(), $options), 1, -1); - return $path . ':' . $exception->getLine(); - } - - /** - * @param \Exception|\Throwable $exception - * - * @param null|string $previous - * - * @return string - */ - private function formatException($exception, $previous = null) - { - $formattedException = - '{"class":"' . get_class($exception) . - '","message":"' . $exception->getMessage() . - '","code":' . $exception->getCode() . - ',"file":"' . $this->formatExceptionFilePathWithLine($exception) . - ($previous ? '","previous":' . $previous : '"') . - '}'; - return $formattedException; - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php deleted file mode 100644 index 310d93c..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * @covers Monolog\Formatter\LineFormatter - */ -class LineFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function testDefFormatWithString() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'context' => array(), - 'message' => 'foo', - 'datetime' => new \DateTime, - 'extra' => array(), - )); - $this->assertEquals('['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message); - } - - public function testDefFormatWithArrayContext() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'message' => 'foo', - 'datetime' => new \DateTime, - 'extra' => array(), - 'context' => array( - 'foo' => 'bar', - 'baz' => 'qux', - 'bool' => false, - 'null' => null, - ), - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: foo {"foo":"bar","baz":"qux","bool":false,"null":null} []'."\n", $message); - } - - public function testDefFormatExtras() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array('ip' => '127.0.0.1'), - 'message' => 'log', - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log [] {"ip":"127.0.0.1"}'."\n", $message); - } - - public function testFormatExtras() - { - $formatter = new LineFormatter("[%datetime%] %channel%.%level_name%: %message% %context% %extra.file% %extra%\n", 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array('ip' => '127.0.0.1', 'file' => 'test'), - 'message' => 'log', - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log [] test {"ip":"127.0.0.1"}'."\n", $message); - } - - public function testContextAndExtraOptionallyNotShownIfEmpty() - { - $formatter = new LineFormatter(null, 'Y-m-d', false, true); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - 'message' => 'log', - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log '."\n", $message); - } - - public function testContextAndExtraReplacement() - { - $formatter = new LineFormatter('%context.foo% => %extra.foo%'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('foo' => 'bar'), - 'datetime' => new \DateTime, - 'extra' => array('foo' => 'xbar'), - 'message' => 'log', - )); - $this->assertEquals('bar => xbar', $message); - } - - public function testDefFormatWithObject() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array('foo' => new TestFoo, 'bar' => new TestBar, 'baz' => array(), 'res' => fopen('php://memory', 'rb')), - 'message' => 'foobar', - )); - - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: foobar [] {"foo":"[object] (Monolog\\\\Formatter\\\\TestFoo: {\\"foo\\":\\"foo\\"})","bar":"[object] (Monolog\\\\Formatter\\\\TestBar: bar)","baz":[],"res":"[resource] (stream)"}'."\n", $message); - } - - public function testDefFormatWithException() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'CRITICAL', - 'channel' => 'core', - 'context' => array('exception' => new \RuntimeException('Foo')), - 'datetime' => new \DateTime, - 'extra' => array(), - 'message' => 'foobar', - )); - - $path = str_replace('\\/', '/', json_encode(__FILE__)); - - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr($path, 1, -1).':'.(__LINE__ - 8).')"} []'."\n", $message); - } - - public function testDefFormatWithPreviousException() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $previous = new \LogicException('Wut?'); - $message = $formatter->format(array( - 'level_name' => 'CRITICAL', - 'channel' => 'core', - 'context' => array('exception' => new \RuntimeException('Foo', 0, $previous)), - 'datetime' => new \DateTime, - 'extra' => array(), - 'message' => 'foobar', - )); - - $path = str_replace('\\/', '/', json_encode(__FILE__)); - - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr($path, 1, -1).':'.(__LINE__ - 8).', LogicException(code: 0): Wut? at '.substr($path, 1, -1).':'.(__LINE__ - 12).')"} []'."\n", $message); - } - - public function testBatchFormat() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->formatBatch(array( - array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'message' => 'foo', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - )); - $this->assertEquals('['.date('Y-m-d').'] test.CRITICAL: bar [] []'."\n".'['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message); - } - - public function testFormatShouldStripInlineLineBreaks() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format( - array( - 'message' => "foo\nbar", - 'context' => array(), - 'extra' => array(), - ) - ); - - $this->assertRegExp('/foo bar/', $message); - } - - public function testFormatShouldNotStripInlineLineBreaksWhenFlagIsSet() - { - $formatter = new LineFormatter(null, 'Y-m-d', true); - $message = $formatter->format( - array( - 'message' => "foo\nbar", - 'context' => array(), - 'extra' => array(), - ) - ); - - $this->assertRegExp('/foo\nbar/', $message); - } -} - -class TestFoo -{ - public $foo = 'foo'; -} - -class TestBar -{ - public function __toString() - { - return 'bar'; - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php deleted file mode 100644 index 6d59b3f..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\TestCase; - -class LogglyFormatterTest extends TestCase -{ - /** - * @covers Monolog\Formatter\LogglyFormatter::__construct - */ - public function testConstruct() - { - $formatter = new LogglyFormatter(); - $this->assertEquals(LogglyFormatter::BATCH_MODE_NEWLINES, $formatter->getBatchMode()); - $formatter = new LogglyFormatter(LogglyFormatter::BATCH_MODE_JSON); - $this->assertEquals(LogglyFormatter::BATCH_MODE_JSON, $formatter->getBatchMode()); - } - - /** - * @covers Monolog\Formatter\LogglyFormatter::format - */ - public function testFormat() - { - $formatter = new LogglyFormatter(); - $record = $this->getRecord(); - $formatted_decoded = json_decode($formatter->format($record), true); - $this->assertArrayHasKey("timestamp", $formatted_decoded); - $this->assertEquals(new \DateTime($formatted_decoded["timestamp"]), $record["datetime"]); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php deleted file mode 100644 index 9f6b1cc..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php +++ /dev/null @@ -1,333 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class LogstashFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function tearDown() - { - \PHPUnit_Framework_Error_Warning::$enabled = true; - - return parent::tearDown(); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testDefaultFormatter() - { - $formatter = new LogstashFormatter('test', 'hostname'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']); - $this->assertEquals('log', $message['@message']); - $this->assertEquals('meh', $message['@fields']['channel']); - $this->assertContains('meh', $message['@tags']); - $this->assertEquals(Logger::ERROR, $message['@fields']['level']); - $this->assertEquals('test', $message['@type']); - $this->assertEquals('hostname', $message['@source']); - - $formatter = new LogstashFormatter('mysystem'); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals('mysystem', $message['@type']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithFileAndLine() - { - $formatter = new LogstashFormatter('test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals('test', $message['@fields']['file']); - $this->assertEquals(14, $message['@fields']['line']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithContext() - { - $formatter = new LogstashFormatter('test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('ctxt_from', $message_array); - $this->assertEquals('logger', $message_array['ctxt_from']); - - // Test with extraPrefix - $formatter = new LogstashFormatter('test', null, null, 'CTX'); - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('CTXfrom', $message_array); - $this->assertEquals('logger', $message_array['CTXfrom']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithExtra() - { - $formatter = new LogstashFormatter('test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('key', $message_array); - $this->assertEquals('pair', $message_array['key']); - - // Test with extraPrefix - $formatter = new LogstashFormatter('test', null, 'EXT'); - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('EXTkey', $message_array); - $this->assertEquals('pair', $message_array['EXTkey']); - } - - public function testFormatWithApplicationName() - { - $formatter = new LogstashFormatter('app', 'test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('@type', $message); - $this->assertEquals('app', $message['@type']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testDefaultFormatterV1() - { - $formatter = new LogstashFormatter('test', 'hostname', null, 'ctxt_', LogstashFormatter::V1); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']); - $this->assertEquals("1", $message['@version']); - $this->assertEquals('log', $message['message']); - $this->assertEquals('meh', $message['channel']); - $this->assertEquals('ERROR', $message['level']); - $this->assertEquals('test', $message['type']); - $this->assertEquals('hostname', $message['host']); - - $formatter = new LogstashFormatter('mysystem', null, null, 'ctxt_', LogstashFormatter::V1); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals('mysystem', $message['type']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithFileAndLineV1() - { - $formatter = new LogstashFormatter('test', null, null, 'ctxt_', LogstashFormatter::V1); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals('test', $message['file']); - $this->assertEquals(14, $message['line']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithContextV1() - { - $formatter = new LogstashFormatter('test', null, null, 'ctxt_', LogstashFormatter::V1); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('ctxt_from', $message); - $this->assertEquals('logger', $message['ctxt_from']); - - // Test with extraPrefix - $formatter = new LogstashFormatter('test', null, null, 'CTX', LogstashFormatter::V1); - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('CTXfrom', $message); - $this->assertEquals('logger', $message['CTXfrom']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithExtraV1() - { - $formatter = new LogstashFormatter('test', null, null, 'ctxt_', LogstashFormatter::V1); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('key', $message); - $this->assertEquals('pair', $message['key']); - - // Test with extraPrefix - $formatter = new LogstashFormatter('test', null, 'EXT', 'ctxt_', LogstashFormatter::V1); - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('EXTkey', $message); - $this->assertEquals('pair', $message['EXTkey']); - } - - public function testFormatWithApplicationNameV1() - { - $formatter = new LogstashFormatter('app', 'test', null, 'ctxt_', LogstashFormatter::V1); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('type', $message); - $this->assertEquals('app', $message['type']); - } - - public function testFormatWithLatin9Data() - { - if (version_compare(PHP_VERSION, '5.5.0', '<')) { - // Ignore the warning that will be emitted by PHP <5.5.0 - \PHPUnit_Framework_Error_Warning::$enabled = false; - } - $formatter = new LogstashFormatter('test', 'hostname'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => '¯\_(ツ)_/¯', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array( - 'user_agent' => "\xD6WN; FBCR/OrangeEspa\xF1a; Vers\xE3o/4.0; F\xE4rist", - ), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']); - $this->assertEquals('log', $message['@message']); - $this->assertEquals('¯\_(ツ)_/¯', $message['@fields']['channel']); - $this->assertContains('¯\_(ツ)_/¯', $message['@tags']); - $this->assertEquals(Logger::ERROR, $message['@fields']['level']); - $this->assertEquals('test', $message['@type']); - $this->assertEquals('hostname', $message['@source']); - if (version_compare(PHP_VERSION, '5.5.0', '>=')) { - $this->assertEquals('ÖWN; FBCR/OrangeEspaña; Versão/4.0; Färist', $message['@fields']['user_agent']); - } else { - // PHP <5.5 does not return false for an element encoding failure, - // instead it emits a warning (possibly) and nulls the value. - $this->assertEquals(null, $message['@fields']['user_agent']); - } - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php deleted file mode 100644 index 52e699e..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * @author Florian Plattner - */ -class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function setUp() - { - if (!class_exists('MongoDate')) { - $this->markTestSkipped('mongo extension not installed'); - } - } - - public function constructArgumentProvider() - { - return array( - array(1, true, 1, true), - array(0, false, 0, false), - ); - } - - /** - * @param $traceDepth - * @param $traceAsString - * @param $expectedTraceDepth - * @param $expectedTraceAsString - * - * @dataProvider constructArgumentProvider - */ - public function testConstruct($traceDepth, $traceAsString, $expectedTraceDepth, $expectedTraceAsString) - { - $formatter = new MongoDBFormatter($traceDepth, $traceAsString); - - $reflTrace = new \ReflectionProperty($formatter, 'exceptionTraceAsString'); - $reflTrace->setAccessible(true); - $this->assertEquals($expectedTraceAsString, $reflTrace->getValue($formatter)); - - $reflDepth = new\ReflectionProperty($formatter, 'maxNestingLevel'); - $reflDepth->setAccessible(true); - $this->assertEquals($expectedTraceDepth, $reflDepth->getValue($formatter)); - } - - public function testSimpleFormat() - { - $record = array( - 'message' => 'some log message', - 'context' => array(), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'test', - 'datetime' => new \DateTime('2014-02-01 00:00:00'), - 'extra' => array(), - ); - - $formatter = new MongoDBFormatter(); - $formattedRecord = $formatter->format($record); - - $this->assertCount(7, $formattedRecord); - $this->assertEquals('some log message', $formattedRecord['message']); - $this->assertEquals(array(), $formattedRecord['context']); - $this->assertEquals(Logger::WARNING, $formattedRecord['level']); - $this->assertEquals(Logger::getLevelName(Logger::WARNING), $formattedRecord['level_name']); - $this->assertEquals('test', $formattedRecord['channel']); - $this->assertInstanceOf('\MongoDate', $formattedRecord['datetime']); - $this->assertEquals('0.00000000 1391212800', $formattedRecord['datetime']->__toString()); - $this->assertEquals(array(), $formattedRecord['extra']); - } - - public function testRecursiveFormat() - { - $someObject = new \stdClass(); - $someObject->foo = 'something'; - $someObject->bar = 'stuff'; - - $record = array( - 'message' => 'some log message', - 'context' => array( - 'stuff' => new \DateTime('2014-02-01 02:31:33'), - 'some_object' => $someObject, - 'context_string' => 'some string', - 'context_int' => 123456, - 'except' => new \Exception('exception message', 987), - ), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'test', - 'datetime' => new \DateTime('2014-02-01 00:00:00'), - 'extra' => array(), - ); - - $formatter = new MongoDBFormatter(); - $formattedRecord = $formatter->format($record); - - $this->assertCount(5, $formattedRecord['context']); - $this->assertInstanceOf('\MongoDate', $formattedRecord['context']['stuff']); - $this->assertEquals('0.00000000 1391221893', $formattedRecord['context']['stuff']->__toString()); - $this->assertEquals( - array( - 'foo' => 'something', - 'bar' => 'stuff', - 'class' => 'stdClass', - ), - $formattedRecord['context']['some_object'] - ); - $this->assertEquals('some string', $formattedRecord['context']['context_string']); - $this->assertEquals(123456, $formattedRecord['context']['context_int']); - - $this->assertCount(5, $formattedRecord['context']['except']); - $this->assertEquals('exception message', $formattedRecord['context']['except']['message']); - $this->assertEquals(987, $formattedRecord['context']['except']['code']); - $this->assertInternalType('string', $formattedRecord['context']['except']['file']); - $this->assertInternalType('integer', $formattedRecord['context']['except']['code']); - $this->assertInternalType('string', $formattedRecord['context']['except']['trace']); - $this->assertEquals('Exception', $formattedRecord['context']['except']['class']); - } - - public function testFormatDepthArray() - { - $record = array( - 'message' => 'some log message', - 'context' => array( - 'nest2' => array( - 'property' => 'anything', - 'nest3' => array( - 'nest4' => 'value', - 'property' => 'nothing', - ), - ), - ), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'test', - 'datetime' => new \DateTime('2014-02-01 00:00:00'), - 'extra' => array(), - ); - - $formatter = new MongoDBFormatter(2); - $formattedResult = $formatter->format($record); - - $this->assertEquals( - array( - 'nest2' => array( - 'property' => 'anything', - 'nest3' => '[...]', - ), - ), - $formattedResult['context'] - ); - } - - public function testFormatDepthArrayInfiniteNesting() - { - $record = array( - 'message' => 'some log message', - 'context' => array( - 'nest2' => array( - 'property' => 'something', - 'nest3' => array( - 'property' => 'anything', - 'nest4' => array( - 'property' => 'nothing', - ), - ), - ), - ), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'test', - 'datetime' => new \DateTime('2014-02-01 00:00:00'), - 'extra' => array(), - ); - - $formatter = new MongoDBFormatter(0); - $formattedResult = $formatter->format($record); - - $this->assertEquals( - array( - 'nest2' => array( - 'property' => 'something', - 'nest3' => array( - 'property' => 'anything', - 'nest4' => array( - 'property' => 'nothing', - ), - ), - ), - ), - $formattedResult['context'] - ); - } - - public function testFormatDepthObjects() - { - $someObject = new \stdClass(); - $someObject->property = 'anything'; - $someObject->nest3 = new \stdClass(); - $someObject->nest3->property = 'nothing'; - $someObject->nest3->nest4 = 'invisible'; - - $record = array( - 'message' => 'some log message', - 'context' => array( - 'nest2' => $someObject, - ), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'test', - 'datetime' => new \DateTime('2014-02-01 00:00:00'), - 'extra' => array(), - ); - - $formatter = new MongoDBFormatter(2, true); - $formattedResult = $formatter->format($record); - - $this->assertEquals( - array( - 'nest2' => array( - 'property' => 'anything', - 'nest3' => '[...]', - 'class' => 'stdClass', - ), - ), - $formattedResult['context'] - ); - } - - public function testFormatDepthException() - { - $record = array( - 'message' => 'some log message', - 'context' => array( - 'nest2' => new \Exception('exception message', 987), - ), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'test', - 'datetime' => new \DateTime('2014-02-01 00:00:00'), - 'extra' => array(), - ); - - $formatter = new MongoDBFormatter(2, false); - $formattedRecord = $formatter->format($record); - - $this->assertEquals('exception message', $formattedRecord['context']['nest2']['message']); - $this->assertEquals(987, $formattedRecord['context']['nest2']['code']); - $this->assertEquals('[...]', $formattedRecord['context']['nest2']['trace']); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php deleted file mode 100644 index 57bcdf9..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php +++ /dev/null @@ -1,423 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * @covers Monolog\Formatter\NormalizerFormatter - */ -class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function tearDown() - { - \PHPUnit_Framework_Error_Warning::$enabled = true; - - return parent::tearDown(); - } - - public function testFormat() - { - $formatter = new NormalizerFormatter('Y-m-d'); - $formatted = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'message' => 'foo', - 'datetime' => new \DateTime, - 'extra' => array('foo' => new TestFooNorm, 'bar' => new TestBarNorm, 'baz' => array(), 'res' => fopen('php://memory', 'rb')), - 'context' => array( - 'foo' => 'bar', - 'baz' => 'qux', - 'inf' => INF, - '-inf' => -INF, - 'nan' => acos(4), - ), - )); - - $this->assertEquals(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'message' => 'foo', - 'datetime' => date('Y-m-d'), - 'extra' => array( - 'foo' => '[object] (Monolog\\Formatter\\TestFooNorm: {"foo":"foo"})', - 'bar' => '[object] (Monolog\\Formatter\\TestBarNorm: bar)', - 'baz' => array(), - 'res' => '[resource] (stream)', - ), - 'context' => array( - 'foo' => 'bar', - 'baz' => 'qux', - 'inf' => 'INF', - '-inf' => '-INF', - 'nan' => 'NaN', - ), - ), $formatted); - } - - public function testFormatExceptions() - { - $formatter = new NormalizerFormatter('Y-m-d'); - $e = new \LogicException('bar'); - $e2 = new \RuntimeException('foo', 0, $e); - $formatted = $formatter->format(array( - 'exception' => $e2, - )); - - $this->assertGreaterThan(5, count($formatted['exception']['trace'])); - $this->assertTrue(isset($formatted['exception']['previous'])); - unset($formatted['exception']['trace'], $formatted['exception']['previous']); - - $this->assertEquals(array( - 'exception' => array( - 'class' => get_class($e2), - 'message' => $e2->getMessage(), - 'code' => $e2->getCode(), - 'file' => $e2->getFile().':'.$e2->getLine(), - ), - ), $formatted); - } - - public function testFormatSoapFaultException() - { - if (!class_exists('SoapFault')) { - $this->markTestSkipped('Requires the soap extension'); - } - - $formatter = new NormalizerFormatter('Y-m-d'); - $e = new \SoapFault('foo', 'bar', 'hello', 'world'); - $formatted = $formatter->format(array( - 'exception' => $e, - )); - - unset($formatted['exception']['trace']); - - $this->assertEquals(array( - 'exception' => array( - 'class' => 'SoapFault', - 'message' => 'bar', - 'code' => 0, - 'file' => $e->getFile().':'.$e->getLine(), - 'faultcode' => 'foo', - 'faultactor' => 'hello', - 'detail' => 'world', - ), - ), $formatted); - } - - public function testFormatToStringExceptionHandle() - { - $formatter = new NormalizerFormatter('Y-m-d'); - $this->setExpectedException('RuntimeException', 'Could not convert to string'); - $formatter->format(array( - 'myObject' => new TestToStringError(), - )); - } - - public function testBatchFormat() - { - $formatter = new NormalizerFormatter('Y-m-d'); - $formatted = $formatter->formatBatch(array( - array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'message' => 'foo', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - )); - $this->assertEquals(array( - array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array(), - 'datetime' => date('Y-m-d'), - 'extra' => array(), - ), - array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'message' => 'foo', - 'context' => array(), - 'datetime' => date('Y-m-d'), - 'extra' => array(), - ), - ), $formatted); - } - - /** - * Test issue #137 - */ - public function testIgnoresRecursiveObjectReferences() - { - // set up the recursion - $foo = new \stdClass(); - $bar = new \stdClass(); - - $foo->bar = $bar; - $bar->foo = $foo; - - // set an error handler to assert that the error is not raised anymore - $that = $this; - set_error_handler(function ($level, $message, $file, $line, $context) use ($that) { - if (error_reporting() & $level) { - restore_error_handler(); - $that->fail("$message should not be raised"); - } - }); - - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'toJson'); - $reflMethod->setAccessible(true); - $res = $reflMethod->invoke($formatter, array($foo, $bar), true); - - restore_error_handler(); - - $this->assertEquals(@json_encode(array($foo, $bar)), $res); - } - - public function testIgnoresInvalidTypes() - { - // set up the recursion - $resource = fopen(__FILE__, 'r'); - - // set an error handler to assert that the error is not raised anymore - $that = $this; - set_error_handler(function ($level, $message, $file, $line, $context) use ($that) { - if (error_reporting() & $level) { - restore_error_handler(); - $that->fail("$message should not be raised"); - } - }); - - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'toJson'); - $reflMethod->setAccessible(true); - $res = $reflMethod->invoke($formatter, array($resource), true); - - restore_error_handler(); - - $this->assertEquals(@json_encode(array($resource)), $res); - } - - public function testNormalizeHandleLargeArrays() - { - $formatter = new NormalizerFormatter(); - $largeArray = range(1, 2000); - - $res = $formatter->format(array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array($largeArray), - 'datetime' => new \DateTime, - 'extra' => array(), - )); - - $this->assertCount(1000, $res['context'][0]); - $this->assertEquals('Over 1000 items (2000 total), aborting normalization', $res['context'][0]['...']); - } - - /** - * @expectedException RuntimeException - */ - public function testThrowsOnInvalidEncoding() - { - if (version_compare(PHP_VERSION, '5.5.0', '<')) { - // Ignore the warning that will be emitted by PHP <5.5.0 - \PHPUnit_Framework_Error_Warning::$enabled = false; - } - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'toJson'); - $reflMethod->setAccessible(true); - - // send an invalid unicode sequence as a object that can't be cleaned - $record = new \stdClass; - $record->message = "\xB1\x31"; - $res = $reflMethod->invoke($formatter, $record); - if (PHP_VERSION_ID < 50500 && $res === '{"message":null}') { - throw new \RuntimeException('PHP 5.3/5.4 throw a warning and null the value instead of returning false entirely'); - } - } - - public function testConvertsInvalidEncodingAsLatin9() - { - if (version_compare(PHP_VERSION, '5.5.0', '<')) { - // Ignore the warning that will be emitted by PHP <5.5.0 - \PHPUnit_Framework_Error_Warning::$enabled = false; - } - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'toJson'); - $reflMethod->setAccessible(true); - - $res = $reflMethod->invoke($formatter, array('message' => "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE")); - - if (version_compare(PHP_VERSION, '5.5.0', '>=')) { - $this->assertSame('{"message":"€ŠšŽžŒœŸ"}', $res); - } else { - // PHP <5.5 does not return false for an element encoding failure, - // instead it emits a warning (possibly) and nulls the value. - $this->assertSame('{"message":null}', $res); - } - } - - /** - * @param mixed $in Input - * @param mixed $expect Expected output - * @covers Monolog\Formatter\NormalizerFormatter::detectAndCleanUtf8 - * @dataProvider providesDetectAndCleanUtf8 - */ - public function testDetectAndCleanUtf8($in, $expect) - { - $formatter = new NormalizerFormatter(); - $formatter->detectAndCleanUtf8($in); - $this->assertSame($expect, $in); - } - - public function providesDetectAndCleanUtf8() - { - $obj = new \stdClass; - - return array( - 'null' => array(null, null), - 'int' => array(123, 123), - 'float' => array(123.45, 123.45), - 'bool false' => array(false, false), - 'bool true' => array(true, true), - 'ascii string' => array('abcdef', 'abcdef'), - 'latin9 string' => array("\xB1\x31\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE\xFF", '±1€ŠšŽžŒœŸÿ'), - 'unicode string' => array('¤¦¨´¸¼½¾€ŠšŽžŒœŸ', '¤¦¨´¸¼½¾€ŠšŽžŒœŸ'), - 'empty array' => array(array(), array()), - 'array' => array(array('abcdef'), array('abcdef')), - 'object' => array($obj, $obj), - ); - } - - /** - * @param int $code - * @param string $msg - * @dataProvider providesHandleJsonErrorFailure - */ - public function testHandleJsonErrorFailure($code, $msg) - { - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'handleJsonError'); - $reflMethod->setAccessible(true); - - $this->setExpectedException('RuntimeException', $msg); - $reflMethod->invoke($formatter, $code, 'faked'); - } - - public function providesHandleJsonErrorFailure() - { - return array( - 'depth' => array(JSON_ERROR_DEPTH, 'Maximum stack depth exceeded'), - 'state' => array(JSON_ERROR_STATE_MISMATCH, 'Underflow or the modes mismatch'), - 'ctrl' => array(JSON_ERROR_CTRL_CHAR, 'Unexpected control character found'), - 'default' => array(-1, 'Unknown error'), - ); - } - - public function testExceptionTraceWithArgs() - { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('Not supported in HHVM since it detects errors differently'); - } - - // This happens i.e. in React promises or Guzzle streams where stream wrappers are registered - // and no file or line are included in the trace because it's treated as internal function - set_error_handler(function ($errno, $errstr, $errfile, $errline) { - throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); - }); - - try { - // This will contain $resource and $wrappedResource as arguments in the trace item - $resource = fopen('php://memory', 'rw+'); - fwrite($resource, 'test_resource'); - $wrappedResource = new TestFooNorm; - $wrappedResource->foo = $resource; - // Just do something stupid with a resource/wrapped resource as argument - array_keys($wrappedResource); - } catch (\Exception $e) { - restore_error_handler(); - } - - $formatter = new NormalizerFormatter(); - $record = array('context' => array('exception' => $e)); - $result = $formatter->format($record); - - $this->assertRegExp( - '%"resource":"\[resource\] \(stream\)"%', - $result['context']['exception']['trace'][0] - ); - - if (version_compare(PHP_VERSION, '5.5.0', '>=')) { - $pattern = '%"wrappedResource":"\[object\] \(Monolog\\\\\\\\Formatter\\\\\\\\TestFooNorm: \)"%'; - } else { - $pattern = '%\\\\"foo\\\\":null%'; - } - - // Tests that the wrapped resource is ignored while encoding, only works for PHP <= 5.4 - $this->assertRegExp( - $pattern, - $result['context']['exception']['trace'][0] - ); - } -} - -class TestFooNorm -{ - public $foo = 'foo'; -} - -class TestBarNorm -{ - public function __toString() - { - return 'bar'; - } -} - -class TestStreamFoo -{ - public $foo; - public $resource; - - public function __construct($resource) - { - $this->resource = $resource; - $this->foo = 'BAR'; - } - - public function __toString() - { - fseek($this->resource, 0); - - return $this->foo . ' - ' . (string) stream_get_contents($this->resource); - } -} - -class TestToStringError -{ - public function __toString() - { - throw new \RuntimeException('Could not convert to string'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php deleted file mode 100644 index b1c8fd4..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -class ScalarFormatterTest extends \PHPUnit_Framework_TestCase -{ - private $formatter; - - public function setUp() - { - $this->formatter = new ScalarFormatter(); - } - - public function buildTrace(\Exception $e) - { - $data = array(); - $trace = $e->getTrace(); - foreach ($trace as $frame) { - if (isset($frame['file'])) { - $data[] = $frame['file'].':'.$frame['line']; - } else { - $data[] = json_encode($frame); - } - } - - return $data; - } - - public function encodeJson($data) - { - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - } - - return json_encode($data); - } - - public function testFormat() - { - $exception = new \Exception('foo'); - $formatted = $this->formatter->format(array( - 'foo' => 'string', - 'bar' => 1, - 'baz' => false, - 'bam' => array(1, 2, 3), - 'bat' => array('foo' => 'bar'), - 'bap' => \DateTime::createFromFormat(\DateTime::ISO8601, '1970-01-01T00:00:00+0000'), - 'ban' => $exception, - )); - - $this->assertSame(array( - 'foo' => 'string', - 'bar' => 1, - 'baz' => false, - 'bam' => $this->encodeJson(array(1, 2, 3)), - 'bat' => $this->encodeJson(array('foo' => 'bar')), - 'bap' => '1970-01-01 00:00:00', - 'ban' => $this->encodeJson(array( - 'class' => get_class($exception), - 'message' => $exception->getMessage(), - 'code' => $exception->getCode(), - 'file' => $exception->getFile() . ':' . $exception->getLine(), - 'trace' => $this->buildTrace($exception), - )), - ), $formatted); - } - - public function testFormatWithErrorContext() - { - $context = array('file' => 'foo', 'line' => 1); - $formatted = $this->formatter->format(array( - 'context' => $context, - )); - - $this->assertSame(array( - 'context' => $this->encodeJson($context), - ), $formatted); - } - - public function testFormatWithExceptionContext() - { - $exception = new \Exception('foo'); - $formatted = $this->formatter->format(array( - 'context' => array( - 'exception' => $exception, - ), - )); - - $this->assertSame(array( - 'context' => $this->encodeJson(array( - 'exception' => array( - 'class' => get_class($exception), - 'message' => $exception->getMessage(), - 'code' => $exception->getCode(), - 'file' => $exception->getFile() . ':' . $exception->getLine(), - 'trace' => $this->buildTrace($exception), - ), - )), - ), $formatted); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php b/api/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php deleted file mode 100644 index 52f15a3..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class WildfireFormatterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testDefaultFormat() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1'), - 'message' => 'log', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '125|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},' - .'{"message":"log","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|', - $message - ); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testFormatWithFileAndLine() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '129|[{"Type":"ERROR","File":"test","Line":14,"Label":"meh"},' - .'{"message":"log","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|', - $message - ); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testFormatWithoutContext() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '58|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},"log"]|', - $message - ); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::formatBatch - * @expectedException BadMethodCallException - */ - public function testBatchFormatThrowException() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $wildfire->formatBatch(array($record)); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testTableFormat() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'table-channel', - 'context' => array( - WildfireFormatter::TABLE => array( - array('col1', 'col2', 'col3'), - array('val1', 'val2', 'val3'), - array('foo1', 'foo2', 'foo3'), - array('bar1', 'bar2', 'bar3'), - ), - ), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'table-message', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '171|[{"Type":"TABLE","File":"","Line":"","Label":"table-channel: table-message"},[["col1","col2","col3"],["val1","val2","val3"],["foo1","foo2","foo3"],["bar1","bar2","bar3"]]]|', - $message - ); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php deleted file mode 100644 index 568eb9d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; -use Monolog\Processor\WebProcessor; - -class AbstractHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\AbstractHandler::__construct - * @covers Monolog\Handler\AbstractHandler::getLevel - * @covers Monolog\Handler\AbstractHandler::setLevel - * @covers Monolog\Handler\AbstractHandler::getBubble - * @covers Monolog\Handler\AbstractHandler::setBubble - * @covers Monolog\Handler\AbstractHandler::getFormatter - * @covers Monolog\Handler\AbstractHandler::setFormatter - */ - public function testConstructAndGetSet() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array(Logger::WARNING, false)); - $this->assertEquals(Logger::WARNING, $handler->getLevel()); - $this->assertEquals(false, $handler->getBubble()); - - $handler->setLevel(Logger::ERROR); - $handler->setBubble(true); - $handler->setFormatter($formatter = new LineFormatter); - $this->assertEquals(Logger::ERROR, $handler->getLevel()); - $this->assertEquals(true, $handler->getBubble()); - $this->assertSame($formatter, $handler->getFormatter()); - } - - /** - * @covers Monolog\Handler\AbstractHandler::handleBatch - */ - public function testHandleBatch() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - $handler->expects($this->exactly(2)) - ->method('handle'); - $handler->handleBatch(array($this->getRecord(), $this->getRecord())); - } - - /** - * @covers Monolog\Handler\AbstractHandler::isHandling - */ - public function testIsHandling() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array(Logger::WARNING, false)); - $this->assertTrue($handler->isHandling($this->getRecord())); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractHandler::__construct - */ - public function testHandlesPsrStyleLevels() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array('warning', false)); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - $handler->setLevel('debug'); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractHandler::getFormatter - * @covers Monolog\Handler\AbstractHandler::getDefaultFormatter - */ - public function testGetFormatterInitializesDefault() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - $this->assertInstanceOf('Monolog\Formatter\LineFormatter', $handler->getFormatter()); - } - - /** - * @covers Monolog\Handler\AbstractHandler::pushProcessor - * @covers Monolog\Handler\AbstractHandler::popProcessor - * @expectedException LogicException - */ - public function testPushPopProcessor() - { - $logger = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - $processor1 = new WebProcessor; - $processor2 = new WebProcessor; - - $logger->pushProcessor($processor1); - $logger->pushProcessor($processor2); - - $this->assertEquals($processor2, $logger->popProcessor()); - $this->assertEquals($processor1, $logger->popProcessor()); - $logger->popProcessor(); - } - - /** - * @covers Monolog\Handler\AbstractHandler::pushProcessor - * @expectedException InvalidArgumentException - */ - public function testPushProcessorWithNonCallable() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - - $handler->pushProcessor(new \stdClass()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php deleted file mode 100644 index 24d4f63..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Processor\WebProcessor; - -class AbstractProcessingHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleLowerLevelMessage() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, true)); - $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleBubbling() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, true)); - $this->assertFalse($handler->handle($this->getRecord())); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleNotBubbling() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, false)); - $this->assertTrue($handler->handle($this->getRecord())); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleIsFalseWhenNotHandled() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, false)); - $this->assertTrue($handler->handle($this->getRecord())); - $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::processRecord - */ - public function testProcessRecord() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler'); - $handler->pushProcessor(new WebProcessor(array( - 'REQUEST_URI' => '', - 'REQUEST_METHOD' => '', - 'REMOTE_ADDR' => '', - 'SERVER_NAME' => '', - 'UNIQUE_ID' => '', - ))); - $handledRecord = null; - $handler->expects($this->once()) - ->method('write') - ->will($this->returnCallback(function ($record) use (&$handledRecord) { - $handledRecord = $record; - })) - ; - $handler->handle($this->getRecord()); - $this->assertEquals(6, count($handledRecord['extra'])); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php deleted file mode 100644 index 8e0e723..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use PhpAmqpLib\Message\AMQPMessage; -use PhpAmqpLib\Connection\AMQPConnection; - -/** - * @covers Monolog\Handler\RotatingFileHandler - */ -class AmqpHandlerTest extends TestCase -{ - public function testHandleAmqpExt() - { - if (!class_exists('AMQPConnection') || !class_exists('AMQPExchange')) { - $this->markTestSkipped("amqp-php not installed"); - } - - if (!class_exists('AMQPChannel')) { - $this->markTestSkipped("Please update AMQP to version >= 1.0"); - } - - $messages = array(); - - $exchange = $this->getMock('AMQPExchange', array('publish', 'setName'), array(), '', false); - $exchange->expects($this->once()) - ->method('setName') - ->with('log') - ; - $exchange->expects($this->any()) - ->method('publish') - ->will($this->returnCallback(function ($message, $routing_key, $flags = 0, $attributes = array()) use (&$messages) { - $messages[] = array($message, $routing_key, $flags, $attributes); - })) - ; - - $handler = new AmqpHandler($exchange, 'log'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - array( - 'message' => 'test', - 'context' => array( - 'data' => array(), - 'foo' => 34, - ), - 'level' => 300, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'extra' => array(), - ), - 'warn.test', - 0, - array( - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ), - ); - - $handler->handle($record); - - $this->assertCount(1, $messages); - $messages[0][0] = json_decode($messages[0][0], true); - unset($messages[0][0]['datetime']); - $this->assertEquals($expected, $messages[0]); - } - - public function testHandlePhpAmqpLib() - { - if (!class_exists('PhpAmqpLib\Connection\AMQPConnection')) { - $this->markTestSkipped("php-amqplib not installed"); - } - - $messages = array(); - - $exchange = $this->getMock('PhpAmqpLib\Channel\AMQPChannel', array('basic_publish', '__destruct'), array(), '', false); - - $exchange->expects($this->any()) - ->method('basic_publish') - ->will($this->returnCallback(function (AMQPMessage $msg, $exchange = "", $routing_key = "", $mandatory = false, $immediate = false, $ticket = null) use (&$messages) { - $messages[] = array($msg, $exchange, $routing_key, $mandatory, $immediate, $ticket); - })) - ; - - $handler = new AmqpHandler($exchange, 'log'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - array( - 'message' => 'test', - 'context' => array( - 'data' => array(), - 'foo' => 34, - ), - 'level' => 300, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'extra' => array(), - ), - 'log', - 'warn.test', - false, - false, - null, - array( - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ), - ); - - $handler->handle($record); - - $this->assertCount(1, $messages); - - /* @var $msg AMQPMessage */ - $msg = $messages[0][0]; - $messages[0][0] = json_decode($msg->body, true); - $messages[0][] = $msg->get_properties(); - unset($messages[0][0]['datetime']); - - $this->assertEquals($expected, $messages[0]); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php deleted file mode 100644 index ffb1d74..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\BrowserConsoleHandlerTest - */ -class BrowserConsoleHandlerTest extends TestCase -{ - protected function setUp() - { - BrowserConsoleHandler::reset(); - } - - protected function generateScript() - { - $reflMethod = new \ReflectionMethod('Monolog\Handler\BrowserConsoleHandler', 'generateScript'); - $reflMethod->setAccessible(true); - - return $reflMethod->invoke(null); - } - - public function testStyling() - { - $handler = new BrowserConsoleHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - - $handler->handle($this->getRecord(Logger::DEBUG, 'foo[[bar]]{color: red}')); - - $expected = <<assertEquals($expected, $this->generateScript()); - } - - public function testEscaping() - { - $handler = new BrowserConsoleHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - - $handler->handle($this->getRecord(Logger::DEBUG, "[foo] [[\"bar\n[baz]\"]]{color: red}")); - - $expected = <<assertEquals($expected, $this->generateScript()); - } - - public function testAutolabel() - { - $handler = new BrowserConsoleHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - - $handler->handle($this->getRecord(Logger::DEBUG, '[[foo]]{macro: autolabel}')); - $handler->handle($this->getRecord(Logger::DEBUG, '[[bar]]{macro: autolabel}')); - $handler->handle($this->getRecord(Logger::DEBUG, '[[foo]]{macro: autolabel}')); - - $expected = <<assertEquals($expected, $this->generateScript()); - } - - public function testContext() - { - $handler = new BrowserConsoleHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - - $handler->handle($this->getRecord(Logger::DEBUG, 'test', array('foo' => 'bar'))); - - $expected = <<assertEquals($expected, $this->generateScript()); - } - - public function testConcurrentHandlers() - { - $handler1 = new BrowserConsoleHandler(); - $handler1->setFormatter($this->getIdentityFormatter()); - - $handler2 = new BrowserConsoleHandler(); - $handler2->setFormatter($this->getIdentityFormatter()); - - $handler1->handle($this->getRecord(Logger::DEBUG, 'test1')); - $handler2->handle($this->getRecord(Logger::DEBUG, 'test2')); - $handler1->handle($this->getRecord(Logger::DEBUG, 'test3')); - $handler2->handle($this->getRecord(Logger::DEBUG, 'test4')); - - $expected = <<assertEquals($expected, $this->generateScript()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php deleted file mode 100644 index da8b3c3..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class BufferHandlerTest extends TestCase -{ - private $shutdownCheckHandler; - - /** - * @covers Monolog\Handler\BufferHandler::__construct - * @covers Monolog\Handler\BufferHandler::handle - * @covers Monolog\Handler\BufferHandler::close - */ - public function testHandleBuffers() - { - $test = new TestHandler(); - $handler = new BufferHandler($test); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - $handler->close(); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - - /** - * @covers Monolog\Handler\BufferHandler::close - * @covers Monolog\Handler\BufferHandler::flush - */ - public function testPropagatesRecordsAtEndOfRequest() - { - $test = new TestHandler(); - $handler = new BufferHandler($test); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->shutdownCheckHandler = $test; - register_shutdown_function(array($this, 'checkPropagation')); - } - - public function checkPropagation() - { - if (!$this->shutdownCheckHandler->hasWarningRecords() || !$this->shutdownCheckHandler->hasDebugRecords()) { - echo '!!! BufferHandlerTest::testPropagatesRecordsAtEndOfRequest failed to verify that the messages have been propagated' . PHP_EOL; - exit(1); - } - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleBufferLimit() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 2); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertFalse($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleBufferLimitWithFlushOnOverflow() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 3, Logger::DEBUG, true, true); - - // send two records - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertCount(0, $test->getRecords()); - - // overflow - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasDebugRecords()); - $this->assertCount(3, $test->getRecords()); - - // should buffer again - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertCount(3, $test->getRecords()); - - $handler->close(); - $this->assertCount(5, $test->getRecords()); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleLevel() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 0, Logger::INFO); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertFalse($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::flush - */ - public function testFlush() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 0); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->flush(); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new BufferHandler($test); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->flush(); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php deleted file mode 100644 index ef3cd1c..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php +++ /dev/null @@ -1,141 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\ChromePHPHandler - */ -class ChromePHPHandlerTest extends TestCase -{ - protected function setUp() - { - TestChromePHPHandler::reset(); - $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; Chrome/1.0'; - } - - public function testHeaders() - { - $handler = new TestChromePHPHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array( - 'version' => ChromePHPHandler::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array( - 'test', - 'test', - ), - 'request_uri' => '', - )))), - ); - - $this->assertEquals($expected, $handler->getHeaders()); - } - - public function testHeadersOverflow() - { - $handler = new TestChromePHPHandler(); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING, str_repeat('a', 150 * 1024))); - - // overflow chrome headers limit - $handler->handle($this->getRecord(Logger::WARNING, str_repeat('a', 100 * 1024))); - - $expected = array( - 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array( - 'version' => ChromePHPHandler::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array( - array( - 'test', - 'test', - 'unknown', - 'log', - ), - array( - 'test', - str_repeat('a', 150 * 1024), - 'unknown', - 'warn', - ), - array( - 'monolog', - 'Incomplete logs, chrome header size limit reached', - 'unknown', - 'warn', - ), - ), - 'request_uri' => '', - )))), - ); - - $this->assertEquals($expected, $handler->getHeaders()); - } - - public function testConcurrentHandlers() - { - $handler = new TestChromePHPHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $handler2 = new TestChromePHPHandler(); - $handler2->setFormatter($this->getIdentityFormatter()); - $handler2->handle($this->getRecord(Logger::DEBUG)); - $handler2->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array( - 'version' => ChromePHPHandler::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array( - 'test', - 'test', - 'test', - 'test', - ), - 'request_uri' => '', - )))), - ); - - $this->assertEquals($expected, $handler2->getHeaders()); - } -} - -class TestChromePHPHandler extends ChromePHPHandler -{ - protected $headers = array(); - - public static function reset() - { - self::$initialized = false; - self::$overflowed = false; - self::$sendHeaders = true; - self::$json['rows'] = array(); - } - - protected function sendHeader($header, $content) - { - $this->headers[$header] = $content; - } - - public function getHeaders() - { - return $this->headers; - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php deleted file mode 100644 index 9fc4b38..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class CouchDBHandlerTest extends TestCase -{ - public function testHandle() - { - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new CouchDBHandler(); - - try { - $handler->handle($record); - } catch (\RuntimeException $e) { - $this->markTestSkipped('Could not connect to couchdb server on http://localhost:5984'); - } - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php deleted file mode 100644 index e2aff86..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class DeduplicationHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\DeduplicationHandler::flush - */ - public function testFlushPassthruIfAllRecordsUnderTrigger() - { - $test = new TestHandler(); - @unlink(sys_get_temp_dir().'/monolog_dedup.log'); - $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); - - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - - $handler->flush(); - - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\DeduplicationHandler::flush - * @covers Monolog\Handler\DeduplicationHandler::appendRecord - */ - public function testFlushPassthruIfEmptyLog() - { - $test = new TestHandler(); - @unlink(sys_get_temp_dir().'/monolog_dedup.log'); - $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); - - $handler->handle($this->getRecord(Logger::ERROR, 'Foo:bar')); - $handler->handle($this->getRecord(Logger::CRITICAL, "Foo\nbar")); - - $handler->flush(); - - $this->assertTrue($test->hasErrorRecords()); - $this->assertTrue($test->hasCriticalRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\DeduplicationHandler::flush - * @covers Monolog\Handler\DeduplicationHandler::appendRecord - * @covers Monolog\Handler\DeduplicationHandler::isDuplicate - * @depends testFlushPassthruIfEmptyLog - */ - public function testFlushSkipsIfLogExists() - { - $test = new TestHandler(); - $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); - - $handler->handle($this->getRecord(Logger::ERROR, 'Foo:bar')); - $handler->handle($this->getRecord(Logger::CRITICAL, "Foo\nbar")); - - $handler->flush(); - - $this->assertFalse($test->hasErrorRecords()); - $this->assertFalse($test->hasCriticalRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\DeduplicationHandler::flush - * @covers Monolog\Handler\DeduplicationHandler::appendRecord - * @covers Monolog\Handler\DeduplicationHandler::isDuplicate - * @depends testFlushPassthruIfEmptyLog - */ - public function testFlushPassthruIfLogTooOld() - { - $test = new TestHandler(); - $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); - - $record = $this->getRecord(Logger::ERROR); - $record['datetime']->modify('+62seconds'); - $handler->handle($record); - $record = $this->getRecord(Logger::CRITICAL); - $record['datetime']->modify('+62seconds'); - $handler->handle($record); - - $handler->flush(); - - $this->assertTrue($test->hasErrorRecords()); - $this->assertTrue($test->hasCriticalRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\DeduplicationHandler::flush - * @covers Monolog\Handler\DeduplicationHandler::appendRecord - * @covers Monolog\Handler\DeduplicationHandler::isDuplicate - * @covers Monolog\Handler\DeduplicationHandler::collectLogs - */ - public function testGcOldLogs() - { - $test = new TestHandler(); - @unlink(sys_get_temp_dir().'/monolog_dedup.log'); - $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); - - // handle two records from yesterday, and one recent - $record = $this->getRecord(Logger::ERROR); - $record['datetime']->modify('-1day -10seconds'); - $handler->handle($record); - $record2 = $this->getRecord(Logger::CRITICAL); - $record2['datetime']->modify('-1day -10seconds'); - $handler->handle($record2); - $record3 = $this->getRecord(Logger::CRITICAL); - $record3['datetime']->modify('-30seconds'); - $handler->handle($record3); - - // log is written as none of them are duplicate - $handler->flush(); - $this->assertSame( - $record['datetime']->getTimestamp() . ":ERROR:test\n" . - $record2['datetime']->getTimestamp() . ":CRITICAL:test\n" . - $record3['datetime']->getTimestamp() . ":CRITICAL:test\n", - file_get_contents(sys_get_temp_dir() . '/monolog_dedup.log') - ); - $this->assertTrue($test->hasErrorRecords()); - $this->assertTrue($test->hasCriticalRecords()); - $this->assertFalse($test->hasWarningRecords()); - - // clear test handler - $test->clear(); - $this->assertFalse($test->hasErrorRecords()); - $this->assertFalse($test->hasCriticalRecords()); - - // log new records, duplicate log gets GC'd at the end of this flush call - $handler->handle($record = $this->getRecord(Logger::ERROR)); - $handler->handle($record2 = $this->getRecord(Logger::CRITICAL)); - $handler->flush(); - - // log should now contain the new errors and the previous one that was recent enough - $this->assertSame( - $record3['datetime']->getTimestamp() . ":CRITICAL:test\n" . - $record['datetime']->getTimestamp() . ":ERROR:test\n" . - $record2['datetime']->getTimestamp() . ":CRITICAL:test\n", - file_get_contents(sys_get_temp_dir() . '/monolog_dedup.log') - ); - $this->assertTrue($test->hasErrorRecords()); - $this->assertTrue($test->hasCriticalRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - public static function tearDownAfterClass() - { - @unlink(sys_get_temp_dir().'/monolog_dedup.log'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php deleted file mode 100644 index d67da90..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class DoctrineCouchDBHandlerTest extends TestCase -{ - protected function setup() - { - if (!class_exists('Doctrine\CouchDB\CouchDBClient')) { - $this->markTestSkipped('The "doctrine/couchdb" package is not installed'); - } - } - - public function testHandle() - { - $client = $this->getMockBuilder('Doctrine\\CouchDB\\CouchDBClient') - ->setMethods(array('postDocument')) - ->disableOriginalConstructor() - ->getMock(); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - 'message' => 'test', - 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), - 'extra' => array(), - ); - - $client->expects($this->once()) - ->method('postDocument') - ->with($expected); - - $handler = new DoctrineCouchDBHandler($client); - $handler->handle($record); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php deleted file mode 100644 index f3a6968..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -class DynamoDbHandlerTest extends TestCase -{ - private $client; - - public function setUp() - { - if (!class_exists('Aws\DynamoDb\DynamoDbClient')) { - $this->markTestSkipped('aws/aws-sdk-php not installed'); - } - - $this->client = $this->getMockBuilder('Aws\DynamoDb\DynamoDbClient') - ->setMethods(array('formatAttributes', '__call')) - ->disableOriginalConstructor()->getMock(); - } - - public function testConstruct() - { - $this->assertInstanceOf('Monolog\Handler\DynamoDbHandler', new DynamoDbHandler($this->client, 'foo')); - } - - public function testInterface() - { - $this->assertInstanceOf('Monolog\Handler\HandlerInterface', new DynamoDbHandler($this->client, 'foo')); - } - - public function testGetFormatter() - { - $handler = new DynamoDbHandler($this->client, 'foo'); - $this->assertInstanceOf('Monolog\Formatter\ScalarFormatter', $handler->getFormatter()); - } - - public function testHandle() - { - $record = $this->getRecord(); - $formatter = $this->getMock('Monolog\Formatter\FormatterInterface'); - $formatted = array('foo' => 1, 'bar' => 2); - $handler = new DynamoDbHandler($this->client, 'foo'); - $handler->setFormatter($formatter); - - $formatter - ->expects($this->once()) - ->method('format') - ->with($record) - ->will($this->returnValue($formatted)); - $this->client - ->expects($this->once()) - ->method('formatAttributes') - ->with($this->isType('array')) - ->will($this->returnValue($formatted)); - $this->client - ->expects($this->once()) - ->method('__call') - ->with('putItem', array(array( - 'TableName' => 'foo', - 'Item' => $formatted, - ))); - - $handler->handle($record); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php deleted file mode 100644 index 1687074..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ElasticaFormatter; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\TestCase; -use Monolog\Logger; -use Elastica\Client; -use Elastica\Request; -use Elastica\Response; - -class ElasticSearchHandlerTest extends TestCase -{ - /** - * @var Client mock - */ - protected $client; - - /** - * @var array Default handler options - */ - protected $options = array( - 'index' => 'my_index', - 'type' => 'doc_type', - ); - - public function setUp() - { - // Elastica lib required - if (!class_exists("Elastica\Client")) { - $this->markTestSkipped("ruflin/elastica not installed"); - } - - // base mock Elastica Client object - $this->client = $this->getMockBuilder('Elastica\Client') - ->setMethods(array('addDocuments')) - ->disableOriginalConstructor() - ->getMock(); - } - - /** - * @covers Monolog\Handler\ElasticSearchHandler::write - * @covers Monolog\Handler\ElasticSearchHandler::handleBatch - * @covers Monolog\Handler\ElasticSearchHandler::bulkSend - * @covers Monolog\Handler\ElasticSearchHandler::getDefaultFormatter - */ - public function testHandle() - { - // log message - $msg = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('foo' => 7, 'bar', 'class' => new \stdClass), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - // format expected result - $formatter = new ElasticaFormatter($this->options['index'], $this->options['type']); - $expected = array($formatter->format($msg)); - - // setup ES client mock - $this->client->expects($this->any()) - ->method('addDocuments') - ->with($expected); - - // perform tests - $handler = new ElasticSearchHandler($this->client, $this->options); - $handler->handle($msg); - $handler->handleBatch(array($msg)); - } - - /** - * @covers Monolog\Handler\ElasticSearchHandler::setFormatter - */ - public function testSetFormatter() - { - $handler = new ElasticSearchHandler($this->client); - $formatter = new ElasticaFormatter('index_new', 'type_new'); - $handler->setFormatter($formatter); - $this->assertInstanceOf('Monolog\Formatter\ElasticaFormatter', $handler->getFormatter()); - $this->assertEquals('index_new', $handler->getFormatter()->getIndex()); - $this->assertEquals('type_new', $handler->getFormatter()->getType()); - } - - /** - * @covers Monolog\Handler\ElasticSearchHandler::setFormatter - * @expectedException InvalidArgumentException - * @expectedExceptionMessage ElasticSearchHandler is only compatible with ElasticaFormatter - */ - public function testSetFormatterInvalid() - { - $handler = new ElasticSearchHandler($this->client); - $formatter = new NormalizerFormatter(); - $handler->setFormatter($formatter); - } - - /** - * @covers Monolog\Handler\ElasticSearchHandler::__construct - * @covers Monolog\Handler\ElasticSearchHandler::getOptions - */ - public function testOptions() - { - $expected = array( - 'index' => $this->options['index'], - 'type' => $this->options['type'], - 'ignore_error' => false, - ); - $handler = new ElasticSearchHandler($this->client, $this->options); - $this->assertEquals($expected, $handler->getOptions()); - } - - /** - * @covers Monolog\Handler\ElasticSearchHandler::bulkSend - * @dataProvider providerTestConnectionErrors - */ - public function testConnectionErrors($ignore, $expectedError) - { - $clientOpts = array('host' => '127.0.0.1', 'port' => 1); - $client = new Client($clientOpts); - $handlerOpts = array('ignore_error' => $ignore); - $handler = new ElasticSearchHandler($client, $handlerOpts); - - if ($expectedError) { - $this->setExpectedException($expectedError[0], $expectedError[1]); - $handler->handle($this->getRecord()); - } else { - $this->assertFalse($handler->handle($this->getRecord())); - } - } - - /** - * @return array - */ - public function providerTestConnectionErrors() - { - return array( - array(false, array('RuntimeException', 'Error sending messages to Elasticsearch')), - array(true, false), - ); - } - - /** - * Integration test using localhost Elastic Search server - * - * @covers Monolog\Handler\ElasticSearchHandler::__construct - * @covers Monolog\Handler\ElasticSearchHandler::handleBatch - * @covers Monolog\Handler\ElasticSearchHandler::bulkSend - * @covers Monolog\Handler\ElasticSearchHandler::getDefaultFormatter - */ - public function testHandleIntegration() - { - $msg = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('foo' => 7, 'bar', 'class' => new \stdClass), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $expected = $msg; - $expected['datetime'] = $msg['datetime']->format(\DateTime::ISO8601); - $expected['context'] = array( - 'class' => '[object] (stdClass: {})', - 'foo' => 7, - 0 => 'bar', - ); - - $client = new Client(); - $handler = new ElasticSearchHandler($client, $this->options); - try { - $handler->handleBatch(array($msg)); - } catch (\RuntimeException $e) { - $this->markTestSkipped("Cannot connect to Elastic Search server on localhost"); - } - - // check document id from ES server response - $documentId = $this->getCreatedDocId($client->getLastResponse()); - $this->assertNotEmpty($documentId, 'No elastic document id received'); - - // retrieve document source from ES and validate - $document = $this->getDocSourceFromElastic( - $client, - $this->options['index'], - $this->options['type'], - $documentId - ); - $this->assertEquals($expected, $document); - - // remove test index from ES - $client->request("/{$this->options['index']}", Request::DELETE); - } - - /** - * Return last created document id from ES response - * @param Response $response Elastica Response object - * @return string|null - */ - protected function getCreatedDocId(Response $response) - { - $data = $response->getData(); - if (!empty($data['items'][0]['create']['_id'])) { - return $data['items'][0]['create']['_id']; - } - } - - /** - * Retrieve document by id from Elasticsearch - * @param Client $client Elastica client - * @param string $index - * @param string $type - * @param string $documentId - * @return array - */ - protected function getDocSourceFromElastic(Client $client, $index, $type, $documentId) - { - $resp = $client->request("/{$index}/{$type}/{$documentId}", Request::GET); - $data = $resp->getData(); - if (!empty($data['_source'])) { - return $data['_source']; - } - - return array(); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php deleted file mode 100644 index 99785cb..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -function error_log() -{ - $GLOBALS['error_log'][] = func_get_args(); -} - -class ErrorLogHandlerTest extends TestCase -{ - protected function setUp() - { - $GLOBALS['error_log'] = array(); - } - - /** - * @covers Monolog\Handler\ErrorLogHandler::__construct - * @expectedException InvalidArgumentException - * @expectedExceptionMessage The given message type "42" is not supported - */ - public function testShouldNotAcceptAnInvalidTypeOnContructor() - { - new ErrorLogHandler(42); - } - - /** - * @covers Monolog\Handler\ErrorLogHandler::write - */ - public function testShouldLogMessagesUsingErrorLogFuncion() - { - $type = ErrorLogHandler::OPERATING_SYSTEM; - $handler = new ErrorLogHandler($type); - $handler->setFormatter(new LineFormatter('%channel%.%level_name%: %message% %context% %extra%', null, true)); - $handler->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); - - $this->assertSame("test.ERROR: Foo\nBar\r\n\r\nBaz [] []", $GLOBALS['error_log'][0][0]); - $this->assertSame($GLOBALS['error_log'][0][1], $type); - - $handler = new ErrorLogHandler($type, Logger::DEBUG, true, true); - $handler->setFormatter(new LineFormatter(null, null, true)); - $handler->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); - - $this->assertStringMatchesFormat('[%s] test.ERROR: Foo', $GLOBALS['error_log'][1][0]); - $this->assertSame($GLOBALS['error_log'][1][1], $type); - - $this->assertStringMatchesFormat('Bar', $GLOBALS['error_log'][2][0]); - $this->assertSame($GLOBALS['error_log'][2][1], $type); - - $this->assertStringMatchesFormat('Baz [] []', $GLOBALS['error_log'][3][0]); - $this->assertSame($GLOBALS['error_log'][3][1], $type); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php deleted file mode 100644 index 31b7686..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\TestCase; - -class FilterHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\FilterHandler::isHandling - */ - public function testIsHandling() - { - $test = new TestHandler(); - $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::INFO))); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::NOTICE))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::WARNING))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::ERROR))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::CRITICAL))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::ALERT))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::EMERGENCY))); - } - - /** - * @covers Monolog\Handler\FilterHandler::handle - * @covers Monolog\Handler\FilterHandler::setAcceptedLevels - * @covers Monolog\Handler\FilterHandler::isHandling - */ - public function testHandleProcessOnlyNeededLevels() - { - $test = new TestHandler(); - $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE); - - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasInfoRecords()); - $handler->handle($this->getRecord(Logger::NOTICE)); - $this->assertTrue($test->hasNoticeRecords()); - - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertFalse($test->hasWarningRecords()); - $handler->handle($this->getRecord(Logger::ERROR)); - $this->assertFalse($test->hasErrorRecords()); - $handler->handle($this->getRecord(Logger::CRITICAL)); - $this->assertFalse($test->hasCriticalRecords()); - $handler->handle($this->getRecord(Logger::ALERT)); - $this->assertFalse($test->hasAlertRecords()); - $handler->handle($this->getRecord(Logger::EMERGENCY)); - $this->assertFalse($test->hasEmergencyRecords()); - - $test = new TestHandler(); - $handler = new FilterHandler($test, array(Logger::INFO, Logger::ERROR)); - - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasInfoRecords()); - $handler->handle($this->getRecord(Logger::NOTICE)); - $this->assertFalse($test->hasNoticeRecords()); - $handler->handle($this->getRecord(Logger::ERROR)); - $this->assertTrue($test->hasErrorRecords()); - $handler->handle($this->getRecord(Logger::CRITICAL)); - $this->assertFalse($test->hasCriticalRecords()); - } - - /** - * @covers Monolog\Handler\FilterHandler::setAcceptedLevels - * @covers Monolog\Handler\FilterHandler::getAcceptedLevels - */ - public function testAcceptedLevelApi() - { - $test = new TestHandler(); - $handler = new FilterHandler($test); - - $levels = array(Logger::INFO, Logger::ERROR); - $handler->setAcceptedLevels($levels); - $this->assertSame($levels, $handler->getAcceptedLevels()); - - $handler->setAcceptedLevels(array('info', 'error')); - $this->assertSame($levels, $handler->getAcceptedLevels()); - - $levels = array(Logger::CRITICAL, Logger::ALERT, Logger::EMERGENCY); - $handler->setAcceptedLevels(Logger::CRITICAL, Logger::EMERGENCY); - $this->assertSame($levels, $handler->getAcceptedLevels()); - - $handler->setAcceptedLevels('critical', 'emergency'); - $this->assertSame($levels, $handler->getAcceptedLevels()); - } - - /** - * @covers Monolog\Handler\FilterHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new FilterHandler($test, Logger::DEBUG, Logger::EMERGENCY); - $handler->pushProcessor( - function ($record) { - $record['extra']['foo'] = true; - - return $record; - } - ); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } - - /** - * @covers Monolog\Handler\FilterHandler::handle - */ - public function testHandleRespectsBubble() - { - $test = new TestHandler(); - - $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE, false); - $this->assertTrue($handler->handle($this->getRecord(Logger::INFO))); - $this->assertFalse($handler->handle($this->getRecord(Logger::WARNING))); - - $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE, true); - $this->assertFalse($handler->handle($this->getRecord(Logger::INFO))); - $this->assertFalse($handler->handle($this->getRecord(Logger::WARNING))); - } - - /** - * @covers Monolog\Handler\FilterHandler::handle - */ - public function testHandleWithCallback() - { - $test = new TestHandler(); - $handler = new FilterHandler( - function ($record, $handler) use ($test) { - return $test; - }, Logger::INFO, Logger::NOTICE, false - ); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FilterHandler::handle - * @expectedException \RuntimeException - */ - public function testHandleWithBadCallbackThrowsException() - { - $handler = new FilterHandler( - function ($record, $handler) { - return 'foo'; - } - ); - $handler->handle($this->getRecord(Logger::WARNING)); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php deleted file mode 100644 index b92bf43..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy; -use Psr\Log\LogLevel; - -class FingersCrossedHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\FingersCrossedHandler::__construct - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testHandleBuffers() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->close(); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 3); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testHandleStopsBufferingAfterTrigger() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - * @covers Monolog\Handler\FingersCrossedHandler::reset - */ - public function testHandleRestartBufferingAfterReset() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->reset(); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testHandleRestartBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::WARNING, 0, false, false); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testHandleBufferLimit() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::WARNING, 2); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertFalse($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testHandleWithCallback() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler(function ($record, $handler) use ($test) { - return $test; - }); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 3); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - * @expectedException RuntimeException - */ - public function testHandleWithBadCallbackThrowsException() - { - $handler = new FingersCrossedHandler(function ($record, $handler) { - return 'foo'; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::isHandling - */ - public function testIsHandlingAlways() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::ERROR); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::__construct - * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::__construct - * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::isHandlerActivated - */ - public function testErrorLevelActivationStrategy() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::__construct - * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::__construct - * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::isHandlerActivated - */ - public function testErrorLevelActivationStrategyWithPsrLevel() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy('warning')); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::__construct - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testOverrideActivationStrategy() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy('warning')); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $handler->activate(); - $this->assertTrue($test->hasDebugRecords()); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::__construct - * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::isHandlerActivated - */ - public function testChannelLevelActivationStrategy() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ChannelLevelActivationStrategy(Logger::ERROR, array('othertest' => Logger::DEBUG))); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertFalse($test->hasWarningRecords()); - $record = $this->getRecord(Logger::DEBUG); - $record['channel'] = 'othertest'; - $handler->handle($record); - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::__construct - * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::isHandlerActivated - */ - public function testChannelLevelActivationStrategyWithPsrLevels() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ChannelLevelActivationStrategy('error', array('othertest' => 'debug'))); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertFalse($test->hasWarningRecords()); - $record = $this->getRecord(Logger::DEBUG); - $record['channel'] = 'othertest'; - $handler->handle($record); - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::activate - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::INFO); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::close - */ - public function testPassthruOnClose() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING), 0, true, true, Logger::INFO); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->close(); - $this->assertFalse($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::close - */ - public function testPsrLevelPassthruOnClose() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING), 0, true, true, LogLevel::INFO); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->close(); - $this->assertFalse($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php deleted file mode 100644 index 0eb10a6..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\FirePHPHandler - */ -class FirePHPHandlerTest extends TestCase -{ - public function setUp() - { - TestFirePHPHandler::reset(); - $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; FirePHP/1.0'; - } - - public function testHeaders() - { - $handler = new TestFirePHPHandler; - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2', - 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', - 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', - 'X-Wf-1-1-1-1' => 'test', - 'X-Wf-1-1-1-2' => 'test', - ); - - $this->assertEquals($expected, $handler->getHeaders()); - } - - public function testConcurrentHandlers() - { - $handler = new TestFirePHPHandler; - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $handler2 = new TestFirePHPHandler; - $handler2->setFormatter($this->getIdentityFormatter()); - $handler2->handle($this->getRecord(Logger::DEBUG)); - $handler2->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2', - 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', - 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', - 'X-Wf-1-1-1-1' => 'test', - 'X-Wf-1-1-1-2' => 'test', - ); - - $expected2 = array( - 'X-Wf-1-1-1-3' => 'test', - 'X-Wf-1-1-1-4' => 'test', - ); - - $this->assertEquals($expected, $handler->getHeaders()); - $this->assertEquals($expected2, $handler2->getHeaders()); - } -} - -class TestFirePHPHandler extends FirePHPHandler -{ - protected $headers = array(); - - public static function reset() - { - self::$initialized = false; - self::$sendHeaders = true; - self::$messageIndex = 1; - } - - protected function sendHeader($header, $content) - { - $this->headers[$header] = $content; - } - - public function getHeaders() - { - return $this->headers; - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php deleted file mode 100644 index 91cdd31..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; -use Monolog\TestCase; - -/** - * @coversDefaultClass \Monolog\Handler\FleepHookHandler - */ -class FleepHookHandlerTest extends TestCase -{ - /** - * Default token to use in tests - */ - const TOKEN = '123abc'; - - /** - * @var FleepHookHandler - */ - private $handler; - - public function setUp() - { - parent::setUp(); - - if (!extension_loaded('openssl')) { - $this->markTestSkipped('This test requires openssl extension to run'); - } - - // Create instances of the handler and logger for convenience - $this->handler = new FleepHookHandler(self::TOKEN); - } - - /** - * @covers ::__construct - */ - public function testConstructorSetsExpectedDefaults() - { - $this->assertEquals(Logger::DEBUG, $this->handler->getLevel()); - $this->assertEquals(true, $this->handler->getBubble()); - } - - /** - * @covers ::getDefaultFormatter - */ - public function testHandlerUsesLineFormatterWhichIgnoresEmptyArrays() - { - $record = array( - 'message' => 'msg', - 'context' => array(), - 'level' => Logger::DEBUG, - 'level_name' => Logger::getLevelName(Logger::DEBUG), - 'channel' => 'channel', - 'datetime' => new \DateTime(), - 'extra' => array(), - ); - - $expectedFormatter = new LineFormatter(null, null, true, true); - $expected = $expectedFormatter->format($record); - - $handlerFormatter = $this->handler->getFormatter(); - $actual = $handlerFormatter->format($record); - - $this->assertEquals($expected, $actual, 'Empty context and extra arrays should not be rendered'); - } - - /** - * @covers ::__construct - */ - public function testConnectionStringisConstructedCorrectly() - { - $this->assertEquals('ssl://' . FleepHookHandler::FLEEP_HOST . ':443', $this->handler->getConnectionString()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php deleted file mode 100644 index 4b120d5..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FlowdockFormatter; -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @author Dominik Liebler - * @see https://www.hipchat.com/docs/api - */ -class FlowdockHandlerTest extends TestCase -{ - /** - * @var resource - */ - private $res; - - /** - * @var FlowdockHandler - */ - private $handler; - - public function setUp() - { - if (!extension_loaded('openssl')) { - $this->markTestSkipped('This test requires openssl to run'); - } - } - - public function testWriteHeader() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/v1\/messages\/team_inbox\/.* HTTP\/1.1\\r\\nHost: api.flowdock.com\\r\\nContent-Type: application\/json\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - /** - * @depends testWriteHeader - */ - public function testWriteContent($content) - { - $this->assertRegexp('/"source":"test_source"/', $content); - $this->assertRegexp('/"from_address":"source@test\.com"/', $content); - } - - private function createHandler($token = 'myToken') - { - $constructorArgs = array($token, Logger::DEBUG); - $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\FlowdockHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $constructorArgs - ); - - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->handler, 'localhost:1234'); - - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - $this->handler->expects($this->any()) - ->method('closeSocket') - ->will($this->returnValue(true)); - - $this->handler->setFormatter(new FlowdockFormatter('test_source', 'source@test.com')); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php deleted file mode 100644 index 9d007b1..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\Message; -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; - -class GelfHandlerLegacyTest extends TestCase -{ - public function setUp() - { - if (!class_exists('Gelf\MessagePublisher') || !class_exists('Gelf\Message')) { - $this->markTestSkipped("mlehner/gelf-php not installed"); - } - - require_once __DIR__ . '/GelfMockMessagePublisher.php'; - } - - /** - * @covers Monolog\Handler\GelfHandler::__construct - */ - public function testConstruct() - { - $handler = new GelfHandler($this->getMessagePublisher()); - $this->assertInstanceOf('Monolog\Handler\GelfHandler', $handler); - } - - protected function getHandler($messagePublisher) - { - $handler = new GelfHandler($messagePublisher); - - return $handler; - } - - protected function getMessagePublisher() - { - return new GelfMockMessagePublisher('localhost'); - } - - public function testDebug() - { - $messagePublisher = $this->getMessagePublisher(); - $handler = $this->getHandler($messagePublisher); - - $record = $this->getRecord(Logger::DEBUG, "A test debug message"); - $handler->handle($record); - - $this->assertEquals(7, $messagePublisher->lastMessage->getLevel()); - $this->assertEquals('test', $messagePublisher->lastMessage->getFacility()); - $this->assertEquals($record['message'], $messagePublisher->lastMessage->getShortMessage()); - $this->assertEquals(null, $messagePublisher->lastMessage->getFullMessage()); - } - - public function testWarning() - { - $messagePublisher = $this->getMessagePublisher(); - $handler = $this->getHandler($messagePublisher); - - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $handler->handle($record); - - $this->assertEquals(4, $messagePublisher->lastMessage->getLevel()); - $this->assertEquals('test', $messagePublisher->lastMessage->getFacility()); - $this->assertEquals($record['message'], $messagePublisher->lastMessage->getShortMessage()); - $this->assertEquals(null, $messagePublisher->lastMessage->getFullMessage()); - } - - public function testInjectedGelfMessageFormatter() - { - $messagePublisher = $this->getMessagePublisher(); - $handler = $this->getHandler($messagePublisher); - - $handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX')); - - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $record['extra']['blarg'] = 'yep'; - $record['context']['from'] = 'logger'; - $handler->handle($record); - - $this->assertEquals('mysystem', $messagePublisher->lastMessage->getHost()); - $this->assertArrayHasKey('_EXTblarg', $messagePublisher->lastMessage->toArray()); - $this->assertArrayHasKey('_CTXfrom', $messagePublisher->lastMessage->toArray()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php deleted file mode 100644 index 8cdd64f..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\Message; -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; - -class GelfHandlerTest extends TestCase -{ - public function setUp() - { - if (!class_exists('Gelf\Publisher') || !class_exists('Gelf\Message')) { - $this->markTestSkipped("graylog2/gelf-php not installed"); - } - } - - /** - * @covers Monolog\Handler\GelfHandler::__construct - */ - public function testConstruct() - { - $handler = new GelfHandler($this->getMessagePublisher()); - $this->assertInstanceOf('Monolog\Handler\GelfHandler', $handler); - } - - protected function getHandler($messagePublisher) - { - $handler = new GelfHandler($messagePublisher); - - return $handler; - } - - protected function getMessagePublisher() - { - return $this->getMock('Gelf\Publisher', array('publish'), array(), '', false); - } - - public function testDebug() - { - $record = $this->getRecord(Logger::DEBUG, "A test debug message"); - $expectedMessage = new Message(); - $expectedMessage - ->setLevel(7) - ->setFacility("test") - ->setShortMessage($record['message']) - ->setTimestamp($record['datetime']) - ; - - $messagePublisher = $this->getMessagePublisher(); - $messagePublisher->expects($this->once()) - ->method('publish') - ->with($expectedMessage); - - $handler = $this->getHandler($messagePublisher); - - $handler->handle($record); - } - - public function testWarning() - { - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $expectedMessage = new Message(); - $expectedMessage - ->setLevel(4) - ->setFacility("test") - ->setShortMessage($record['message']) - ->setTimestamp($record['datetime']) - ; - - $messagePublisher = $this->getMessagePublisher(); - $messagePublisher->expects($this->once()) - ->method('publish') - ->with($expectedMessage); - - $handler = $this->getHandler($messagePublisher); - - $handler->handle($record); - } - - public function testInjectedGelfMessageFormatter() - { - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $record['extra']['blarg'] = 'yep'; - $record['context']['from'] = 'logger'; - - $expectedMessage = new Message(); - $expectedMessage - ->setLevel(4) - ->setFacility("test") - ->setHost("mysystem") - ->setShortMessage($record['message']) - ->setTimestamp($record['datetime']) - ->setAdditional("EXTblarg", 'yep') - ->setAdditional("CTXfrom", 'logger') - ; - - $messagePublisher = $this->getMessagePublisher(); - $messagePublisher->expects($this->once()) - ->method('publish') - ->with($expectedMessage); - - $handler = $this->getHandler($messagePublisher); - $handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX')); - $handler->handle($record); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php deleted file mode 100644 index 873d92f..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\MessagePublisher; -use Gelf\Message; - -class GelfMockMessagePublisher extends MessagePublisher -{ - public function publish(Message $message) - { - $this->lastMessage = $message; - } - - public $lastMessage = null; -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php deleted file mode 100644 index a1b8617..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class GroupHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\GroupHandler::__construct - * @expectedException InvalidArgumentException - */ - public function testConstructorOnlyTakesHandler() - { - new GroupHandler(array(new TestHandler(), "foo")); - } - - /** - * @covers Monolog\Handler\GroupHandler::__construct - * @covers Monolog\Handler\GroupHandler::handle - */ - public function testHandle() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new GroupHandler($testHandlers); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - } - - /** - * @covers Monolog\Handler\GroupHandler::handleBatch - */ - public function testHandleBatch() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new GroupHandler($testHandlers); - $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - } - - /** - * @covers Monolog\Handler\GroupHandler::isHandling - */ - public function testIsHandling() - { - $testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING)); - $handler = new GroupHandler($testHandlers); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR))); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\GroupHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new GroupHandler(array($test)); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } - - /** - * @covers Monolog\Handler\GroupHandler::handle - */ - public function testHandleBatchUsesProcessors() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new GroupHandler($testHandlers); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - $this->assertTrue($records[1]['extra']['foo']); - } - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php deleted file mode 100644 index d8d0452..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -/** - * @author Alexey Karapetov - */ -class HandlerWrapperTest extends TestCase -{ - /** - * @var HandlerWrapper - */ - private $wrapper; - - private $handler; - - public function setUp() - { - parent::setUp(); - $this->handler = $this->getMock('Monolog\\Handler\\HandlerInterface'); - $this->wrapper = new HandlerWrapper($this->handler); - } - - /** - * @return array - */ - public function trueFalseDataProvider() - { - return array( - array(true), - array(false), - ); - } - - /** - * @param $result - * @dataProvider trueFalseDataProvider - */ - public function testIsHandling($result) - { - $record = $this->getRecord(); - $this->handler->expects($this->once()) - ->method('isHandling') - ->with($record) - ->willReturn($result); - - $this->assertEquals($result, $this->wrapper->isHandling($record)); - } - - /** - * @param $result - * @dataProvider trueFalseDataProvider - */ - public function testHandle($result) - { - $record = $this->getRecord(); - $this->handler->expects($this->once()) - ->method('handle') - ->with($record) - ->willReturn($result); - - $this->assertEquals($result, $this->wrapper->handle($record)); - } - - /** - * @param $result - * @dataProvider trueFalseDataProvider - */ - public function testHandleBatch($result) - { - $records = $this->getMultipleRecords(); - $this->handler->expects($this->once()) - ->method('handleBatch') - ->with($records) - ->willReturn($result); - - $this->assertEquals($result, $this->wrapper->handleBatch($records)); - } - - public function testPushProcessor() - { - $processor = function () {}; - $this->handler->expects($this->once()) - ->method('pushProcessor') - ->with($processor); - - $this->assertEquals($this->wrapper, $this->wrapper->pushProcessor($processor)); - } - - public function testPopProcessor() - { - $processor = function () {}; - $this->handler->expects($this->once()) - ->method('popProcessor') - ->willReturn($processor); - - $this->assertEquals($processor, $this->wrapper->popProcessor()); - } - - public function testSetFormatter() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $this->handler->expects($this->once()) - ->method('setFormatter') - ->with($formatter); - - $this->assertEquals($this->wrapper, $this->wrapper->setFormatter($formatter)); - } - - public function testGetFormatter() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $this->handler->expects($this->once()) - ->method('getFormatter') - ->willReturn($formatter); - - $this->assertEquals($formatter, $this->wrapper->getFormatter()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php deleted file mode 100644 index 52dc9da..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @author Rafael Dohms - * @see https://www.hipchat.com/docs/api - */ -class HipChatHandlerTest extends TestCase -{ - private $res; - /** @var HipChatHandler */ - private $handler; - - public function testWriteHeader() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/v1\/rooms\/message\?format=json&auth_token=.* HTTP\/1.1\\r\\nHost: api.hipchat.com\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - public function testWriteCustomHostHeader() - { - $this->createHandler('myToken', 'room1', 'Monolog', true, 'hipchat.foo.bar'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/v1\/rooms\/message\?format=json&auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - public function testWriteV2() - { - $this->createHandler('myToken', 'room1', 'Monolog', false, 'hipchat.foo.bar', 'v2'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/v2\/room\/room1\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - public function testWriteV2Notify() - { - $this->createHandler('myToken', 'room1', 'Monolog', true, 'hipchat.foo.bar', 'v2'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/v2\/room\/room1\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - public function testRoomSpaces() - { - $this->createHandler('myToken', 'room name', 'Monolog', false, 'hipchat.foo.bar', 'v2'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/v2\/room\/room%20name\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - /** - * @depends testWriteHeader - */ - public function testWriteContent($content) - { - $this->assertRegexp('/notify=0&message=test1&message_format=text&color=red&room_id=room1&from=Monolog$/', $content); - } - - public function testWriteContentV1WithoutName() - { - $this->createHandler('myToken', 'room1', null, false, 'hipchat.foo.bar', 'v1'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/notify=0&message=test1&message_format=text&color=red&room_id=room1&from=$/', $content); - - return $content; - } - - /** - * @depends testWriteCustomHostHeader - */ - public function testWriteContentNotify($content) - { - $this->assertRegexp('/notify=1&message=test1&message_format=text&color=red&room_id=room1&from=Monolog$/', $content); - } - - /** - * @depends testWriteV2 - */ - public function testWriteContentV2($content) - { - $this->assertRegexp('/notify=false&message=test1&message_format=text&color=red&from=Monolog$/', $content); - } - - /** - * @depends testWriteV2Notify - */ - public function testWriteContentV2Notify($content) - { - $this->assertRegexp('/notify=true&message=test1&message_format=text&color=red&from=Monolog$/', $content); - } - - public function testWriteContentV2WithoutName() - { - $this->createHandler('myToken', 'room1', null, false, 'hipchat.foo.bar', 'v2'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/notify=false&message=test1&message_format=text&color=red$/', $content); - - return $content; - } - - public function testWriteWithComplexMessage() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Backup of database "example" finished in 16 minutes.')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/message=Backup\+of\+database\+%22example%22\+finished\+in\+16\+minutes\./', $content); - } - - public function testWriteTruncatesLongMessage() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, str_repeat('abcde', 2000))); - fseek($this->res, 0); - $content = fread($this->res, 12000); - - $this->assertRegexp('/message='.str_repeat('abcde', 1900).'\+%5Btruncated%5D/', $content); - } - - /** - * @dataProvider provideLevelColors - */ - public function testWriteWithErrorLevelsAndColors($level, $expectedColor) - { - $this->createHandler(); - $this->handler->handle($this->getRecord($level, 'Backup of database "example" finished in 16 minutes.')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/color='.$expectedColor.'/', $content); - } - - public function provideLevelColors() - { - return array( - array(Logger::DEBUG, 'gray'), - array(Logger::INFO, 'green'), - array(Logger::WARNING, 'yellow'), - array(Logger::ERROR, 'red'), - array(Logger::CRITICAL, 'red'), - array(Logger::ALERT, 'red'), - array(Logger::EMERGENCY,'red'), - array(Logger::NOTICE, 'green'), - ); - } - - /** - * @dataProvider provideBatchRecords - */ - public function testHandleBatch($records, $expectedColor) - { - $this->createHandler(); - - $this->handler->handleBatch($records); - - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/color='.$expectedColor.'/', $content); - } - - public function provideBatchRecords() - { - return array( - array( - array( - array('level' => Logger::WARNING, 'message' => 'Oh bugger!', 'level_name' => 'warning', 'datetime' => new \DateTime()), - array('level' => Logger::NOTICE, 'message' => 'Something noticeable happened.', 'level_name' => 'notice', 'datetime' => new \DateTime()), - array('level' => Logger::CRITICAL, 'message' => 'Everything is broken!', 'level_name' => 'critical', 'datetime' => new \DateTime()), - ), - 'red', - ), - array( - array( - array('level' => Logger::WARNING, 'message' => 'Oh bugger!', 'level_name' => 'warning', 'datetime' => new \DateTime()), - array('level' => Logger::NOTICE, 'message' => 'Something noticeable happened.', 'level_name' => 'notice', 'datetime' => new \DateTime()), - ), - 'yellow', - ), - array( - array( - array('level' => Logger::DEBUG, 'message' => 'Just debugging.', 'level_name' => 'debug', 'datetime' => new \DateTime()), - array('level' => Logger::NOTICE, 'message' => 'Something noticeable happened.', 'level_name' => 'notice', 'datetime' => new \DateTime()), - ), - 'green', - ), - array( - array( - array('level' => Logger::DEBUG, 'message' => 'Just debugging.', 'level_name' => 'debug', 'datetime' => new \DateTime()), - ), - 'gray', - ), - ); - } - - private function createHandler($token = 'myToken', $room = 'room1', $name = 'Monolog', $notify = false, $host = 'api.hipchat.com', $version = 'v1') - { - $constructorArgs = array($token, $room, $name, $notify, Logger::DEBUG, true, true, 'text', $host, $version); - $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\HipChatHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $constructorArgs - ); - - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->handler, 'localhost:1234'); - - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - $this->handler->expects($this->any()) - ->method('closeSocket') - ->will($this->returnValue(true)); - - $this->handler->setFormatter($this->getIdentityFormatter()); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testCreateWithTooLongName() - { - $hipChatHandler = new HipChatHandler('token', 'room', 'SixteenCharsHere'); - } - - public function testCreateWithTooLongNameV2() - { - // creating a handler with too long of a name but using the v2 api doesn't matter. - $hipChatHandler = new HipChatHandler('token', 'room', 'SixteenCharsHere', false, Logger::CRITICAL, true, true, 'test', 'api.hipchat.com', 'v2'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php deleted file mode 100644 index b2deb40..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @author Robert Kaufmann III - */ -class LogEntriesHandlerTest extends TestCase -{ - /** - * @var resource - */ - private $res; - - /** - * @var LogEntriesHandler - */ - private $handler; - - public function testWriteContent() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Critical write test')); - - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] test.CRITICAL: Critical write test/', $content); - } - - public function testWriteBatchContent() - { - $records = array( - $this->getRecord(), - $this->getRecord(), - $this->getRecord(), - ); - $this->createHandler(); - $this->handler->handleBatch($records); - - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] .* \[\] \[\]\n){3}/', $content); - } - - private function createHandler() - { - $useSSL = extension_loaded('openssl'); - $args = array('testToken', $useSSL, Logger::DEBUG, true); - $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\LogEntriesHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $args - ); - - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->handler, 'localhost:1234'); - - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - $this->handler->expects($this->any()) - ->method('closeSocket') - ->will($this->returnValue(true)); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php deleted file mode 100644 index 6754f3d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\TestCase; - -class MailHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\MailHandler::handleBatch - */ - public function testHandleBatch() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter->expects($this->once()) - ->method('formatBatch'); // Each record is formatted - - $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); - $handler->expects($this->once()) - ->method('send'); - $handler->expects($this->never()) - ->method('write'); // write is for individual records - - $handler->setFormatter($formatter); - - $handler->handleBatch($this->getMultipleRecords()); - } - - /** - * @covers Monolog\Handler\MailHandler::handleBatch - */ - public function testHandleBatchNotSendsMailIfMessagesAreBelowLevel() - { - $records = array( - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - ); - - $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); - $handler->expects($this->never()) - ->method('send'); - $handler->setLevel(Logger::ERROR); - - $handler->handleBatch($records); - } - - /** - * @covers Monolog\Handler\MailHandler::write - */ - public function testHandle() - { - $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); - - $record = $this->getRecord(); - $records = array($record); - $records[0]['formatted'] = '['.$record['datetime']->format('Y-m-d H:i:s').'] test.WARNING: test [] []'."\n"; - - $handler->expects($this->once()) - ->method('send') - ->with($records[0]['formatted'], $records); - - $handler->handle($record); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php deleted file mode 100644 index a083322..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Raven_Client; - -class MockRavenClient extends Raven_Client -{ - public function capture($data, $stack, $vars = null) - { - $data = array_merge($this->get_user_data(), $data); - $this->lastData = $data; - $this->lastStack = $stack; - } - - public $lastData; - public $lastStack; -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php deleted file mode 100644 index 0fdef63..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class MongoDBHandlerTest extends TestCase -{ - /** - * @expectedException InvalidArgumentException - */ - public function testConstructorShouldThrowExceptionForInvalidMongo() - { - new MongoDBHandler(new \stdClass(), 'DB', 'Collection'); - } - - public function testHandle() - { - $mongo = $this->getMock('Mongo', array('selectCollection'), array(), '', false); - $collection = $this->getMock('stdClass', array('save')); - - $mongo->expects($this->once()) - ->method('selectCollection') - ->with('DB', 'Collection') - ->will($this->returnValue($collection)); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - 'message' => 'test', - 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), - 'extra' => array(), - ); - - $collection->expects($this->once()) - ->method('save') - ->with($expected); - - $handler = new MongoDBHandler($mongo, 'DB', 'Collection'); - $handler->handle($record); - } -} - -if (!class_exists('Mongo')) { - class Mongo - { - public function selectCollection() - { - } - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php deleted file mode 100644 index ddf545d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use InvalidArgumentException; - -function mail($to, $subject, $message, $additional_headers = null, $additional_parameters = null) -{ - $GLOBALS['mail'][] = func_get_args(); -} - -class NativeMailerHandlerTest extends TestCase -{ - protected function setUp() - { - $GLOBALS['mail'] = array(); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testConstructorHeaderInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', "receiver@example.org\r\nFrom: faked@attacker.org"); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSetterHeaderInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); - $mailer->addHeader("Content-Type: text/html\r\nFrom: faked@attacker.org"); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSetterArrayHeaderInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); - $mailer->addHeader(array("Content-Type: text/html\r\nFrom: faked@attacker.org")); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSetterContentTypeInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); - $mailer->setContentType("text/html\r\nFrom: faked@attacker.org"); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSetterEncodingInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); - $mailer->setEncoding("utf-8\r\nFrom: faked@attacker.org"); - } - - public function testSend() - { - $to = 'spammer@example.org'; - $subject = 'dear victim'; - $from = 'receiver@example.org'; - - $mailer = new NativeMailerHandler($to, $subject, $from); - $mailer->handleBatch(array()); - - // batch is empty, nothing sent - $this->assertEmpty($GLOBALS['mail']); - - // non-empty batch - $mailer->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); - $this->assertNotEmpty($GLOBALS['mail']); - $this->assertInternalType('array', $GLOBALS['mail']); - $this->assertArrayHasKey('0', $GLOBALS['mail']); - $params = $GLOBALS['mail'][0]; - $this->assertCount(5, $params); - $this->assertSame($to, $params[0]); - $this->assertSame($subject, $params[1]); - $this->assertStringEndsWith(" test.ERROR: Foo Bar Baz [] []\n", $params[2]); - $this->assertSame("From: $from\r\nContent-type: text/plain; charset=utf-8\r\n", $params[3]); - $this->assertSame('', $params[4]); - } - - public function testMessageSubjectFormatting() - { - $mailer = new NativeMailerHandler('to@example.org', 'Alert: %level_name% %message%', 'from@example.org'); - $mailer->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); - $this->assertNotEmpty($GLOBALS['mail']); - $this->assertInternalType('array', $GLOBALS['mail']); - $this->assertArrayHasKey('0', $GLOBALS['mail']); - $params = $GLOBALS['mail'][0]; - $this->assertCount(5, $params); - $this->assertSame('Alert: ERROR Foo Bar Baz', $params[1]); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php deleted file mode 100644 index 4d3a615..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php +++ /dev/null @@ -1,200 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\TestCase; -use Monolog\Logger; - -class NewRelicHandlerTest extends TestCase -{ - public static $appname; - public static $customParameters; - public static $transactionName; - - public function setUp() - { - self::$appname = null; - self::$customParameters = array(); - self::$transactionName = null; - } - - /** - * @expectedException Monolog\Handler\MissingExtensionException - */ - public function testThehandlerThrowsAnExceptionIfTheNRExtensionIsNotLoaded() - { - $handler = new StubNewRelicHandlerWithoutExtension(); - $handler->handle($this->getRecord(Logger::ERROR)); - } - - public function testThehandlerCanHandleTheRecord() - { - $handler = new StubNewRelicHandler(); - $handler->handle($this->getRecord(Logger::ERROR)); - } - - public function testThehandlerCanAddContextParamsToTheNewRelicTrace() - { - $handler = new StubNewRelicHandler(); - $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('a' => 'b'))); - $this->assertEquals(array('context_a' => 'b'), self::$customParameters); - } - - public function testThehandlerCanAddExplodedContextParamsToTheNewRelicTrace() - { - $handler = new StubNewRelicHandler(Logger::ERROR, true, self::$appname, true); - $handler->handle($this->getRecord( - Logger::ERROR, - 'log message', - array('a' => array('key1' => 'value1', 'key2' => 'value2')) - )); - $this->assertEquals( - array('context_a_key1' => 'value1', 'context_a_key2' => 'value2'), - self::$customParameters - ); - } - - public function testThehandlerCanAddExtraParamsToTheNewRelicTrace() - { - $record = $this->getRecord(Logger::ERROR, 'log message'); - $record['extra'] = array('c' => 'd'); - - $handler = new StubNewRelicHandler(); - $handler->handle($record); - - $this->assertEquals(array('extra_c' => 'd'), self::$customParameters); - } - - public function testThehandlerCanAddExplodedExtraParamsToTheNewRelicTrace() - { - $record = $this->getRecord(Logger::ERROR, 'log message'); - $record['extra'] = array('c' => array('key1' => 'value1', 'key2' => 'value2')); - - $handler = new StubNewRelicHandler(Logger::ERROR, true, self::$appname, true); - $handler->handle($record); - - $this->assertEquals( - array('extra_c_key1' => 'value1', 'extra_c_key2' => 'value2'), - self::$customParameters - ); - } - - public function testThehandlerCanAddExtraContextAndParamsToTheNewRelicTrace() - { - $record = $this->getRecord(Logger::ERROR, 'log message', array('a' => 'b')); - $record['extra'] = array('c' => 'd'); - - $handler = new StubNewRelicHandler(); - $handler->handle($record); - - $expected = array( - 'context_a' => 'b', - 'extra_c' => 'd', - ); - - $this->assertEquals($expected, self::$customParameters); - } - - public function testThehandlerCanHandleTheRecordsFormattedUsingTheLineFormatter() - { - $handler = new StubNewRelicHandler(); - $handler->setFormatter(new LineFormatter()); - $handler->handle($this->getRecord(Logger::ERROR)); - } - - public function testTheAppNameIsNullByDefault() - { - $handler = new StubNewRelicHandler(); - $handler->handle($this->getRecord(Logger::ERROR, 'log message')); - - $this->assertEquals(null, self::$appname); - } - - public function testTheAppNameCanBeInjectedFromtheConstructor() - { - $handler = new StubNewRelicHandler(Logger::DEBUG, false, 'myAppName'); - $handler->handle($this->getRecord(Logger::ERROR, 'log message')); - - $this->assertEquals('myAppName', self::$appname); - } - - public function testTheAppNameCanBeOverriddenFromEachLog() - { - $handler = new StubNewRelicHandler(Logger::DEBUG, false, 'myAppName'); - $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('appname' => 'logAppName'))); - - $this->assertEquals('logAppName', self::$appname); - } - - public function testTheTransactionNameIsNullByDefault() - { - $handler = new StubNewRelicHandler(); - $handler->handle($this->getRecord(Logger::ERROR, 'log message')); - - $this->assertEquals(null, self::$transactionName); - } - - public function testTheTransactionNameCanBeInjectedFromTheConstructor() - { - $handler = new StubNewRelicHandler(Logger::DEBUG, false, null, false, 'myTransaction'); - $handler->handle($this->getRecord(Logger::ERROR, 'log message')); - - $this->assertEquals('myTransaction', self::$transactionName); - } - - public function testTheTransactionNameCanBeOverriddenFromEachLog() - { - $handler = new StubNewRelicHandler(Logger::DEBUG, false, null, false, 'myTransaction'); - $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('transaction_name' => 'logTransactName'))); - - $this->assertEquals('logTransactName', self::$transactionName); - } -} - -class StubNewRelicHandlerWithoutExtension extends NewRelicHandler -{ - protected function isNewRelicEnabled() - { - return false; - } -} - -class StubNewRelicHandler extends NewRelicHandler -{ - protected function isNewRelicEnabled() - { - return true; - } -} - -function newrelic_notice_error() -{ - return true; -} - -function newrelic_set_appname($appname) -{ - return NewRelicHandlerTest::$appname = $appname; -} - -function newrelic_name_transaction($transactionName) -{ - return NewRelicHandlerTest::$transactionName = $transactionName; -} - -function newrelic_add_custom_parameter($key, $value) -{ - NewRelicHandlerTest::$customParameters[$key] = $value; - - return true; -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php deleted file mode 100644 index 292df78..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\NullHandler::handle - */ -class NullHandlerTest extends TestCase -{ - public function testHandle() - { - $handler = new NullHandler(); - $this->assertTrue($handler->handle($this->getRecord())); - } - - public function testHandleLowerLevelRecord() - { - $handler = new NullHandler(Logger::WARNING); - $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php deleted file mode 100644 index 152573e..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php +++ /dev/null @@ -1,273 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Exception; -use Monolog\ErrorHandler; -use Monolog\Logger; -use Monolog\TestCase; -use PhpConsole\Connector; -use PhpConsole\Dispatcher\Debug as DebugDispatcher; -use PhpConsole\Dispatcher\Errors as ErrorDispatcher; -use PhpConsole\Handler; -use PHPUnit_Framework_MockObject_MockObject; - -/** - * @covers Monolog\Handler\PHPConsoleHandler - * @author Sergey Barbushin https://www.linkedin.com/in/barbushin - */ -class PHPConsoleHandlerTest extends TestCase -{ - /** @var Connector|PHPUnit_Framework_MockObject_MockObject */ - protected $connector; - /** @var DebugDispatcher|PHPUnit_Framework_MockObject_MockObject */ - protected $debugDispatcher; - /** @var ErrorDispatcher|PHPUnit_Framework_MockObject_MockObject */ - protected $errorDispatcher; - - protected function setUp() - { - if (!class_exists('PhpConsole\Connector')) { - $this->markTestSkipped('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); - } - $this->connector = $this->initConnectorMock(); - - $this->debugDispatcher = $this->initDebugDispatcherMock($this->connector); - $this->connector->setDebugDispatcher($this->debugDispatcher); - - $this->errorDispatcher = $this->initErrorDispatcherMock($this->connector); - $this->connector->setErrorsDispatcher($this->errorDispatcher); - } - - protected function initDebugDispatcherMock(Connector $connector) - { - return $this->getMockBuilder('PhpConsole\Dispatcher\Debug') - ->disableOriginalConstructor() - ->setMethods(array('dispatchDebug')) - ->setConstructorArgs(array($connector, $connector->getDumper())) - ->getMock(); - } - - protected function initErrorDispatcherMock(Connector $connector) - { - return $this->getMockBuilder('PhpConsole\Dispatcher\Errors') - ->disableOriginalConstructor() - ->setMethods(array('dispatchError', 'dispatchException')) - ->setConstructorArgs(array($connector, $connector->getDumper())) - ->getMock(); - } - - protected function initConnectorMock() - { - $connector = $this->getMockBuilder('PhpConsole\Connector') - ->disableOriginalConstructor() - ->setMethods(array( - 'sendMessage', - 'onShutDown', - 'isActiveClient', - 'setSourcesBasePath', - 'setServerEncoding', - 'setPassword', - 'enableSslOnlyMode', - 'setAllowedIpMasks', - 'setHeadersLimit', - 'startEvalRequestsListener', - )) - ->getMock(); - - $connector->expects($this->any()) - ->method('isActiveClient') - ->will($this->returnValue(true)); - - return $connector; - } - - protected function getHandlerDefaultOption($name) - { - $handler = new PHPConsoleHandler(array(), $this->connector); - $options = $handler->getOptions(); - - return $options[$name]; - } - - protected function initLogger($handlerOptions = array(), $level = Logger::DEBUG) - { - return new Logger('test', array( - new PHPConsoleHandler($handlerOptions, $this->connector, $level), - )); - } - - public function testInitWithDefaultConnector() - { - $handler = new PHPConsoleHandler(); - $this->assertEquals(spl_object_hash(Connector::getInstance()), spl_object_hash($handler->getConnector())); - } - - public function testInitWithCustomConnector() - { - $handler = new PHPConsoleHandler(array(), $this->connector); - $this->assertEquals(spl_object_hash($this->connector), spl_object_hash($handler->getConnector())); - } - - public function testDebug() - { - $this->debugDispatcher->expects($this->once())->method('dispatchDebug')->with($this->equalTo('test')); - $this->initLogger()->addDebug('test'); - } - - public function testDebugContextInMessage() - { - $message = 'test'; - $tag = 'tag'; - $context = array($tag, 'custom' => mt_rand()); - $expectedMessage = $message . ' ' . json_encode(array_slice($context, 1)); - $this->debugDispatcher->expects($this->once())->method('dispatchDebug')->with( - $this->equalTo($expectedMessage), - $this->equalTo($tag) - ); - $this->initLogger()->addDebug($message, $context); - } - - public function testDebugTags($tagsContextKeys = null) - { - $expectedTags = mt_rand(); - $logger = $this->initLogger($tagsContextKeys ? array('debugTagsKeysInContext' => $tagsContextKeys) : array()); - if (!$tagsContextKeys) { - $tagsContextKeys = $this->getHandlerDefaultOption('debugTagsKeysInContext'); - } - foreach ($tagsContextKeys as $key) { - $debugDispatcher = $this->initDebugDispatcherMock($this->connector); - $debugDispatcher->expects($this->once())->method('dispatchDebug')->with( - $this->anything(), - $this->equalTo($expectedTags) - ); - $this->connector->setDebugDispatcher($debugDispatcher); - $logger->addDebug('test', array($key => $expectedTags)); - } - } - - public function testError($classesPartialsTraceIgnore = null) - { - $code = E_USER_NOTICE; - $message = 'message'; - $file = __FILE__; - $line = __LINE__; - $this->errorDispatcher->expects($this->once())->method('dispatchError')->with( - $this->equalTo($code), - $this->equalTo($message), - $this->equalTo($file), - $this->equalTo($line), - $classesPartialsTraceIgnore ?: $this->equalTo($this->getHandlerDefaultOption('classesPartialsTraceIgnore')) - ); - $errorHandler = ErrorHandler::register($this->initLogger($classesPartialsTraceIgnore ? array('classesPartialsTraceIgnore' => $classesPartialsTraceIgnore) : array()), false); - $errorHandler->registerErrorHandler(array(), false, E_USER_WARNING); - $errorHandler->handleError($code, $message, $file, $line); - } - - public function testException() - { - $e = new Exception(); - $this->errorDispatcher->expects($this->once())->method('dispatchException')->with( - $this->equalTo($e) - ); - $handler = $this->initLogger(); - $handler->log( - \Psr\Log\LogLevel::ERROR, - sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()), - array('exception' => $e) - ); - } - - /** - * @expectedException Exception - */ - public function testWrongOptionsThrowsException() - { - new PHPConsoleHandler(array('xxx' => 1)); - } - - public function testOptionEnabled() - { - $this->debugDispatcher->expects($this->never())->method('dispatchDebug'); - $this->initLogger(array('enabled' => false))->addDebug('test'); - } - - public function testOptionClassesPartialsTraceIgnore() - { - $this->testError(array('Class', 'Namespace\\')); - } - - public function testOptionDebugTagsKeysInContext() - { - $this->testDebugTags(array('key1', 'key2')); - } - - public function testOptionUseOwnErrorsAndExceptionsHandler() - { - $this->initLogger(array('useOwnErrorsHandler' => true, 'useOwnExceptionsHandler' => true)); - $this->assertEquals(array(Handler::getInstance(), 'handleError'), set_error_handler(function () { - })); - $this->assertEquals(array(Handler::getInstance(), 'handleException'), set_exception_handler(function () { - })); - } - - public static function provideConnectorMethodsOptionsSets() - { - return array( - array('sourcesBasePath', 'setSourcesBasePath', __DIR__), - array('serverEncoding', 'setServerEncoding', 'cp1251'), - array('password', 'setPassword', '******'), - array('enableSslOnlyMode', 'enableSslOnlyMode', true, false), - array('ipMasks', 'setAllowedIpMasks', array('127.0.0.*')), - array('headersLimit', 'setHeadersLimit', 2500), - array('enableEvalListener', 'startEvalRequestsListener', true, false), - ); - } - - /** - * @dataProvider provideConnectorMethodsOptionsSets - */ - public function testOptionCallsConnectorMethod($option, $method, $value, $isArgument = true) - { - $expectCall = $this->connector->expects($this->once())->method($method); - if ($isArgument) { - $expectCall->with($value); - } - new PHPConsoleHandler(array($option => $value), $this->connector); - } - - public function testOptionDetectDumpTraceAndSource() - { - new PHPConsoleHandler(array('detectDumpTraceAndSource' => true), $this->connector); - $this->assertTrue($this->connector->getDebugDispatcher()->detectTraceAndSource); - } - - public static function provideDumperOptionsValues() - { - return array( - array('dumperLevelLimit', 'levelLimit', 1001), - array('dumperItemsCountLimit', 'itemsCountLimit', 1002), - array('dumperItemSizeLimit', 'itemSizeLimit', 1003), - array('dumperDumpSizeLimit', 'dumpSizeLimit', 1004), - array('dumperDetectCallbacks', 'detectCallbacks', true), - ); - } - - /** - * @dataProvider provideDumperOptionsValues - */ - public function testDumperOptions($option, $dumperProperty, $value) - { - new PHPConsoleHandler(array($option => $value), $this->connector); - $this->assertEquals($value, $this->connector->getDumper()->$dumperProperty); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php deleted file mode 100644 index 64eaab1..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\PsrHandler::handle - */ -class PsrHandlerTest extends TestCase -{ - public function logLevelProvider() - { - $levels = array(); - $monologLogger = new Logger(''); - - foreach ($monologLogger->getLevels() as $levelName => $level) { - $levels[] = array($levelName, $level); - } - - return $levels; - } - - /** - * @dataProvider logLevelProvider - */ - public function testHandlesAllLevels($levelName, $level) - { - $message = 'Hello, world! ' . $level; - $context = array('foo' => 'bar', 'level' => $level); - - $psrLogger = $this->getMock('Psr\Log\NullLogger'); - $psrLogger->expects($this->once()) - ->method('log') - ->with(strtolower($levelName), $message, $context); - - $handler = new PsrHandler($psrLogger); - $handler->handle(array('level' => $level, 'level_name' => $levelName, 'message' => $message, 'context' => $context)); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php deleted file mode 100644 index 56df474..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php +++ /dev/null @@ -1,141 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * Almost all examples (expected header, titles, messages) taken from - * https://www.pushover.net/api - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - */ -class PushoverHandlerTest extends TestCase -{ - private $res; - private $handler; - - public function testWriteHeader() - { - $this->createHandler(); - $this->handler->setHighPriorityLevel(Logger::EMERGENCY); // skip priority notifications - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/1\/messages.json HTTP\/1.1\\r\\nHost: api.pushover.net\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - /** - * @depends testWriteHeader - */ - public function testWriteContent($content) - { - $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}$/', $content); - } - - public function testWriteWithComplexTitle() - { - $this->createHandler('myToken', 'myUser', 'Backup finished - SQL1'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/title=Backup\+finished\+-\+SQL1/', $content); - } - - public function testWriteWithComplexMessage() - { - $this->createHandler(); - $this->handler->setHighPriorityLevel(Logger::EMERGENCY); // skip priority notifications - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Backup of database "example" finished in 16 minutes.')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/message=Backup\+of\+database\+%22example%22\+finished\+in\+16\+minutes\./', $content); - } - - public function testWriteWithTooLongMessage() - { - $message = str_pad('test', 520, 'a'); - $this->createHandler(); - $this->handler->setHighPriorityLevel(Logger::EMERGENCY); // skip priority notifications - $this->handler->handle($this->getRecord(Logger::CRITICAL, $message)); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $expectedMessage = substr($message, 0, 505); - - $this->assertRegexp('/message=' . $expectedMessage . '&title/', $content); - } - - public function testWriteWithHighPriority() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}&priority=1$/', $content); - } - - public function testWriteWithEmergencyPriority() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::EMERGENCY, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}&priority=2&retry=30&expire=25200$/', $content); - } - - public function testWriteToMultipleUsers() - { - $this->createHandler('myToken', array('userA', 'userB')); - $this->handler->handle($this->getRecord(Logger::EMERGENCY, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/token=myToken&user=userA&message=test1&title=Monolog×tamp=\d{10}&priority=2&retry=30&expire=25200POST/', $content); - $this->assertRegexp('/token=myToken&user=userB&message=test1&title=Monolog×tamp=\d{10}&priority=2&retry=30&expire=25200$/', $content); - } - - private function createHandler($token = 'myToken', $user = 'myUser', $title = 'Monolog') - { - $constructorArgs = array($token, $user, $title); - $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\PushoverHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $constructorArgs - ); - - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->handler, 'localhost:1234'); - - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - $this->handler->expects($this->any()) - ->method('closeSocket') - ->will($this->returnValue(true)); - - $this->handler->setFormatter($this->getIdentityFormatter()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php deleted file mode 100644 index 26d212b..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -class RavenHandlerTest extends TestCase -{ - public function setUp() - { - if (!class_exists('Raven_Client')) { - $this->markTestSkipped('raven/raven not installed'); - } - - require_once __DIR__ . '/MockRavenClient.php'; - } - - /** - * @covers Monolog\Handler\RavenHandler::__construct - */ - public function testConstruct() - { - $handler = new RavenHandler($this->getRavenClient()); - $this->assertInstanceOf('Monolog\Handler\RavenHandler', $handler); - } - - protected function getHandler($ravenClient) - { - $handler = new RavenHandler($ravenClient); - - return $handler; - } - - protected function getRavenClient() - { - $dsn = 'http://43f6017361224d098402974103bfc53d:a6a0538fc2934ba2bed32e08741b2cd3@marca.python.live.cheggnet.com:9000/1'; - - return new MockRavenClient($dsn); - } - - public function testDebug() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $record = $this->getRecord(Logger::DEBUG, 'A test debug message'); - $handler->handle($record); - - $this->assertEquals($ravenClient::DEBUG, $ravenClient->lastData['level']); - $this->assertContains($record['message'], $ravenClient->lastData['message']); - } - - public function testWarning() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $record = $this->getRecord(Logger::WARNING, 'A test warning message'); - $handler->handle($record); - - $this->assertEquals($ravenClient::WARNING, $ravenClient->lastData['level']); - $this->assertContains($record['message'], $ravenClient->lastData['message']); - } - - public function testTag() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $tags = array(1, 2, 'foo'); - $record = $this->getRecord(Logger::INFO, 'test', array('tags' => $tags)); - $handler->handle($record); - - $this->assertEquals($tags, $ravenClient->lastData['tags']); - } - - public function testExtraParameters() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $checksum = '098f6bcd4621d373cade4e832627b4f6'; - $release = '05a671c66aefea124cc08b76ea6d30bb'; - $eventId = '31423'; - $record = $this->getRecord(Logger::INFO, 'test', array('checksum' => $checksum, 'release' => $release, 'event_id' => $eventId)); - $handler->handle($record); - - $this->assertEquals($checksum, $ravenClient->lastData['checksum']); - $this->assertEquals($release, $ravenClient->lastData['release']); - $this->assertEquals($eventId, $ravenClient->lastData['event_id']); - } - - public function testFingerprint() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $fingerprint = array('{{ default }}', 'other value'); - $record = $this->getRecord(Logger::INFO, 'test', array('fingerprint' => $fingerprint)); - $handler->handle($record); - - $this->assertEquals($fingerprint, $ravenClient->lastData['fingerprint']); - } - - public function testUserContext() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $recordWithNoContext = $this->getRecord(Logger::INFO, 'test with default user context'); - // set user context 'externally' - - $user = array( - 'id' => '123', - 'email' => 'test@test.com', - ); - - $recordWithContext = $this->getRecord(Logger::INFO, 'test', array('user' => $user)); - - $ravenClient->user_context(array('id' => 'test_user_id')); - // handle context - $handler->handle($recordWithContext); - $this->assertEquals($user, $ravenClient->lastData['user']); - - // check to see if its reset - $handler->handle($recordWithNoContext); - $this->assertInternalType('array', $ravenClient->context->user); - $this->assertSame('test_user_id', $ravenClient->context->user['id']); - - // handle with null context - $ravenClient->user_context(null); - $handler->handle($recordWithContext); - $this->assertEquals($user, $ravenClient->lastData['user']); - - // check to see if its reset - $handler->handle($recordWithNoContext); - $this->assertNull($ravenClient->context->user); - } - - public function testException() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - try { - $this->methodThatThrowsAnException(); - } catch (\Exception $e) { - $record = $this->getRecord(Logger::ERROR, $e->getMessage(), array('exception' => $e)); - $handler->handle($record); - } - - $this->assertEquals($record['message'], $ravenClient->lastData['message']); - } - - public function testHandleBatch() - { - $records = $this->getMultipleRecords(); - $records[] = $this->getRecord(Logger::WARNING, 'warning'); - $records[] = $this->getRecord(Logger::WARNING, 'warning'); - - $logFormatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $logFormatter->expects($this->once())->method('formatBatch'); - - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter->expects($this->once())->method('format')->with($this->callback(function ($record) { - return $record['level'] == 400; - })); - - $handler = $this->getHandler($this->getRavenClient()); - $handler->setBatchFormatter($logFormatter); - $handler->setFormatter($formatter); - $handler->handleBatch($records); - } - - public function testHandleBatchDoNothingIfRecordsAreBelowLevel() - { - $records = array( - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - ); - - $handler = $this->getMock('Monolog\Handler\RavenHandler', null, array($this->getRavenClient())); - $handler->expects($this->never())->method('handle'); - $handler->setLevel(Logger::ERROR); - $handler->handleBatch($records); - } - - public function testHandleBatchPicksProperMessage() - { - $records = array( - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information 1'), - $this->getRecord(Logger::ERROR, 'error 1'), - $this->getRecord(Logger::WARNING, 'warning'), - $this->getRecord(Logger::ERROR, 'error 2'), - $this->getRecord(Logger::INFO, 'information 2'), - ); - - $logFormatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $logFormatter->expects($this->once())->method('formatBatch'); - - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter->expects($this->once())->method('format')->with($this->callback(function ($record) use ($records) { - return $record['message'] == 'error 1'; - })); - - $handler = $this->getHandler($this->getRavenClient()); - $handler->setBatchFormatter($logFormatter); - $handler->setFormatter($formatter); - $handler->handleBatch($records); - } - - public function testGetSetBatchFormatter() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $handler->setBatchFormatter($formatter = new LineFormatter()); - $this->assertSame($formatter, $handler->getBatchFormatter()); - } - - public function testRelease() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - $release = 'v42.42.42'; - $handler->setRelease($release); - $record = $this->getRecord(Logger::INFO, 'test'); - $handler->handle($record); - $this->assertEquals($release, $ravenClient->lastData['release']); - - $localRelease = 'v41.41.41'; - $record = $this->getRecord(Logger::INFO, 'test', array('release' => $localRelease)); - $handler->handle($record); - $this->assertEquals($localRelease, $ravenClient->lastData['release']); - } - - private function methodThatThrowsAnException() - { - throw new \Exception('This is an exception'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php deleted file mode 100644 index 689d527..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -class RedisHandlerTest extends TestCase -{ - /** - * @expectedException InvalidArgumentException - */ - public function testConstructorShouldThrowExceptionForInvalidRedis() - { - new RedisHandler(new \stdClass(), 'key'); - } - - public function testConstructorShouldWorkWithPredis() - { - $redis = $this->getMock('Predis\Client'); - $this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key')); - } - - public function testConstructorShouldWorkWithRedis() - { - $redis = $this->getMock('Redis'); - $this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key')); - } - - public function testPredisHandle() - { - $redis = $this->getMock('Predis\Client', array('rpush')); - - // Predis\Client uses rpush - $redis->expects($this->once()) - ->method('rpush') - ->with('key', 'test'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new RedisHandler($redis, 'key'); - $handler->setFormatter(new LineFormatter("%message%")); - $handler->handle($record); - } - - public function testRedisHandle() - { - $redis = $this->getMock('Redis', array('rpush')); - - // Redis uses rPush - $redis->expects($this->once()) - ->method('rPush') - ->with('key', 'test'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new RedisHandler($redis, 'key'); - $handler->setFormatter(new LineFormatter("%message%")); - $handler->handle($record); - } - - public function testRedisHandleCapped() - { - $redis = $this->getMock('Redis', array('multi', 'rpush', 'ltrim', 'exec')); - - // Redis uses multi - $redis->expects($this->once()) - ->method('multi') - ->will($this->returnSelf()); - - $redis->expects($this->once()) - ->method('rpush') - ->will($this->returnSelf()); - - $redis->expects($this->once()) - ->method('ltrim') - ->will($this->returnSelf()); - - $redis->expects($this->once()) - ->method('exec') - ->will($this->returnSelf()); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new RedisHandler($redis, 'key', Logger::DEBUG, true, 10); - $handler->setFormatter(new LineFormatter("%message%")); - $handler->handle($record); - } - - public function testPredisHandleCapped() - { - $redis = $this->getMock('Predis\Client', array('transaction')); - - $redisTransaction = $this->getMock('Predis\Client', array('rpush', 'ltrim')); - - $redisTransaction->expects($this->once()) - ->method('rpush') - ->will($this->returnSelf()); - - $redisTransaction->expects($this->once()) - ->method('ltrim') - ->will($this->returnSelf()); - - // Redis uses multi - $redis->expects($this->once()) - ->method('transaction') - ->will($this->returnCallback(function ($cb) use ($redisTransaction) { - $cb($redisTransaction); - })); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new RedisHandler($redis, 'key', Logger::DEBUG, true, 10); - $handler->setFormatter(new LineFormatter("%message%")); - $handler->handle($record); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php deleted file mode 100644 index c510617..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php +++ /dev/null @@ -1,211 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use PHPUnit_Framework_Error_Deprecated; - -/** - * @covers Monolog\Handler\RotatingFileHandler - */ -class RotatingFileHandlerTest extends TestCase -{ - /** - * This var should be private but then the anonymous function - * in the `setUp` method won't be able to set it. `$this` cant't - * be used in the anonymous function in `setUp` because PHP 5.3 - * does not support it. - */ - public $lastError; - - public function setUp() - { - $dir = __DIR__.'/Fixtures'; - chmod($dir, 0777); - if (!is_writable($dir)) { - $this->markTestSkipped($dir.' must be writable to test the RotatingFileHandler.'); - } - $this->lastError = null; - $self = $this; - // workaround with &$self used for PHP 5.3 - set_error_handler(function($code, $message) use (&$self) { - $self->lastError = array( - 'code' => $code, - 'message' => $message, - ); - }); - } - - private function assertErrorWasTriggered($code, $message) - { - if (empty($this->lastError)) { - $this->fail( - sprintf( - 'Failed asserting that error with code `%d` and message `%s` was triggered', - $code, - $message - ) - ); - } - $this->assertEquals($code, $this->lastError['code'], sprintf('Expected an error with code %d to be triggered, got `%s` instead', $code, $this->lastError['code'])); - $this->assertEquals($message, $this->lastError['message'], sprintf('Expected an error with message `%d` to be triggered, got `%s` instead', $message, $this->lastError['message'])); - } - - public function testRotationCreatesNewFile() - { - touch(__DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400).'.rot'); - - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot'); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord()); - - $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; - $this->assertTrue(file_exists($log)); - $this->assertEquals('test', file_get_contents($log)); - } - - /** - * @dataProvider rotationTests - */ - public function testRotation($createFile, $dateFormat, $timeCallback) - { - touch($old1 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-1)).'.rot'); - touch($old2 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-2)).'.rot'); - touch($old3 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-3)).'.rot'); - touch($old4 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-4)).'.rot'); - - $log = __DIR__.'/Fixtures/foo-'.date($dateFormat).'.rot'; - - if ($createFile) { - touch($log); - } - - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->setFilenameFormat('{filename}-{date}', $dateFormat); - $handler->handle($this->getRecord()); - - $handler->close(); - - $this->assertTrue(file_exists($log)); - $this->assertTrue(file_exists($old1)); - $this->assertEquals($createFile, file_exists($old2)); - $this->assertEquals($createFile, file_exists($old3)); - $this->assertEquals($createFile, file_exists($old4)); - $this->assertEquals('test', file_get_contents($log)); - } - - public function rotationTests() - { - $now = time(); - $dayCallback = function($ago) use ($now) { - return $now + 86400 * $ago; - }; - $monthCallback = function($ago) { - return gmmktime(0, 0, 0, date('n') + $ago, date('d'), date('Y')); - }; - $yearCallback = function($ago) { - return gmmktime(0, 0, 0, date('n'), date('d'), date('Y') + $ago); - }; - - return array( - 'Rotation is triggered when the file of the current day is not present' - => array(true, RotatingFileHandler::FILE_PER_DAY, $dayCallback), - 'Rotation is not triggered when the file of the current day is already present' - => array(false, RotatingFileHandler::FILE_PER_DAY, $dayCallback), - - 'Rotation is triggered when the file of the current month is not present' - => array(true, RotatingFileHandler::FILE_PER_MONTH, $monthCallback), - 'Rotation is not triggered when the file of the current month is already present' - => array(false, RotatingFileHandler::FILE_PER_MONTH, $monthCallback), - - 'Rotation is triggered when the file of the current year is not present' - => array(true, RotatingFileHandler::FILE_PER_YEAR, $yearCallback), - 'Rotation is not triggered when the file of the current year is already present' - => array(false, RotatingFileHandler::FILE_PER_YEAR, $yearCallback), - ); - } - - /** - * @dataProvider dateFormatProvider - */ - public function testAllowOnlyFixedDefinedDateFormats($dateFormat, $valid) - { - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); - $handler->setFilenameFormat('{filename}-{date}', $dateFormat); - if (!$valid) { - $this->assertErrorWasTriggered( - E_USER_DEPRECATED, - 'Invalid date format - format must be one of RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), '. - 'RotatingFileHandler::FILE_PER_MONTH ("Y-m") or RotatingFileHandler::FILE_PER_YEAR ("Y"), '. - 'or you can set one of the date formats using slashes, underscores and/or dots instead of dashes.' - ); - } - } - - public function dateFormatProvider() - { - return array( - array(RotatingFileHandler::FILE_PER_DAY, true), - array(RotatingFileHandler::FILE_PER_MONTH, true), - array(RotatingFileHandler::FILE_PER_YEAR, true), - array('m-d-Y', false), - array('Y-m-d-h-i', false) - ); - } - - /** - * @dataProvider filenameFormatProvider - */ - public function testDisallowFilenameFormatsWithoutDate($filenameFormat, $valid) - { - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); - $handler->setFilenameFormat($filenameFormat, RotatingFileHandler::FILE_PER_DAY); - if (!$valid) { - $this->assertErrorWasTriggered( - E_USER_DEPRECATED, - 'Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.' - ); - } - } - - public function filenameFormatProvider() - { - return array( - array('{filename}', false), - array('{filename}-{date}', true), - array('{date}', true), - array('foobar-{date}', true), - array('foo-{date}-bar', true), - array('{date}-foobar', true), - array('foobar', false), - ); - } - - public function testReuseCurrentFile() - { - $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; - file_put_contents($log, "foo"); - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot'); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord()); - $this->assertEquals('footest', file_get_contents($log)); - } - - public function tearDown() - { - foreach (glob(__DIR__.'/Fixtures/*.rot') as $file) { - unlink($file); - } - restore_error_handler(); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php deleted file mode 100644 index b354cee..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -/** - * @covers Monolog\Handler\SamplingHandler::handle - */ -class SamplingHandlerTest extends TestCase -{ - public function testHandle() - { - $testHandler = new TestHandler(); - $handler = new SamplingHandler($testHandler, 2); - for ($i = 0; $i < 10000; $i++) { - $handler->handle($this->getRecord()); - } - $count = count($testHandler->getRecords()); - // $count should be half of 10k, so between 4k and 6k - $this->assertLessThan(6000, $count); - $this->assertGreaterThan(4000, $count); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php deleted file mode 100644 index e1aa96d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php +++ /dev/null @@ -1,387 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Slack; - -use Monolog\Logger; -use Monolog\TestCase; - -/** - * @coversDefaultClass Monolog\Handler\Slack\SlackRecord - */ -class SlackRecordTest extends TestCase -{ - private $jsonPrettyPrintFlag; - - protected function setUp() - { - $this->jsonPrettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; - } - - public function dataGetAttachmentColor() - { - return array( - array(Logger::DEBUG, SlackRecord::COLOR_DEFAULT), - array(Logger::INFO, SlackRecord::COLOR_GOOD), - array(Logger::NOTICE, SlackRecord::COLOR_GOOD), - array(Logger::WARNING, SlackRecord::COLOR_WARNING), - array(Logger::ERROR, SlackRecord::COLOR_DANGER), - array(Logger::CRITICAL, SlackRecord::COLOR_DANGER), - array(Logger::ALERT, SlackRecord::COLOR_DANGER), - array(Logger::EMERGENCY, SlackRecord::COLOR_DANGER), - ); - } - - /** - * @dataProvider dataGetAttachmentColor - * @param int $logLevel - * @param string $expectedColour RGB hex color or name of Slack color - * @covers ::getAttachmentColor - */ - public function testGetAttachmentColor($logLevel, $expectedColour) - { - $slackRecord = new SlackRecord(); - $this->assertSame( - $expectedColour, - $slackRecord->getAttachmentColor($logLevel) - ); - } - - public function testAddsChannel() - { - $channel = '#test'; - $record = new SlackRecord($channel); - $data = $record->getSlackData($this->getRecord()); - - $this->assertArrayHasKey('channel', $data); - $this->assertSame($channel, $data['channel']); - } - - public function testNoUsernameByDefault() - { - $record = new SlackRecord(); - $data = $record->getSlackData($this->getRecord()); - - $this->assertArrayNotHasKey('username', $data); - } - - /** - * @return array - */ - public function dataStringify() - { - $jsonPrettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; - - $multipleDimensions = array(array(1, 2)); - $numericKeys = array('library' => 'monolog'); - $singleDimension = array(1, 'Hello', 'Jordi'); - - return array( - array(array(), '[]'), - array($multipleDimensions, json_encode($multipleDimensions, $jsonPrettyPrintFlag)), - array($numericKeys, json_encode($numericKeys, $jsonPrettyPrintFlag)), - array($singleDimension, json_encode($singleDimension)) - ); - } - - /** - * @dataProvider dataStringify - */ - public function testStringify($fields, $expectedResult) - { - $slackRecord = new SlackRecord( - '#test', - 'test', - true, - null, - true, - true - ); - - $this->assertSame($expectedResult, $slackRecord->stringify($fields)); - } - - public function testAddsCustomUsername() - { - $username = 'Monolog bot'; - $record = new SlackRecord(null, $username); - $data = $record->getSlackData($this->getRecord()); - - $this->assertArrayHasKey('username', $data); - $this->assertSame($username, $data['username']); - } - - public function testNoIcon() - { - $record = new SlackRecord(); - $data = $record->getSlackData($this->getRecord()); - - $this->assertArrayNotHasKey('icon_emoji', $data); - } - - public function testAddsIcon() - { - $record = $this->getRecord(); - $slackRecord = new SlackRecord(null, null, false, 'ghost'); - $data = $slackRecord->getSlackData($record); - - $slackRecord2 = new SlackRecord(null, null, false, 'http://github.com/Seldaek/monolog'); - $data2 = $slackRecord2->getSlackData($record); - - $this->assertArrayHasKey('icon_emoji', $data); - $this->assertSame(':ghost:', $data['icon_emoji']); - $this->assertArrayHasKey('icon_url', $data2); - $this->assertSame('http://github.com/Seldaek/monolog', $data2['icon_url']); - } - - public function testAttachmentsNotPresentIfNoAttachment() - { - $record = new SlackRecord(null, null, false); - $data = $record->getSlackData($this->getRecord()); - - $this->assertArrayNotHasKey('attachments', $data); - } - - public function testAddsOneAttachment() - { - $record = new SlackRecord(); - $data = $record->getSlackData($this->getRecord()); - - $this->assertArrayHasKey('attachments', $data); - $this->assertArrayHasKey(0, $data['attachments']); - $this->assertInternalType('array', $data['attachments'][0]); - } - - public function testTextEqualsMessageIfNoAttachment() - { - $message = 'Test message'; - $record = new SlackRecord(null, null, false); - $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); - - $this->assertArrayHasKey('text', $data); - $this->assertSame($message, $data['text']); - } - - public function testTextEqualsFormatterOutput() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter - ->expects($this->any()) - ->method('format') - ->will($this->returnCallback(function ($record) { return $record['message'] . 'test'; })); - - $formatter2 = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter2 - ->expects($this->any()) - ->method('format') - ->will($this->returnCallback(function ($record) { return $record['message'] . 'test1'; })); - - $message = 'Test message'; - $record = new SlackRecord(null, null, false, null, false, false, array(), $formatter); - $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); - - $this->assertArrayHasKey('text', $data); - $this->assertSame($message . 'test', $data['text']); - - $record->setFormatter($formatter2); - $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); - - $this->assertArrayHasKey('text', $data); - $this->assertSame($message . 'test1', $data['text']); - } - - public function testAddsFallbackAndTextToAttachment() - { - $message = 'Test message'; - $record = new SlackRecord(null); - $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); - - $this->assertSame($message, $data['attachments'][0]['text']); - $this->assertSame($message, $data['attachments'][0]['fallback']); - } - - public function testMapsLevelToColorAttachmentColor() - { - $record = new SlackRecord(null); - $errorLoggerRecord = $this->getRecord(Logger::ERROR); - $emergencyLoggerRecord = $this->getRecord(Logger::EMERGENCY); - $warningLoggerRecord = $this->getRecord(Logger::WARNING); - $infoLoggerRecord = $this->getRecord(Logger::INFO); - $debugLoggerRecord = $this->getRecord(Logger::DEBUG); - - $data = $record->getSlackData($errorLoggerRecord); - $this->assertSame(SlackRecord::COLOR_DANGER, $data['attachments'][0]['color']); - - $data = $record->getSlackData($emergencyLoggerRecord); - $this->assertSame(SlackRecord::COLOR_DANGER, $data['attachments'][0]['color']); - - $data = $record->getSlackData($warningLoggerRecord); - $this->assertSame(SlackRecord::COLOR_WARNING, $data['attachments'][0]['color']); - - $data = $record->getSlackData($infoLoggerRecord); - $this->assertSame(SlackRecord::COLOR_GOOD, $data['attachments'][0]['color']); - - $data = $record->getSlackData($debugLoggerRecord); - $this->assertSame(SlackRecord::COLOR_DEFAULT, $data['attachments'][0]['color']); - } - - public function testAddsShortAttachmentWithoutContextAndExtra() - { - $level = Logger::ERROR; - $levelName = Logger::getLevelName($level); - $record = new SlackRecord(null, null, true, null, true); - $data = $record->getSlackData($this->getRecord($level, 'test', array('test' => 1))); - - $attachment = $data['attachments'][0]; - $this->assertArrayHasKey('title', $attachment); - $this->assertArrayHasKey('fields', $attachment); - $this->assertSame($levelName, $attachment['title']); - $this->assertSame(array(), $attachment['fields']); - } - - public function testAddsShortAttachmentWithContextAndExtra() - { - $level = Logger::ERROR; - $levelName = Logger::getLevelName($level); - $context = array('test' => 1); - $extra = array('tags' => array('web')); - $record = new SlackRecord(null, null, true, null, true, true); - $loggerRecord = $this->getRecord($level, 'test', $context); - $loggerRecord['extra'] = $extra; - $data = $record->getSlackData($loggerRecord); - - $attachment = $data['attachments'][0]; - $this->assertArrayHasKey('title', $attachment); - $this->assertArrayHasKey('fields', $attachment); - $this->assertCount(2, $attachment['fields']); - $this->assertSame($levelName, $attachment['title']); - $this->assertSame( - array( - array( - 'title' => 'Extra', - 'value' => sprintf('```%s```', json_encode($extra, $this->jsonPrettyPrintFlag)), - 'short' => false - ), - array( - 'title' => 'Context', - 'value' => sprintf('```%s```', json_encode($context, $this->jsonPrettyPrintFlag)), - 'short' => false - ) - ), - $attachment['fields'] - ); - } - - public function testAddsLongAttachmentWithoutContextAndExtra() - { - $level = Logger::ERROR; - $levelName = Logger::getLevelName($level); - $record = new SlackRecord(null, null, true, null); - $data = $record->getSlackData($this->getRecord($level, 'test', array('test' => 1))); - - $attachment = $data['attachments'][0]; - $this->assertArrayHasKey('title', $attachment); - $this->assertArrayHasKey('fields', $attachment); - $this->assertCount(1, $attachment['fields']); - $this->assertSame('Message', $attachment['title']); - $this->assertSame( - array(array( - 'title' => 'Level', - 'value' => $levelName, - 'short' => false - )), - $attachment['fields'] - ); - } - - public function testAddsLongAttachmentWithContextAndExtra() - { - $level = Logger::ERROR; - $levelName = Logger::getLevelName($level); - $context = array('test' => 1); - $extra = array('tags' => array('web')); - $record = new SlackRecord(null, null, true, null, false, true); - $loggerRecord = $this->getRecord($level, 'test', $context); - $loggerRecord['extra'] = $extra; - $data = $record->getSlackData($loggerRecord); - - $expectedFields = array( - array( - 'title' => 'Level', - 'value' => $levelName, - 'short' => false, - ), - array( - 'title' => 'tags', - 'value' => sprintf('```%s```', json_encode($extra['tags'])), - 'short' => false - ), - array( - 'title' => 'test', - 'value' => $context['test'], - 'short' => false - ) - ); - - $attachment = $data['attachments'][0]; - $this->assertArrayHasKey('title', $attachment); - $this->assertArrayHasKey('fields', $attachment); - $this->assertCount(3, $attachment['fields']); - $this->assertSame('Message', $attachment['title']); - $this->assertSame( - $expectedFields, - $attachment['fields'] - ); - } - - public function testAddsTimestampToAttachment() - { - $record = $this->getRecord(); - $slackRecord = new SlackRecord(); - $data = $slackRecord->getSlackData($this->getRecord()); - - $attachment = $data['attachments'][0]; - $this->assertArrayHasKey('ts', $attachment); - $this->assertSame($record['datetime']->getTimestamp(), $attachment['ts']); - } - - public function testExcludeExtraAndContextFields() - { - $record = $this->getRecord( - Logger::WARNING, - 'test', - array('info' => array('library' => 'monolog', 'author' => 'Jordi')) - ); - $record['extra'] = array('tags' => array('web', 'cli')); - - $slackRecord = new SlackRecord(null, null, true, null, false, true, array('context.info.library', 'extra.tags.1')); - $data = $slackRecord->getSlackData($record); - $attachment = $data['attachments'][0]; - - $expected = array( - array( - 'title' => 'info', - 'value' => sprintf('```%s```', json_encode(array('author' => 'Jordi'), $this->jsonPrettyPrintFlag)), - 'short' => false - ), - array( - 'title' => 'tags', - 'value' => sprintf('```%s```', json_encode(array('web'))), - 'short' => false - ), - ); - - foreach ($expected as $field) { - $this->assertNotFalse(array_search($field, $attachment['fields'])); - break; - } - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php deleted file mode 100644 index b12b01f..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; -use Monolog\Handler\Slack\SlackRecord; - -/** - * @author Greg Kedzierski - * @see https://api.slack.com/ - */ -class SlackHandlerTest extends TestCase -{ - /** - * @var resource - */ - private $res; - - /** - * @var SlackHandler - */ - private $handler; - - public function setUp() - { - if (!extension_loaded('openssl')) { - $this->markTestSkipped('This test requires openssl to run'); - } - } - - public function testWriteHeader() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/api\/chat.postMessage HTTP\/1.1\\r\\nHost: slack.com\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - } - - public function testWriteContent() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegExp('/username=Monolog/', $content); - $this->assertRegExp('/channel=channel1/', $content); - $this->assertRegExp('/token=myToken/', $content); - $this->assertRegExp('/attachments/', $content); - } - - public function testWriteContentUsesFormatterIfProvided() - { - $this->createHandler('myToken', 'channel1', 'Monolog', false); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->createHandler('myToken', 'channel1', 'Monolog', false); - $this->handler->setFormatter(new LineFormatter('foo--%message%')); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test2')); - fseek($this->res, 0); - $content2 = fread($this->res, 1024); - - $this->assertRegexp('/text=test1/', $content); - $this->assertRegexp('/text=foo--test2/', $content2); - } - - public function testWriteContentWithEmoji() - { - $this->createHandler('myToken', 'channel1', 'Monolog', true, 'alien'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/icon_emoji=%3Aalien%3A/', $content); - } - - /** - * @dataProvider provideLevelColors - */ - public function testWriteContentWithColors($level, $expectedColor) - { - $this->createHandler(); - $this->handler->handle($this->getRecord($level, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/%22color%22%3A%22'.$expectedColor.'/', $content); - } - - public function testWriteContentWithPlainTextMessage() - { - $this->createHandler('myToken', 'channel1', 'Monolog', false); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/text=test1/', $content); - } - - public function provideLevelColors() - { - return array( - array(Logger::DEBUG, urlencode(SlackRecord::COLOR_DEFAULT)), - array(Logger::INFO, SlackRecord::COLOR_GOOD), - array(Logger::NOTICE, SlackRecord::COLOR_GOOD), - array(Logger::WARNING, SlackRecord::COLOR_WARNING), - array(Logger::ERROR, SlackRecord::COLOR_DANGER), - array(Logger::CRITICAL, SlackRecord::COLOR_DANGER), - array(Logger::ALERT, SlackRecord::COLOR_DANGER), - array(Logger::EMERGENCY,SlackRecord::COLOR_DANGER), - ); - } - - private function createHandler($token = 'myToken', $channel = 'channel1', $username = 'Monolog', $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeExtra = false) - { - $constructorArgs = array($token, $channel, $username, $useAttachment, $iconEmoji, Logger::DEBUG, true, $useShortAttachment, $includeExtra); - $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\SlackHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $constructorArgs - ); - - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->handler, 'localhost:1234'); - - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - $this->handler->expects($this->any()) - ->method('closeSocket') - ->will($this->returnValue(true)); - - $this->handler->setFormatter($this->getIdentityFormatter()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php deleted file mode 100644 index c9229e2..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; -use Monolog\Handler\Slack\SlackRecord; - -/** - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - * @coversDefaultClass Monolog\Handler\SlackWebhookHandler - */ -class SlackWebhookHandlerTest extends TestCase -{ - const WEBHOOK_URL = 'https://hooks.slack.com/services/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E'; - - /** - * @covers ::__construct - * @covers ::getSlackRecord - */ - public function testConstructorMinimal() - { - $handler = new SlackWebhookHandler(self::WEBHOOK_URL); - $record = $this->getRecord(); - $slackRecord = $handler->getSlackRecord(); - $this->assertInstanceOf('Monolog\Handler\Slack\SlackRecord', $slackRecord); - $this->assertEquals(array( - 'attachments' => array( - array( - 'fallback' => 'test', - 'text' => 'test', - 'color' => SlackRecord::COLOR_WARNING, - 'fields' => array( - array( - 'title' => 'Level', - 'value' => 'WARNING', - 'short' => false, - ), - ), - 'title' => 'Message', - 'mrkdwn_in' => array('fields'), - 'ts' => $record['datetime']->getTimestamp(), - ), - ), - ), $slackRecord->getSlackData($record)); - } - - /** - * @covers ::__construct - * @covers ::getSlackRecord - */ - public function testConstructorFull() - { - $handler = new SlackWebhookHandler( - self::WEBHOOK_URL, - 'test-channel', - 'test-username', - false, - ':ghost:', - false, - false, - Logger::DEBUG, - false - ); - - $slackRecord = $handler->getSlackRecord(); - $this->assertInstanceOf('Monolog\Handler\Slack\SlackRecord', $slackRecord); - $this->assertEquals(array( - 'username' => 'test-username', - 'text' => 'test', - 'channel' => 'test-channel', - 'icon_emoji' => ':ghost:', - ), $slackRecord->getSlackData($this->getRecord())); - } - - /** - * @covers ::getFormatter - */ - public function testGetFormatter() - { - $handler = new SlackWebhookHandler(self::WEBHOOK_URL); - $formatter = $handler->getFormatter(); - $this->assertInstanceOf('Monolog\Formatter\FormatterInterface', $formatter); - } - - /** - * @covers ::setFormatter - */ - public function testSetFormatter() - { - $handler = new SlackWebhookHandler(self::WEBHOOK_URL); - $formatter = new LineFormatter(); - $handler->setFormatter($formatter); - $this->assertSame($formatter, $handler->getFormatter()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php deleted file mode 100644 index b1b02bd..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @author Haralan Dobrev - * @see https://slack.com/apps/A0F81R8ET-slackbot - * @coversDefaultClass Monolog\Handler\SlackbotHandler - */ -class SlackbotHandlerTest extends TestCase -{ - /** - * @covers ::__construct - */ - public function testConstructorMinimal() - { - $handler = new SlackbotHandler('test-team', 'test-token', 'test-channel'); - $this->assertInstanceOf('Monolog\Handler\AbstractProcessingHandler', $handler); - } - - /** - * @covers ::__construct - */ - public function testConstructorFull() - { - $handler = new SlackbotHandler( - 'test-team', - 'test-token', - 'test-channel', - Logger::DEBUG, - false - ); - $this->assertInstanceOf('Monolog\Handler\AbstractProcessingHandler', $handler); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php deleted file mode 100644 index 1f9c1f2..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php +++ /dev/null @@ -1,309 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @author Pablo de Leon Belloc - */ -class SocketHandlerTest extends TestCase -{ - /** - * @var Monolog\Handler\SocketHandler - */ - private $handler; - - /** - * @var resource - */ - private $res; - - /** - * @expectedException UnexpectedValueException - */ - public function testInvalidHostname() - { - $this->createHandler('garbage://here'); - $this->writeRecord('data'); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testBadConnectionTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setConnectionTimeout(-1); - } - - public function testSetConnectionTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setConnectionTimeout(10.1); - $this->assertEquals(10.1, $this->handler->getConnectionTimeout()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testBadTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setTimeout(-1); - } - - public function testSetTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setTimeout(10.25); - $this->assertEquals(10.25, $this->handler->getTimeout()); - } - - public function testSetWritingTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setWritingTimeout(10.25); - $this->assertEquals(10.25, $this->handler->getWritingTimeout()); - } - - public function testSetConnectionString() - { - $this->createHandler('tcp://localhost:9090'); - $this->assertEquals('tcp://localhost:9090', $this->handler->getConnectionString()); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testExceptionIsThrownOnFsockopenError() - { - $this->setMockHandler(array('fsockopen')); - $this->handler->expects($this->once()) - ->method('fsockopen') - ->will($this->returnValue(false)); - $this->writeRecord('Hello world'); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testExceptionIsThrownOnPfsockopenError() - { - $this->setMockHandler(array('pfsockopen')); - $this->handler->expects($this->once()) - ->method('pfsockopen') - ->will($this->returnValue(false)); - $this->handler->setPersistent(true); - $this->writeRecord('Hello world'); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testExceptionIsThrownIfCannotSetTimeout() - { - $this->setMockHandler(array('streamSetTimeout')); - $this->handler->expects($this->once()) - ->method('streamSetTimeout') - ->will($this->returnValue(false)); - $this->writeRecord('Hello world'); - } - - /** - * @expectedException RuntimeException - */ - public function testWriteFailsOnIfFwriteReturnsFalse() - { - $this->setMockHandler(array('fwrite')); - - $callback = function ($arg) { - $map = array( - 'Hello world' => 6, - 'world' => false, - ); - - return $map[$arg]; - }; - - $this->handler->expects($this->exactly(2)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - - $this->writeRecord('Hello world'); - } - - /** - * @expectedException RuntimeException - */ - public function testWriteFailsIfStreamTimesOut() - { - $this->setMockHandler(array('fwrite', 'streamGetMetadata')); - - $callback = function ($arg) { - $map = array( - 'Hello world' => 6, - 'world' => 5, - ); - - return $map[$arg]; - }; - - $this->handler->expects($this->exactly(1)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - $this->handler->expects($this->exactly(1)) - ->method('streamGetMetadata') - ->will($this->returnValue(array('timed_out' => true))); - - $this->writeRecord('Hello world'); - } - - /** - * @expectedException RuntimeException - */ - public function testWriteFailsOnIncompleteWrite() - { - $this->setMockHandler(array('fwrite', 'streamGetMetadata')); - - $res = $this->res; - $callback = function ($string) use ($res) { - fclose($res); - - return strlen('Hello'); - }; - - $this->handler->expects($this->exactly(1)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - $this->handler->expects($this->exactly(1)) - ->method('streamGetMetadata') - ->will($this->returnValue(array('timed_out' => false))); - - $this->writeRecord('Hello world'); - } - - public function testWriteWithMemoryFile() - { - $this->setMockHandler(); - $this->writeRecord('test1'); - $this->writeRecord('test2'); - $this->writeRecord('test3'); - fseek($this->res, 0); - $this->assertEquals('test1test2test3', fread($this->res, 1024)); - } - - public function testWriteWithMock() - { - $this->setMockHandler(array('fwrite')); - - $callback = function ($arg) { - $map = array( - 'Hello world' => 6, - 'world' => 5, - ); - - return $map[$arg]; - }; - - $this->handler->expects($this->exactly(2)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - - $this->writeRecord('Hello world'); - } - - public function testClose() - { - $this->setMockHandler(); - $this->writeRecord('Hello world'); - $this->assertInternalType('resource', $this->res); - $this->handler->close(); - $this->assertFalse(is_resource($this->res), "Expected resource to be closed after closing handler"); - } - - public function testCloseDoesNotClosePersistentSocket() - { - $this->setMockHandler(); - $this->handler->setPersistent(true); - $this->writeRecord('Hello world'); - $this->assertTrue(is_resource($this->res)); - $this->handler->close(); - $this->assertTrue(is_resource($this->res)); - } - - /** - * @expectedException \RuntimeException - */ - public function testAvoidInfiniteLoopWhenNoDataIsWrittenForAWritingTimeoutSeconds() - { - $this->setMockHandler(array('fwrite', 'streamGetMetadata')); - - $this->handler->expects($this->any()) - ->method('fwrite') - ->will($this->returnValue(0)); - - $this->handler->expects($this->any()) - ->method('streamGetMetadata') - ->will($this->returnValue(array('timed_out' => false))); - - $this->handler->setWritingTimeout(1); - - $this->writeRecord('Hello world'); - } - - private function createHandler($connectionString) - { - $this->handler = new SocketHandler($connectionString); - $this->handler->setFormatter($this->getIdentityFormatter()); - } - - private function writeRecord($string) - { - $this->handler->handle($this->getRecord(Logger::WARNING, $string)); - } - - private function setMockHandler(array $methods = array()) - { - $this->res = fopen('php://memory', 'a'); - - $defaultMethods = array('fsockopen', 'pfsockopen', 'streamSetTimeout'); - $newMethods = array_diff($methods, $defaultMethods); - - $finalMethods = array_merge($defaultMethods, $newMethods); - - $this->handler = $this->getMock( - '\Monolog\Handler\SocketHandler', $finalMethods, array('localhost:1234') - ); - - if (!in_array('fsockopen', $methods)) { - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - } - - if (!in_array('pfsockopen', $methods)) { - $this->handler->expects($this->any()) - ->method('pfsockopen') - ->will($this->returnValue($this->res)); - } - - if (!in_array('streamSetTimeout', $methods)) { - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - } - - $this->handler->setFormatter($this->getIdentityFormatter()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php deleted file mode 100644 index 487030f..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class StreamHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWrite() - { - $handle = fopen('php://memory', 'a+'); - $handler = new StreamHandler($handle); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::WARNING, 'test')); - $handler->handle($this->getRecord(Logger::WARNING, 'test2')); - $handler->handle($this->getRecord(Logger::WARNING, 'test3')); - fseek($handle, 0); - $this->assertEquals('testtest2test3', fread($handle, 100)); - } - - /** - * @covers Monolog\Handler\StreamHandler::close - */ - public function testCloseKeepsExternalHandlersOpen() - { - $handle = fopen('php://memory', 'a+'); - $handler = new StreamHandler($handle); - $this->assertTrue(is_resource($handle)); - $handler->close(); - $this->assertTrue(is_resource($handle)); - } - - /** - * @covers Monolog\Handler\StreamHandler::close - */ - public function testClose() - { - $handler = new StreamHandler('php://memory'); - $handler->handle($this->getRecord(Logger::WARNING, 'test')); - $streamProp = new \ReflectionProperty('Monolog\Handler\StreamHandler', 'stream'); - $streamProp->setAccessible(true); - $handle = $streamProp->getValue($handler); - - $this->assertTrue(is_resource($handle)); - $handler->close(); - $this->assertFalse(is_resource($handle)); - } - - /** - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteCreatesTheStreamResource() - { - $handler = new StreamHandler('php://memory'); - $handler->handle($this->getRecord()); - } - - /** - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteLocking() - { - $temp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'monolog_locked_log'; - $handler = new StreamHandler($temp, Logger::DEBUG, true, null, true); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException LogicException - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteMissingResource() - { - $handler = new StreamHandler(null); - $handler->handle($this->getRecord()); - } - - public function invalidArgumentProvider() - { - return array( - array(1), - array(array()), - array(array('bogus://url')), - ); - } - - /** - * @dataProvider invalidArgumentProvider - * @expectedException InvalidArgumentException - * @covers Monolog\Handler\StreamHandler::__construct - */ - public function testWriteInvalidArgument($invalidArgument) - { - $handler = new StreamHandler($invalidArgument); - } - - /** - * @expectedException UnexpectedValueException - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteInvalidResource() - { - $handler = new StreamHandler('bogus://url'); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException UnexpectedValueException - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteNonExistingResource() - { - $handler = new StreamHandler('ftp://foo/bar/baz/'.rand(0, 10000)); - $handler->handle($this->getRecord()); - } - - /** - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteNonExistingPath() - { - $handler = new StreamHandler(sys_get_temp_dir().'/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); - $handler->handle($this->getRecord()); - } - - /** - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteNonExistingFileResource() - { - $handler = new StreamHandler('file://'.sys_get_temp_dir().'/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException Exception - * @expectedExceptionMessageRegExp /There is no existing directory at/ - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteNonExistingAndNotCreatablePath() - { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->markTestSkipped('Permissions checks can not run on windows'); - } - $handler = new StreamHandler('/foo/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException Exception - * @expectedExceptionMessageRegExp /There is no existing directory at/ - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteNonExistingAndNotCreatableFileResource() - { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->markTestSkipped('Permissions checks can not run on windows'); - } - $handler = new StreamHandler('file:///foo/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); - $handler->handle($this->getRecord()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php deleted file mode 100644 index 8588691..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\TestCase; - -class SwiftMailerHandlerTest extends TestCase -{ - /** @var \Swift_Mailer|\PHPUnit_Framework_MockObject_MockObject */ - private $mailer; - - public function setUp() - { - $this->mailer = $this - ->getMockBuilder('Swift_Mailer') - ->disableOriginalConstructor() - ->getMock(); - } - - public function testMessageCreationIsLazyWhenUsingCallback() - { - $this->mailer->expects($this->never()) - ->method('send'); - - $callback = function () { - throw new \RuntimeException('Swift_Message creation callback should not have been called in this test'); - }; - $handler = new SwiftMailerHandler($this->mailer, $callback); - - $records = array( - $this->getRecord(Logger::DEBUG), - $this->getRecord(Logger::INFO), - ); - $handler->handleBatch($records); - } - - public function testMessageCanBeCustomizedGivenLoggedData() - { - // Wire Mailer to expect a specific Swift_Message with a customized Subject - $expectedMessage = new \Swift_Message(); - $this->mailer->expects($this->once()) - ->method('send') - ->with($this->callback(function ($value) use ($expectedMessage) { - return $value instanceof \Swift_Message - && $value->getSubject() === 'Emergency' - && $value === $expectedMessage; - })); - - // Callback dynamically changes subject based on number of logged records - $callback = function ($content, array $records) use ($expectedMessage) { - $subject = count($records) > 0 ? 'Emergency' : 'Normal'; - $expectedMessage->setSubject($subject); - - return $expectedMessage; - }; - $handler = new SwiftMailerHandler($this->mailer, $callback); - - // Logging 1 record makes this an Emergency - $records = array( - $this->getRecord(Logger::EMERGENCY), - ); - $handler->handleBatch($records); - } - - public function testMessageSubjectFormatting() - { - // Wire Mailer to expect a specific Swift_Message with a customized Subject - $messageTemplate = new \Swift_Message(); - $messageTemplate->setSubject('Alert: %level_name% %message%'); - $receivedMessage = null; - - $this->mailer->expects($this->once()) - ->method('send') - ->with($this->callback(function ($value) use (&$receivedMessage) { - $receivedMessage = $value; - return true; - })); - - $handler = new SwiftMailerHandler($this->mailer, $messageTemplate); - - $records = array( - $this->getRecord(Logger::EMERGENCY), - ); - $handler->handleBatch($records); - - $this->assertEquals('Alert: EMERGENCY test', $receivedMessage->getSubject()); - } - - public function testMessageHaveUniqueId() - { - $messageTemplate = \Swift_Message::newInstance(); - $handler = new SwiftMailerHandler($this->mailer, $messageTemplate); - - $method = new \ReflectionMethod('Monolog\Handler\SwiftMailerHandler', 'buildMessage'); - $method->setAccessible(true); - $method->invokeArgs($handler, array($messageTemplate, array())); - - $builtMessage1 = $method->invoke($handler, $messageTemplate, array()); - $builtMessage2 = $method->invoke($handler, $messageTemplate, array()); - - $this->assertFalse($builtMessage1->getId() === $builtMessage2->getId(), 'Two different messages have the same id'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php deleted file mode 100644 index 8f9e46b..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -class SyslogHandlerTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Handler\SyslogHandler::__construct - */ - public function testConstruct() - { - $handler = new SyslogHandler('test'); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - - $handler = new SyslogHandler('test', LOG_USER); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - - $handler = new SyslogHandler('test', 'user'); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - - $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - } - - /** - * @covers Monolog\Handler\SyslogHandler::__construct - */ - public function testConstructInvalidFacility() - { - $this->setExpectedException('UnexpectedValueException'); - $handler = new SyslogHandler('test', 'unknown'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php deleted file mode 100644 index aa4a334..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -/** - * @requires extension sockets - */ -class SyslogUdpHandlerTest extends TestCase -{ - /** - * @expectedException UnexpectedValueException - */ - public function testWeValidateFacilities() - { - $handler = new SyslogUdpHandler("ip", null, "invalidFacility"); - } - - public function testWeSplitIntoLines() - { - $handler = new SyslogUdpHandler("127.0.0.1", 514, "authpriv"); - $handler->setFormatter(new \Monolog\Formatter\ChromePHPFormatter()); - - $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol')); - $socket->expects($this->at(0)) - ->method('write') - ->with("lol", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 "); - $socket->expects($this->at(1)) - ->method('write') - ->with("hej", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 "); - - $handler->setSocket($socket); - - $handler->handle($this->getRecordWithMessage("hej\nlol")); - } - - public function testSplitWorksOnEmptyMsg() - { - $handler = new SyslogUdpHandler("127.0.0.1", 514, "authpriv"); - $handler->setFormatter($this->getIdentityFormatter()); - - $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol')); - $socket->expects($this->never()) - ->method('write'); - - $handler->setSocket($socket); - - $handler->handle($this->getRecordWithMessage(null)); - } - - protected function getRecordWithMessage($msg) - { - return array('message' => $msg, 'level' => \Monolog\Logger::WARNING, 'context' => null, 'extra' => array(), 'channel' => 'lol'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php deleted file mode 100644 index bfb8d3d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\TestHandler - */ -class TestHandlerTest extends TestCase -{ - /** - * @dataProvider methodProvider - */ - public function testHandler($method, $level) - { - $handler = new TestHandler; - $record = $this->getRecord($level, 'test'.$method); - $this->assertFalse($handler->hasRecords($level)); - $this->assertFalse($handler->hasRecord($record, $level)); - $this->assertFalse($handler->{'has'.$method}($record), 'has'.$method); - $this->assertFalse($handler->{'has'.$method.'ThatContains'}('test'), 'has'.$method.'ThatContains'); - $this->assertFalse($handler->{'has'.$method.'ThatPasses'}(function ($rec) { - return true; - }), 'has'.$method.'ThatPasses'); - $this->assertFalse($handler->{'has'.$method.'ThatMatches'}('/test\w+/')); - $this->assertFalse($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records'); - $handler->handle($record); - - $this->assertFalse($handler->{'has'.$method}('bar'), 'has'.$method); - $this->assertTrue($handler->hasRecords($level)); - $this->assertTrue($handler->hasRecord($record, $level)); - $this->assertTrue($handler->{'has'.$method}($record), 'has'.$method); - $this->assertTrue($handler->{'has'.$method}('test'.$method), 'has'.$method); - $this->assertTrue($handler->{'has'.$method.'ThatContains'}('test'), 'has'.$method.'ThatContains'); - $this->assertTrue($handler->{'has'.$method.'ThatPasses'}(function ($rec) { - return true; - }), 'has'.$method.'ThatPasses'); - $this->assertTrue($handler->{'has'.$method.'ThatMatches'}('/test\w+/')); - $this->assertTrue($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records'); - - $records = $handler->getRecords(); - unset($records[0]['formatted']); - $this->assertEquals(array($record), $records); - } - - public function methodProvider() - { - return array( - array('Emergency', Logger::EMERGENCY), - array('Alert' , Logger::ALERT), - array('Critical' , Logger::CRITICAL), - array('Error' , Logger::ERROR), - array('Warning' , Logger::WARNING), - array('Info' , Logger::INFO), - array('Notice' , Logger::NOTICE), - array('Debug' , Logger::DEBUG), - ); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php deleted file mode 100644 index fa524d0..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Handler\SyslogUdp\UdpSocket; - -/** - * @requires extension sockets - */ -class UdpSocketTest extends TestCase -{ - public function testWeDoNotTruncateShortMessages() - { - $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('send'), array('lol', 'lol')); - - $socket->expects($this->at(0)) - ->method('send') - ->with("HEADER: The quick brown fox jumps over the lazy dog"); - - $socket->write("The quick brown fox jumps over the lazy dog", "HEADER: "); - } - - public function testLongMessagesAreTruncated() - { - $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('send'), array('lol', 'lol')); - - $truncatedString = str_repeat("derp", 16254).'d'; - - $socket->expects($this->exactly(1)) - ->method('send') - ->with("HEADER" . $truncatedString); - - $longString = str_repeat("derp", 20000); - - $socket->write($longString, "HEADER"); - } - - public function testDoubleCloseDoesNotError() - { - $socket = new UdpSocket('127.0.0.1', 514); - $socket->close(); - $socket->close(); - } - - /** - * @expectedException LogicException - */ - public function testWriteAfterCloseErrors() - { - $socket = new UdpSocket('127.0.0.1', 514); - $socket->close(); - $socket->write('foo', "HEADER"); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php deleted file mode 100644 index 8d37a1f..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class WhatFailureGroupHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\WhatFailureGroupHandler::__construct - * @expectedException InvalidArgumentException - */ - public function testConstructorOnlyTakesHandler() - { - new WhatFailureGroupHandler(array(new TestHandler(), "foo")); - } - - /** - * @covers Monolog\Handler\WhatFailureGroupHandler::__construct - * @covers Monolog\Handler\WhatFailureGroupHandler::handle - */ - public function testHandle() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new WhatFailureGroupHandler($testHandlers); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - } - - /** - * @covers Monolog\Handler\WhatFailureGroupHandler::handleBatch - */ - public function testHandleBatch() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new WhatFailureGroupHandler($testHandlers); - $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - } - - /** - * @covers Monolog\Handler\WhatFailureGroupHandler::isHandling - */ - public function testIsHandling() - { - $testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING)); - $handler = new WhatFailureGroupHandler($testHandlers); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR))); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\WhatFailureGroupHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new WhatFailureGroupHandler(array($test)); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } - - /** - * @covers Monolog\Handler\WhatFailureGroupHandler::handle - */ - public function testHandleException() - { - $test = new TestHandler(); - $exception = new ExceptionTestHandler(); - $handler = new WhatFailureGroupHandler(array($exception, $test, $exception)); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } -} - -class ExceptionTestHandler extends TestHandler -{ - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - parent::handle($record); - - throw new \Exception("ExceptionTestHandler::handle"); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php b/api/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php deleted file mode 100644 index 69b001e..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -class ZendMonitorHandlerTest extends TestCase -{ - protected $zendMonitorHandler; - - public function setUp() - { - if (!function_exists('zend_monitor_custom_event')) { - $this->markTestSkipped('ZendServer is not installed'); - } - } - - /** - * @covers Monolog\Handler\ZendMonitorHandler::write - */ - public function testWrite() - { - $record = $this->getRecord(); - $formatterResult = array( - 'message' => $record['message'], - ); - - $zendMonitor = $this->getMockBuilder('Monolog\Handler\ZendMonitorHandler') - ->setMethods(array('writeZendMonitorCustomEvent', 'getDefaultFormatter')) - ->getMock(); - - $formatterMock = $this->getMockBuilder('Monolog\Formatter\NormalizerFormatter') - ->disableOriginalConstructor() - ->getMock(); - - $formatterMock->expects($this->once()) - ->method('format') - ->will($this->returnValue($formatterResult)); - - $zendMonitor->expects($this->once()) - ->method('getDefaultFormatter') - ->will($this->returnValue($formatterMock)); - - $levelMap = $zendMonitor->getLevelMap(); - - $zendMonitor->expects($this->once()) - ->method('writeZendMonitorCustomEvent') - ->with($levelMap[$record['level']], $record['message'], $formatterResult); - - $zendMonitor->handle($record); - } - - /** - * @covers Monolog\Handler\ZendMonitorHandler::getDefaultFormatter - */ - public function testGetDefaultFormatterReturnsNormalizerFormatter() - { - $zendMonitor = new ZendMonitorHandler(); - $this->assertInstanceOf('Monolog\Formatter\NormalizerFormatter', $zendMonitor->getDefaultFormatter()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/LoggerTest.php b/api/vendor/monolog/monolog/tests/Monolog/LoggerTest.php deleted file mode 100644 index 1ecc34a..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/LoggerTest.php +++ /dev/null @@ -1,548 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Processor\WebProcessor; -use Monolog\Handler\TestHandler; - -class LoggerTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Logger::getName - */ - public function testGetName() - { - $logger = new Logger('foo'); - $this->assertEquals('foo', $logger->getName()); - } - - /** - * @covers Monolog\Logger::getLevelName - */ - public function testGetLevelName() - { - $this->assertEquals('ERROR', Logger::getLevelName(Logger::ERROR)); - } - - /** - * @covers Monolog\Logger::withName - */ - public function testWithName() - { - $first = new Logger('first', array($handler = new TestHandler())); - $second = $first->withName('second'); - - $this->assertSame('first', $first->getName()); - $this->assertSame('second', $second->getName()); - $this->assertSame($handler, $second->popHandler()); - } - - /** - * @covers Monolog\Logger::toMonologLevel - */ - public function testConvertPSR3ToMonologLevel() - { - $this->assertEquals(Logger::toMonologLevel('debug'), 100); - $this->assertEquals(Logger::toMonologLevel('info'), 200); - $this->assertEquals(Logger::toMonologLevel('notice'), 250); - $this->assertEquals(Logger::toMonologLevel('warning'), 300); - $this->assertEquals(Logger::toMonologLevel('error'), 400); - $this->assertEquals(Logger::toMonologLevel('critical'), 500); - $this->assertEquals(Logger::toMonologLevel('alert'), 550); - $this->assertEquals(Logger::toMonologLevel('emergency'), 600); - } - - /** - * @covers Monolog\Logger::getLevelName - * @expectedException InvalidArgumentException - */ - public function testGetLevelNameThrows() - { - Logger::getLevelName(5); - } - - /** - * @covers Monolog\Logger::__construct - */ - public function testChannel() - { - $logger = new Logger('foo'); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->addWarning('test'); - list($record) = $handler->getRecords(); - $this->assertEquals('foo', $record['channel']); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testLog() - { - $logger = new Logger(__METHOD__); - - $handler = $this->getMock('Monolog\Handler\NullHandler', array('handle')); - $handler->expects($this->once()) - ->method('handle'); - $logger->pushHandler($handler); - - $this->assertTrue($logger->addWarning('test')); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testLogNotHandled() - { - $logger = new Logger(__METHOD__); - - $handler = $this->getMock('Monolog\Handler\NullHandler', array('handle'), array(Logger::ERROR)); - $handler->expects($this->never()) - ->method('handle'); - $logger->pushHandler($handler); - - $this->assertFalse($logger->addWarning('test')); - } - - public function testHandlersInCtor() - { - $handler1 = new TestHandler; - $handler2 = new TestHandler; - $logger = new Logger(__METHOD__, array($handler1, $handler2)); - - $this->assertEquals($handler1, $logger->popHandler()); - $this->assertEquals($handler2, $logger->popHandler()); - } - - public function testProcessorsInCtor() - { - $processor1 = new WebProcessor; - $processor2 = new WebProcessor; - $logger = new Logger(__METHOD__, array(), array($processor1, $processor2)); - - $this->assertEquals($processor1, $logger->popProcessor()); - $this->assertEquals($processor2, $logger->popProcessor()); - } - - /** - * @covers Monolog\Logger::pushHandler - * @covers Monolog\Logger::popHandler - * @expectedException LogicException - */ - public function testPushPopHandler() - { - $logger = new Logger(__METHOD__); - $handler1 = new TestHandler; - $handler2 = new TestHandler; - - $logger->pushHandler($handler1); - $logger->pushHandler($handler2); - - $this->assertEquals($handler2, $logger->popHandler()); - $this->assertEquals($handler1, $logger->popHandler()); - $logger->popHandler(); - } - - /** - * @covers Monolog\Logger::setHandlers - */ - public function testSetHandlers() - { - $logger = new Logger(__METHOD__); - $handler1 = new TestHandler; - $handler2 = new TestHandler; - - $logger->pushHandler($handler1); - $logger->setHandlers(array($handler2)); - - // handler1 has been removed - $this->assertEquals(array($handler2), $logger->getHandlers()); - - $logger->setHandlers(array( - "AMapKey" => $handler1, - "Woop" => $handler2, - )); - - // Keys have been scrubbed - $this->assertEquals(array($handler1, $handler2), $logger->getHandlers()); - } - - /** - * @covers Monolog\Logger::pushProcessor - * @covers Monolog\Logger::popProcessor - * @expectedException LogicException - */ - public function testPushPopProcessor() - { - $logger = new Logger(__METHOD__); - $processor1 = new WebProcessor; - $processor2 = new WebProcessor; - - $logger->pushProcessor($processor1); - $logger->pushProcessor($processor2); - - $this->assertEquals($processor2, $logger->popProcessor()); - $this->assertEquals($processor1, $logger->popProcessor()); - $logger->popProcessor(); - } - - /** - * @covers Monolog\Logger::pushProcessor - * @expectedException InvalidArgumentException - */ - public function testPushProcessorWithNonCallable() - { - $logger = new Logger(__METHOD__); - - $logger->pushProcessor(new \stdClass()); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testProcessorsAreExecuted() - { - $logger = new Logger(__METHOD__); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->pushProcessor(function ($record) { - $record['extra']['win'] = true; - - return $record; - }); - $logger->addError('test'); - list($record) = $handler->getRecords(); - $this->assertTrue($record['extra']['win']); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testProcessorsAreCalledOnlyOnce() - { - $logger = new Logger(__METHOD__); - $handler = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler->expects($this->any()) - ->method('handle') - ->will($this->returnValue(true)) - ; - $logger->pushHandler($handler); - - $processor = $this->getMockBuilder('Monolog\Processor\WebProcessor') - ->disableOriginalConstructor() - ->setMethods(array('__invoke')) - ->getMock() - ; - $processor->expects($this->once()) - ->method('__invoke') - ->will($this->returnArgument(0)) - ; - $logger->pushProcessor($processor); - - $logger->addError('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testProcessorsNotCalledWhenNotHandled() - { - $logger = new Logger(__METHOD__); - $handler = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler); - $that = $this; - $logger->pushProcessor(function ($record) use ($that) { - $that->fail('The processor should not be called'); - }); - $logger->addAlert('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testHandlersNotCalledBeforeFirstHandling() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->never()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $handler1->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler1); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler2); - - $handler3 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler3->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $handler3->expects($this->never()) - ->method('handle') - ; - $logger->pushHandler($handler3); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testHandlersNotCalledBeforeFirstHandlingWithAssocArray() - { - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->never()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $handler1->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - - $handler3 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler3->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $handler3->expects($this->never()) - ->method('handle') - ; - - $logger = new Logger(__METHOD__, array('last' => $handler3, 'second' => $handler2, 'first' => $handler1)); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testBubblingWhenTheHandlerReturnsFalse() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler1->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler1); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler2); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testNotBubblingWhenTheHandlerReturnsTrue() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler1->expects($this->never()) - ->method('handle') - ; - $logger->pushHandler($handler1); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(true)) - ; - $logger->pushHandler($handler2); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::isHandling - */ - public function testIsHandling() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - - $logger->pushHandler($handler1); - $this->assertFalse($logger->isHandling(Logger::DEBUG)); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - - $logger->pushHandler($handler2); - $this->assertTrue($logger->isHandling(Logger::DEBUG)); - } - - /** - * @dataProvider logMethodProvider - * @covers Monolog\Logger::addDebug - * @covers Monolog\Logger::addInfo - * @covers Monolog\Logger::addNotice - * @covers Monolog\Logger::addWarning - * @covers Monolog\Logger::addError - * @covers Monolog\Logger::addCritical - * @covers Monolog\Logger::addAlert - * @covers Monolog\Logger::addEmergency - * @covers Monolog\Logger::debug - * @covers Monolog\Logger::info - * @covers Monolog\Logger::notice - * @covers Monolog\Logger::warn - * @covers Monolog\Logger::err - * @covers Monolog\Logger::crit - * @covers Monolog\Logger::alert - * @covers Monolog\Logger::emerg - */ - public function testLogMethods($method, $expectedLevel) - { - $logger = new Logger('foo'); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->{$method}('test'); - list($record) = $handler->getRecords(); - $this->assertEquals($expectedLevel, $record['level']); - } - - public function logMethodProvider() - { - return array( - // monolog methods - array('addDebug', Logger::DEBUG), - array('addInfo', Logger::INFO), - array('addNotice', Logger::NOTICE), - array('addWarning', Logger::WARNING), - array('addError', Logger::ERROR), - array('addCritical', Logger::CRITICAL), - array('addAlert', Logger::ALERT), - array('addEmergency', Logger::EMERGENCY), - - // ZF/Sf2 compat methods - array('debug', Logger::DEBUG), - array('info', Logger::INFO), - array('notice', Logger::NOTICE), - array('warn', Logger::WARNING), - array('err', Logger::ERROR), - array('crit', Logger::CRITICAL), - array('alert', Logger::ALERT), - array('emerg', Logger::EMERGENCY), - ); - } - - /** - * @dataProvider setTimezoneProvider - * @covers Monolog\Logger::setTimezone - */ - public function testSetTimezone($tz) - { - Logger::setTimezone($tz); - $logger = new Logger('foo'); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->info('test'); - list($record) = $handler->getRecords(); - $this->assertEquals($tz, $record['datetime']->getTimezone()); - } - - public function setTimezoneProvider() - { - return array_map( - function ($tz) { return array(new \DateTimeZone($tz)); }, - \DateTimeZone::listIdentifiers() - ); - } - - /** - * @dataProvider useMicrosecondTimestampsProvider - * @covers Monolog\Logger::useMicrosecondTimestamps - * @covers Monolog\Logger::addRecord - */ - public function testUseMicrosecondTimestamps($micro, $assert) - { - $logger = new Logger('foo'); - $logger->useMicrosecondTimestamps($micro); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->info('test'); - list($record) = $handler->getRecords(); - $this->{$assert}('000000', $record['datetime']->format('u')); - } - - public function useMicrosecondTimestampsProvider() - { - return array( - // this has a very small chance of a false negative (1/10^6) - 'with microseconds' => array(true, 'assertNotSame'), - 'without microseconds' => array(false, PHP_VERSION_ID >= 70100 ? 'assertNotSame' : 'assertSame'), - ); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php deleted file mode 100644 index 5adb505..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class GitProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\GitProcessor::__invoke - */ - public function testProcessor() - { - $processor = new GitProcessor(); - $record = $processor($this->getRecord()); - - $this->assertArrayHasKey('git', $record['extra']); - $this->assertTrue(!is_array($record['extra']['git']['branch'])); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php deleted file mode 100644 index 0dd411d..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Acme; - -class Tester -{ - public function test($handler, $record) - { - $handler->handle($record); - } -} - -function tester($handler, $record) -{ - $handler->handle($record); -} - -namespace Monolog\Processor; - -use Monolog\Logger; -use Monolog\TestCase; -use Monolog\Handler\TestHandler; - -class IntrospectionProcessorTest extends TestCase -{ - public function getHandler() - { - $processor = new IntrospectionProcessor(); - $handler = new TestHandler(); - $handler->pushProcessor($processor); - - return $handler; - } - - public function testProcessorFromClass() - { - $handler = $this->getHandler(); - $tester = new \Acme\Tester; - $tester->test($handler, $this->getRecord()); - list($record) = $handler->getRecords(); - $this->assertEquals(__FILE__, $record['extra']['file']); - $this->assertEquals(18, $record['extra']['line']); - $this->assertEquals('Acme\Tester', $record['extra']['class']); - $this->assertEquals('test', $record['extra']['function']); - } - - public function testProcessorFromFunc() - { - $handler = $this->getHandler(); - \Acme\tester($handler, $this->getRecord()); - list($record) = $handler->getRecords(); - $this->assertEquals(__FILE__, $record['extra']['file']); - $this->assertEquals(24, $record['extra']['line']); - $this->assertEquals(null, $record['extra']['class']); - $this->assertEquals('Acme\tester', $record['extra']['function']); - } - - public function testLevelTooLow() - { - $input = array( - 'level' => Logger::DEBUG, - 'extra' => array(), - ); - - $expected = $input; - - $processor = new IntrospectionProcessor(Logger::CRITICAL); - $actual = $processor($input); - - $this->assertEquals($expected, $actual); - } - - public function testLevelEqual() - { - $input = array( - 'level' => Logger::CRITICAL, - 'extra' => array(), - ); - - $expected = $input; - $expected['extra'] = array( - 'file' => null, - 'line' => null, - 'class' => 'ReflectionMethod', - 'function' => 'invokeArgs', - ); - - $processor = new IntrospectionProcessor(Logger::CRITICAL); - $actual = $processor($input); - - $this->assertEquals($expected, $actual); - } - - public function testLevelHigher() - { - $input = array( - 'level' => Logger::EMERGENCY, - 'extra' => array(), - ); - - $expected = $input; - $expected['extra'] = array( - 'file' => null, - 'line' => null, - 'class' => 'ReflectionMethod', - 'function' => 'invokeArgs', - ); - - $processor = new IntrospectionProcessor(Logger::CRITICAL); - $actual = $processor($input); - - $this->assertEquals($expected, $actual); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php deleted file mode 100644 index eb66614..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class MemoryPeakUsageProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\MemoryPeakUsageProcessor::__invoke - * @covers Monolog\Processor\MemoryProcessor::formatBytes - */ - public function testProcessor() - { - $processor = new MemoryPeakUsageProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('memory_peak_usage', $record['extra']); - $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_peak_usage']); - } - - /** - * @covers Monolog\Processor\MemoryPeakUsageProcessor::__invoke - * @covers Monolog\Processor\MemoryProcessor::formatBytes - */ - public function testProcessorWithoutFormatting() - { - $processor = new MemoryPeakUsageProcessor(true, false); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('memory_peak_usage', $record['extra']); - $this->assertInternalType('int', $record['extra']['memory_peak_usage']); - $this->assertGreaterThan(0, $record['extra']['memory_peak_usage']); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php deleted file mode 100644 index 4692dbf..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class MemoryUsageProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\MemoryUsageProcessor::__invoke - * @covers Monolog\Processor\MemoryProcessor::formatBytes - */ - public function testProcessor() - { - $processor = new MemoryUsageProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('memory_usage', $record['extra']); - $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_usage']); - } - - /** - * @covers Monolog\Processor\MemoryUsageProcessor::__invoke - * @covers Monolog\Processor\MemoryProcessor::formatBytes - */ - public function testProcessorWithoutFormatting() - { - $processor = new MemoryUsageProcessor(true, false); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('memory_usage', $record['extra']); - $this->assertInternalType('int', $record['extra']['memory_usage']); - $this->assertGreaterThan(0, $record['extra']['memory_usage']); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php deleted file mode 100644 index 11f2b35..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class MercurialProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\MercurialProcessor::__invoke - */ - public function testProcessor() - { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - exec("where hg 2>NUL", $output, $result); - } else { - exec("which hg 2>/dev/null >/dev/null", $output, $result); - } - if ($result != 0) { - $this->markTestSkipped('hg is missing'); - return; - } - - `hg init`; - $processor = new MercurialProcessor(); - $record = $processor($this->getRecord()); - - $this->assertArrayHasKey('hg', $record['extra']); - $this->assertTrue(!is_array($record['extra']['hg']['branch'])); - $this->assertTrue(!is_array($record['extra']['hg']['revision'])); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php deleted file mode 100644 index 458d2a3..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class ProcessIdProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\ProcessIdProcessor::__invoke - */ - public function testProcessor() - { - $processor = new ProcessIdProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('process_id', $record['extra']); - $this->assertInternalType('int', $record['extra']['process_id']); - $this->assertGreaterThan(0, $record['extra']['process_id']); - $this->assertEquals(getmypid(), $record['extra']['process_id']); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php deleted file mode 100644 index 029a0c0..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -class PsrLogMessageProcessorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getPairs - */ - public function testReplacement($val, $expected) - { - $proc = new PsrLogMessageProcessor; - - $message = $proc(array( - 'message' => '{foo}', - 'context' => array('foo' => $val), - )); - $this->assertEquals($expected, $message['message']); - } - - public function getPairs() - { - return array( - array('foo', 'foo'), - array('3', '3'), - array(3, '3'), - array(null, ''), - array(true, '1'), - array(false, ''), - array(new \stdClass, '[object stdClass]'), - array(array(), '[array]'), - ); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php deleted file mode 100644 index 0d860c6..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class TagProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\TagProcessor::__invoke - */ - public function testProcessor() - { - $tags = array(1, 2, 3); - $processor = new TagProcessor($tags); - $record = $processor($this->getRecord()); - - $this->assertEquals($tags, $record['extra']['tags']); - } - - /** - * @covers Monolog\Processor\TagProcessor::__invoke - */ - public function testProcessorTagModification() - { - $tags = array(1, 2, 3); - $processor = new TagProcessor($tags); - - $record = $processor($this->getRecord()); - $this->assertEquals($tags, $record['extra']['tags']); - - $processor->setTags(array('a', 'b')); - $record = $processor($this->getRecord()); - $this->assertEquals(array('a', 'b'), $record['extra']['tags']); - - $processor->addTags(array('a', 'c', 'foo' => 'bar')); - $record = $processor($this->getRecord()); - $this->assertEquals(array('a', 'b', 'a', 'c', 'foo' => 'bar'), $record['extra']['tags']); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php deleted file mode 100644 index 5d13058..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class UidProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\UidProcessor::__invoke - */ - public function testProcessor() - { - $processor = new UidProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('uid', $record['extra']); - } - - public function testGetUid() - { - $processor = new UidProcessor(10); - $this->assertEquals(10, strlen($processor->getUid())); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php b/api/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php deleted file mode 100644 index 4105baf..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class WebProcessorTest extends TestCase -{ - public function testProcessor() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'HTTP_REFERER' => 'D', - 'SERVER_NAME' => 'F', - 'UNIQUE_ID' => 'G', - ); - - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); - $this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']); - $this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']); - $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']); - $this->assertEquals($server['SERVER_NAME'], $record['extra']['server']); - $this->assertEquals($server['UNIQUE_ID'], $record['extra']['unique_id']); - } - - public function testProcessorDoNothingIfNoRequestUri() - { - $server = array( - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - ); - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertEmpty($record['extra']); - } - - public function testProcessorReturnNullIfNoHttpReferer() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'SERVER_NAME' => 'F', - ); - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertNull($record['extra']['referrer']); - } - - public function testProcessorDoesNotAddUniqueIdIfNotPresent() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'SERVER_NAME' => 'F', - ); - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertFalse(isset($record['extra']['unique_id'])); - } - - public function testProcessorAddsOnlyRequestedExtraFields() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'SERVER_NAME' => 'F', - ); - - $processor = new WebProcessor($server, array('url', 'http_method')); - $record = $processor($this->getRecord()); - - $this->assertSame(array('url' => 'A', 'http_method' => 'C'), $record['extra']); - } - - public function testProcessorConfiguringOfExtraFields() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'SERVER_NAME' => 'F', - ); - - $processor = new WebProcessor($server, array('url' => 'REMOTE_ADDR')); - $record = $processor($this->getRecord()); - - $this->assertSame(array('url' => 'B'), $record['extra']); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testInvalidData() - { - new WebProcessor(new \stdClass); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php b/api/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php deleted file mode 100644 index ab89944..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Handler\TestHandler; -use Monolog\Formatter\LineFormatter; -use Monolog\Processor\PsrLogMessageProcessor; -use Psr\Log\Test\LoggerInterfaceTest; - -class PsrLogCompatTest extends LoggerInterfaceTest -{ - private $handler; - - public function getLogger() - { - $logger = new Logger('foo'); - $logger->pushHandler($handler = new TestHandler); - $logger->pushProcessor(new PsrLogMessageProcessor); - $handler->setFormatter(new LineFormatter('%level_name% %message%')); - - $this->handler = $handler; - - return $logger; - } - - public function getLogs() - { - $convert = function ($record) { - $lower = function ($match) { - return strtolower($match[0]); - }; - - return preg_replace_callback('{^[A-Z]+}', $lower, $record['formatted']); - }; - - return array_map($convert, $this->handler->getRecords()); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/RegistryTest.php b/api/vendor/monolog/monolog/tests/Monolog/RegistryTest.php deleted file mode 100644 index 15fdfbd..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/RegistryTest.php +++ /dev/null @@ -1,153 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -class RegistryTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - Registry::clear(); - } - - /** - * @dataProvider hasLoggerProvider - * @covers Monolog\Registry::hasLogger - */ - public function testHasLogger(array $loggersToAdd, array $loggersToCheck, array $expectedResult) - { - foreach ($loggersToAdd as $loggerToAdd) { - Registry::addLogger($loggerToAdd); - } - foreach ($loggersToCheck as $index => $loggerToCheck) { - $this->assertSame($expectedResult[$index], Registry::hasLogger($loggerToCheck)); - } - } - - public function hasLoggerProvider() - { - $logger1 = new Logger('test1'); - $logger2 = new Logger('test2'); - $logger3 = new Logger('test3'); - - return array( - // only instances - array( - array($logger1), - array($logger1, $logger2), - array(true, false), - ), - // only names - array( - array($logger1), - array('test1', 'test2'), - array(true, false), - ), - // mixed case - array( - array($logger1, $logger2), - array('test1', $logger2, 'test3', $logger3), - array(true, true, false, false), - ), - ); - } - - /** - * @covers Monolog\Registry::clear - */ - public function testClearClears() - { - Registry::addLogger(new Logger('test1'), 'log'); - Registry::clear(); - - $this->setExpectedException('\InvalidArgumentException'); - Registry::getInstance('log'); - } - - /** - * @dataProvider removedLoggerProvider - * @covers Monolog\Registry::addLogger - * @covers Monolog\Registry::removeLogger - */ - public function testRemovesLogger($loggerToAdd, $remove) - { - Registry::addLogger($loggerToAdd); - Registry::removeLogger($remove); - - $this->setExpectedException('\InvalidArgumentException'); - Registry::getInstance($loggerToAdd->getName()); - } - - public function removedLoggerProvider() - { - $logger1 = new Logger('test1'); - - return array( - array($logger1, $logger1), - array($logger1, 'test1'), - ); - } - - /** - * @covers Monolog\Registry::addLogger - * @covers Monolog\Registry::getInstance - * @covers Monolog\Registry::__callStatic - */ - public function testGetsSameLogger() - { - $logger1 = new Logger('test1'); - $logger2 = new Logger('test2'); - - Registry::addLogger($logger1, 'test1'); - Registry::addLogger($logger2); - - $this->assertSame($logger1, Registry::getInstance('test1')); - $this->assertSame($logger2, Registry::test2()); - } - - /** - * @expectedException \InvalidArgumentException - * @covers Monolog\Registry::getInstance - */ - public function testFailsOnNonExistantLogger() - { - Registry::getInstance('test1'); - } - - /** - * @covers Monolog\Registry::addLogger - */ - public function testReplacesLogger() - { - $log1 = new Logger('test1'); - $log2 = new Logger('test2'); - - Registry::addLogger($log1, 'log'); - - Registry::addLogger($log2, 'log', true); - - $this->assertSame($log2, Registry::getInstance('log')); - } - - /** - * @expectedException \InvalidArgumentException - * @covers Monolog\Registry::addLogger - */ - public function testFailsOnUnspecifiedReplacement() - { - $log1 = new Logger('test1'); - $log2 = new Logger('test2'); - - Registry::addLogger($log1, 'log'); - - Registry::addLogger($log2, 'log'); - } -} diff --git a/api/vendor/monolog/monolog/tests/Monolog/TestCase.php b/api/vendor/monolog/monolog/tests/Monolog/TestCase.php deleted file mode 100644 index 4eb7b4c..0000000 --- a/api/vendor/monolog/monolog/tests/Monolog/TestCase.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -class TestCase extends \PHPUnit_Framework_TestCase -{ - /** - * @return array Record - */ - protected function getRecord($level = Logger::WARNING, $message = 'test', $context = array()) - { - return array( - 'message' => $message, - 'context' => $context, - 'level' => $level, - 'level_name' => Logger::getLevelName($level), - 'channel' => 'test', - 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true))), - 'extra' => array(), - ); - } - - /** - * @return array - */ - protected function getMultipleRecords() - { - return array( - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - $this->getRecord(Logger::WARNING, 'warning'), - $this->getRecord(Logger::ERROR, 'error'), - ); - } - - /** - * @return Monolog\Formatter\FormatterInterface - */ - protected function getIdentityFormatter() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter->expects($this->any()) - ->method('format') - ->will($this->returnCallback(function ($record) { return $record['message']; })); - - return $formatter; - } -} diff --git a/api/vendor/mtdowling/cron-expression/composer.json b/api/vendor/mtdowling/cron-expression/composer.json index ce42d40..d68c9ec 100644 --- a/api/vendor/mtdowling/cron-expression/composer.json +++ b/api/vendor/mtdowling/cron-expression/composer.json @@ -24,5 +24,6 @@ "psr-4": { "Tests\\": "tests/Cron/" } - } -} \ No newline at end of file + }, + "abandoned": "dragonmantank/cron-expression" +} diff --git a/api/vendor/myclabs/deep-copy/.gitattributes b/api/vendor/myclabs/deep-copy/.gitattributes deleted file mode 100644 index 8018068..0000000 --- a/api/vendor/myclabs/deep-copy/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -*.png binary - -tests/ export-ignore -phpunit.xml.dist export-ignore diff --git a/api/vendor/myclabs/deep-copy/.github/FUNDING.yml b/api/vendor/myclabs/deep-copy/.github/FUNDING.yml new file mode 100644 index 0000000..b8da664 --- /dev/null +++ b/api/vendor/myclabs/deep-copy/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: "packagist/myclabs/deep-copy" +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/api/vendor/myclabs/deep-copy/.github/workflows/ci.yaml b/api/vendor/myclabs/deep-copy/.github/workflows/ci.yaml new file mode 100644 index 0000000..eac2812 --- /dev/null +++ b/api/vendor/myclabs/deep-copy/.github/workflows/ci.yaml @@ -0,0 +1,101 @@ +name: "Continuous Integration" + +on: + - pull_request + - push + +env: + COMPOSER_ROOT_VERSION: 1.99 + +jobs: + composer-json-lint: + name: "Lint composer.json" + + runs-on: "ubuntu-latest" + + strategy: + matrix: + php-version: + - "8.1" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + tools: composer-normalize + + - name: "Get composer cache directory" + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: "Cache dependencies" + uses: actions/cache@v2 + with: + path: ${{ steps.composercache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- + + - name: "Install dependencies" + run: "composer update --no-interaction --no-progress" + + - name: "Validate composer.json" + run: "composer validate --strict" + + - name: "Normalize composer.json" + run: "composer-normalize --dry-run" + + tests: + name: "Tests" + + runs-on: "ubuntu-latest" + + strategy: + matrix: + php-version: + - "7.1" + - "7.2" + - "7.3" + - "7.4" + - "8.0" + - "8.1" + dependencies: + - "lowest" + - "highest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php-version }}" + ini-values: zend.assertions=1 + + - name: "Get composer cache directory" + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: "Cache dependencies" + uses: actions/cache@v2 + with: + path: ${{ steps.composercache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- + + - name: "Install lowest dependencies" + if: ${{ matrix.dependencies == 'lowest' }} + run: "composer update --no-interaction --no-progress --prefer-lowest" + + - name: "Install highest dependencies" + if: ${{ matrix.dependencies == 'highest' }} + run: "composer update --no-interaction --no-progress" + + - name: "Run tests" + timeout-minutes: 3 + run: "vendor/bin/phpunit" diff --git a/api/vendor/myclabs/deep-copy/.gitignore b/api/vendor/myclabs/deep-copy/.gitignore deleted file mode 100644 index 9354171..0000000 --- a/api/vendor/myclabs/deep-copy/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -.idea/* - -vendor/* -composer.phar -composer.lock diff --git a/api/vendor/myclabs/deep-copy/.travis.yml b/api/vendor/myclabs/deep-copy/.travis.yml deleted file mode 100644 index 347c6e7..0000000 --- a/api/vendor/myclabs/deep-copy/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: php - -php: - - '5.5' - - '5.6' - - '7.0' - - '7.1' - - nightly - - hhvm - -matrix: - fast_finish: true - include: - - php: '5.4' - env: COMPOSER_FLAGS="--prefer-lowest" - allow_failures: - - php: nightly - - php: hhvm - -before_install: - - | - if [ "$TRAVIS_PHP_VERSION" = "nightly" ] || "$TRAVIS_PHP_VERSION" = "7.1" ]; then - COMPOSER_FLAGS="$COMPOSER_FLAGS --ignore-platform-reqs" - fi; - -install: - - composer update -n --prefer-dist $COMPOSER_FLAGS - - wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.0/coveralls.phar - -before_script: - - mkdir -p build/logs - -script: - - vendor/bin/phpunit --coverage-clover build/logs/clover.xml - -after_script: - - php coveralls.phar -v diff --git a/api/vendor/myclabs/deep-copy/README.md b/api/vendor/myclabs/deep-copy/README.md index 853b761..503e93d 100644 --- a/api/vendor/myclabs/deep-copy/README.md +++ b/api/vendor/myclabs/deep-copy/README.md @@ -2,16 +2,15 @@ DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph. -[![Build Status](https://travis-ci.org/myclabs/DeepCopy.png?branch=master)](https://travis-ci.org/myclabs/DeepCopy) [![Coverage Status](https://coveralls.io/repos/myclabs/DeepCopy/badge.png?branch=master)](https://coveralls.io/r/myclabs/DeepCopy?branch=master) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/myclabs/DeepCopy/badges/quality-score.png?s=2747100c19b275f93a777e3297c6c12d1b68b934)](https://scrutinizer-ci.com/g/myclabs/DeepCopy/) [![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy) - +[![Integrate](https://github.com/myclabs/DeepCopy/workflows/ci/badge.svg?branch=1.x)](https://github.com/myclabs/DeepCopy/actions) ## Table of Contents 1. [How](#how) 1. [Why](#why) 1. [Using simply `clone`](#using-simply-clone) - 1. [Overridding `__clone()`](#overridding-__clone) + 1. [Overriding `__clone()`](#overriding-__clone) 1. [With `DeepCopy`](#with-deepcopy) 1. [How it works](#how-it-works) 1. [Going further](#going-further) @@ -20,30 +19,33 @@ DeepCopy helps you create deep copies (clones) of your objects. It is designed t 1. [Specific property](#specific-property) 1. [Type](#type) 1. [Filters](#filters) - 1. [`SetNullFilter`](#setnullfilter) - 1. [`KeepFilter`](#keepfilter) - 1. [`ReplaceFilter`](#replacefilter) - 1. [`ShallowCopyFilter`](#doctrinecollectionfilter) - 1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter) - 1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter) + 1. [`SetNullFilter`](#setnullfilter-filter) + 1. [`KeepFilter`](#keepfilter-filter) + 1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter-filter) + 1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter-filter) + 1. [`DoctrineProxyFilter`](#doctrineproxyfilter-filter) + 1. [`ReplaceFilter`](#replacefilter-type-filter) + 1. [`ShallowCopyFilter`](#shallowcopyfilter-type-filter) +1. [Edge cases](#edge-cases) 1. [Contributing](#contributing) 1. [Tests](#tests) + ## How? Install with Composer: -```json +``` composer require myclabs/deep-copy ``` -Use simply: +Use it: ```php use DeepCopy\DeepCopy; -$deepCopy = new DeepCopy(); -$myCopy = $deepCopy->copy($myObject); +$copier = new DeepCopy(); +$myCopy = $copier->copy($myObject); ``` @@ -57,7 +59,8 @@ $myCopy = clone $myObject; - How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)? -You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior yourself. +You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior +yourself. - But how do you handle **cycles** in the association graph? @@ -65,37 +68,82 @@ Now you're in for a big mess :( ![association graph](doc/graph.png) + ### Using simply `clone` ![Using clone](doc/clone.png) -### Overridding `__clone()` -![Overridding __clone](doc/deep-clone.png) +### Overriding `__clone()` + +![Overriding __clone](doc/deep-clone.png) + ### With `DeepCopy` ![With DeepCopy](doc/deep-copy.png) + ## How it works -DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it keeps a hash map of all instances and thus preserves the object graph. +DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it +keeps a hash map of all instances and thus preserves the object graph. + +To use it: + +```php +use function DeepCopy\deep_copy; + +$copy = deep_copy($var); +``` + +Alternatively, you can create your own `DeepCopy` instance to configure it differently for example: + +```php +use DeepCopy\DeepCopy; + +$copier = new DeepCopy(true); + +$copy = $copier->copy($var); +``` + +You may want to roll your own deep copy function: + +```php +namespace Acme; + +use DeepCopy\DeepCopy; + +function deep_copy($var) +{ + static $copier = null; + + if (null === $copier) { + $copier = new DeepCopy(true); + } + + return $copier->copy($var); +} +``` + ## Going further You can add filters to customize the copy process. -The method to add a filter is `$deepCopy->addFilter($filter, $matcher)`, +The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`, with `$filter` implementing `DeepCopy\Filter\Filter` and `$matcher` implementing `DeepCopy\Matcher\Matcher`. We provide some generic filters and matchers. + ### Matchers - `DeepCopy\Matcher` applies on a object attribute. - `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements. + #### Property name The `PropertyNameMatcher` will match a property by its name: @@ -103,10 +151,11 @@ The `PropertyNameMatcher` will match a property by its name: ```php use DeepCopy\Matcher\PropertyNameMatcher; +// Will apply a filter to any property of any objects named "id" $matcher = new PropertyNameMatcher('id'); -// will apply a filter to any property of any objects named "id" ``` + #### Specific property The `PropertyMatcher` will match a specific property of a specific class: @@ -114,46 +163,53 @@ The `PropertyMatcher` will match a specific property of a specific class: ```php use DeepCopy\Matcher\PropertyMatcher; +// Will apply a filter to the property "id" of any objects of the class "MyClass" $matcher = new PropertyMatcher('MyClass', 'id'); -// will apply a filter to the property "id" of any objects of the class "MyClass" ``` + #### Type -The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of [gettype()](http://php.net/manual/en/function.gettype.php) function): +The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of +[gettype()](http://php.net/manual/en/function.gettype.php) function): ```php use DeepCopy\TypeMatcher\TypeMatcher; +// Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection $matcher = new TypeMatcher('Doctrine\Common\Collections\Collection'); -// will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection ``` + ### Filters - - `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher`. - - `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher`. +- `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher` +- `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher` -#### `SetNullFilter` -Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have any ID: +#### `SetNullFilter` (filter) + +Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have +any ID: ```php use DeepCopy\DeepCopy; use DeepCopy\Filter\SetNullFilter; use DeepCopy\Matcher\PropertyNameMatcher; -$myObject = MyClass::load(123); -echo $myObject->id; // 123 +$object = MyClass::load(123); +echo $object->id; // 123 -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); -$myCopy = $deepCopy->copy($myObject); +$copier = new DeepCopy(); +$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); -echo $myCopy->id; // null +$copy = $copier->copy($object); + +echo $copy->id; // null ``` -#### `KeepFilter` + +#### `KeepFilter` (filter) If you want a property to remain untouched (for example, an association to an object): @@ -162,53 +218,114 @@ use DeepCopy\DeepCopy; use DeepCopy\Filter\KeepFilter; use DeepCopy\Matcher\PropertyMatcher; -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category')); -$myCopy = $deepCopy->copy($myObject); +$copier = new DeepCopy(); +$copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category')); -// $myCopy->category has not been touched +$copy = $copier->copy($object); +// $copy->category has not been touched ``` -#### `ReplaceFilter` - 1. If you want to replace the value of a property: +#### `DoctrineCollectionFilter` (filter) - ```php - use DeepCopy\DeepCopy; - use DeepCopy\Filter\ReplaceFilter; - use DeepCopy\Matcher\PropertyMatcher; +If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`: - $deepCopy = new DeepCopy(); - $callback = function ($currentValue) { - return $currentValue . ' (copy)' - }; - $deepCopy->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title')); - $myCopy = $deepCopy->copy($myObject); +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter; +use DeepCopy\Matcher\PropertyTypeMatcher; - // $myCopy->title will contain the data returned by the callback, e.g. 'The title (copy)' - ``` +$copier = new DeepCopy(); +$copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')); - 2. If you want to replace whole element: +$copy = $copier->copy($object); +``` - ```php - use DeepCopy\DeepCopy; - use DeepCopy\TypeFilter\ReplaceFilter; - use DeepCopy\TypeMatcher\TypeMatcher; - $deepCopy = new DeepCopy(); - $callback = function (MyClass $myClass) { - return get_class($myClass); - }; - $deepCopy->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass')); - $myCopy = $deepCopy->copy(array(new MyClass, 'some string', new MyClass)); +#### `DoctrineEmptyCollectionFilter` (filter) - // $myCopy will contain ['MyClass', 'some string', 'MyClass'] - ``` +If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the +`DoctrineEmptyCollectionFilter` + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter; +use DeepCopy\Matcher\PropertyMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty')); + +$copy = $copier->copy($object); + +// $copy->myProperty will return an empty collection +``` + + +#### `DoctrineProxyFilter` (filter) + +If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a +Doctrine proxy class (...\\\_\_CG\_\_\Proxy). +You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class. +**Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded +before other filters are applied!** + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; +use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher()); + +$copy = $copier->copy($object); + +// $copy should now contain a clone of all entities, including those that were not yet fully loaded. +``` + + +#### `ReplaceFilter` (type filter) + +1. If you want to replace the value of a property: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\ReplaceFilter; +use DeepCopy\Matcher\PropertyMatcher; + +$copier = new DeepCopy(); +$callback = function ($currentValue) { + return $currentValue . ' (copy)' +}; +$copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title')); + +$copy = $copier->copy($object); + +// $copy->title will contain the data returned by the callback, e.g. 'The title (copy)' +``` + +2. If you want to replace whole element: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\TypeFilter\ReplaceFilter; +use DeepCopy\TypeMatcher\TypeMatcher; + +$copier = new DeepCopy(); +$callback = function (MyClass $myClass) { + return get_class($myClass); +}; +$copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass')); + +$copy = $copier->copy([new MyClass, 'some string', new MyClass]); + +// $copy will contain ['MyClass', 'some string', 'MyClass'] +``` The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable. -#### `ShallowCopyFilter` + +#### `ShallowCopyFilter` (type filter) Stop *DeepCopy* from recursively copying element, using standard `clone` instead: @@ -225,66 +342,32 @@ $this->deepCopy->addTypeFilter( ); $myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class)); -// all mocks will be just cloned, not deep-copied +// All mocks will be just cloned, not deep copied ``` -#### `DoctrineCollectionFilter` -If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`: +## Edge cases -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter; -use DeepCopy\Matcher\PropertyTypeMatcher; +The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are +not applied. There is two ways for you to handle them: -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')); -$myCopy = $deepCopy->copy($myObject); -``` +- Implement your own `__clone()` method +- Use a filter with a type matcher -#### `DoctrineEmptyCollectionFilter` - -If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the `DoctrineEmptyCollectionFilter` - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty')); -$myCopy = $deepCopy->copy($myObject); - -// $myCopy->myProperty will return an empty collection -``` - -#### `DoctrineProxyFilter` - -If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a -Doctrine proxy class (...\\\_\_CG\_\_\Proxy). -You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class. -**Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded before other filters are applied!** - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; -use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; - -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher()); -$myCopy = $deepCopy->copy($myObject); - -// $myCopy should now contain a clone of all entities, including those that were not yet fully loaded. -``` ## Contributing DeepCopy is distributed under the MIT license. + ### Tests Running the tests is simple: ```php -phpunit +vendor/bin/phpunit ``` + +### Support + +Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme). diff --git a/api/vendor/myclabs/deep-copy/composer.json b/api/vendor/myclabs/deep-copy/composer.json index d20287a..66fb34a 100644 --- a/api/vendor/myclabs/deep-copy/composer.json +++ b/api/vendor/myclabs/deep-copy/composer.json @@ -1,21 +1,42 @@ { "name": "myclabs/deep-copy", - "type": "library", "description": "Create deep copies (clones) of your objects", - "keywords": ["clone", "copy", "duplicate", "object", "object graph"], - "homepage": "https://github.com/myclabs/DeepCopy", "license": "MIT", - "autoload": { - "psr-4": { "DeepCopy\\": "src/DeepCopy/" } - }, - "autoload-dev": { - "psr-4": { "DeepCopyTest\\": "tests/DeepCopyTest/" } - }, + "type": "library", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], "require": { - "php": ">=5.4.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "autoload-dev": { + "psr-4": { + "DeepCopy\\": "fixtures/", + "DeepCopyTest\\": "tests/DeepCopyTest/" + } + }, + "config": { + "sort-packages": true } } diff --git a/api/vendor/myclabs/deep-copy/doc/clone.png b/api/vendor/myclabs/deep-copy/doc/clone.png deleted file mode 100644 index 376afd4..0000000 Binary files a/api/vendor/myclabs/deep-copy/doc/clone.png and /dev/null differ diff --git a/api/vendor/myclabs/deep-copy/doc/deep-clone.png b/api/vendor/myclabs/deep-copy/doc/deep-clone.png deleted file mode 100644 index 2b37a6d..0000000 Binary files a/api/vendor/myclabs/deep-copy/doc/deep-clone.png and /dev/null differ diff --git a/api/vendor/myclabs/deep-copy/doc/deep-copy.png b/api/vendor/myclabs/deep-copy/doc/deep-copy.png deleted file mode 100644 index 68c508a..0000000 Binary files a/api/vendor/myclabs/deep-copy/doc/deep-copy.png and /dev/null differ diff --git a/api/vendor/myclabs/deep-copy/doc/graph.png b/api/vendor/myclabs/deep-copy/doc/graph.png deleted file mode 100644 index 4d5c942..0000000 Binary files a/api/vendor/myclabs/deep-copy/doc/graph.png and /dev/null differ diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php index aee9e72..5e68c64 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php @@ -2,37 +2,50 @@ namespace DeepCopy; +use ArrayObject; +use DateInterval; +use DateTimeInterface; +use DateTimeZone; use DeepCopy\Exception\CloneException; use DeepCopy\Filter\Filter; use DeepCopy\Matcher\Matcher; -use DeepCopy\TypeFilter\Spl\SplDoublyLinkedList; +use DeepCopy\Reflection\ReflectionHelper; +use DeepCopy\TypeFilter\Date\DateIntervalFilter; +use DeepCopy\TypeFilter\Spl\ArrayObjectFilter; +use DeepCopy\TypeFilter\Spl\SplDoublyLinkedListFilter; use DeepCopy\TypeFilter\TypeFilter; use DeepCopy\TypeMatcher\TypeMatcher; +use ReflectionObject; use ReflectionProperty; -use DeepCopy\Reflection\ReflectionHelper; +use SplDoublyLinkedList; /** - * DeepCopy + * @final */ class DeepCopy { /** - * @var array + * @var object[] List of objects copied. */ private $hashMap = []; /** * Filters to apply. - * @var array + * + * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs. */ private $filters = []; /** * Type Filters to apply. - * @var array + * + * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs. */ private $typeFilters = []; + /** + * @var bool + */ private $skipUncloneable = false; /** @@ -48,23 +61,30 @@ class DeepCopy { $this->useCloneMethod = $useCloneMethod; - $this->addTypeFilter(new SplDoublyLinkedList($this), new TypeMatcher('\SplDoublyLinkedList')); + $this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class)); + $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class)); + $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class)); } /** - * Cloning uncloneable properties won't throw exception. + * If enabled, will not throw an exception when coming across an uncloneable property. + * * @param $skipUncloneable + * * @return $this */ public function skipUncloneable($skipUncloneable = true) { $this->skipUncloneable = $skipUncloneable; + return $this; } /** - * Perform a deep copy of the object. + * Deep copies the given object. + * * @param mixed $object + * * @return mixed */ public function copy($object) @@ -82,6 +102,14 @@ class DeepCopy ]; } + public function prependFilter(Filter $filter, Matcher $matcher) + { + array_unshift($this->filters, [ + 'matcher' => $matcher, + 'filter' => $filter, + ]); + } + public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) { $this->typeFilters[] = [ @@ -90,7 +118,6 @@ class DeepCopy ]; } - private function recursiveCopy($var) { // Matches Type Filter @@ -102,14 +129,22 @@ class DeepCopy if (is_resource($var)) { return $var; } + // Array if (is_array($var)) { return $this->copyArray($var); } + // Scalar if (! is_object($var)) { return $var; } + + // Enum + if (PHP_VERSION_ID >= 80100 && enum_exists(get_class($var))) { + return $var; + } + // Object return $this->copyObject($var); } @@ -129,8 +164,12 @@ class DeepCopy } /** - * Copy an object + * Copies an object. + * * @param object $object + * + * @throws CloneException + * * @return object */ private function copyObject($object) @@ -141,29 +180,35 @@ class DeepCopy return $this->hashMap[$objectHash]; } - $reflectedObject = new \ReflectionObject($object); - - if (false === $isCloneable = $reflectedObject->isCloneable() and $this->skipUncloneable) { - $this->hashMap[$objectHash] = $object; - return $object; - } + $reflectedObject = new ReflectionObject($object); + $isCloneable = $reflectedObject->isCloneable(); if (false === $isCloneable) { - throw new CloneException(sprintf( - 'Class "%s" is not cloneable.', - $reflectedObject->getName() - )); + if ($this->skipUncloneable) { + $this->hashMap[$objectHash] = $object; + + return $object; + } + + throw new CloneException( + sprintf( + 'The class "%s" is not cloneable.', + $reflectedObject->getName() + ) + ); } $newObject = clone $object; $this->hashMap[$objectHash] = $newObject; - if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) { - return $object; - } - if ($newObject instanceof \DateTimeInterface) { + if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) { return $newObject; } + + if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) { + return $newObject; + } + foreach (ReflectionHelper::getProperties($reflectedObject) as $property) { $this->copyObjectProperty($newObject, $property); } @@ -193,12 +238,19 @@ class DeepCopy return $this->recursiveCopy($object); } ); + // If a filter matches, we stop processing this property return; } } $property->setAccessible(true); + + // Ignore uninitialized properties (for PHP >7.4) + if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) { + return; + } + $propertyValue = $property->getValue($object); // Copy the property @@ -206,10 +258,12 @@ class DeepCopy } /** - * Returns first filter that matches variable, NULL if no such filter found. + * Returns first filter that matches variable, `null` if no such filter found. + * * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and * 'matcher' with value of type {@see TypeMatcher} * @param mixed $var + * * @return TypeFilter|null */ private function getFirstMatchedTypeFilter(array $filterRecords, $var) @@ -228,10 +282,13 @@ class DeepCopy } /** - * Returns first element that matches predicate, NULL if no such element found. - * @param array $elements + * Returns first element that matches predicate, `null` if no such element found. + * + * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs. * @param callable $predicate Predicate arguments are: element. - * @return mixed|null + * + * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher' + * with value of type {@see TypeMatcher} or `null`. */ private function first(array $elements, callable $predicate) { diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php index dd3b617..c046706 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php @@ -1,6 +1,9 @@ setAccessible(true); $oldCollection = $reflectionProperty->getValue($object); diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php index f9b3f7a..7b33fd5 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php @@ -3,12 +3,16 @@ namespace DeepCopy\Filter\Doctrine; use DeepCopy\Filter\Filter; +use DeepCopy\Reflection\ReflectionHelper; use Doctrine\Common\Collections\ArrayCollection; +/** + * @final + */ class DoctrineEmptyCollectionFilter implements Filter { /** - * Apply the filter to the object. + * Sets the object property to an empty doctrine collection. * * @param object $object * @param string $property @@ -16,7 +20,7 @@ class DoctrineEmptyCollectionFilter implements Filter */ public function apply($object, $property, $objectCopier) { - $reflectionProperty = new \ReflectionProperty($object, $property); + $reflectionProperty = ReflectionHelper::getProperty($object, $property); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($object, new ArrayCollection()); diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php index a855277..8bee8f7 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php @@ -5,12 +5,14 @@ namespace DeepCopy\Filter\Doctrine; use DeepCopy\Filter\Filter; /** - * Trigger the magic method __load() on a Doctrine Proxy class to load the - * actual entity from the database. + * @final */ class DoctrineProxyFilter implements Filter { /** + * Triggers the magic method __load() on a Doctrine Proxy class to load the + * actual entity from the database. + * * {@inheritdoc} */ public function apply($object, $property, $objectCopier) diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php index 48076a1..85ba18c 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php @@ -8,7 +8,8 @@ namespace DeepCopy\Filter; interface Filter { /** - * Apply the filter to the object. + * Applies the filter to the object. + * * @param object $object * @param string $property * @param callable $objectCopier diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php index 14c55e7..4b11a08 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php @@ -2,12 +2,11 @@ namespace DeepCopy\Filter; -/** - * Keep the value of a property - */ class KeepFilter implements Filter { /** + * Keeps the value of the object property. + * * {@inheritdoc} */ public function apply($object, $property, $objectCopier) diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php index fce7114..7aca593 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php @@ -2,8 +2,10 @@ namespace DeepCopy\Filter; +use DeepCopy\Reflection\ReflectionHelper; + /** - * Replace the value of a property + * @final */ class ReplaceFilter implements Filter { @@ -21,11 +23,13 @@ class ReplaceFilter implements Filter } /** + * Replaces the object property by the result of the callback called with the object property. + * * {@inheritdoc} */ public function apply($object, $property, $objectCopier) { - $reflectionProperty = new \ReflectionProperty($object, $property); + $reflectionProperty = ReflectionHelper::getProperty($object, $property); $reflectionProperty->setAccessible(true); $value = call_user_func($this->callback, $reflectionProperty->getValue($object)); diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php index d48f15b..bea86b8 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php @@ -2,19 +2,21 @@ namespace DeepCopy\Filter; -use ReflectionProperty; +use DeepCopy\Reflection\ReflectionHelper; /** - * Set a null value for a property + * @final */ class SetNullFilter implements Filter { /** + * Sets the object property to null. + * * {@inheritdoc} */ public function apply($object, $property, $objectCopier) { - $reflectionProperty = new ReflectionProperty($object, $property); + $reflectionProperty = ReflectionHelper::getProperty($object, $property); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($object, null); diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php index 6a7bcf5..c5887b1 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php @@ -3,14 +3,16 @@ namespace DeepCopy\Matcher\Doctrine; use DeepCopy\Matcher\Matcher; -use Doctrine\Common\Persistence\Proxy; +use Doctrine\Persistence\Proxy; /** - * Match a Doctrine Proxy class. + * @final */ class DoctrineProxyMatcher implements Matcher { /** + * Matches a Doctrine Proxy class. + * * {@inheritdoc} */ public function matches($object, $property) diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php index 91eb7c9..d67f3ca 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php @@ -2,14 +2,12 @@ namespace DeepCopy\Matcher; -/** - * Matcher interface - */ interface Matcher { /** * @param object $object * @param string $property + * * @return boolean */ public function matches($object, $property); diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php index 03ef68c..073b20c 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php @@ -3,7 +3,7 @@ namespace DeepCopy\Matcher; /** - * Match a specific property of a specific class + * @final */ class PropertyMatcher implements Matcher { @@ -28,10 +28,12 @@ class PropertyMatcher implements Matcher } /** + * Matches a specific property of a specific class. + * * {@inheritdoc} */ public function matches($object, $property) { - return ($object instanceof $this->class) && ($property == $this->property); + return ($object instanceof $this->class) && $property == $this->property; } } diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php index 9d9575f..c8ec0d2 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php @@ -3,7 +3,7 @@ namespace DeepCopy\Matcher; /** - * Match a property by its name + * @final */ class PropertyNameMatcher implements Matcher { @@ -21,6 +21,8 @@ class PropertyNameMatcher implements Matcher } /** + * Matches a property by its name. + * * {@inheritdoc} */ public function matches($object, $property) diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php index da116c1..c7f4690 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php @@ -2,13 +2,16 @@ namespace DeepCopy\Matcher; -use ReflectionProperty; +use DeepCopy\Reflection\ReflectionHelper; +use ReflectionException; /** - * Match a property by its type + * Matches a property by its type. * * It is recommended to use {@see DeepCopy\TypeFilter\TypeFilter} instead, as it applies on all occurrences * of given type in copied context (eg. array elements), not just on object properties. + * + * @final */ class PropertyTypeMatcher implements Matcher { @@ -30,9 +33,20 @@ class PropertyTypeMatcher implements Matcher */ public function matches($object, $property) { - $reflectionProperty = new ReflectionProperty($object, $property); + try { + $reflectionProperty = ReflectionHelper::getProperty($object, $property); + } catch (ReflectionException $exception) { + return false; + } + $reflectionProperty->setAccessible(true); + // Uninitialized properties (for PHP >7.4) + if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) { + // null instanceof $this->propertyType + return false; + } + return $reflectionProperty->getValue($object) instanceof $this->propertyType; } } diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php index a094e72..742410c 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php @@ -2,6 +2,12 @@ namespace DeepCopy\Reflection; +use DeepCopy\Exception\PropertyException; +use ReflectionClass; +use ReflectionException; +use ReflectionObject; +use ReflectionProperty; + class ReflectionHelper { /** @@ -12,10 +18,11 @@ class ReflectionHelper * @author muratyaman@gmail.com * @see http://php.net/manual/en/reflectionclass.getproperties.php * - * @param \ReflectionClass $ref - * @return \ReflectionProperty[] + * @param ReflectionClass $ref + * + * @return ReflectionProperty[] */ - public static function getProperties(\ReflectionClass $ref) + public static function getProperties(ReflectionClass $ref) { $props = $ref->getProperties(); $propsArr = array(); @@ -36,4 +43,36 @@ class ReflectionHelper return $propsArr; } + + /** + * Retrieves property by name from object and all its ancestors. + * + * @param object|string $object + * @param string $name + * + * @throws PropertyException + * @throws ReflectionException + * + * @return ReflectionProperty + */ + public static function getProperty($object, $name) + { + $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object); + + if ($reflection->hasProperty($name)) { + return $reflection->getProperty($name); + } + + if ($parentClass = $reflection->getParentClass()) { + return self::getProperty($parentClass->getName(), $name); + } + + throw new PropertyException( + sprintf( + 'The class "%s" doesn\'t have a property with the given name: "%s".', + is_object($object) ? get_class($object) : $object, + $name + ) + ); + } } diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php new file mode 100644 index 0000000..becd1cf --- /dev/null +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php @@ -0,0 +1,33 @@ + $propertyValue) { + $copy->{$propertyName} = $propertyValue; + } + + return $copy; + } +} diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php index 0e42b0f..164f8b8 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php @@ -2,6 +2,9 @@ namespace DeepCopy\TypeFilter; +/** + * @final + */ class ReplaceFilter implements TypeFilter { /** diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php index 408d18b..a5fbd7a 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php @@ -2,6 +2,9 @@ namespace DeepCopy\TypeFilter; +/** + * @final + */ class ShallowCopyFilter implements TypeFilter { /** diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php new file mode 100644 index 0000000..1784601 --- /dev/null +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php @@ -0,0 +1,36 @@ +copier = $copier; + } + + /** + * {@inheritdoc} + */ + public function apply($arrayObject) + { + $clone = clone $arrayObject; + foreach ($arrayObject->getArrayCopy() as $k => $v) { + $clone->offsetSet($k, $this->copier->copy($v)); + } + + return $clone; + } +} + diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php index 2bdc537..c5644cf 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php @@ -2,36 +2,9 @@ namespace DeepCopy\TypeFilter\Spl; -use DeepCopy\DeepCopy; -use DeepCopy\TypeFilter\TypeFilter; - -class SplDoublyLinkedList implements TypeFilter +/** + * @deprecated Use {@see SplDoublyLinkedListFilter} instead. + */ +class SplDoublyLinkedList extends SplDoublyLinkedListFilter { - /** - * @var DeepCopy - */ - private $deepCopy; - - public function __construct(DeepCopy $deepCopy) - { - $this->deepCopy = $deepCopy; - } - - /** - * {@inheritdoc} - */ - public function apply($element) - { - $newElement = clone $element; - - if ($element instanceof \SplDoublyLinkedList) { - // Replace each element in the list with a deep copy of itself - for ($i = 1; $i <= $newElement->count(); $i++) { - $newElement->push($this->deepCopy->copy($newElement->shift())); - } - } - - return $newElement; - - } } diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php new file mode 100644 index 0000000..c33be45 --- /dev/null +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php @@ -0,0 +1,51 @@ +copier = $copier; + } + + /** + * {@inheritdoc} + */ + public function apply($element) + { + $newElement = clone $element; + + $copy = $this->createCopyClosure(); + + return $copy($newElement); + } + + private function createCopyClosure() + { + $copier = $this->copier; + + $copy = function (SplDoublyLinkedList $list) use ($copier) { + // Replace each element in the list with a deep copy of itself + for ($i = 1; $i <= $list->count(); $i++) { + $copy = $copier->recursiveCopy($list->shift()); + + $list->push($copy); + } + + return $list; + }; + + return Closure::bind($copy, null, DeepCopy::class); + } +} diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php index a37a8ba..5785a7d 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php @@ -5,7 +5,8 @@ namespace DeepCopy\TypeFilter; interface TypeFilter { /** - * Apply the filter to the object. + * Applies the filter to the object. + * * @param mixed $element */ public function apply($element); diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php index e640f31..a563cb2 100644 --- a/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php @@ -2,9 +2,6 @@ namespace DeepCopy\TypeMatcher; -/** - * TypeMatcher class - */ class TypeMatcher { /** @@ -21,7 +18,8 @@ class TypeMatcher } /** - * @param $element + * @param mixed $element + * * @return boolean */ public function matches($element) diff --git a/api/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php b/api/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php new file mode 100644 index 0000000..55dcc92 --- /dev/null +++ b/api/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php @@ -0,0 +1,20 @@ +copy($value); + } +} diff --git a/api/vendor/nesbot/carbon/.php_cs.dist b/api/vendor/nesbot/carbon/.php_cs.dist deleted file mode 100644 index ff8b56f..0000000 --- a/api/vendor/nesbot/carbon/.php_cs.dist +++ /dev/null @@ -1,57 +0,0 @@ - true, - 'array_syntax' => [ - 'syntax' => 'long', - ], - 'binary_operator_spaces' => [ - 'align_double_arrow' => false, - 'align_equals' => false, - ], - 'blank_line_before_return' => true, - 'cast_spaces' => true, - 'concat_space' => [ - 'spacing' => 'none', - ], - 'ereg_to_preg' => true, - 'method_separation' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_extra_consecutive_blank_lines' => true, - 'no_short_bool_cast' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unused_imports' => true, - 'no_whitespace_in_blank_line' => true, - 'ordered_imports' => true, - 'phpdoc_align' => true, - 'phpdoc_indent' => true, - 'phpdoc_inline_tag' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_alias_tag' => [ - 'type' => 'var', - ], - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_var_without_name' => true, - 'self_accessor' => true, - 'single_quote' => true, - 'space_after_semicolon' => true, - 'standardize_not_equals' => true, - 'ternary_operator_spaces' => true, - 'trailing_comma_in_multiline_array' => true, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, -]; - -return Config::create()->setRules($rules) - ->setFinder(Finder::create()->in(__DIR__)) - ->setUsingCache(true) - ->setRiskyAllowed(true); \ No newline at end of file diff --git a/api/vendor/nesbot/carbon/bin/upgrade-carbon b/api/vendor/nesbot/carbon/bin/upgrade-carbon new file mode 100755 index 0000000..49c4c9a --- /dev/null +++ b/api/vendor/nesbot/carbon/bin/upgrade-carbon @@ -0,0 +1,34 @@ +#!/usr/bin/env php +=5.3.0", - "symfony/translation": "~2.6 || ~3.0" + "php": ">=5.3.9", + "kylekatarnls/update-helper": "^1.1", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { + "composer/composer": "^1.2", "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" + "phpunit/phpunit": "^4.8.35 || ^5.7" }, "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "": "src/" } }, "autoload-dev": { @@ -38,17 +41,30 @@ "Tests\\": "tests/" } }, - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, "config": { "sort-packages": true }, "scripts": { - "test": "./vendor/bin/phpunit; ./vendor/bin/php-cs-fixer fix -v --diff --dry-run;", - "phpunit": "./vendor/bin/phpunit;", - "phpcs": "./vendor/bin/php-cs-fixer fix -v --diff --dry-run;" + "test": [ + "@phpunit", + "@phpcs" + ], + "phpunit": "phpunit --verbose --coverage-clover=coverage.xml", + "phpcs": "php-cs-fixer fix -v --diff --dry-run", + "phpstan": "phpstan analyse --configuration phpstan.neon --level 3 src tests", + "post-autoload-dump": [ + "UpdateHelper\\UpdateHelper::check" + ], + "upgrade-carbon": [ + "Carbon\\Upgrade::upgrade" + ] + }, + "extra": { + "update-helper": "Carbon\\Upgrade", + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + } } } diff --git a/api/vendor/nesbot/carbon/readme.md b/api/vendor/nesbot/carbon/readme.md index 57836c3..5e9d1cc 100644 --- a/api/vendor/nesbot/carbon/readme.md +++ b/api/vendor/nesbot/carbon/readme.md @@ -6,6 +6,7 @@ [![StyleCI](https://styleci.io/repos/5724990/shield?style=flat)](https://styleci.io/repos/5724990) [![codecov.io](https://codecov.io/github/briannesbitt/Carbon/coverage.svg?branch=master)](https://codecov.io/github/briannesbitt/Carbon?branch=master) [![PHP-Eye](https://php-eye.com/badge/nesbot/carbon/tested.svg?style=flat)](https://php-eye.com/package/nesbot/carbon) +[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan) A simple PHP API extension for DateTime. [http://carbon.nesbot.com](http://carbon.nesbot.com) @@ -16,7 +17,7 @@ printf("Right now is %s", Carbon::now()->toDateTimeString()); printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() $tomorrow = Carbon::now()->addDay(); $lastWeek = Carbon::now()->subWeek(); -$nextSummerOlympics = Carbon::createFromDate(2012)->addYears(4); +$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4); $officialDate = Carbon::now()->toRfc2822String(); @@ -24,13 +25,13 @@ $howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; $noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); -$worldWillEnd = Carbon::createFromDate(2012, 12, 21, 'GMT'); +$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT'); -// Don't really want to die so mock now +// Don't really want this to happen so mock now Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); // comparisons are always done in UTC -if (Carbon::now()->gte($worldWillEnd)) { +if (Carbon::now()->gte($internetWillBlowUpOn)) { die(); } @@ -74,6 +75,7 @@ printf("Now: %s", Carbon::now()); ``` + ### Without Composer Why are you not using [composer](http://getcomposer.org/)? Download [Carbon.php](https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Carbon.php) from the repo and save the file into your project path somewhere. @@ -89,4 +91,4 @@ printf("Now: %s", Carbon::now()); ## Docs -[http://carbon.nesbot.com/docs](http://carbon.nesbot.com/docs) \ No newline at end of file +[http://carbon.nesbot.com/docs](http://carbon.nesbot.com/docs) diff --git a/api/vendor/nesbot/carbon/src/Carbon/Carbon.php b/api/vendor/nesbot/carbon/src/Carbon/Carbon.php index d537e0b..7b8a5d9 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -13,12 +13,13 @@ namespace Carbon; use Carbon\Exceptions\InvalidDateException; use Closure; +use DateInterval; use DatePeriod; use DateTime; +use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; -use Symfony\Component\Translation\Loader\ArrayLoader; -use Symfony\Component\Translation\Translator; +use JsonSerializable; use Symfony\Component\Translation\TranslatorInterface; /** @@ -36,8 +37,10 @@ use Symfony\Component\Translation\TranslatorInterface; * @property \DateTimeZone $tz alias of timezone * @property-read int $micro * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) * @property-read int $dayOfYear 0 through 365 * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday * @property-read int $daysInMonth number of days in the given month * @property-read int $age does a diffInYears() with default parameters @@ -49,9 +52,26 @@ use Symfony\Component\Translation\TranslatorInterface; * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise * @property-read string $timezoneName * @property-read string $tzName + * @property-read string $englishDayOfWeek the day of week in English + * @property-read string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property-read string $englishMonth the day of week in English + * @property-read string $shortEnglishMonth the abbreviated day of week in English + * @property-read string $localeDayOfWeek the day of week in current locale LC_TIME + * @property-read string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME + * @property-read string $localeMonth the month in current locale LC_TIME + * @property-read string $shortLocaleMonth the abbreviated month in current locale LC_TIME */ -class Carbon extends DateTime +class Carbon extends DateTime implements JsonSerializable { + const NO_ZERO_DIFF = 01; + const JUST_NOW = 02; + const ONE_DAY_WORDS = 04; + const TWO_DAY_WORDS = 010; + + // Substitutes for Carbon 2 modes + const DIFF_RELATIVE_TO_NOW = 'relative-to-now'; + const DIFF_RELATIVE_TO_OTHER = 'relative-to-other'; + /** * The day constants. */ @@ -78,38 +98,29 @@ class Carbon extends DateTime self::SATURDAY => 'Saturday', ); - /** - * Terms used to detect if a time passed is a relative date. - * - * This is here for testing purposes. - * - * @var array - */ - protected static $relativeKeywords = array( - '+', - '-', - 'ago', - 'first', - 'last', - 'next', - 'this', - 'today', - 'tomorrow', - 'yesterday', - ); - /** * Number of X in Y. */ + const YEARS_PER_MILLENNIUM = 1000; const YEARS_PER_CENTURY = 100; const YEARS_PER_DECADE = 10; const MONTHS_PER_YEAR = 12; const MONTHS_PER_QUARTER = 3; const WEEKS_PER_YEAR = 52; + const WEEKS_PER_MONTH = 4; const DAYS_PER_WEEK = 7; const HOURS_PER_DAY = 24; const MINUTES_PER_HOUR = 60; const SECONDS_PER_MINUTE = 60; + const MICROSECONDS_PER_MILLISECOND = 1000; + const MICROSECONDS_PER_SECOND = 1000000; + + /** + * RFC7231 DateTime format. + * + * @var string + */ + const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; /** * Default format to use for __toString method when type juggling occurs. @@ -118,6 +129,20 @@ class Carbon extends DateTime */ const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; + /** + * Format for converting mocked time, includes microseconds. + * + * @var string + */ + const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; + + /** + * Customizable PHP_INT_SIZE override. + * + * @var int + */ + public static $PHPIntSize = PHP_INT_SIZE; + /** * Format to use for __toString method when type juggling occurs. * @@ -149,6 +174,61 @@ class Carbon extends DateTime self::SUNDAY, ); + /** + * Midday/noon hour. + * + * @var int + */ + protected static $midDayAt = 12; + + /** + * Format regex patterns. + * + * @var array + */ + protected static $regexFormats = array( + 'd' => '(3[01]|[12][0-9]|0[1-9])', + 'D' => '([a-zA-Z]{3})', + 'j' => '([123][0-9]|[1-9])', + 'l' => '([a-zA-Z]{2,})', + 'N' => '([1-7])', + 'S' => '([a-zA-Z]{2})', + 'w' => '([0-6])', + 'z' => '(36[0-5]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9])', + 'W' => '(5[012]|[1-4][0-9]|[1-9])', + 'F' => '([a-zA-Z]{2,})', + 'm' => '(1[012]|0[1-9])', + 'M' => '([a-zA-Z]{3})', + 'n' => '(1[012]|[1-9])', + 't' => '(2[89]|3[01])', + 'L' => '(0|1)', + 'o' => '([1-9][0-9]{0,4})', + 'Y' => '([1-9]?[0-9]{4})', + 'y' => '([0-9]{2})', + 'a' => '(am|pm)', + 'A' => '(AM|PM)', + 'B' => '([0-9]{3})', + 'g' => '(1[012]|[1-9])', + 'G' => '(2[0-3]|1?[0-9])', + 'h' => '(1[012]|0[1-9])', + 'H' => '(2[0-3]|[01][0-9])', + 'i' => '([0-5][0-9])', + 's' => '([0-5][0-9])', + 'u' => '([0-9]{1,6})', + 'v' => '([0-9]{1,3})', + 'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\/[a-zA-Z]*)', + 'I' => '(0|1)', + 'O' => '([\+\-](1[012]|0[0-9])[0134][05])', + 'P' => '([\+\-](1[012]|0[0-9]):[0134][05])', + 'T' => '([a-zA-Z]{1,5})', + 'Z' => '(-?[1-5]?[0-9]{1,4})', + 'U' => '([0-9]*)', + + // The formats below are combinations of the above formats. + 'c' => '(([1-9]?[0-9]{4})\-(1[012]|0[1-9])\-(3[01]|[12][0-9]|0[1-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])[\+\-](1[012]|0[0-9]):([0134][05]))', // Y-m-dTH:i:sP + 'r' => '(([a-zA-Z]{3}), ([123][0-9]|[1-9]) ([a-zA-Z]{3}) ([1-9]?[0-9]{4}) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9]) [\+\-](1[012]|0[0-9])([0134][05]))', // D, j M Y H:i:s O + ); + /** * A test Carbon instance to be returned when now instances are created. * @@ -170,6 +250,20 @@ class Carbon extends DateTime */ protected static $lastErrors; + /** + * The custom Carbon JSON serializer. + * + * @var callable|null + */ + protected static $serializer; + + /** + * The registered string macros. + * + * @var array + */ + protected static $localMacros = array(); + /** * Will UTF8 encoding be used to print localized date/time ? * @@ -177,13 +271,96 @@ class Carbon extends DateTime */ protected static $utf8 = false; - /* + /** + * Add microseconds to now on PHP < 7.1 and 7.1.3. true by default. + * + * @var bool + */ + protected static $microsecondsFallback = true; + + /** * Indicates if months should be calculated with overflow. * * @var bool */ protected static $monthsOverflow = true; + /** + * Indicates if years should be calculated with overflow. + * + * @var bool + */ + protected static $yearsOverflow = true; + + /** + * Indicates if years are compared with month by default so isSameMonth and isSameQuarter have $ofSameYear set + * to true by default. + * + * @var bool + */ + protected static $compareYearWithMonth = false; + + /** + * Options for diffForHumans(). + * + * @var int + */ + protected static $humanDiffOptions = self::NO_ZERO_DIFF; + + /** + * @param int $humanDiffOptions + */ + public static function setHumanDiffOptions($humanDiffOptions) + { + static::$humanDiffOptions = $humanDiffOptions; + } + + /** + * @param int $humanDiffOption + */ + public static function enableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; + } + + /** + * @param int $humanDiffOption + */ + public static function disableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; + } + + /** + * @return int + */ + public static function getHumanDiffOptions() + { + return static::$humanDiffOptions; + } + + /** + * Add microseconds to now on PHP < 7.1 and 7.1.3 if set to true, + * let microseconds to 0 on those PHP versions if false. + * + * @param bool $microsecondsFallback + */ + public static function useMicrosecondsFallback($microsecondsFallback = true) + { + static::$microsecondsFallback = $microsecondsFallback; + } + + /** + * Return true if microseconds fallback on PHP < 7.1 and 7.1.3 is + * enabled. false if disabled. + * + * @return bool + */ + public static function isMicrosecondsFallbackEnabled() + { + return static::$microsecondsFallback; + } + /** * Indicates if months should be calculated with overflow. * @@ -216,6 +393,58 @@ class Carbon extends DateTime return static::$monthsOverflow; } + /** + * Indicates if years should be calculated with overflow. + * + * @param bool $yearsOverflow + * + * @return void + */ + public static function useYearsOverflow($yearsOverflow = true) + { + static::$yearsOverflow = $yearsOverflow; + } + + /** + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetYearsOverflow() + { + static::$yearsOverflow = true; + } + + /** + * Get the month overflow behavior. + * + * @return bool + */ + public static function shouldOverflowYears() + { + return static::$yearsOverflow; + } + + /** + * Get the month comparison default behavior. + * + * @return bool + */ + public static function compareYearWithMonth($compareYearWithMonth = true) + { + static::$compareYearWithMonth = $compareYearWithMonth; + } + + /** + * Get the month comparison default behavior. + * + * @return bool + */ + public static function shouldCompareYearWithMonth() + { + return static::$compareYearWithMonth; + } + /** * Creates a DateTimeZone from a string, DateTimeZone or integer offset. * @@ -246,13 +475,25 @@ class Carbon extends DateTime $object = $tzName; } - $tz = @timezone_open((string) $object); + $tz = @timezone_open($object = (string) $object); - if ($tz === false) { - throw new InvalidArgumentException('Unknown or bad timezone ('.$object.')'); + if ($tz !== false) { + return $tz; } - return $tz; + // Work-around for a bug fixed in PHP 5.5.10 https://bugs.php.net/bug.php?id=45528 + // See: https://stackoverflow.com/q/14068594/2646927 + // @codeCoverageIgnoreStart + if (strpos($object, ':') !== false) { + try { + return static::createFromFormat('O', $object)->getTimezone(); + } catch (InvalidArgumentException $e) { + // + } + } + // @codeCoverageIgnoreEnd + + throw new InvalidArgumentException('Unknown or bad timezone ('.$object.')'); } /////////////////////////////////////////////////////////////////// @@ -272,11 +513,9 @@ class Carbon extends DateTime { // If the class has a test now set and we are trying to create a now() // instance then override as required - if (static::hasTestNow() && (empty($time) || $time === 'now' || static::hasRelativeKeywords($time))) { + $isNow = empty($time) || $time === 'now'; + if (static::hasTestNow() && ($isNow || static::hasRelativeKeywords($time))) { $testInstance = clone static::getTestNow(); - if (static::hasRelativeKeywords($time)) { - $testInstance->modify($time); - } //shift the time according to the given time zone if ($tz !== null && $tz !== static::getTestNow()->getTimezone()) { @@ -285,26 +524,57 @@ class Carbon extends DateTime $tz = $testInstance->getTimezone(); } - $time = $testInstance->toDateTimeString(); + if (static::hasRelativeKeywords($time)) { + $testInstance->modify($time); + } + + $time = $testInstance->format(static::MOCK_DATETIME_FORMAT); } - parent::__construct($time, static::safeCreateDateTimeZone($tz)); + $timezone = static::safeCreateDateTimeZone($tz); + // @codeCoverageIgnoreStart + if ($isNow && !isset($testInstance) && static::isMicrosecondsFallbackEnabled() && ( + version_compare(PHP_VERSION, '7.1.0-dev', '<') + || + version_compare(PHP_VERSION, '7.1.3-dev', '>=') && version_compare(PHP_VERSION, '7.1.4-dev', '<') + ) + ) { + // Get microseconds from microtime() if "now" asked and PHP < 7.1 and PHP 7.1.3 if fallback enabled. + list($microTime, $timeStamp) = explode(' ', microtime()); + $dateTime = new DateTime('now', $timezone); + $dateTime->setTimestamp($timeStamp); // Use the timestamp returned by microtime as now can happen in the next second + $time = $dateTime->format(static::DEFAULT_TO_STRING_FORMAT).substr($microTime, 1, 7); + } + // @codeCoverageIgnoreEnd + + // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 + if (strpos((string) .1, '.') === false) { + $locale = setlocale(LC_NUMERIC, '0'); + setlocale(LC_NUMERIC, 'C'); + } + parent::__construct($time, $timezone); + if (isset($locale)) { + setlocale(LC_NUMERIC, $locale); + } + static::setLastErrors(parent::getLastErrors()); } /** * Create a Carbon instance from a DateTime one. * - * @param \DateTime $dt + * @param \DateTime|\DateTimeInterface $date * * @return static */ - public static function instance(DateTime $dt) + public static function instance($date) { - if ($dt instanceof static) { - return clone $dt; + if ($date instanceof static) { + return clone $date; } - return new static($dt->format('Y-m-d H:i:s.u'), $dt->getTimezone()); + static::expectDateTime($date); + + return new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); } /** @@ -345,7 +615,7 @@ class Carbon extends DateTime */ public static function today($tz = null) { - return static::now($tz)->startOfDay(); + return static::parse('today', $tz); } /** @@ -357,7 +627,7 @@ class Carbon extends DateTime */ public static function tomorrow($tz = null) { - return static::today($tz)->addDay(); + return static::parse('tomorrow', $tz); } /** @@ -369,7 +639,7 @@ class Carbon extends DateTime */ public static function yesterday($tz = null) { - return static::today($tz)->subDay(); + return static::parse('yesterday', $tz); } /** @@ -379,9 +649,9 @@ class Carbon extends DateTime */ public static function maxValue() { - if (PHP_INT_SIZE === 4) { - // 32 bit (and additionally Windows 64 bit) - return static::createFromTimestamp(PHP_INT_MAX); + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore } // 64 bit @@ -395,9 +665,9 @@ class Carbon extends DateTime */ public static function minValue() { - if (PHP_INT_SIZE === 4) { - // 32 bit (and additionally Windows 64 bit) - return static::createFromTimestamp(~PHP_INT_MAX); + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore } // 64 bit @@ -424,11 +694,13 @@ class Carbon extends DateTime * @param int|null $second * @param \DateTimeZone|string|null $tz * + * @throws \InvalidArgumentException + * * @return static */ public static function create($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) { - $now = static::hasTestNow() ? static::getTestNow()->getTimestamp() : time(); + $now = static::hasTestNow() ? static::getTestNow() : static::now($tz); $defaults = array_combine(array( 'year', @@ -437,7 +709,7 @@ class Carbon extends DateTime 'hour', 'minute', 'second', - ), explode('-', date('Y-n-j-G-i-s', $now))); + ), explode('-', $now->format('Y-n-j-G-i-s'))); $year = $year === null ? $defaults['year'] : $year; $month = $month === null ? $defaults['month'] : $month; @@ -462,7 +734,7 @@ class Carbon extends DateTime $year = 9999; } - $instance = static::createFromFormat('Y-n-j G:i:s', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); + $instance = static::createFromFormat('!Y-n-j G:i:s', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); if ($fixYear !== null) { $instance->addYears($fixYear); @@ -494,7 +766,7 @@ class Carbon extends DateTime * @param int|null $second * @param \DateTimeZone|string|null $tz * - * @throws \Carbon\Exceptions\InvalidDateException + * @throws \Carbon\Exceptions\InvalidDateException|\InvalidArgumentException * * @return static */ @@ -515,13 +787,15 @@ class Carbon extends DateTime } } - $instance = static::create($year, $month, 1, $hour, $minute, $second, $tz); + $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); - if ($day !== null && $day > $instance->daysInMonth) { - throw new InvalidDateException('day', $day); + foreach (array_reverse($fields) as $field => $range) { + if ($$field !== null && (!is_int($$field) || $$field !== $instance->$field)) { + throw new InvalidDateException($field, $$field); + } } - return $instance->day($day); + return $instance; } /** @@ -532,6 +806,8 @@ class Carbon extends DateTime * @param int|null $day * @param \DateTimeZone|string|null $tz * + * @throws \InvalidArgumentException + * * @return static */ public static function createFromDate($year = null, $month = null, $day = null, $tz = null) @@ -539,6 +815,21 @@ class Carbon extends DateTime return static::create($year, $month, $day, null, null, null, $tz); } + /** + * Create a Carbon instance from just a date. The time portion is set to midnight. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, 0, 0, 0, $tz); + } + /** * Create a Carbon instance from just a time. The date portion is set to today. * @@ -547,6 +838,8 @@ class Carbon extends DateTime * @param int|null $second * @param \DateTimeZone|string|null $tz * + * @throws \InvalidArgumentException + * * @return static */ public static function createFromTime($hour = null, $minute = null, $second = null, $tz = null) @@ -555,9 +848,8 @@ class Carbon extends DateTime } /** - * Create a Carbon instance from a specific format. + * Create a Carbon instance from a time string. The date portion is set to today. * - * @param string $format * @param string $time * @param \DateTimeZone|string|null $tz * @@ -565,18 +857,61 @@ class Carbon extends DateTime * * @return static */ + public static function createFromTimeString($time, $tz = null) + { + return static::today($tz)->setTimeFromTimeString($time); + } + + private static function createFromFormatAndTimezone($format, $time, $tz) + { + return $tz !== null + ? parent::createFromFormat($format, $time, static::safeCreateDateTimeZone($tz)) + : parent::createFromFormat($format, $time); + } + + /** + * Create a Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param \DateTimeZone|string|null $tz + * + * @throws InvalidArgumentException + * + * @return static + */ public static function createFromFormat($format, $time, $tz = null) { - if ($tz !== null) { - $dt = parent::createFromFormat($format, $time, static::safeCreateDateTimeZone($tz)); - } else { - $dt = parent::createFromFormat($format, $time); + // First attempt to create an instance, so that error messages are based on the unmodified format. + $date = self::createFromFormatAndTimezone($format, $time, $tz); + $lastErrors = parent::getLastErrors(); + + if (($mock = static::getTestNow()) && ($date instanceof DateTime || $date instanceof DateTimeInterface)) { + // Set timezone from mock if custom timezone was neither given directly nor as a part of format. + // First let's skip the part that will be ignored by the parser. + $nonEscaped = '(?getTimezone(); + } + + // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. + if (!preg_match("/{$nonEscaped}[!|]/", $format)) { + $format = static::MOCK_DATETIME_FORMAT.' '.$format; + $time = $mock->format(static::MOCK_DATETIME_FORMAT).' '.$time; + } + + // Regenerate date from the modified format to base result on the mocked instance instead of now. + $date = self::createFromFormatAndTimezone($format, $time, $tz); } - static::setLastErrors($lastErrors = parent::getLastErrors()); + if ($date instanceof DateTime || $date instanceof DateTimeInterface) { + $instance = static::instance($date); + $instance::setLastErrors($lastErrors); - if ($dt instanceof DateTime) { - return static::instance($dt); + return $instance; } throw new InvalidArgumentException(implode(PHP_EOL, $lastErrors['errors'])); @@ -612,7 +947,21 @@ class Carbon extends DateTime */ public static function createFromTimestamp($timestamp, $tz = null) { - return static::now($tz)->setTimestamp($timestamp); + return static::today($tz)->setTimestamp($timestamp); + } + + /** + * Create a Carbon instance from a timestamp in milliseconds. + * + * @param int $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestampMs($timestamp, $tz = null) + { + return static::createFromFormat('U.u', sprintf('%F', $timestamp / 1000)) + ->setTimezone($tz); } /** @@ -627,6 +976,32 @@ class Carbon extends DateTime return new static('@'.$timestamp); } + /** + * Make a Carbon instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed $var + * + * @return static|null + */ + public static function make($var) + { + if ($var instanceof DateTime || $var instanceof DateTimeInterface) { + return static::instance($var); + } + + if (is_string($var)) { + $var = trim($var); + $first = substr($var, 0, 1); + + if (is_string($var) && $first !== 'P' && $first !== 'R' && preg_match('/[a-z0-9]/i', $var)) { + return static::parse($var); + } + } + } + /** * Get a copy of the instance. * @@ -637,6 +1012,63 @@ class Carbon extends DateTime return clone $this; } + /** + * Returns a present instance in the same timezone. + * + * @return static + */ + public function nowWithSameTz() + { + return static::now($this->getTimezone()); + } + + /** + * Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface + * and not in $other. + * + * @param mixed $date + * @param string|array $other + * + * @throws \InvalidArgumentException + */ + protected static function expectDateTime($date, $other = array()) + { + $message = 'Expected '; + foreach ((array) $other as $expect) { + $message .= "{$expect}, "; + } + + if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) { + throw new InvalidArgumentException( + $message.'DateTime or DateTimeInterface, '. + (is_object($date) ? get_class($date) : gettype($date)).' given' + ); + } + } + + /** + * Return the Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * + * @return static + */ + protected function resolveCarbon($date = null) + { + if (!$date) { + return $this->nowWithSameTz(); + } + + if (is_string($date)) { + return static::parse($date, $this->getTimezone()); + } + + static::expectDateTime($date, array('null', 'string')); + + return $date instanceof self ? $date : static::instance($date); + } + /////////////////////////////////////////////////////////////////// ///////////////////////// GETTERS AND SETTERS ///////////////////// /////////////////////////////////////////////////////////////////// @@ -648,31 +1080,49 @@ class Carbon extends DateTime * * @throws \InvalidArgumentException * - * @return string|int|\DateTimeZone + * @return string|int|bool|\DateTimeZone */ public function __get($name) { + static $formats = array( + 'year' => 'Y', + 'yearIso' => 'o', + 'month' => 'n', + 'day' => 'j', + 'hour' => 'G', + 'minute' => 'i', + 'second' => 's', + 'micro' => 'u', + 'dayOfWeek' => 'w', + 'dayOfWeekIso' => 'N', + 'dayOfYear' => 'z', + 'weekOfYear' => 'W', + 'daysInMonth' => 't', + 'timestamp' => 'U', + 'englishDayOfWeek' => 'l', + 'shortEnglishDayOfWeek' => 'D', + 'englishMonth' => 'F', + 'shortEnglishMonth' => 'M', + 'localeDayOfWeek' => '%A', + 'shortLocaleDayOfWeek' => '%a', + 'localeMonth' => '%B', + 'shortLocaleMonth' => '%b', + ); + switch (true) { - case array_key_exists($name, $formats = array( - 'year' => 'Y', - 'yearIso' => 'o', - 'month' => 'n', - 'day' => 'j', - 'hour' => 'G', - 'minute' => 'i', - 'second' => 's', - 'micro' => 'u', - 'dayOfWeek' => 'w', - 'dayOfYear' => 'z', - 'weekOfYear' => 'W', - 'daysInMonth' => 't', - 'timestamp' => 'U', - )): - return (int) $this->format($formats[$name]); + case isset($formats[$name]): + $format = $formats[$name]; + $method = substr($format, 0, 1) === '%' ? 'formatLocalized' : 'format'; + $value = $this->$method($format); + + return is_numeric($value) ? (int) $value : $value; case $name === 'weekOfMonth': return (int) ceil($this->day / static::DAYS_PER_WEEK); + case $name === 'weekNumberInMonth': + return (int) ceil(($this->day + $this->copy()->startOfMonth()->dayOfWeek - 1) / static::DAYS_PER_WEEK); + case $name === 'age': return $this->diffInYears(); @@ -730,6 +1180,8 @@ class Carbon extends DateTime * @param string|int|\DateTimeZone $value * * @throws \InvalidArgumentException + * + * @return void */ public function __set($name, $value) { @@ -889,13 +1341,11 @@ class Carbon extends DateTime */ public function setTimeFromTimeString($time) { - $time = explode(':', $time); + if (strpos($time, ':') === false) { + $time .= ':0'; + } - $hour = $time[0]; - $minute = isset($time[1]) ? $time[1] : 0; - $second = isset($time[2]) ? $time[2] : 0; - - return $this->setTime($hour, $minute, $second); + return $this->modify($time); } /** @@ -943,7 +1393,54 @@ class Carbon extends DateTime */ public function setTimezone($value) { - return parent::setTimezone(static::safeCreateDateTimeZone($value)); + parent::setTimezone(static::safeCreateDateTimeZone($value)); + // https://bugs.php.net/bug.php?id=72338 + // just workaround on this bug + $this->getTimestamp(); + + return $this; + } + + /** + * Set the year, month, and date for this instance to that of the passed instance. + * + * @param \Carbon\Carbon|\DateTimeInterface $date + * + * @return static + */ + public function setDateFrom($date) + { + $date = static::instance($date); + + $this->setDate($date->year, $date->month, $date->day); + + return $this; + } + + /** + * Set the hour, day, and time for this instance to that of the passed instance. + * + * @param \Carbon\Carbon|\DateTimeInterface $date + * + * @return static + */ + public function setTimeFrom($date) + { + $date = static::instance($date); + + $this->setTime($date->hour, $date->minute, $date->second); + + return $this; + } + + /** + * Get the days of the week + * + * @return array + */ + public static function getDays() + { + return static::$days; } /////////////////////////////////////////////////////////////////// @@ -963,10 +1460,18 @@ class Carbon extends DateTime /** * Set the first day of week * - * @param int + * @param int $day week start day + * + * @throws InvalidArgumentException + * + * @return void */ public static function setWeekStartsAt($day) { + if ($day > static::SATURDAY || $day < static::SUNDAY) { + throw new InvalidArgumentException('Day of a week should be greater than or equal to 0 and less than or equal to 6.'); + } + static::$weekStartsAt = $day; } @@ -983,10 +1488,18 @@ class Carbon extends DateTime /** * Set the last day of week * - * @param int + * @param int $day + * + * @throws InvalidArgumentException + * + * @return void */ public static function setWeekEndsAt($day) { + if ($day > static::SATURDAY || $day < static::SUNDAY) { + throw new InvalidArgumentException('Day of a week should be greater than or equal to 0 and less than or equal to 6.'); + } + static::$weekEndsAt = $day; } @@ -1003,13 +1516,37 @@ class Carbon extends DateTime /** * Set weekend days * - * @param array + * @param array $days + * + * @return void */ public static function setWeekendDays($days) { static::$weekendDays = $days; } + /** + * get midday/noon hour + * + * @return int + */ + public static function getMidDayAt() + { + return static::$midDayAt; + } + + /** + * Set midday/noon hour + * + * @param int $hour midday hour + * + * @return void + */ + public static function setMidDayAt($hour) + { + static::$midDayAt = $hour; + } + /////////////////////////////////////////////////////////////////// ///////////////////////// TESTING AIDS //////////////////////////// /////////////////////////////////////////////////////////////////// @@ -1029,6 +1566,7 @@ class Carbon extends DateTime * To clear the test instance call this method using the default * parameter of null. * + * @param \Carbon\Carbon|null $testNow real or mock Carbon instance * @param \Carbon\Carbon|string|null $testNow */ public static function setTestNow($testNow = null) @@ -1059,25 +1597,24 @@ class Carbon extends DateTime } /** - * Determine if there is a relative keyword in the time string, this is to - * create dates relative to now for test instances. e.g.: next tuesday + * Determine if a time string will produce a relative date. * * @param string $time * - * @return bool true if there is a keyword, otherwise false + * @return bool true if time match a relative date, false if absolute or invalid time string */ public static function hasRelativeKeywords($time) { - // skip common format with a '-' in it - if (preg_match('/\d{4}-\d{1,2}-\d{1,2}/', $time) !== 1) { - foreach (static::$relativeKeywords as $keyword) { - if (stripos($time, $keyword) !== false) { - return true; - } - } + if (strtotime($time) === false) { + return false; } - return false; + $date1 = new DateTime('2000-01-01T00:00:00Z'); + $date1->modify($time); + $date2 = new DateTime('2001-12-25T00:00:00Z'); + $date2->modify($time); + + return $date1 != $date2; } /////////////////////////////////////////////////////////////////// @@ -1092,9 +1629,7 @@ class Carbon extends DateTime protected static function translator() { if (static::$translator === null) { - static::$translator = new Translator('en'); - static::$translator->addLoader('array', new ArrayLoader()); - static::setLocale('en'); + static::$translator = Translator::get(); } return static::$translator; @@ -1114,6 +1649,8 @@ class Carbon extends DateTime * Set the translator instance to use * * @param \Symfony\Component\Translation\TranslatorInterface $translator + * + * @return void */ public static function setTranslator(TranslatorInterface $translator) { @@ -1133,25 +1670,149 @@ class Carbon extends DateTime /** * Set the current translator locale and indicate if the source locale file exists * - * @param string $locale + * @param string $locale locale ex. en * * @return bool */ public static function setLocale($locale) { - $locale = preg_replace_callback('/\b([a-z]{2})[-_](?:([a-z]{4})[-_])?([a-z]{2})\b/', function ($matches) { - return $matches[1].'_'.(!empty($matches[2]) ? ucfirst($matches[2]).'_' : '').strtoupper($matches[3]); - }, strtolower($locale)); + return static::translator()->setLocale($locale) !== false; + } - if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) { - static::translator()->setLocale($locale); - // Ensure the locale has been loaded. - static::translator()->addResource('array', require $filename, $locale); + /** + * Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * + * @param string $locale locale ex. en + * + * @return mixed + */ + public static function executeWithLocale($locale, $func) + { + $currentLocale = static::getLocale(); + $result = call_user_func($func, static::setLocale($locale) ? static::getLocale() : false, static::translator()); + static::setLocale($currentLocale); - return true; + return $result; + } + + /** + * Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasShortUnits($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + ( + ($y = $translator->trans('y')) !== 'y' && + $y !== $translator->trans('year') + ) || ( + ($y = $translator->trans('d')) !== 'd' && + $y !== $translator->trans('day') + ) || ( + ($y = $translator->trans('h')) !== 'h' && + $y !== $translator->trans('hour') + ); + }); + } + + /** + * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffSyntax($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('ago') !== 'ago' && + $translator->trans('from_now') !== 'from_now' && + $translator->trans('before') !== 'before' && + $translator->trans('after') !== 'after'; + }); + } + + /** + * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffOneDayWords($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('diff_now') !== 'diff_now' && + $translator->trans('diff_yesterday') !== 'diff_yesterday' && + $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; + }); + } + + /** + * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasDiffTwoDayWords($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && + $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; + }); + } + + /** + * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * + * @param string $locale locale ex. en + * + * @return bool + */ + public static function localeHasPeriodSyntax($locale) + { + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { + return $newLocale && + $translator->trans('period_recurrences') !== 'period_recurrences' && + $translator->trans('period_interval') !== 'period_interval' && + $translator->trans('period_start_date') !== 'period_start_date' && + $translator->trans('period_end_date') !== 'period_end_date'; + }); + } + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @return array + */ + public static function getAvailableLocales() + { + $translator = static::translator(); + $locales = array(); + if ($translator instanceof Translator) { + foreach (glob(__DIR__.'/Lang/*.php') as $file) { + $locales[] = substr($file, strrpos($file, '/') + 1, -4); + } + + $locales = array_unique(array_merge($locales, array_keys($translator->getMessages()))); } - return false; + return $locales; } /////////////////////////////////////////////////////////////////// @@ -1178,19 +1839,20 @@ class Carbon extends DateTime */ public function formatLocalized($format) { - // Check for Windows to find and replace the %e - // modifier correctly + // Check for Windows to find and replace the %e modifier correctly. if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $format = preg_replace('#(?toDateTimeString())); return static::$utf8 ? utf8_encode($formatted) : $formatted; } /** * Reset the format used to the default when type juggling a Carbon instance to a string + * + * @return void */ public static function resetToStringFormat() { @@ -1200,7 +1862,9 @@ class Carbon extends DateTime /** * Set the default format used when type juggling a Carbon instance to a string * - * @param string $format + * @param string|Closure $format + * + * @return void */ public static function setToStringFormat($format) { @@ -1214,7 +1878,9 @@ class Carbon extends DateTime */ public function __toString() { - return $this->format(static::$toStringFormat); + $format = static::$toStringFormat; + + return $this->format($format instanceof Closure ? $format($this) : $format); } /** @@ -1257,6 +1923,21 @@ class Carbon extends DateTime return $this->format('Y-m-d H:i:s'); } + /** + * Format the instance as date and time T-separated with no timezone + * + * @example + * ``` + * echo Carbon::now()->toDateTimeLocalString(); + * ``` + * + * @return string + */ + public function toDateTimeLocalString() + { + return $this->format('Y-m-d\TH:i:s'); + } + /** * Format the instance with day, date and time * @@ -1307,6 +1988,16 @@ class Carbon extends DateTime return $this->format(static::RFC822); } + /** + * Convert the instance to UTC and return as Zulu ISO8601 + * + * @return string + */ + public function toIso8601ZuluString() + { + return $this->copy()->setTimezone('UTC')->format('Y-m-d\TH:i:s\Z'); + } + /** * Format the instance as RFC850 * @@ -1377,6 +2068,147 @@ class Carbon extends DateTime return $this->format(static::W3C); } + /** + * Format the instance as RFC7231 + * + * @return string + */ + public function toRfc7231String() + { + return $this->copy() + ->setTimezone('GMT') + ->format(static::RFC7231_FORMAT); + } + + /** + * Get default array representation + * + * @return array + */ + public function toArray() + { + return array( + 'year' => $this->year, + 'month' => $this->month, + 'day' => $this->day, + 'dayOfWeek' => $this->dayOfWeek, + 'dayOfYear' => $this->dayOfYear, + 'hour' => $this->hour, + 'minute' => $this->minute, + 'second' => $this->second, + 'micro' => $this->micro, + 'timestamp' => $this->timestamp, + 'formatted' => $this->format(self::DEFAULT_TO_STRING_FORMAT), + 'timezone' => $this->timezone, + ); + } + + /** + * Get default object representation. + * + * @example + * ``` + * var_dump(Carbon::now()->toObject()); + * ``` + * + * @return object + */ + public function toObject() + { + return (object) $this->toArray(); + } + + /** + * Returns english human readable complete date string. + * + * @example + * ``` + * echo Carbon::now()->toString(); + * ``` + * + * @return string + */ + public function toString() + { + return $this->format('D M j Y H:i:s \G\M\TO'); + } + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: + * 1977-04-22T01:00:00-05:00). + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toISOString() . "\n"; + * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; + * ``` + * + * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. + * + * @return null|string + */ + public function toISOString($keepOffset = false) + { + if ($this->year === 0) { + return null; + } + + $year = $this->year < 0 || $this->year > 9999 + ? ($this->year < 0 ? '-' : '+').str_pad(abs($this->year), 6, '0', STR_PAD_LEFT) + : str_pad($this->year, 4, '0', STR_PAD_LEFT); + $tz = $keepOffset ? $this->format('P') : 'Z'; + $date = $keepOffset ? $this : $this->copy()->setTimezone('UTC'); + + return $year.$date->format('-m-d\TH:i:s.u').$tz; + } + + /** + * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. + * + * @example + * ``` + * echo Carbon::now('America/Toronto')->toJSON(); + * ``` + * + * @return null|string + */ + public function toJSON() + { + return $this->toISOString(); + } + + /** + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDateTime()); + * ``` + * + * @return DateTime + */ + public function toDateTime() + { + return new DateTime($this->format('Y-m-d H:i:s.u'), $this->getTimezone()); + } + + /** + * @alias toDateTime + * + * Return native DateTime PHP object matching the current instance. + * + * @example + * ``` + * var_dump(Carbon::now()->toDate()); + * ``` + * + * @return DateTime + */ + public function toDate() + { + return $this->toDateTime(); + } + /////////////////////////////////////////////////////////////////// ////////////////////////// COMPARISONS //////////////////////////// /////////////////////////////////////////////////////////////////// @@ -1384,267 +2216,316 @@ class Carbon extends DateTime /** * Determines if the instance is equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function eq(Carbon $dt) + public function eq($date) { - return $this == $dt; + return $this == $date; } /** * Determines if the instance is equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see eq() * * @return bool */ - public function equalTo(Carbon $dt) + public function equalTo($date) { - return $this->eq($dt); + return $this->eq($date); } /** * Determines if the instance is not equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function ne(Carbon $dt) + public function ne($date) { - return !$this->eq($dt); + return !$this->eq($date); } /** * Determines if the instance is not equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see ne() * * @return bool */ - public function notEqualTo(Carbon $dt) + public function notEqualTo($date) { - return $this->ne($dt); + return $this->ne($date); } /** * Determines if the instance is greater (after) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function gt(Carbon $dt) + public function gt($date) { - return $this > $dt; + return $this > $date; } /** * Determines if the instance is greater (after) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see gt() * * @return bool */ - public function greaterThan(Carbon $dt) + public function greaterThan($date) { - return $this->gt($dt); + return $this->gt($date); } /** - * Determines if the instance is greater (after) than or equal to another + * Determines if the instance is greater (after) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see gt() * * @return bool */ - public function gte(Carbon $dt) + public function isAfter($date) { - return $this >= $dt; + return $this->gt($date); } /** * Determines if the instance is greater (after) than or equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function gte($date) + { + return $this >= $date; + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see gte() * * @return bool */ - public function greaterThanOrEqualTo(Carbon $dt) + public function greaterThanOrEqualTo($date) { - return $this->gte($dt); + return $this->gte($date); } /** * Determines if the instance is less (before) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function lt(Carbon $dt) + public function lt($date) { - return $this < $dt; + return $this < $date; } /** * Determines if the instance is less (before) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lt() * * @return bool */ - public function lessThan(Carbon $dt) + public function lessThan($date) { - return $this->lt($dt); + return $this->lt($date); } /** - * Determines if the instance is less (before) or equal to another + * Determines if the instance is less (before) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @see lt() * * @return bool */ - public function lte(Carbon $dt) + public function isBefore($date) { - return $this <= $dt; + return $this->lt($date); } /** * Determines if the instance is less (before) or equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date + * + * @return bool + */ + public function lte($date) + { + return $this <= $date; + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lte() * * @return bool */ - public function lessThanOrEqualTo(Carbon $dt) + public function lessThanOrEqualTo($date) { - return $this->lte($dt); + return $this->lte($date); } /** * Determines if the instance is between two others * - * @param Carbon $dt1 - * @param Carbon $dt2 - * @param bool $equal Indicates if a > and < comparison should be used or <= or >= + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ - public function between(Carbon $dt1, Carbon $dt2, $equal = true) + public function between($date1, $date2, $equal = true) { - if ($dt1->gt($dt2)) { - $temp = $dt1; - $dt1 = $dt2; - $dt2 = $temp; + if ($date1->gt($date2)) { + $temp = $date1; + $date1 = $date2; + $date2 = $temp; } if ($equal) { - return $this->gte($dt1) && $this->lte($dt2); + return $this->gte($date1) && $this->lte($date2); } - return $this->gt($dt1) && $this->lt($dt2); + return $this->gt($date1) && $this->lt($date2); + } + + protected function floatDiffInSeconds($date) + { + $date = $this->resolveCarbon($date); + + return abs($this->diffInRealSeconds($date, false) + ($date->micro - $this->micro) / 1000000); + } + + /** + * Determines if the instance is between two others + * + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if a > and < comparison should be used or <= or >= + * + * @return bool + */ + public function isBetween($date1, $date2, $equal = true) + { + return $this->between($date1, $date2, $equal); } /** * Get the closest date from the instance. * - * @param Carbon $dt1 - * @param Carbon $dt2 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ - public function closest(Carbon $dt1, Carbon $dt2) + public function closest($date1, $date2) { - return $this->diffInSeconds($dt1) < $this->diffInSeconds($dt2) ? $dt1 : $dt2; + return $this->floatDiffInSeconds($date1) < $this->floatDiffInSeconds($date2) ? $date1 : $date2; } /** * Get the farthest date from the instance. * - * @param Carbon $dt1 - * @param Carbon $dt2 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ - public function farthest(Carbon $dt1, Carbon $dt2) + public function farthest($date1, $date2) { - return $this->diffInSeconds($dt1) > $this->diffInSeconds($dt2) ? $dt1 : $dt2; + return $this->floatDiffInSeconds($date1) > $this->floatDiffInSeconds($date2) ? $date1 : $date2; } /** * Get the minimum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date * * @return static */ - public function min(Carbon $dt = null) + public function min($date = null) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); - return $this->lt($dt) ? $this : $dt; + return $this->lt($date) ? $this : $date; } /** * Get the minimum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see min() * * @return static */ - public function minimum(Carbon $dt = null) + public function minimum($date = null) { - return $this->min($dt); + return $this->min($date); } /** * Get the maximum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date * * @return static */ - public function max(Carbon $dt = null) + public function max($date = null) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); - return $this->gt($dt) ? $this : $dt; + return $this->gt($date) ? $this : $date; } /** * Get the maximum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see max() * * @return static */ - public function maximum(Carbon $dt = null) + public function maximum($date = null) { - return $this->max($dt); + return $this->max($date); } /** - * Determines if the instance is a weekday + * Determines if the instance is a weekday. * * @return bool */ @@ -1654,7 +2535,7 @@ class Carbon extends DateTime } /** - * Determines if the instance is a weekend day + * Determines if the instance is a weekend day. * * @return bool */ @@ -1664,7 +2545,7 @@ class Carbon extends DateTime } /** - * Determines if the instance is yesterday + * Determines if the instance is yesterday. * * @return bool */ @@ -1674,17 +2555,17 @@ class Carbon extends DateTime } /** - * Determines if the instance is today + * Determines if the instance is today. * * @return bool */ public function isToday() { - return $this->toDateString() === static::now($this->getTimezone())->toDateString(); + return $this->toDateString() === $this->nowWithSameTz()->toDateString(); } /** - * Determines if the instance is tomorrow + * Determines if the instance is tomorrow. * * @return bool */ @@ -1694,87 +2575,107 @@ class Carbon extends DateTime } /** - * Determines if the instance is within the next week + * Determines if the instance is within the next week. * * @return bool */ public function isNextWeek() { - return $this->weekOfYear === static::now($this->getTimezone())->addWeek()->weekOfYear; + return $this->weekOfYear === $this->nowWithSameTz()->addWeek()->weekOfYear; } /** - * Determines if the instance is within the last week + * Determines if the instance is within the last week. * * @return bool */ public function isLastWeek() { - return $this->weekOfYear === static::now($this->getTimezone())->subWeek()->weekOfYear; + return $this->weekOfYear === $this->nowWithSameTz()->subWeek()->weekOfYear; } /** - * Determines if the instance is within the next month + * Determines if the instance is within the next quarter. + * + * @return bool + */ + public function isNextQuarter() + { + return $this->quarter === $this->nowWithSameTz()->addQuarter()->quarter; + } + + /** + * Determines if the instance is within the last quarter. + * + * @return bool + */ + public function isLastQuarter() + { + return $this->quarter === $this->nowWithSameTz()->subQuarter()->quarter; + } + + /** + * Determines if the instance is within the next month. * * @return bool */ public function isNextMonth() { - return $this->month === static::now($this->getTimezone())->addMonthNoOverflow()->month; + return $this->month === $this->nowWithSameTz()->addMonthNoOverflow()->month; } /** - * Determines if the instance is within the last month + * Determines if the instance is within the last month. * * @return bool */ public function isLastMonth() { - return $this->month === static::now($this->getTimezone())->subMonthNoOverflow()->month; + return $this->month === $this->nowWithSameTz()->subMonthNoOverflow()->month; } /** - * Determines if the instance is within next year + * Determines if the instance is within next year. * * @return bool */ public function isNextYear() { - return $this->year === static::now($this->getTimezone())->addYear()->year; + return $this->year === $this->nowWithSameTz()->addYear()->year; } /** - * Determines if the instance is within the previous year + * Determines if the instance is within the previous year. * * @return bool */ public function isLastYear() { - return $this->year === static::now($this->getTimezone())->subYear()->year; + return $this->year === $this->nowWithSameTz()->subYear()->year; } /** - * Determines if the instance is in the future, ie. greater (after) than now + * Determines if the instance is in the future, ie. greater (after) than now. * * @return bool */ public function isFuture() { - return $this->gt(static::now($this->getTimezone())); + return $this->gt($this->nowWithSameTz()); } /** - * Determines if the instance is in the past, ie. less (before) than now + * Determines if the instance is in the past, ie. less (before) than now. * * @return bool */ public function isPast() { - return $this->lt(static::now($this->getTimezone())); + return $this->lt($this->nowWithSameTz()); } /** - * Determines if the instance is a leap year + * Determines if the instance is a leap year. * * @return bool */ @@ -1795,23 +2696,27 @@ class Carbon extends DateTime return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; } - /* + /** * Compares the formatted values of the two dates. * - * @param string $format The date formats to compare. - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. + * @param string $format The date formats to compare. + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @throws \InvalidArgumentException * * @return bool */ - public function isSameAs($format, Carbon $dt = null) + public function isSameAs($format, $date = null) { - $dt = $dt ?: static::now($this->tz); + $date = $date ?: static::now($this->tz); - return $this->format($format) === $dt->format($format); + static::expectDateTime($date, 'null'); + + return $this->format($format) === $date->format($format); } /** - * Determines if the instance is in the current year + * Determines if the instance is in the current year. * * @return bool */ @@ -1823,50 +2728,172 @@ class Carbon extends DateTime /** * Checks if the passed in date is in the same year as the instance year. * - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. * * @return bool */ - public function isSameYear(Carbon $dt = null) + public function isSameYear($date = null) { - return $this->isSameAs('Y', $dt); + return $this->isSameAs('Y', $date); } /** - * Determines if the instance is in the current month + * Determines if the instance is in the current month. * * @return bool */ - public function isCurrentMonth() + public function isCurrentQuarter() { - return $this->isSameMonth(); + return $this->isSameQuarter(); } /** - * Checks if the passed in date is in the same month as the instance month (and year if needed). + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). * - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. - * @param bool $ofSameYear Check if it is the same month in the same year. + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ - public function isSameMonth(Carbon $dt = null, $ofSameYear = false) + public function isSameQuarter($date = null, $ofSameYear = null) { - $format = $ofSameYear ? 'Y-m' : 'm'; + $date = $date ? static::instance($date) : static::now($this->tz); - return $this->isSameAs($format, $dt); + static::expectDateTime($date, 'null'); + + $ofSameYear = is_null($ofSameYear) ? static::shouldCompareYearWithMonth() : $ofSameYear; + + return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); } /** - * Checks if the passed in date is the same day as the instance current day. + * Determines if the instance is in the current month. * - * @param \Carbon\Carbon $dt + * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ - public function isSameDay(Carbon $dt) + public function isCurrentMonth($ofSameYear = null) { - return $this->toDateString() === $dt->toDateString(); + return $this->isSameMonth(null, $ofSameYear); + } + + /** + * Checks if the passed in date is in the same month as the instance´s month. + * + * Note that this defaults to only comparing the month while ignoring the year. + * To test if it is the same exact month of the same year, pass in true as the second parameter. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameMonth($date = null, $ofSameYear = null) + { + $ofSameYear = is_null($ofSameYear) ? static::shouldCompareYearWithMonth() : $ofSameYear; + + return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); + } + + /** + * Determines if the instance is in the current day. + * + * @return bool + */ + public function isCurrentDay() + { + return $this->isSameDay(); + } + + /** + * Checks if the passed in date is the same exact day as the instance´s day. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameDay($date = null) + { + return $this->isSameAs('Y-m-d', $date); + } + + /** + * Determines if the instance is in the current hour. + * + * @return bool + */ + public function isCurrentHour() + { + return $this->isSameHour(); + } + + /** + * Checks if the passed in date is the same exact hour as the instance´s hour. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameHour($date = null) + { + return $this->isSameAs('Y-m-d H', $date); + } + + /** + * Determines if the instance is in the current minute. + * + * @return bool + */ + public function isCurrentMinute() + { + return $this->isSameMinute(); + } + + /** + * Checks if the passed in date is the same exact minute as the instance´s minute. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameMinute($date = null) + { + return $this->isSameAs('Y-m-d H:i', $date); + } + + /** + * Determines if the instance is in the current second. + * + * @return bool + */ + public function isCurrentSecond() + { + return $this->isSameSecond(); + } + + /** + * Checks if the passed in date is the same exact second as the instance´s second. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameSecond($date = null) + { + return $this->isSameAs('Y-m-d H:i:s', $date); + } + + /** + * Checks if this day is a specific day of the week. + * + * @param int $dayOfWeek + * + * @return bool + */ + public function isDayOfWeek($dayOfWeek) + { + return $this->dayOfWeek === $dayOfWeek; } /** @@ -1939,10 +2966,161 @@ class Carbon extends DateTime return $this->dayOfWeek === static::SATURDAY; } + /** + * Check if its the birthday. Compares the date/month values of the two dates. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @return bool + */ + public function isBirthday($date = null) + { + return $this->isSameAs('md', $date); + } + + /** + * Check if today is the last day of the Month + * + * @return bool + */ + public function isLastOfMonth() + { + return $this->day === $this->daysInMonth; + } + + /** + * Check if the instance is start of day / midnight. + * + * @param bool $checkMicroseconds check time at microseconds precision + * /!\ Warning, this is not reliable with PHP < 7.1.4 + * + * @return bool + */ + public function isStartOfDay($checkMicroseconds = false) + { + return $checkMicroseconds + ? $this->format('H:i:s.u') === '00:00:00.000000' + : $this->format('H:i:s') === '00:00:00'; + } + + /** + * Check if the instance is end of day. + * + * @param bool $checkMicroseconds check time at microseconds precision + * /!\ Warning, this is not reliable with PHP < 7.1.4 + * + * @return bool + */ + public function isEndOfDay($checkMicroseconds = false) + { + return $checkMicroseconds + ? $this->format('H:i:s.u') === '23:59:59.999999' + : $this->format('H:i:s') === '23:59:59'; + } + + /** + * Check if the instance is start of day / midnight. + * + * @return bool + */ + public function isMidnight() + { + return $this->isStartOfDay(); + } + + /** + * Check if the instance is midday. + * + * @return bool + */ + public function isMidday() + { + return $this->format('G:i:s') === static::$midDayAt.':00:00'; + } + + /** + * Checks if the (date)time string is in a given format. + * + * @param string $date + * @param string $format + * + * @return bool + */ + public static function hasFormat($date, $format) + { + try { + // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string + // doesn't match the format in any way. + static::createFromFormat($format, $date); + + // createFromFormat() is known to handle edge cases silently. + // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. + // To ensure we're really testing against our desired format, perform an additional regex validation. + $regex = strtr( + preg_quote($format, '/'), + static::$regexFormats + ); + + return (bool) preg_match('/^'.$regex.'$/', $date); + } catch (InvalidArgumentException $e) { + } + + return false; + } + /////////////////////////////////////////////////////////////////// /////////////////// ADDITIONS AND SUBTRACTIONS //////////////////// /////////////////////////////////////////////////////////////////// + /** + * Add centuries to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addCenturies($value) + { + return $this->addYears(static::YEARS_PER_CENTURY * $value); + } + + /** + * Add a century to the instance + * + * @param int $value + * + * @return static + */ + public function addCentury($value = 1) + { + return $this->addCenturies($value); + } + + /** + * Remove centuries from the instance + * + * @param int $value + * + * @return static + */ + public function subCenturies($value) + { + return $this->addCenturies(-1 * $value); + } + + /** + * Remove a century from the instance + * + * @param int $value + * + * @return static + */ + public function subCentury($value = 1) + { + return $this->subCenturies($value); + } + /** * Add years to the instance. Positive $value travel forward while * negative $value travel into the past. @@ -1953,7 +3131,11 @@ class Carbon extends DateTime */ public function addYears($value) { - return $this->modify((int) $value.' year'); + if ($this->shouldOverflowYears()) { + return $this->addYearsWithOverflow($value); + } + + return $this->addYearsNoOverflow($value); } /** @@ -1969,15 +3151,55 @@ class Carbon extends DateTime } /** - * Remove a year from the instance + * Add years to the instance with no overflow of months + * Positive $value travel forward while + * negative $value travel into the past. * * @param int $value * * @return static */ - public function subYear($value = 1) + public function addYearsNoOverflow($value) { - return $this->subYears($value); + return $this->addMonthsNoOverflow($value * static::MONTHS_PER_YEAR); + } + + /** + * Add year with overflow months set to false + * + * @param int $value + * + * @return static + */ + public function addYearNoOverflow($value = 1) + { + return $this->addYearsNoOverflow($value); + } + + /** + * Add years to the instance. + * Positive $value travel forward while + * negative $value travel into the past. + * + * @param int $value + * + * @return static + */ + public function addYearsWithOverflow($value) + { + return $this->modify((int) $value.' year'); + } + + /** + * Add year with overflow. + * + * @param int $value + * + * @return static + */ + public function addYearWithOverflow($value = 1) + { + return $this->addYearsWithOverflow($value); } /** @@ -1992,6 +3214,66 @@ class Carbon extends DateTime return $this->addYears(-1 * $value); } + /** + * Remove a year from the instance + * + * @param int $value + * + * @return static + */ + public function subYear($value = 1) + { + return $this->subYears($value); + } + + /** + * Remove years from the instance with no month overflow. + * + * @param int $value + * + * @return static + */ + public function subYearsNoOverflow($value) + { + return $this->subMonthsNoOverflow($value * static::MONTHS_PER_YEAR); + } + + /** + * Remove year from the instance with no month overflow + * + * @param int $value + * + * @return static + */ + public function subYearNoOverflow($value = 1) + { + return $this->subYearsNoOverflow($value); + } + + /** + * Remove years from the instance. + * + * @param int $value + * + * @return static + */ + public function subYearsWithOverflow($value) + { + return $this->subMonthsWithOverflow($value * static::MONTHS_PER_YEAR); + } + + /** + * Remove year from the instance. + * + * @param int $value + * + * @return static + */ + public function subYearWithOverflow($value = 1) + { + return $this->subYearsWithOverflow($value); + } + /** * Add quarters to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2017,18 +3299,6 @@ class Carbon extends DateTime return $this->addQuarters($value); } - /** - * Remove a quarter from the instance - * - * @param int $value - * - * @return static - */ - public function subQuarter($value = 1) - { - return $this->subQuarters($value); - } - /** * Remove quarters from the instance * @@ -2042,52 +3312,15 @@ class Carbon extends DateTime } /** - * Add centuries to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Remove a quarter from the instance * * @param int $value * * @return static */ - public function addCenturies($value) + public function subQuarter($value = 1) { - return $this->addYears(static::YEARS_PER_CENTURY * $value); - } - - /** - * Add a century to the instance - * - * @param int $value - * - * @return static - */ - public function addCentury($value = 1) - { - return $this->addCenturies($value); - } - - /** - * Remove a century from the instance - * - * @param int $value - * - * @return static - */ - public function subCentury($value = 1) - { - return $this->subCenturies($value); - } - - /** - * Remove centuries from the instance - * - * @param int $value - * - * @return static - */ - public function subCenturies($value) - { - return $this->addCenturies(-1 * $value); + return $this->subQuarters($value); } /** @@ -2119,18 +3352,6 @@ class Carbon extends DateTime return $this->addMonths($value); } - /** - * Remove a month from the instance - * - * @param int $value - * - * @return static - */ - public function subMonth($value = 1) - { - return $this->subMonths($value); - } - /** * Remove months from the instance * @@ -2143,6 +3364,18 @@ class Carbon extends DateTime return $this->addMonths(-1 * $value); } + /** + * Remove a month from the instance + * + * @param int $value + * + * @return static + */ + public function subMonth($value = 1) + { + return $this->subMonths($value); + } + /** * Add months to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2168,18 +3401,6 @@ class Carbon extends DateTime return $this->addMonthsWithOverflow($value); } - /** - * Remove a month from the instance - * - * @param int $value - * - * @return static - */ - public function subMonthWithOverflow($value = 1) - { - return $this->subMonthsWithOverflow($value); - } - /** * Remove months from the instance * @@ -2192,6 +3413,18 @@ class Carbon extends DateTime return $this->addMonthsWithOverflow(-1 * $value); } + /** + * Remove a month from the instance + * + * @param int $value + * + * @return static + */ + public function subMonthWithOverflow($value = 1) + { + return $this->subMonthsWithOverflow($value); + } + /** * Add months without overflowing to the instance. Positive $value * travels forward while negative $value travels into the past. @@ -2225,18 +3458,6 @@ class Carbon extends DateTime return $this->addMonthsNoOverflow($value); } - /** - * Remove a month with no overflow from the instance - * - * @param int $value - * - * @return static - */ - public function subMonthNoOverflow($value = 1) - { - return $this->subMonthsNoOverflow($value); - } - /** * Remove months with no overflow from the instance * @@ -2249,6 +3470,18 @@ class Carbon extends DateTime return $this->addMonthsNoOverflow(-1 * $value); } + /** + * Remove a month with no overflow from the instance + * + * @param int $value + * + * @return static + */ + public function subMonthNoOverflow($value = 1) + { + return $this->subMonthsNoOverflow($value); + } + /** * Add days to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2274,18 +3507,6 @@ class Carbon extends DateTime return $this->addDays($value); } - /** - * Remove a day from the instance - * - * @param int $value - * - * @return static - */ - public function subDay($value = 1) - { - return $this->subDays($value); - } - /** * Remove days from the instance * @@ -2298,6 +3519,18 @@ class Carbon extends DateTime return $this->addDays(-1 * $value); } + /** + * Remove a day from the instance + * + * @param int $value + * + * @return static + */ + public function subDay($value = 1) + { + return $this->subDays($value); + } + /** * Add weekdays to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2308,7 +3541,7 @@ class Carbon extends DateTime */ public function addWeekdays($value) { - // fix for https://bugs.php.net/bug.php?id=54909 + // Fix for weekday bug https://bugs.php.net/bug.php?id=54909 $t = $this->toTimeString(); $this->modify((int) $value.' weekday'); @@ -2327,18 +3560,6 @@ class Carbon extends DateTime return $this->addWeekdays($value); } - /** - * Remove a weekday from the instance - * - * @param int $value - * - * @return static - */ - public function subWeekday($value = 1) - { - return $this->subWeekdays($value); - } - /** * Remove weekdays from the instance * @@ -2351,6 +3572,18 @@ class Carbon extends DateTime return $this->addWeekdays(-1 * $value); } + /** + * Remove a weekday from the instance + * + * @param int $value + * + * @return static + */ + public function subWeekday($value = 1) + { + return $this->subWeekdays($value); + } + /** * Add weeks to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2376,18 +3609,6 @@ class Carbon extends DateTime return $this->addWeeks($value); } - /** - * Remove a week from the instance - * - * @param int $value - * - * @return static - */ - public function subWeek($value = 1) - { - return $this->subWeeks($value); - } - /** * Remove weeks to the instance * @@ -2400,6 +3621,18 @@ class Carbon extends DateTime return $this->addWeeks(-1 * $value); } + /** + * Remove a week from the instance + * + * @param int $value + * + * @return static + */ + public function subWeek($value = 1) + { + return $this->subWeeks($value); + } + /** * Add hours to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2414,7 +3647,20 @@ class Carbon extends DateTime } /** - * Add an hour to the instance + * Add hours to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addRealHours($value) + { + return $this->addRealMinutes($value * static::MINUTES_PER_HOUR); + } + + /** + * Add an hour to the instance. * * @param int $value * @@ -2426,19 +3672,19 @@ class Carbon extends DateTime } /** - * Remove an hour from the instance + * Add an hour to the instance using timestamp. * * @param int $value * * @return static */ - public function subHour($value = 1) + public function addRealHour($value = 1) { - return $this->subHours($value); + return $this->addRealHours($value); } /** - * Remove hours from the instance + * Remove hours from the instance. * * @param int $value * @@ -2450,8 +3696,44 @@ class Carbon extends DateTime } /** - * Add minutes to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Remove hours from the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function subRealHours($value) + { + return $this->addRealHours(-1 * $value); + } + + /** + * Remove an hour from the instance. + * + * @param int $value + * + * @return static + */ + public function subHour($value = 1) + { + return $this->subHours($value); + } + + /** + * Remove an hour from the instance. + * + * @param int $value + * + * @return static + */ + public function subRealHour($value = 1) + { + return $this->subRealHours($value); + } + + /** + * Add minutes to the instance using timestamp. Positive $value + * travels forward while negative $value travels into the past. * * @param int $value * @@ -2463,7 +3745,20 @@ class Carbon extends DateTime } /** - * Add a minute to the instance + * Add minutes to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addRealMinutes($value) + { + return $this->addRealSeconds($value * static::SECONDS_PER_MINUTE); + } + + /** + * Add a minute to the instance. * * @param int $value * @@ -2475,7 +3770,19 @@ class Carbon extends DateTime } /** - * Remove a minute from the instance + * Add a minute to the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function addRealMinute($value = 1) + { + return $this->addRealMinutes($value); + } + + /** + * Remove a minute from the instance. * * @param int $value * @@ -2487,7 +3794,19 @@ class Carbon extends DateTime } /** - * Remove minutes from the instance + * Remove a minute from the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function subRealMinute($value = 1) + { + return $this->addRealMinutes(-1 * $value); + } + + /** + * Remove minutes from the instance. * * @param int $value * @@ -2498,6 +3817,18 @@ class Carbon extends DateTime return $this->addMinutes(-1 * $value); } + /** + * Remove a minute from the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function subRealMinutes($value = 1) + { + return $this->subRealMinute($value); + } + /** * Add seconds to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2512,7 +3843,20 @@ class Carbon extends DateTime } /** - * Add a second to the instance + * Add seconds to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addRealSeconds($value) + { + return $this->setTimestamp($this->getTimestamp() + $value); + } + + /** + * Add a second to the instance. * * @param int $value * @@ -2523,6 +3867,42 @@ class Carbon extends DateTime return $this->addSeconds($value); } + /** + * Add a second to the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function addRealSecond($value = 1) + { + return $this->addRealSeconds($value); + } + + /** + * Remove seconds from the instance. + * + * @param int $value + * + * @return static + */ + public function subSeconds($value) + { + return $this->addSeconds(-1 * $value); + } + + /** + * Remove seconds from the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function subRealSeconds($value) + { + return $this->addRealSeconds(-1 * $value); + } + /** * Remove a second from the instance * @@ -2536,121 +3916,205 @@ class Carbon extends DateTime } /** - * Remove seconds from the instance + * Remove a second from the instance using timestamp. * * @param int $value * * @return static */ - public function subSeconds($value) + public function subRealSecond($value = 1) { - return $this->addSeconds(-1 * $value); + return $this->subRealSeconds($value); } /////////////////////////////////////////////////////////////////// /////////////////////////// DIFFERENCES /////////////////////////// /////////////////////////////////////////////////////////////////// + /** + * @param DateInterval $diff + * @param bool $absolute + * @param bool $trimMicroseconds + * + * @return CarbonInterval + */ + protected static function fixDiffInterval(DateInterval $diff, $absolute, $trimMicroseconds) + { + $diff = CarbonInterval::instance($diff, $trimMicroseconds); + + // @codeCoverageIgnoreStart + if (version_compare(PHP_VERSION, '7.1.0-dev', '<')) { + return $diff; + } + + // Work-around for https://bugs.php.net/bug.php?id=77145 + if ($diff->f > 0 && $diff->y === -1 && $diff->m === 11 && $diff->d >= 27 && $diff->h === 23 && $diff->i === 59 && $diff->s === 59) { + $diff->y = 0; + $diff->m = 0; + $diff->d = 0; + $diff->h = 0; + $diff->i = 0; + $diff->s = 0; + $diff->f = (1000000 - round($diff->f * 1000000)) / 1000000; + $diff->invert(); + } elseif ($diff->f < 0) { + if ($diff->s !== 0 || $diff->i !== 0 || $diff->h !== 0 || $diff->d !== 0 || $diff->m !== 0 || $diff->y !== 0) { + $diff->f = (round($diff->f * 1000000) + 1000000) / 1000000; + $diff->s--; + if ($diff->s < 0) { + $diff->s += 60; + $diff->i--; + if ($diff->i < 0) { + $diff->i += 60; + $diff->h--; + if ($diff->h < 0) { + $diff->h += 24; + $diff->d--; + if ($diff->d < 0) { + $diff->d += 30; + $diff->m--; + if ($diff->m < 0) { + $diff->m += 12; + $diff->y--; + } + } + } + } + } + } else { + $diff->f *= -1; + $diff->invert(); + } + } + // @codeCoverageIgnoreEnd + if ($absolute && $diff->invert) { + $diff->invert(); + } + + return $diff; + } + + /** + * Get the difference as a CarbonInterval instance. + * + * Pass false as second argument to get a microseconds-precise interval. Else + * microseconds in the original interval will not be kept. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * @param bool $trimMicroseconds (true by default) + * + * @return CarbonInterval + */ + public function diffAsCarbonInterval($date = null, $absolute = true, $trimMicroseconds = true) + { + $from = $this; + $to = $this->resolveCarbon($date); + + if ($trimMicroseconds) { + $from = $from->copy()->startOfSecond(); + $to = $to->copy()->startOfSecond(); + } + + return static::fixDiffInterval($from->diff($to, $absolute), $absolute, $trimMicroseconds); + } + /** * Get the difference in years * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInYears(Carbon $dt = null, $abs = true) + public function diffInYears($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); - - return (int) $this->diff($dt, $abs)->format('%r%y'); + return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%y'); } /** * Get the difference in months * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInMonths(Carbon $dt = null, $abs = true) + public function diffInMonths($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); - return $this->diffInYears($dt, $abs) * static::MONTHS_PER_YEAR + (int) $this->diff($dt, $abs)->format('%r%m'); + return $this->diffInYears($date, $absolute) * static::MONTHS_PER_YEAR + (int) $this->diff($date, $absolute)->format('%r%m'); } /** * Get the difference in weeks * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInWeeks(Carbon $dt = null, $abs = true) + public function diffInWeeks($date = null, $absolute = true) { - return (int) ($this->diffInDays($dt, $abs) / static::DAYS_PER_WEEK); + return (int) ($this->diffInDays($date, $absolute) / static::DAYS_PER_WEEK); } /** * Get the difference in days * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInDays(Carbon $dt = null, $abs = true) + public function diffInDays($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); - - return (int) $this->diff($dt, $abs)->format('%r%a'); + return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%a'); } /** * Get the difference in days using a filter closure * - * @param Closure $callback - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param Closure $callback + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInDaysFiltered(Closure $callback, Carbon $dt = null, $abs = true) + public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true) { - return $this->diffFiltered(CarbonInterval::day(), $callback, $dt, $abs); + return $this->diffFiltered(CarbonInterval::day(), $callback, $date, $absolute); } /** * Get the difference in hours using a filter closure * - * @param Closure $callback - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param Closure $callback + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInHoursFiltered(Closure $callback, Carbon $dt = null, $abs = true) + public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true) { - return $this->diffFiltered(CarbonInterval::hour(), $callback, $dt, $abs); + return $this->diffFiltered(CarbonInterval::hour(), $callback, $date, $absolute); } /** * Get the difference by the given interval using a filter closure * - * @param CarbonInterval $ci An interval to traverse by - * @param Closure $callback - * @param Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffFiltered(CarbonInterval $ci, Closure $callback, Carbon $dt = null, $abs = true) + public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true) { $start = $this; - $end = $dt ?: static::now($this->getTimezone()); + $end = $this->resolveCarbon($date); $inverse = false; if ($end < $start) { @@ -2660,85 +4124,197 @@ class Carbon extends DateTime } $period = new DatePeriod($start, $ci, $end); - $vals = array_filter(iterator_to_array($period), function (DateTime $date) use ($callback) { + $values = array_filter(iterator_to_array($period), function ($date) use ($callback) { return call_user_func($callback, Carbon::instance($date)); }); - $diff = count($vals); + $diff = count($values); - return $inverse && !$abs ? -$diff : $diff; + return $inverse && !$absolute ? -$diff : $diff; } /** * Get the difference in weekdays * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInWeekdays(Carbon $dt = null, $abs = true) + public function diffInWeekdays($date = null, $absolute = true) { return $this->diffInDaysFiltered(function (Carbon $date) { return $date->isWeekday(); - }, $dt, $abs); + }, $date, $absolute); } /** * Get the difference in weekend days using a filter * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInWeekendDays(Carbon $dt = null, $abs = true) + public function diffInWeekendDays($date = null, $absolute = true) { return $this->diffInDaysFiltered(function (Carbon $date) { return $date->isWeekend(); - }, $dt, $abs); + }, $date, $absolute); } /** - * Get the difference in hours + * Get the difference in hours. * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInHours(Carbon $dt = null, $abs = true) + public function diffInHours($date = null, $absolute = true) { - return (int) ($this->diffInSeconds($dt, $abs) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); } /** - * Get the difference in minutes + * Get the difference in hours using timestamps. * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInMinutes(Carbon $dt = null, $abs = true) + public function diffInRealHours($date = null, $absolute = true) { - return (int) ($this->diffInSeconds($dt, $abs) / static::SECONDS_PER_MINUTE); + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); } /** - * Get the difference in seconds + * Get the difference in minutes. * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInSeconds(Carbon $dt = null, $abs = true) + public function diffInMinutes($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); - $value = $dt->getTimestamp() - $this->getTimestamp(); + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); + } - return $abs ? abs($value) : $value; + /** + * Get the difference in minutes using timestamps. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMinutes($date = null, $absolute = true) + { + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); + } + + /** + * Get the difference in seconds. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInSeconds($date = null, $absolute = true) + { + $diff = $this->diff($this->resolveCarbon($date)); + if (!$diff->days && version_compare(PHP_VERSION, '5.4.0-dev', '>=')) { + $diff = static::fixDiffInterval($diff, $absolute, false); + } + $value = $diff->days * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE + + $diff->h * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE + + $diff->i * static::SECONDS_PER_MINUTE + + $diff->s; + + return $absolute || !$diff->invert ? $value : -$value; + } + + /** + * Get the difference in seconds using timestamps. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealSeconds($date = null, $absolute = true) + { + $date = $this->resolveCarbon($date); + $value = $date->getTimestamp() - $this->getTimestamp(); + + return $absolute ? abs($value) : $value; + } + + /** + * Get the difference in milliseconds. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMilliseconds($date = null, $absolute = true) + { + return (int) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); + } + + /** + * Get the difference in milliseconds using timestamps. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMilliseconds($date = null, $absolute = true) + { + return (int) ($this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); + } + + /** + * Get the difference in microseconds. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMicroseconds($date = null, $absolute = true) + { + $diff = $this->diff($this->resolveCarbon($date)); + $micro = isset($diff->f) ? $diff->f : 0; + $value = (int) round((((($diff->days * static::HOURS_PER_DAY) + + $diff->h) * static::MINUTES_PER_HOUR + + $diff->i) * static::SECONDS_PER_MINUTE + + ($micro + $diff->s)) * static::MICROSECONDS_PER_SECOND); + + return $absolute || !$diff->invert ? $value : -$value; + } + + /** + * Get the difference in microseconds using timestamps. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealMicroseconds($date = null, $absolute = true) + { + /** @var Carbon $date */ + $date = $this->resolveCarbon($date); + $value = ($date->timestamp - $this->timestamp) * static::MICROSECONDS_PER_SECOND + + $date->micro - $this->micro; + + return $absolute ? abs($value) : $value; } /** @@ -2752,7 +4328,7 @@ class Carbon extends DateTime } /** - * The number of seconds until 23:23:59. + * The number of seconds until 23:59:59. * * @return int */ @@ -2783,61 +4359,93 @@ class Carbon extends DateTime * @param Carbon|null $other * @param bool $absolute removes time difference modifiers ago, after, etc * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval * * @return string */ - public function diffForHumans(Carbon $other = null, $absolute = false, $short = false) + public function diffForHumans($other = null, $absolute = false, $short = false, $parts = 1) { $isNow = $other === null; + $relativeToNow = $isNow; + + if ($absolute === static::DIFF_RELATIVE_TO_NOW) { + $absolute = false; + $relativeToNow = true; + } elseif ($absolute === static::DIFF_RELATIVE_TO_OTHER) { + $absolute = false; + $relativeToNow = false; + } + + $interval = array(); + + $parts = min(6, max(1, (int) $parts)); + $count = 1; + $unit = $short ? 's' : 'second'; if ($isNow) { - $other = static::now($this->getTimezone()); + $other = $this->nowWithSameTz(); + } elseif (!$other instanceof DateTime && !$other instanceof DateTimeInterface) { + $other = static::parse($other); } $diffInterval = $this->diff($other); - switch (true) { - case $diffInterval->y > 0: - $unit = $short ? 'y' : 'year'; - $count = $diffInterval->y; - break; + $diffIntervalArray = array( + array('value' => $diffInterval->y, 'unit' => 'year', 'unitShort' => 'y'), + array('value' => $diffInterval->m, 'unit' => 'month', 'unitShort' => 'm'), + array('value' => $diffInterval->d, 'unit' => 'day', 'unitShort' => 'd'), + array('value' => $diffInterval->h, 'unit' => 'hour', 'unitShort' => 'h'), + array('value' => $diffInterval->i, 'unit' => 'minute', 'unitShort' => 'min'), + array('value' => $diffInterval->s, 'unit' => 'second', 'unitShort' => 's'), + ); - case $diffInterval->m > 0: - $unit = $short ? 'm' : 'month'; - $count = $diffInterval->m; - break; + foreach ($diffIntervalArray as $diffIntervalData) { + if ($diffIntervalData['value'] > 0) { + $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; + $count = $diffIntervalData['value']; - case $diffInterval->d > 0: - $unit = $short ? 'd' : 'day'; - $count = $diffInterval->d; - - if ($count >= static::DAYS_PER_WEEK) { + if ($diffIntervalData['unit'] === 'day' && $count >= static::DAYS_PER_WEEK) { $unit = $short ? 'w' : 'week'; $count = (int) ($count / static::DAYS_PER_WEEK); + + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); + + // get the count days excluding weeks (might be zero) + $numOfDaysCount = (int) ($diffIntervalData['value'] - ($count * static::DAYS_PER_WEEK)); + + if ($numOfDaysCount > 0 && count($interval) < $parts) { + $unit = $short ? 'd' : 'day'; + $count = $numOfDaysCount; + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); + } + } else { + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); } - break; + } - case $diffInterval->h > 0: - $unit = $short ? 'h' : 'hour'; - $count = $diffInterval->h; - break; - - case $diffInterval->i > 0: - $unit = $short ? 'min' : 'minute'; - $count = $diffInterval->i; - break; - - default: - $count = $diffInterval->s; - $unit = $short ? 's' : 'second'; + // break the loop after we get the required number of parts in array + if (count($interval) >= $parts) { break; + } } - if ($count === 0) { - $count = 1; + if (count($interval) === 0) { + if ($isNow && static::getHumanDiffOptions() & self::JUST_NOW) { + $key = 'diff_now'; + $translation = static::translator()->trans($key); + if ($translation !== $key) { + return $translation; + } + } + $count = static::getHumanDiffOptions() & self::NO_ZERO_DIFF ? 1 : 0; + $unit = $short ? 's' : 'second'; + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); } - $time = static::translator()->transChoice($unit, $count, array(':count' => $count)); + // join the interval parts by a space + $time = implode(' ', $interval); + + unset($diffIntervalArray, $interval); if ($absolute) { return $time; @@ -2845,39 +4453,238 @@ class Carbon extends DateTime $isFuture = $diffInterval->invert === 1; - $transId = $isNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); - // Some langs have special pluralization for past and future tense. - $tryKeyExists = $unit.'_'.$transId; - if ($tryKeyExists !== static::translator()->transChoice($tryKeyExists, $count)) { - $time = static::translator()->transChoice($tryKeyExists, $count, array(':count' => $count)); + if ($parts === 1) { + if ($isNow && $unit === 'day') { + if ($count === 1 && static::getHumanDiffOptions() & self::ONE_DAY_WORDS) { + $key = $isFuture ? 'diff_tomorrow' : 'diff_yesterday'; + $translation = static::translator()->trans($key); + if ($translation !== $key) { + return $translation; + } + } + if ($count === 2 && static::getHumanDiffOptions() & self::TWO_DAY_WORDS) { + $key = $isFuture ? 'diff_after_tomorrow' : 'diff_before_yesterday'; + $translation = static::translator()->trans($key); + if ($translation !== $key) { + return $translation; + } + } + } + // Some languages have special pluralization for past and future tense. + $key = $unit.'_'.$transId; + if ($key !== static::translator()->transChoice($key, $count)) { + $time = static::translator()->transChoice($key, $count, array(':count' => $count)); + } } return static::translator()->trans($transId, array(':time' => $time)); } + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale. + * + * When comparing a value in the past to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the future to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the past to another value: + * 1 hour before + * 5 months before + * + * When comparing a value in the future to another value: + * 1 hour after + * 5 months after + * + * @param Carbon|null $other + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function from($other = null, $absolute = false, $short = false, $parts = 1) + { + if (!$other && !$absolute) { + $absolute = static::DIFF_RELATIVE_TO_NOW; + } + + return $this->diffForHumans($other, $absolute, $short, $parts); + } + + /** + * @alias diffForHumans + * + * Get the difference in a human readable format in the current locale. + * + * When comparing a value in the past to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the future to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the past to another value: + * 1 hour before + * 5 months before + * + * When comparing a value in the future to another value: + * 1 hour after + * 5 months after + * + * @param Carbon|null $other + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function since($other = null, $absolute = false, $short = false, $parts = 1) + { + return $this->diffForHumans($other, $absolute, $short, $parts); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * When comparing a value in the past to default now: + * 1 hour from now + * 5 months from now + * + * When comparing a value in the future to default now: + * 1 hour ago + * 5 months ago + * + * When comparing a value in the past to another value: + * 1 hour after + * 5 months after + * + * When comparing a value in the future to another value: + * 1 hour before + * 5 months before + * + * @param Carbon|null $other + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function to($other = null, $absolute = false, $short = false, $parts = 1) + { + if (!$other && !$absolute) { + $absolute = static::DIFF_RELATIVE_TO_NOW; + } + + return $this->resolveCarbon($other)->diffForHumans($this, $absolute, $short, $parts); + } + + /** + * @alias to + * + * Get the difference in a human readable format in the current locale from an other + * instance given (or now if null given) to current instance. + * + * @param Carbon|null $other + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function until($other = null, $absolute = false, $short = false, $parts = 1) + { + return $this->to($other, $absolute, $short, $parts); + } + + /** + * Get the difference in a human readable format in the current locale from current + * instance to now. + * + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function fromNow($absolute = null, $short = false, $parts = 1) + { + $other = null; + + if ($absolute instanceof DateTimeInterface) { + list($other, $absolute, $short, $parts) = array_pad(func_get_args(), 5, null); + } + + return $this->from($other, $absolute, $short, $parts); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function toNow($absolute = null, $short = false, $parts = 1) + { + return $this->to(null, $absolute, $short, $parts); + } + + /** + * Get the difference in a human readable format in the current locale from an other + * instance given to now + * + * @param bool $absolute removes time difference modifiers ago, after, etc + * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval + * + * @return string + */ + public function ago($absolute = null, $short = false, $parts = 1) + { + $other = null; + + if ($absolute instanceof DateTimeInterface) { + list($other, $absolute, $short, $parts) = array_pad(func_get_args(), 5, null); + } + + return $this->from($other, $absolute, $short, $parts); + } + /////////////////////////////////////////////////////////////////// //////////////////////////// MODIFIERS //////////////////////////// /////////////////////////////////////////////////////////////////// /** - * Resets the time to 00:00:00 + * Resets the time to 00:00:00 start of day * * @return static */ public function startOfDay() { - return $this->setTime(0, 0, 0); + return $this->modify('00:00:00.000000'); } /** - * Resets the time to 23:59:59 + * Resets the time to 23:59:59 end of day * * @return static */ public function endOfDay() { - return $this->setTime(23, 59, 59); + return $this->modify('23:59:59.999999'); } /** @@ -2887,7 +4694,7 @@ class Carbon extends DateTime */ public function startOfMonth() { - return $this->setDateTime($this->year, $this->month, 1, 0, 0, 0); + return $this->setDate($this->year, $this->month, 1)->startOfDay(); } /** @@ -2897,7 +4704,7 @@ class Carbon extends DateTime */ public function endOfMonth() { - return $this->setDateTime($this->year, $this->month, $this->daysInMonth, 23, 59, 59); + return $this->setDate($this->year, $this->month, $this->daysInMonth)->endOfDay(); } /** @@ -2909,7 +4716,7 @@ class Carbon extends DateTime { $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; - return $this->setDateTime($this->year, $month, 1, 0, 0, 0); + return $this->setDate($this->year, $month, 1)->startOfDay(); } /** @@ -2929,7 +4736,7 @@ class Carbon extends DateTime */ public function startOfYear() { - return $this->setDateTime($this->year, 1, 1, 0, 0, 0); + return $this->setDate($this->year, 1, 1)->startOfDay(); } /** @@ -2939,7 +4746,7 @@ class Carbon extends DateTime */ public function endOfYear() { - return $this->setDateTime($this->year, 12, 31, 23, 59, 59); + return $this->setDate($this->year, 12, 31)->endOfDay(); } /** @@ -2951,7 +4758,7 @@ class Carbon extends DateTime { $year = $this->year - $this->year % static::YEARS_PER_DECADE; - return $this->setDateTime($year, 1, 1, 0, 0, 0); + return $this->setDate($year, 1, 1)->startOfDay(); } /** @@ -2963,7 +4770,7 @@ class Carbon extends DateTime { $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; - return $this->setDateTime($year, 12, 31, 23, 59, 59); + return $this->setDate($year, 12, 31)->endOfDay(); } /** @@ -2975,7 +4782,7 @@ class Carbon extends DateTime { $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; - return $this->setDateTime($year, 1, 1, 0, 0, 0); + return $this->setDate($year, 1, 1)->startOfDay(); } /** @@ -2987,7 +4794,31 @@ class Carbon extends DateTime { $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; - return $this->setDateTime($year, 12, 31, 23, 59, 59); + return $this->setDate($year, 12, 31)->endOfDay(); + } + + /** + * Resets the date to the first day of the century and the time to 00:00:00 + * + * @return static + */ + public function startOfMillennium() + { + $year = $this->year - ($this->year - 1) % static::YEARS_PER_MILLENNIUM; + + return $this->setDate($year, 1, 1)->startOfDay(); + } + + /** + * Resets the date to end of the century and time to 23:59:59 + * + * @return static + */ + public function endOfMillennium() + { + $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_MILLENNIUM + static::YEARS_PER_MILLENNIUM; + + return $this->setDate($year, 12, 31)->endOfDay(); } /** @@ -3018,6 +4849,76 @@ class Carbon extends DateTime return $this->endOfDay(); } + /** + * Modify to start of current hour, minutes and seconds become 0 + * + * @return static + */ + public function startOfHour() + { + return $this->setTime($this->hour, 0, 0); + } + + /** + * Modify to end of current hour, minutes and seconds become 59 + * + * @return static + */ + public function endOfHour() + { + return $this->modify("$this->hour:59:59.999999"); + } + + /** + * Modify to start of current minute, seconds become 0 + * + * @return static + */ + public function startOfMinute() + { + return $this->setTime($this->hour, $this->minute, 0); + } + + /** + * Modify to end of current minute, seconds become 59 + * + * @return static + */ + public function endOfMinute() + { + return $this->modify("$this->hour:$this->minute:59.999999"); + } + + /** + * Modify to start of current minute, seconds become 0 + * + * @return static + */ + public function startOfSecond() + { + return $this->modify("$this->hour:$this->minute:$this->second.0"); + } + + /** + * Modify to end of current minute, seconds become 59 + * + * @return static + */ + public function endOfSecond() + { + return $this->modify("$this->hour:$this->minute:$this->second.999999"); + } + + /** + * Modify to midday, default to self::$midDayAt + * + * @return static + */ + public function midDay() + { + return $this->setTime(self::$midDayAt, 0, 0); + } + /** * Modify to the next occurrence of a given day of the week. * If no dayOfWeek is provided, modify to the next occurrence @@ -3043,7 +4944,7 @@ class Carbon extends DateTime * @param bool $weekday * @param bool $forward * - * @return static + * @return $this */ private function nextOrPreviousDay($weekday = true, $forward = true) { @@ -3069,7 +4970,7 @@ class Carbon extends DateTime /** * Go backward to the previous weekday. * - * @return static + * @return $this */ public function previousWeekday() { @@ -3079,7 +4980,7 @@ class Carbon extends DateTime /** * Go forward to the next weekend day. * - * @return static + * @return $this */ public function nextWeekendDay() { @@ -3089,7 +4990,7 @@ class Carbon extends DateTime /** * Go backward to the previous weekend day. * - * @return static + * @return $this */ public function previousWeekendDay() { @@ -3170,11 +5071,11 @@ class Carbon extends DateTime */ public function nthOfMonth($nth, $dayOfWeek) { - $dt = $this->copy()->firstOfMonth(); - $check = $dt->format('Y-m'); - $dt->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + $date = $this->copy()->firstOfMonth(); + $check = $date->format('Y-m'); + $date->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return $dt->format('Y-m') === $check ? $this->modify($dt) : false; + return $date->format('Y-m') === $check ? $this->modify($date) : false; } /** @@ -3183,7 +5084,7 @@ class Carbon extends DateTime * first day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3198,7 +5099,7 @@ class Carbon extends DateTime * last day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3220,12 +5121,12 @@ class Carbon extends DateTime */ public function nthOfQuarter($nth, $dayOfWeek) { - $dt = $this->copy()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); - $lastMonth = $dt->month; - $year = $dt->year; - $dt->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + $date = $this->copy()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); + $lastMonth = $date->month; + $year = $date->year; + $date->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return ($lastMonth < $dt->month || $year !== $dt->year) ? false : $this->modify($dt); + return ($lastMonth < $date->month || $year !== $date->year) ? false : $this->modify($date); } /** @@ -3234,7 +5135,7 @@ class Carbon extends DateTime * first day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3249,7 +5150,7 @@ class Carbon extends DateTime * last day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3271,58 +5172,42 @@ class Carbon extends DateTime */ public function nthOfYear($nth, $dayOfWeek) { - $dt = $this->copy()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + $date = $this->copy()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return $this->year === $dt->year ? $this->modify($dt) : false; + return $this->year === $date->year ? $this->modify($date) : false; } /** * Modify the current instance to the average of a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date * * @return static */ - public function average(Carbon $dt = null) + public function average($date = null) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); + $increment = $this->diffInRealSeconds($date, false) / 2; + $intIncrement = floor($increment); + $microIncrement = (int) (($date->micro - $this->micro) / 2 + 1000000 * ($increment - $intIncrement)); + $micro = (int) ($this->micro + $microIncrement); + while ($micro >= 1000000) { + $micro -= 1000000; + $intIncrement++; + } + $this->addSeconds($intIncrement); - return $this->addSeconds((int) ($this->diffInSeconds($dt, false) / 2)); - } - - /** - * Check if its the birthday. Compares the date/month values of the two dates. - * - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. - * - * @return bool - */ - public function isBirthday(Carbon $dt = null) - { - return $this->isSameAs('md', $dt); - } - - /** - * Consider the timezone when modifying the instance. - * - * @param string $modify - * - * @return static - */ - public function modify($modify) - { - if ($this->local) { - return parent::modify($modify); + if (version_compare(PHP_VERSION, '7.1.8-dev', '>=')) { + $this->setTime($this->hour, $this->minute, $this->second, $micro); } - $timezone = $this->getTimezone(); - $this->setTimezone('UTC'); - $instance = parent::modify($modify); - $this->setTimezone($timezone); - - return $instance; + return $this; } + /////////////////////////////////////////////////////////////////// + /////////////////////////// SERIALIZATION ///////////////////////// + /////////////////////////////////////////////////////////////////// + /** * Return a serialized string of the instance. * @@ -3334,7 +5219,7 @@ class Carbon extends DateTime } /** - * Create an instance form a serialized string. + * Create an instance from a serialized string. * * @param string $value * @@ -3352,4 +5237,191 @@ class Carbon extends DateTime return $instance; } + + /** + * The __set_state handler. + * + * @param array $array + * + * @return static + */ + public static function __set_state($array) + { + return static::instance(parent::__set_state($array)); + } + + /** + * Prepare the object for JSON serialization. + * + * @return array|string + */ + public function jsonSerialize() + { + if (static::$serializer) { + return call_user_func(static::$serializer, $this); + } + + $carbon = $this; + + return call_user_func(function () use ($carbon) { + return get_object_vars($carbon); + }); + } + + /** + * JSON serialize all Carbon instances using the given callback. + * + * @param callable $callback + * + * @return void + */ + public static function serializeUsing($callback) + { + static::$serializer = $callback; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////////////// MACRO ///////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Register a custom macro. + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$localMacros[$name] = $macro; + } + + /** + * Remove all macros. + */ + public static function resetMacros() + { + static::$localMacros = array(); + } + + /** + * Mix another object into the class. + * + * @param object $mixin + * + * @return void + */ + public static function mixin($mixin) + { + $reflection = new \ReflectionClass($mixin); + $methods = $reflection->getMethods( + \ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); + } + } + + /** + * Checks if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$localMacros[$name]); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method + * @param array $parameters + * + * @throws \BadMethodCallException + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + if (!static::hasMacro($method)) { + throw new \BadMethodCallException("Method $method does not exist."); + } + + if (static::$localMacros[$method] instanceof Closure && method_exists('Closure', 'bind')) { + return call_user_func_array(Closure::bind(static::$localMacros[$method], null, get_called_class()), $parameters); + } + + return call_user_func_array(static::$localMacros[$method], $parameters); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method + * @param array $parameters + * + * @throws \BadMethodCallException|\ReflectionException + * + * @return mixed + */ + public function __call($method, $parameters) + { + if (!static::hasMacro($method)) { + throw new \BadMethodCallException("Method $method does not exist."); + } + + $macro = static::$localMacros[$method]; + + $reflexion = new \ReflectionFunction($macro); + $reflectionParameters = $reflexion->getParameters(); + $expectedCount = count($reflectionParameters); + $actualCount = count($parameters); + if ($expectedCount > $actualCount && $reflectionParameters[$expectedCount - 1]->name === 'self') { + for ($i = $actualCount; $i < $expectedCount - 1; $i++) { + $parameters[] = $reflectionParameters[$i]->getDefaultValue(); + } + $parameters[] = $this; + } + + if ($macro instanceof Closure && method_exists($macro, 'bindTo')) { + return call_user_func_array($macro->bindTo($this, get_class($this)), $parameters); + } + + return call_user_func_array($macro, $parameters); + } + + /** + * Show truthy properties on var_dump(). + * + * @return array + */ + public function __debugInfo() + { + return array_filter(get_object_vars($this), function ($var) { + return $var; + }); + } + + /** + * Cast the current instance into the given class. + * + * @param string $className The $className::instance() method will be called to cast the current object. + * + * @return object + */ + public function cast($className) + { + if (!method_exists($className, 'instance')) { + throw new \InvalidArgumentException("$className has not the instance() method needed to cast the date."); + } + + return $className::instance($this); + } } diff --git a/api/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/api/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php index 514ca6e..e8c6032 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ b/api/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -11,10 +11,12 @@ namespace Carbon; +use Closure; use DateInterval; use InvalidArgumentException; -use Symfony\Component\Translation\Loader\ArrayLoader; -use Symfony\Component\Translation\Translator; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; use Symfony\Component\Translation\TranslatorInterface; /** @@ -31,6 +33,14 @@ use Symfony\Component\Translation\TranslatorInterface; * @property int $seconds Total seconds of the current interval. * @property-read int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). * @property-read int $daysExcludeWeeks alias of dayzExcludeWeeks + * @property-read float $totalYears Number of years equivalent to the interval. + * @property-read float $totalMonths Number of months equivalent to the interval. + * @property-read float $totalWeeks Number of weeks equivalent to the interval. + * @property-read float $totalDays Number of days equivalent to the interval. + * @property-read float $totalDayz Alias for totalDays. + * @property-read float $totalHours Number of hours equivalent to the interval. + * @property-read float $totalMinutes Number of minutes equivalent to the interval. + * @property-read float $totalSeconds Number of seconds equivalent to the interval. * * @method static CarbonInterval years($years = 1) Create instance specifying a number of years. * @method static CarbonInterval year($years = 1) Alias for years() @@ -47,21 +57,21 @@ use Symfony\Component\Translation\TranslatorInterface; * @method static CarbonInterval minute($minutes = 1) Alias for minutes() * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds. * @method static CarbonInterval second($seconds = 1) Alias for seconds() - * @method CarbonInterval years() years($years = 1) Set the years portion of the current interval. - * @method CarbonInterval year() year($years = 1) Alias for years(). - * @method CarbonInterval months() months($months = 1) Set the months portion of the current interval. - * @method CarbonInterval month() month($months = 1) Alias for months(). - * @method CarbonInterval weeks() weeks($weeks = 1) Set the weeks portion of the current interval. Will overwrite dayz value. - * @method CarbonInterval week() week($weeks = 1) Alias for weeks(). - * @method CarbonInterval days() days($days = 1) Set the days portion of the current interval. - * @method CarbonInterval dayz() dayz($days = 1) Alias for days(). - * @method CarbonInterval day() day($days = 1) Alias for days(). - * @method CarbonInterval hours() hours($hours = 1) Set the hours portion of the current interval. - * @method CarbonInterval hour() hour($hours = 1) Alias for hours(). - * @method CarbonInterval minutes() minutes($minutes = 1) Set the minutes portion of the current interval. - * @method CarbonInterval minute() minute($minutes = 1) Alias for minutes(). - * @method CarbonInterval seconds() seconds($seconds = 1) Set the seconds portion of the current interval. - * @method CarbonInterval second() second($seconds = 1) Alias for seconds(). + * @method CarbonInterval years($years = 1) Set the years portion of the current interval. + * @method CarbonInterval year($years = 1) Alias for years(). + * @method CarbonInterval months($months = 1) Set the months portion of the current interval. + * @method CarbonInterval month($months = 1) Alias for months(). + * @method CarbonInterval weeks($weeks = 1) Set the weeks portion of the current interval. Will overwrite dayz value. + * @method CarbonInterval week($weeks = 1) Alias for weeks(). + * @method CarbonInterval days($days = 1) Set the days portion of the current interval. + * @method CarbonInterval dayz($days = 1) Alias for days(). + * @method CarbonInterval day($days = 1) Alias for days(). + * @method CarbonInterval hours($hours = 1) Set the hours portion of the current interval. + * @method CarbonInterval hour($hours = 1) Alias for hours(). + * @method CarbonInterval minutes($minutes = 1) Set the minutes portion of the current interval. + * @method CarbonInterval minute($minutes = 1) Alias for minutes(). + * @method CarbonInterval seconds($seconds = 1) Set the seconds portion of the current interval. + * @method CarbonInterval second($seconds = 1) Alias for seconds(). */ class CarbonInterval extends DateInterval { @@ -84,12 +94,77 @@ class CarbonInterval extends DateInterval */ protected static $translator; + /** + * @var array|null + */ + protected static $cascadeFactors; + + /** + * @var array|null + */ + private static $flipCascadeFactors; + + /** + * The registered macros. + * + * @var array + */ + protected static $macros = array(); + /** * Before PHP 5.4.20/5.5.4 instead of FALSE days will be set to -99999 when the interval instance - * was created by DateTime:diff(). + * was created by DateTime::diff(). */ const PHP_DAYS_FALSE = -99999; + /** + * Mapping of units and factors for cascading. + * + * Should only be modified by changing the factors or referenced constants. + * + * @return array + */ + public static function getCascadeFactors() + { + return static::$cascadeFactors ?: array( + 'minutes' => array(Carbon::SECONDS_PER_MINUTE, 'seconds'), + 'hours' => array(Carbon::MINUTES_PER_HOUR, 'minutes'), + 'dayz' => array(Carbon::HOURS_PER_DAY, 'hours'), + 'months' => array(Carbon::DAYS_PER_WEEK * Carbon::WEEKS_PER_MONTH, 'dayz'), + 'years' => array(Carbon::MONTHS_PER_YEAR, 'months'), + ); + } + + private static function standardizeUnit($unit) + { + $unit = rtrim($unit, 'sz').'s'; + + return $unit === 'days' ? 'dayz' : $unit; + } + + private static function getFlipCascadeFactors() + { + if (!self::$flipCascadeFactors) { + self::$flipCascadeFactors = array(); + foreach (static::getCascadeFactors() as $to => $tuple) { + list($factor, $from) = $tuple; + + self::$flipCascadeFactors[self::standardizeUnit($from)] = array(self::standardizeUnit($to), $factor); + } + } + + return self::$flipCascadeFactors; + } + + /** + * @param array $cascadeFactors + */ + public static function setCascadeFactors(array $cascadeFactors) + { + self::$flipCascadeFactors = null; + static::$cascadeFactors = $cascadeFactors; + } + /** * Determine if the interval was created via DateTime:diff() or not. * @@ -119,32 +194,99 @@ class CarbonInterval extends DateInterval */ public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null) { - $spec = static::PERIOD_PREFIX; + $spec = $years; - $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; - $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; + if (!is_string($spec) || floatval($years) || preg_match('/^[0-9.]/', $years)) { + $spec = static::PERIOD_PREFIX; - $specDays = 0; - $specDays += $weeks > 0 ? $weeks * Carbon::DAYS_PER_WEEK : 0; - $specDays += $days > 0 ? $days : 0; + $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; + $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; - $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; + $specDays = 0; + $specDays += $weeks > 0 ? $weeks * static::getDaysPerWeek() : 0; + $specDays += $days > 0 ? $days : 0; - if ($hours > 0 || $minutes > 0 || $seconds > 0) { - $spec .= static::PERIOD_TIME_PREFIX; - $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; - $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; - $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; - } + $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; - if ($spec === static::PERIOD_PREFIX) { - // Allow the zero interval. - $spec .= '0'.static::PERIOD_YEARS; + if ($hours > 0 || $minutes > 0 || $seconds > 0) { + $spec .= static::PERIOD_TIME_PREFIX; + $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; + $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; + $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; + } + + if ($spec === static::PERIOD_PREFIX) { + // Allow the zero interval. + $spec .= '0'.static::PERIOD_YEARS; + } } parent::__construct($spec); } + /** + * Returns the factor for a given source-to-target couple. + * + * @param string $source + * @param string $target + * + * @return int|null + */ + public static function getFactor($source, $target) + { + $source = self::standardizeUnit($source); + $target = self::standardizeUnit($target); + $factors = static::getFlipCascadeFactors(); + if (isset($factors[$source])) { + list($to, $factor) = $factors[$source]; + if ($to === $target) { + return $factor; + } + } + + return null; + } + + /** + * Returns current config for days per week. + * + * @return int + */ + public static function getDaysPerWeek() + { + return static::getFactor('dayz', 'weeks') ?: Carbon::DAYS_PER_WEEK; + } + + /** + * Returns current config for hours per day. + * + * @return int + */ + public static function getHoursPerDay() + { + return static::getFactor('hours', 'dayz') ?: Carbon::HOURS_PER_DAY; + } + + /** + * Returns current config for minutes per hour. + * + * @return int + */ + public static function getMinutesPerHours() + { + return static::getFactor('minutes', 'hours') ?: Carbon::MINUTES_PER_HOUR; + } + + /** + * Returns current config for seconds per minute. + * + * @return int + */ + public static function getSecondsPerMinutes() + { + return static::getFactor('seconds', 'minutes') ?: Carbon::SECONDS_PER_MINUTE; + } + /** * Create a new CarbonInterval instance from specific values. * This is an alias for the constructor that allows better fluent @@ -166,6 +308,19 @@ class CarbonInterval extends DateInterval return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds); } + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + $date = new static($this->spec()); + $date->invert = $this->invert; + + return $date; + } + /** * Provide static helpers to create instances. Allows CarbonInterval::years(3). * @@ -211,6 +366,123 @@ class CarbonInterval extends DateInterval case 'second': return new static(null, null, null, null, null, null, $arg); } + + if (static::hasMacro($name)) { + return call_user_func_array( + array(new static(0), $name), $args + ); + } + } + + /** + * Creates a CarbonInterval from string. + * + * Format: + * + * Suffix | Unit | Example | DateInterval expression + * -------|---------|---------|------------------------ + * y | years | 1y | P1Y + * mo | months | 3mo | P3M + * w | weeks | 2w | P2W + * d | days | 28d | P28D + * h | hours | 4h | PT4H + * m | minutes | 12m | PT12M + * s | seconds | 59s | PT59S + * + * e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds. + * + * Special cases: + * - An empty string will return a zero interval + * - Fractions are allowed for weeks, days, hours and minutes and will be converted + * and rounded to the next smaller value (caution: 0.5w = 4d) + * + * @param string $intervalDefinition + * + * @return static + */ + public static function fromString($intervalDefinition) + { + if (empty($intervalDefinition)) { + return new static(0); + } + + $years = 0; + $months = 0; + $weeks = 0; + $days = 0; + $hours = 0; + $minutes = 0; + $seconds = 0; + + $pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i'; + preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER); + while ($match = array_shift($parts)) { + list($part, $value, $unit) = $match; + $intValue = intval($value); + $fraction = floatval($value) - $intValue; + switch (strtolower($unit)) { + case 'year': + case 'years': + case 'y': + $years += $intValue; + break; + + case 'month': + case 'months': + case 'mo': + $months += $intValue; + break; + + case 'week': + case 'weeks': + case 'w': + $weeks += $intValue; + if ($fraction) { + $parts[] = array(null, $fraction * static::getDaysPerWeek(), 'd'); + } + break; + + case 'day': + case 'days': + case 'd': + $days += $intValue; + if ($fraction) { + $parts[] = array(null, $fraction * static::getHoursPerDay(), 'h'); + } + break; + + case 'hour': + case 'hours': + case 'h': + $hours += $intValue; + if ($fraction) { + $parts[] = array(null, $fraction * static::getMinutesPerHours(), 'm'); + } + break; + + case 'minute': + case 'minutes': + case 'm': + $minutes += $intValue; + if ($fraction) { + $seconds += round($fraction * static::getSecondsPerMinutes()); + } + break; + + case 'second': + case 'seconds': + case 's': + $seconds += $intValue; + break; + + default: + throw new InvalidArgumentException( + sprintf('Invalid part %s in definition %s', $part, $intervalDefinition) + ); + } + } + + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds); } /** @@ -218,25 +490,60 @@ class CarbonInterval extends DateInterval * DateInterval objects created from DateTime::diff() as you can't externally * set the $days field. * - * @param DateInterval $di + * Pass false as second argument to get a microseconds-precise interval. Else + * microseconds in the original interval will not be kept. * - * @throws \InvalidArgumentException + * @param DateInterval $di + * @param bool $trimMicroseconds (true by default) * * @return static */ - public static function instance(DateInterval $di) + public static function instance(DateInterval $di, $trimMicroseconds = true) { - if (static::wasCreatedFromDiff($di)) { - throw new InvalidArgumentException('Can not instance a DateInterval object created from DateTime::diff().'); + $microseconds = $trimMicroseconds || version_compare(PHP_VERSION, '7.1.0-dev', '<') ? 0 : $di->f; + $instance = new static(static::getDateIntervalSpec($di)); + if ($microseconds) { + $instance->f = $microseconds; + } + $instance->invert = $di->invert; + foreach (array('y', 'm', 'd', 'h', 'i', 's') as $unit) { + if ($di->$unit < 0) { + $instance->$unit *= -1; + } } - $instance = new static($di->y, $di->m, 0, $di->d, $di->h, $di->i, $di->s); - $instance->invert = $di->invert; - $instance->days = $di->days; - return $instance; } + /** + * Make a CarbonInterval instance from given variable if possible. + * + * Always return a new instance. Parse only strings and only these likely to be intervals (skip dates + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * + * @param mixed $var + * + * @return static|null + */ + public static function make($var) + { + if ($var instanceof DateInterval) { + return static::instance($var); + } + + if (is_string($var)) { + $var = trim($var); + + if (substr($var, 0, 1) === 'P') { + return new static($var); + } + + if (preg_match('/^(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+$/i', $var)) { + return static::fromString($var); + } + } + } + /////////////////////////////////////////////////////////////////// /////////////////////// LOCALIZATION ////////////////////////////// /////////////////////////////////////////////////////////////////// @@ -249,16 +556,14 @@ class CarbonInterval extends DateInterval protected static function translator() { if (static::$translator === null) { - static::$translator = new Translator('en'); - static::$translator->addLoader('array', new ArrayLoader()); - static::setLocale('en'); + static::$translator = Translator::get(); } return static::$translator; } /** - * Get the translator instance in use + * Get the translator instance in use. * * @return \Symfony\Component\Translation\TranslatorInterface */ @@ -268,7 +573,7 @@ class CarbonInterval extends DateInterval } /** - * Set the translator instance to use + * Set the translator instance to use. * * @param TranslatorInterface $translator */ @@ -278,7 +583,7 @@ class CarbonInterval extends DateInterval } /** - * Get the current translator locale + * Get the current translator locale. * * @return string */ @@ -288,16 +593,13 @@ class CarbonInterval extends DateInterval } /** - * Set the current translator locale + * Set the current translator locale. * * @param string $locale */ public static function setLocale($locale) { - static::translator()->setLocale($locale); - - // Ensure the locale has been loaded. - static::translator()->addResource('array', require __DIR__.'/Lang/'.$locale.'.php', $locale); + return static::translator()->setLocale($locale) !== false; } /////////////////////////////////////////////////////////////////// @@ -305,16 +607,20 @@ class CarbonInterval extends DateInterval /////////////////////////////////////////////////////////////////// /** - * Get a part of the CarbonInterval object + * Get a part of the CarbonInterval object. * * @param string $name * * @throws \InvalidArgumentException * - * @return int + * @return int|float */ public function __get($name) { + if (substr($name, 0, 5) === 'total') { + return $this->total(substr($name, 5)); + } + switch ($name) { case 'years': return $this->y; @@ -335,11 +641,11 @@ class CarbonInterval extends DateInterval return $this->s; case 'weeks': - return (int) floor($this->d / Carbon::DAYS_PER_WEEK); + return (int) floor($this->d / static::getDaysPerWeek()); case 'daysExcludeWeeks': case 'dayzExcludeWeeks': - return $this->d % Carbon::DAYS_PER_WEEK; + return $this->d % static::getDaysPerWeek(); default: throw new InvalidArgumentException(sprintf("Unknown getter '%s'", $name)); @@ -347,7 +653,7 @@ class CarbonInterval extends DateInterval } /** - * Set a part of the CarbonInterval object + * Set a part of the CarbonInterval object. * * @param string $name * @param int $val @@ -366,7 +672,7 @@ class CarbonInterval extends DateInterval break; case 'weeks': - $this->d = $val * Carbon::DAYS_PER_WEEK; + $this->d = $val * static::getDaysPerWeek(); break; case 'dayz': @@ -397,11 +703,102 @@ class CarbonInterval extends DateInterval */ public function weeksAndDays($weeks, $days) { - $this->dayz = ($weeks * Carbon::DAYS_PER_WEEK) + $days; + $this->dayz = ($weeks * static::getDaysPerWeek()) + $days; return $this; } + /** + * Register a custom macro. + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$macros[$name] = $macro; + } + + /** + * Remove all macros. + */ + public static function resetMacros() + { + static::$macros = array(); + } + + /** + * Register macros from a mixin object. + * + * @param object $mixin + * + * @throws \ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + $reflection = new ReflectionClass($mixin); + + $methods = $reflection->getMethods( + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); + } + } + + /** + * Check if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Call given macro. + * + * @param string $name + * @param array $parameters + * + * @return mixed + */ + protected function callMacro($name, $parameters) + { + $macro = static::$macros[$name]; + + $reflection = new ReflectionFunction($macro); + + $reflectionParameters = $reflection->getParameters(); + + $expectedCount = count($reflectionParameters); + $actualCount = count($parameters); + + if ($expectedCount > $actualCount && $reflectionParameters[$expectedCount - 1]->name === 'self') { + for ($i = $actualCount; $i < $expectedCount - 1; $i++) { + $parameters[] = $reflectionParameters[$i]->getDefaultValue(); + } + + $parameters[] = $this; + } + + if ($macro instanceof Closure && method_exists($macro, 'bindTo')) { + $macro = $macro->bindTo($this, get_class($this)); + } + + return call_user_func_array($macro, $parameters); + } + /** * Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day(). * @@ -415,6 +812,10 @@ class CarbonInterval extends DateInterval */ public function __call($name, $args) { + if (static::hasMacro($name)) { + return $this->callMacro($name, $args); + } + $arg = count($args) === 0 ? 1 : $args[0]; switch ($name) { @@ -430,7 +831,7 @@ class CarbonInterval extends DateInterval case 'weeks': case 'week': - $this->dayz = $arg * Carbon::DAYS_PER_WEEK; + $this->dayz = $arg * static::getDaysPerWeek(); break; case 'days': @@ -461,24 +862,27 @@ class CarbonInterval extends DateInterval /** * Get the current interval in a human readable format in the current locale. * + * @param bool $short (false by default), returns short units if true + * * @return string */ - public function forHumans() + public function forHumans($short = false) { $periods = array( - 'year' => $this->years, - 'month' => $this->months, - 'week' => $this->weeks, - 'day' => $this->daysExcludeWeeks, - 'hour' => $this->hours, - 'minute' => $this->minutes, - 'second' => $this->seconds, + 'year' => array('y', $this->years), + 'month' => array('m', $this->months), + 'week' => array('w', $this->weeks), + 'day' => array('d', $this->daysExcludeWeeks), + 'hour' => array('h', $this->hours), + 'minute' => array('min', $this->minutes), + 'second' => array('s', $this->seconds), ); $parts = array(); - foreach ($periods as $unit => $count) { + foreach ($periods as $unit => $options) { + list($shortUnit, $count) = $options; if ($count > 0) { - array_push($parts, static::translator()->transChoice($unit, $count, array(':count' => $count))); + $parts[] = static::translator()->transChoice($short ? $shortUnit : $unit, $count, array(':count' => $count)); } } @@ -496,7 +900,31 @@ class CarbonInterval extends DateInterval } /** - * Add the passed interval to the current instance + * Convert the interval to a CarbonPeriod. + * + * @return CarbonPeriod + */ + public function toPeriod() + { + return CarbonPeriod::createFromArray( + array_merge(array($this), func_get_args()) + ); + } + + /** + * Invert the interval. + * + * @return $this + */ + public function invert() + { + $this->invert = $this->invert ? 0 : 1; + + return $this; + } + + /** + * Add the passed interval to the current instance. * * @param DateInterval $interval * @@ -504,7 +932,7 @@ class CarbonInterval extends DateInterval */ public function add(DateInterval $interval) { - $sign = $interval->invert === 1 ? -1 : 1; + $sign = ($this->invert === 1) !== ($interval->invert === 1) ? -1 : 1; if (static::wasCreatedFromDiff($interval)) { $this->dayz += $interval->days * $sign; @@ -517,26 +945,64 @@ class CarbonInterval extends DateInterval $this->seconds += $interval->s * $sign; } + if (($this->years || $this->months || $this->dayz || $this->hours || $this->minutes || $this->seconds) && + $this->years <= 0 && $this->months <= 0 && $this->dayz <= 0 && $this->hours <= 0 && $this->minutes <= 0 && $this->seconds <= 0 + ) { + $this->years *= -1; + $this->months *= -1; + $this->dayz *= -1; + $this->hours *= -1; + $this->minutes *= -1; + $this->seconds *= -1; + $this->invert(); + } + return $this; } /** - * Get the interval_spec string + * Multiply current instance given number of times + * + * @param float $factor + * + * @return $this + */ + public function times($factor) + { + if ($factor < 0) { + $this->invert = $this->invert ? 0 : 1; + $factor = -$factor; + } + + $this->years = (int) round($this->years * $factor); + $this->months = (int) round($this->months * $factor); + $this->dayz = (int) round($this->dayz * $factor); + $this->hours = (int) round($this->hours * $factor); + $this->minutes = (int) round($this->minutes * $factor); + $this->seconds = (int) round($this->seconds * $factor); + + return $this; + } + + /** + * Get the interval_spec string of a date interval. + * + * @param DateInterval $interval * * @return string */ - public function spec() + public static function getDateIntervalSpec(DateInterval $interval) { $date = array_filter(array( - static::PERIOD_YEARS => $this->y, - static::PERIOD_MONTHS => $this->m, - static::PERIOD_DAYS => $this->d, + static::PERIOD_YEARS => abs($interval->y), + static::PERIOD_MONTHS => abs($interval->m), + static::PERIOD_DAYS => abs($interval->d), )); $time = array_filter(array( - static::PERIOD_HOURS => $this->h, - static::PERIOD_MINUTES => $this->i, - static::PERIOD_SECONDS => $this->s, + static::PERIOD_HOURS => abs($interval->h), + static::PERIOD_MINUTES => abs($interval->i), + static::PERIOD_SECONDS => abs($interval->s), )); $specString = static::PERIOD_PREFIX; @@ -554,4 +1020,144 @@ class CarbonInterval extends DateInterval return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; } + + /** + * Get the interval_spec string. + * + * @return string + */ + public function spec() + { + return static::getDateIntervalSpec($this); + } + + /** + * Comparing 2 date intervals. + * + * @param DateInterval $a + * @param DateInterval $b + * + * @return int + */ + public static function compareDateIntervals(DateInterval $a, DateInterval $b) + { + $current = Carbon::now(); + $passed = $current->copy()->add($b); + $current->add($a); + + if ($current < $passed) { + return -1; + } + if ($current > $passed) { + return 1; + } + + return 0; + } + + /** + * Comparing with passed interval. + * + * @param DateInterval $interval + * + * @return int + */ + public function compare(DateInterval $interval) + { + return static::compareDateIntervals($this, $interval); + } + + /** + * Convert overflowed values into bigger units. + * + * @return $this + */ + public function cascade() + { + foreach (static::getFlipCascadeFactors() as $source => $cascade) { + list($target, $factor) = $cascade; + + if ($source === 'dayz' && $target === 'weeks') { + continue; + } + + $value = $this->$source; + $this->$source = $modulo = $value % $factor; + $this->$target += ($value - $modulo) / $factor; + } + + return $this; + } + + /** + * Get amount of given unit equivalent to the interval. + * + * @param string $unit + * + * @throws \InvalidArgumentException + * + * @return float + */ + public function total($unit) + { + $realUnit = $unit = strtolower($unit); + + if (in_array($unit, array('days', 'weeks'))) { + $realUnit = 'dayz'; + } elseif (!in_array($unit, array('seconds', 'minutes', 'hours', 'dayz', 'months', 'years'))) { + throw new InvalidArgumentException("Unknown unit '$unit'."); + } + + $result = 0; + $cumulativeFactor = 0; + $unitFound = false; + + foreach (static::getFlipCascadeFactors() as $source => $cascade) { + list($target, $factor) = $cascade; + + if ($source === $realUnit) { + $unitFound = true; + $result += $this->$source; + $cumulativeFactor = 1; + } + + if ($factor === false) { + if ($unitFound) { + break; + } + + $result = 0; + $cumulativeFactor = 0; + + continue; + } + + if ($target === $realUnit) { + $unitFound = true; + } + + if ($cumulativeFactor) { + $cumulativeFactor *= $factor; + $result += $this->$target * $cumulativeFactor; + + continue; + } + + $result = ($result + $this->$source) / $factor; + } + + if (isset($target) && !$cumulativeFactor) { + $result += $this->$target; + } + + if (!$unitFound) { + throw new \InvalidArgumentException("Unit $unit have no configuration to get total from other units."); + } + + if ($unit === 'weeks') { + return $result / static::getDaysPerWeek(); + } + + return $result; + } } diff --git a/api/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/api/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php new file mode 100644 index 0000000..808e9d6 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php @@ -0,0 +1,1453 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use BadMethodCallException; +use Closure; +use Countable; +use DateInterval; +use DateTime; +use DateTimeInterface; +use InvalidArgumentException; +use Iterator; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; +use RuntimeException; + +/** + * Substitution of DatePeriod with some modifications and many more features. + * Fully compatible with PHP 5.3+! + * + * @method static CarbonPeriod start($date, $inclusive = null) Create instance specifying start date. + * @method static CarbonPeriod since($date, $inclusive = null) Alias for start(). + * @method static CarbonPeriod sinceNow($inclusive = null) Create instance with start date set to now. + * @method static CarbonPeriod end($date = null, $inclusive = null) Create instance specifying end date. + * @method static CarbonPeriod until($date = null, $inclusive = null) Alias for end(). + * @method static CarbonPeriod untilNow($inclusive = null) Create instance with end date set to now. + * @method static CarbonPeriod dates($start, $end = null) Create instance with start and end date. + * @method static CarbonPeriod between($start, $end = null) Create instance with start and end date. + * @method static CarbonPeriod recurrences($recurrences = null) Create instance with maximum number of recurrences. + * @method static CarbonPeriod times($recurrences = null) Alias for recurrences(). + * @method static CarbonPeriod options($options = null) Create instance with options. + * @method static CarbonPeriod toggle($options, $state = null) Create instance with options toggled on or off. + * @method static CarbonPeriod filter($callback, $name = null) Create instance with filter added to the stack. + * @method static CarbonPeriod push($callback, $name = null) Alias for filter(). + * @method static CarbonPeriod prepend($callback, $name = null) Create instance with filter prepened to the stack. + * @method static CarbonPeriod filters(array $filters) Create instance with filters stack. + * @method static CarbonPeriod interval($interval) Create instance with given date interval. + * @method static CarbonPeriod each($interval) Create instance with given date interval. + * @method static CarbonPeriod every($interval) Create instance with given date interval. + * @method static CarbonPeriod step($interval) Create instance with given date interval. + * @method static CarbonPeriod stepBy($interval) Create instance with given date interval. + * @method static CarbonPeriod invert() Create instance with inverted date interval. + * @method static CarbonPeriod years($years = 1) Create instance specifying a number of years for date interval. + * @method static CarbonPeriod year($years = 1) Alias for years(). + * @method static CarbonPeriod months($months = 1) Create instance specifying a number of months for date interval. + * @method static CarbonPeriod month($months = 1) Alias for months(). + * @method static CarbonPeriod weeks($weeks = 1) Create instance specifying a number of weeks for date interval. + * @method static CarbonPeriod week($weeks = 1) Alias for weeks(). + * @method static CarbonPeriod days($days = 1) Create instance specifying a number of days for date interval. + * @method static CarbonPeriod dayz($days = 1) Alias for days(). + * @method static CarbonPeriod day($days = 1) Alias for days(). + * @method static CarbonPeriod hours($hours = 1) Create instance specifying a number of hours for date interval. + * @method static CarbonPeriod hour($hours = 1) Alias for hours(). + * @method static CarbonPeriod minutes($minutes = 1) Create instance specifying a number of minutes for date interval. + * @method static CarbonPeriod minute($minutes = 1) Alias for minutes(). + * @method static CarbonPeriod seconds($seconds = 1) Create instance specifying a number of seconds for date interval. + * @method static CarbonPeriod second($seconds = 1) Alias for seconds(). + * @method CarbonPeriod start($date, $inclusive = null) Change the period start date. + * @method CarbonPeriod since($date, $inclusive = null) Alias for start(). + * @method CarbonPeriod sinceNow($inclusive = null) Change the period start date to now. + * @method CarbonPeriod end($date = null, $inclusive = null) Change the period end date. + * @method CarbonPeriod until($date = null, $inclusive = null) Alias for end(). + * @method CarbonPeriod untilNow($inclusive = null) Change the period end date to now. + * @method CarbonPeriod dates($start, $end = null) Change the period start and end date. + * @method CarbonPeriod recurrences($recurrences = null) Change the maximum number of recurrences. + * @method CarbonPeriod times($recurrences = null) Alias for recurrences(). + * @method CarbonPeriod options($options = null) Change the period options. + * @method CarbonPeriod toggle($options, $state = null) Toggle given options on or off. + * @method CarbonPeriod filter($callback, $name = null) Add a filter to the stack. + * @method CarbonPeriod push($callback, $name = null) Alias for filter(). + * @method CarbonPeriod prepend($callback, $name = null) Prepend a filter to the stack. + * @method CarbonPeriod filters(array $filters = array()) Set filters stack. + * @method CarbonPeriod interval($interval) Change the period date interval. + * @method CarbonPeriod invert() Invert the period date interval. + * @method CarbonPeriod years($years = 1) Set the years portion of the date interval. + * @method CarbonPeriod year($years = 1) Alias for years(). + * @method CarbonPeriod months($months = 1) Set the months portion of the date interval. + * @method CarbonPeriod month($months = 1) Alias for months(). + * @method CarbonPeriod weeks($weeks = 1) Set the weeks portion of the date interval. + * @method CarbonPeriod week($weeks = 1) Alias for weeks(). + * @method CarbonPeriod days($days = 1) Set the days portion of the date interval. + * @method CarbonPeriod dayz($days = 1) Alias for days(). + * @method CarbonPeriod day($days = 1) Alias for days(). + * @method CarbonPeriod hours($hours = 1) Set the hours portion of the date interval. + * @method CarbonPeriod hour($hours = 1) Alias for hours(). + * @method CarbonPeriod minutes($minutes = 1) Set the minutes portion of the date interval. + * @method CarbonPeriod minute($minutes = 1) Alias for minutes(). + * @method CarbonPeriod seconds($seconds = 1) Set the seconds portion of the date interval. + * @method CarbonPeriod second($seconds = 1) Alias for seconds(). + */ +class CarbonPeriod implements Iterator, Countable +{ + /** + * Built-in filters. + * + * @var string + */ + const RECURRENCES_FILTER = 'Carbon\CarbonPeriod::filterRecurrences'; + const END_DATE_FILTER = 'Carbon\CarbonPeriod::filterEndDate'; + + /** + * Special value which can be returned by filters to end iteration. Also a filter. + * + * @var string + */ + const END_ITERATION = 'Carbon\CarbonPeriod::endIteration'; + + /** + * Available options. + * + * @var int + */ + const EXCLUDE_START_DATE = 1; + const EXCLUDE_END_DATE = 2; + + /** + * Number of maximum attempts before giving up on finding next valid date. + * + * @var int + */ + const NEXT_MAX_ATTEMPTS = 1000; + + /** + * The registered macros. + * + * @var array + */ + protected static $macros = array(); + + /** + * Underlying date interval instance. Always present, one day by default. + * + * @var CarbonInterval + */ + protected $dateInterval; + + /** + * Whether current date interval was set by default. + * + * @var bool + */ + protected $isDefaultInterval; + + /** + * The filters stack. + * + * @var array + */ + protected $filters = array(); + + /** + * Period start date. Applied on rewind. Always present, now by default. + * + * @var Carbon + */ + protected $startDate; + + /** + * Period end date. For inverted interval should be before the start date. Applied via a filter. + * + * @var Carbon|null + */ + protected $endDate; + + /** + * Limit for number of recurrences. Applied via a filter. + * + * @var int|null + */ + protected $recurrences; + + /** + * Iteration options. + * + * @var int + */ + protected $options; + + /** + * Index of current date. Always sequential, even if some dates are skipped by filters. + * Equal to null only before the first iteration. + * + * @var int + */ + protected $key; + + /** + * Current date. May temporarily hold unaccepted value when looking for a next valid date. + * Equal to null only before the first iteration. + * + * @var Carbon + */ + protected $current; + + /** + * Timezone of current date. Taken from the start date. + * + * @var \DateTimeZone|null + */ + protected $timezone; + + /** + * The cached validation result for current date. + * + * @var bool|string|null + */ + protected $validationResult; + + /** + * Create a new instance. + * + * @return static + */ + public static function create() + { + return static::createFromArray(func_get_args()); + } + + /** + * Create a new instance from an array of parameters. + * + * @param array $params + * + * @return static + */ + public static function createFromArray(array $params) + { + // PHP 5.3 equivalent of new static(...$params). + $reflection = new ReflectionClass(get_class()); + /** @var static $instance */ + $instance = $reflection->newInstanceArgs($params); + + return $instance; + } + + /** + * Create CarbonPeriod from ISO 8601 string. + * + * @param string $iso + * @param int|null $options + * + * @return static + */ + public static function createFromIso($iso, $options = null) + { + $params = static::parseIso8601($iso); + + $instance = static::createFromArray($params); + + if ($options !== null) { + $instance->setOptions($options); + } + + return $instance; + } + + /** + * Return whether given interval contains non zero value of any time unit. + * + * @param \DateInterval $interval + * + * @return bool + */ + protected static function intervalHasTime(DateInterval $interval) + { + // The array_key_exists and get_object_vars are used as a workaround to check microsecond support. + // Both isset and property_exists will fail on PHP 7.0.14 - 7.0.21 due to the following bug: + // https://bugs.php.net/bug.php?id=74852 + return $interval->h || $interval->i || $interval->s || array_key_exists('f', get_object_vars($interval)) && $interval->f; + } + + /** + * Return whether given callable is a string pointing to one of Carbon's is* methods + * and should be automatically converted to a filter callback. + * + * @param callable $callable + * + * @return bool + */ + protected static function isCarbonPredicateMethod($callable) + { + return is_string($callable) && substr($callable, 0, 2) === 'is' && (method_exists('Carbon\Carbon', $callable) || Carbon::hasMacro($callable)); + } + + /** + * Return whether given variable is an ISO 8601 specification. + * + * Note: Check is very basic, as actual validation will be done later when parsing. + * We just want to ensure that variable is not any other type of a valid parameter. + * + * @param mixed $var + * + * @return bool + */ + protected static function isIso8601($var) + { + if (!is_string($var)) { + return false; + } + + // Match slash but not within a timezone name. + $part = '[a-z]+(?:[_-][a-z]+)*'; + + preg_match("#\b$part/$part\b|(/)#i", $var, $match); + + return isset($match[1]); + } + + /** + * Parse given ISO 8601 string into an array of arguments. + * + * @param string $iso + * + * @return array + */ + protected static function parseIso8601($iso) + { + $result = array(); + + $interval = null; + $start = null; + $end = null; + + foreach (explode('/', $iso) as $key => $part) { + if ($key === 0 && preg_match('/^R([0-9]*)$/', $part, $match)) { + $parsed = strlen($match[1]) ? (int) $match[1] : null; + } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { + $interval = $part; + } elseif ($start === null && $parsed = Carbon::make($part)) { + $start = $part; + } elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start, $part))) { + $end = $part; + } else { + throw new InvalidArgumentException("Invalid ISO 8601 specification: $iso."); + } + + $result[] = $parsed; + } + + return $result; + } + + /** + * Add missing parts of the target date from the soure date. + * + * @param string $source + * @param string $target + * + * @return string + */ + protected static function addMissingParts($source, $target) + { + $pattern = '/'.preg_replace('/[0-9]+/', '[0-9]+', preg_quote($target, '/')).'$/'; + + $result = preg_replace($pattern, $target, $source, 1, $count); + + return $count ? $result : $target; + } + + /** + * Register a custom macro. + * + * @param string $name + * @param object|callable $macro + * + * @return void + */ + public static function macro($name, $macro) + { + static::$macros[$name] = $macro; + } + + /** + * Remove all macros. + */ + public static function resetMacros() + { + static::$macros = array(); + } + + /** + * Register macros from a mixin object. + * + * @param object $mixin + * + * @throws \ReflectionException + * + * @return void + */ + public static function mixin($mixin) + { + $reflection = new ReflectionClass($mixin); + + $methods = $reflection->getMethods( + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); + } + } + + /** + * Check if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + + /** + * Provide static proxy for instance aliases. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + return call_user_func_array( + array(new static, $method), $parameters + ); + } + + /** + * CarbonPeriod constructor. + * + * @throws InvalidArgumentException + */ + public function __construct() + { + // Parse and assign arguments one by one. First argument may be an ISO 8601 spec, + // which will be first parsed into parts and then processed the same way. + $arguments = func_get_args(); + + if (count($arguments) && static::isIso8601($iso = $arguments[0])) { + array_splice($arguments, 0, 1, static::parseIso8601($iso)); + } + + foreach ($arguments as $argument) { + if ($this->dateInterval === null && $parsed = CarbonInterval::make($argument)) { + $this->setDateInterval($parsed); + } elseif ($this->startDate === null && $parsed = Carbon::make($argument)) { + $this->setStartDate($parsed); + } elseif ($this->endDate === null && $parsed = Carbon::make($argument)) { + $this->setEndDate($parsed); + } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { + $this->setRecurrences($argument); + } elseif ($this->options === null && (is_int($argument) || $argument === null)) { + $this->setOptions($argument); + } else { + throw new InvalidArgumentException('Invalid constructor parameters.'); + } + } + + if ($this->startDate === null) { + $this->setStartDate(Carbon::now()); + } + + if ($this->dateInterval === null) { + $this->setDateInterval(CarbonInterval::day()); + + $this->isDefaultInterval = true; + } + + if ($this->options === null) { + $this->setOptions(0); + } + } + + /** + * Change the period date interval. + * + * @param DateInterval|string $interval + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setDateInterval($interval) + { + if (!$interval = CarbonInterval::make($interval)) { + throw new InvalidArgumentException('Invalid interval.'); + } + + if ($interval->spec() === 'PT0S') { + throw new InvalidArgumentException('Empty interval is not accepted.'); + } + + $this->dateInterval = $interval; + + $this->isDefaultInterval = false; + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Invert the period date interval. + * + * @return $this + */ + public function invertDateInterval() + { + $interval = $this->dateInterval->invert(); + + return $this->setDateInterval($interval); + } + + /** + * Set start and end date. + * + * @param DateTime|DateTimeInterface|string $start + * @param DateTime|DateTimeInterface|string|null $end + * + * @return $this + */ + public function setDates($start, $end) + { + $this->setStartDate($start); + $this->setEndDate($end); + + return $this; + } + + /** + * Change the period options. + * + * @param int|null $options + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setOptions($options) + { + if (!is_int($options) && !is_null($options)) { + throw new InvalidArgumentException('Invalid options.'); + } + + $this->options = $options ?: 0; + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Get the period options. + * + * @return int + */ + public function getOptions() + { + return $this->options; + } + + /** + * Toggle given options on or off. + * + * @param int $options + * @param bool|null $state + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function toggleOptions($options, $state = null) + { + if ($state === null) { + $state = ($this->options & $options) !== $options; + } + + return $this->setOptions($state ? + $this->options | $options : + $this->options & ~$options + ); + } + + /** + * Toggle EXCLUDE_START_DATE option. + * + * @param bool $state + * + * @return $this + */ + public function excludeStartDate($state = true) + { + return $this->toggleOptions(static::EXCLUDE_START_DATE, $state); + } + + /** + * Toggle EXCLUDE_END_DATE option. + * + * @param bool $state + * + * @return $this + */ + public function excludeEndDate($state = true) + { + return $this->toggleOptions(static::EXCLUDE_END_DATE, $state); + } + + /** + * Get the underlying date interval. + * + * @return CarbonInterval + */ + public function getDateInterval() + { + return $this->dateInterval->copy(); + } + + /** + * Get start date of the period. + * + * @return Carbon + */ + public function getStartDate() + { + return $this->startDate->copy(); + } + + /** + * Get end date of the period. + * + * @return Carbon|null + */ + public function getEndDate() + { + if ($this->endDate) { + return $this->endDate->copy(); + } + } + + /** + * Get number of recurrences. + * + * @return int|null + */ + public function getRecurrences() + { + return $this->recurrences; + } + + /** + * Returns true if the start date should be excluded. + * + * @return bool + */ + public function isStartExcluded() + { + return ($this->options & static::EXCLUDE_START_DATE) !== 0; + } + + /** + * Returns true if the end date should be excluded. + * + * @return bool + */ + public function isEndExcluded() + { + return ($this->options & static::EXCLUDE_END_DATE) !== 0; + } + + /** + * Add a filter to the stack. + * + * @param callable $callback + * @param string $name + * + * @return $this + */ + public function addFilter($callback, $name = null) + { + $tuple = $this->createFilterTuple(func_get_args()); + + $this->filters[] = $tuple; + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Prepend a filter to the stack. + * + * @param callable $callback + * @param string $name + * + * @return $this + */ + public function prependFilter($callback, $name = null) + { + $tuple = $this->createFilterTuple(func_get_args()); + + array_unshift($this->filters, $tuple); + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Create a filter tuple from raw parameters. + * + * Will create an automatic filter callback for one of Carbon's is* methods. + * + * @param array $parameters + * + * @return array + */ + protected function createFilterTuple(array $parameters) + { + $method = array_shift($parameters); + + if (!$this->isCarbonPredicateMethod($method)) { + return array($method, array_shift($parameters)); + } + + return array(function ($date) use ($method, $parameters) { + return call_user_func_array(array($date, $method), $parameters); + }, $method); + } + + /** + * Remove a filter by instance or name. + * + * @param callable|string $filter + * + * @return $this + */ + public function removeFilter($filter) + { + $key = is_callable($filter) ? 0 : 1; + + $this->filters = array_values(array_filter( + $this->filters, + function ($tuple) use ($key, $filter) { + return $tuple[$key] !== $filter; + } + )); + + $this->updateInternalState(); + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Return whether given instance or name is in the filter stack. + * + * @param callable|string $filter + * + * @return bool + */ + public function hasFilter($filter) + { + $key = is_callable($filter) ? 0 : 1; + + foreach ($this->filters as $tuple) { + if ($tuple[$key] === $filter) { + return true; + } + } + + return false; + } + + /** + * Get filters stack. + * + * @return array + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Set filters stack. + * + * @param array $filters + * + * @return $this + */ + public function setFilters(array $filters) + { + $this->filters = $filters; + + $this->updateInternalState(); + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Reset filters stack. + * + * @return $this + */ + public function resetFilters() + { + $this->filters = array(); + + if ($this->endDate !== null) { + $this->filters[] = array(static::END_DATE_FILTER, null); + } + + if ($this->recurrences !== null) { + $this->filters[] = array(static::RECURRENCES_FILTER, null); + } + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Update properties after removing built-in filters. + * + * @return void + */ + protected function updateInternalState() + { + if (!$this->hasFilter(static::END_DATE_FILTER)) { + $this->endDate = null; + } + + if (!$this->hasFilter(static::RECURRENCES_FILTER)) { + $this->recurrences = null; + } + } + + /** + * Add a recurrences filter (set maximum number of recurrences). + * + * @param int|null $recurrences + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setRecurrences($recurrences) + { + if (!is_numeric($recurrences) && !is_null($recurrences) || $recurrences < 0) { + throw new InvalidArgumentException('Invalid number of recurrences.'); + } + + if ($recurrences === null) { + return $this->removeFilter(static::RECURRENCES_FILTER); + } + + $this->recurrences = (int) $recurrences; + + if (!$this->hasFilter(static::RECURRENCES_FILTER)) { + return $this->addFilter(static::RECURRENCES_FILTER); + } + + $this->handleChangedParameters(); + + return $this; + } + + /** + * Recurrences filter callback (limits number of recurrences). + * + * @param \Carbon\Carbon $current + * @param int $key + * + * @return bool|string + */ + protected function filterRecurrences($current, $key) + { + if ($key < $this->recurrences) { + return true; + } + + return static::END_ITERATION; + } + + /** + * Change the period start date. + * + * @param DateTime|DateTimeInterface|string $date + * @param bool|null $inclusive + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setStartDate($date, $inclusive = null) + { + if (!$date = Carbon::make($date)) { + throw new InvalidArgumentException('Invalid start date.'); + } + + $this->startDate = $date; + + if ($inclusive !== null) { + $this->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); + } + + return $this; + } + + /** + * Change the period end date. + * + * @param DateTime|DateTimeInterface|string|null $date + * @param bool|null $inclusive + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setEndDate($date, $inclusive = null) + { + if (!is_null($date) && !$date = Carbon::make($date)) { + throw new InvalidArgumentException('Invalid end date.'); + } + + if (!$date) { + return $this->removeFilter(static::END_DATE_FILTER); + } + + $this->endDate = $date; + + if ($inclusive !== null) { + $this->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); + } + + if (!$this->hasFilter(static::END_DATE_FILTER)) { + return $this->addFilter(static::END_DATE_FILTER); + } + + $this->handleChangedParameters(); + + return $this; + } + + /** + * End date filter callback. + * + * @param \Carbon\Carbon $current + * + * @return bool|string + */ + protected function filterEndDate($current) + { + if (!$this->isEndExcluded() && $current == $this->endDate) { + return true; + } + + if ($this->dateInterval->invert ? $current > $this->endDate : $current < $this->endDate) { + return true; + } + + return static::END_ITERATION; + } + + /** + * End iteration filter callback. + * + * @return string + */ + protected function endIteration() + { + return static::END_ITERATION; + } + + /** + * Handle change of the parameters. + */ + protected function handleChangedParameters() + { + $this->validationResult = null; + } + + /** + * Validate current date and stop iteration when necessary. + * + * Returns true when current date is valid, false if it is not, or static::END_ITERATION + * when iteration should be stopped. + * + * @return bool|string + */ + protected function validateCurrentDate() + { + if ($this->current === null) { + $this->rewind(); + } + + // Check after the first rewind to avoid repeating the initial validation. + if ($this->validationResult !== null) { + return $this->validationResult; + } + + return $this->validationResult = $this->checkFilters(); + } + + /** + * Check whether current value and key pass all the filters. + * + * @return bool|string + */ + protected function checkFilters() + { + $current = $this->prepareForReturn($this->current); + + foreach ($this->filters as $tuple) { + $result = call_user_func( + $tuple[0], $current->copy(), $this->key, $this + ); + + if ($result === static::END_ITERATION) { + return static::END_ITERATION; + } + + if (!$result) { + return false; + } + } + + return true; + } + + /** + * Prepare given date to be returned to the external logic. + * + * @param Carbon $date + * + * @return Carbon + */ + protected function prepareForReturn(Carbon $date) + { + $date = $date->copy(); + + if ($this->timezone) { + $date->setTimezone($this->timezone); + } + + return $date; + } + + /** + * Check if the current position is valid. + * + * @return bool + */ + public function valid() + { + return $this->validateCurrentDate() === true; + } + + /** + * Return the current key. + * + * @return int|null + */ + public function key() + { + if ($this->valid()) { + return $this->key; + } + } + + /** + * Return the current date. + * + * @return Carbon|null + */ + public function current() + { + if ($this->valid()) { + return $this->prepareForReturn($this->current); + } + } + + /** + * Move forward to the next date. + * + * @throws \RuntimeException + * + * @return void + */ + public function next() + { + if ($this->current === null) { + $this->rewind(); + } + + if ($this->validationResult !== static::END_ITERATION) { + $this->key++; + + $this->incrementCurrentDateUntilValid(); + } + } + + /** + * Rewind to the start date. + * + * Iterating over a date in the UTC timezone avoids bug during backward DST change. + * + * @see https://bugs.php.net/bug.php?id=72255 + * @see https://bugs.php.net/bug.php?id=74274 + * @see https://wiki.php.net/rfc/datetime_and_daylight_saving_time + * + * @throws \RuntimeException + * + * @return void + */ + public function rewind() + { + $this->key = 0; + $this->current = $this->startDate->copy(); + $this->timezone = static::intervalHasTime($this->dateInterval) ? $this->current->getTimezone() : null; + + if ($this->timezone) { + $this->current->setTimezone('UTC'); + } + + $this->validationResult = null; + + if ($this->isStartExcluded() || $this->validateCurrentDate() === false) { + $this->incrementCurrentDateUntilValid(); + } + } + + /** + * Skip iterations and returns iteration state (false if ended, true if still valid). + * + * @param int $count steps number to skip (1 by default) + * + * @return bool + */ + public function skip($count = 1) + { + for ($i = $count; $this->valid() && $i > 0; $i--) { + $this->next(); + } + + return $this->valid(); + } + + /** + * Keep incrementing the current date until a valid date is found or the iteration is ended. + * + * @throws \RuntimeException + * + * @return void + */ + protected function incrementCurrentDateUntilValid() + { + $attempts = 0; + + do { + $this->current->add($this->dateInterval); + + $this->validationResult = null; + + if (++$attempts > static::NEXT_MAX_ATTEMPTS) { + throw new RuntimeException('Could not find next valid date.'); + } + } while ($this->validateCurrentDate() === false); + } + + /** + * Format the date period as ISO 8601. + * + * @return string + */ + public function toIso8601String() + { + $parts = array(); + + if ($this->recurrences !== null) { + $parts[] = 'R'.$this->recurrences; + } + + $parts[] = $this->startDate->toIso8601String(); + + $parts[] = $this->dateInterval->spec(); + + if ($this->endDate !== null) { + $parts[] = $this->endDate->toIso8601String(); + } + + return implode('/', $parts); + } + + /** + * Convert the date period into a string. + * + * @return string + */ + public function toString() + { + $translator = Carbon::getTranslator(); + + $parts = array(); + + $format = !$this->startDate->isStartOfDay() || $this->endDate && !$this->endDate->isStartOfDay() + ? 'Y-m-d H:i:s' + : 'Y-m-d'; + + if ($this->recurrences !== null) { + $parts[] = $translator->transChoice('period_recurrences', $this->recurrences, array(':count' => $this->recurrences)); + } + + $parts[] = $translator->trans('period_interval', array(':interval' => $this->dateInterval->forHumans())); + + $parts[] = $translator->trans('period_start_date', array(':date' => $this->startDate->format($format))); + + if ($this->endDate !== null) { + $parts[] = $translator->trans('period_end_date', array(':date' => $this->endDate->format($format))); + } + + $result = implode(' ', $parts); + + return mb_strtoupper(mb_substr($result, 0, 1)).mb_substr($result, 1); + } + + /** + * Format the date period as ISO 8601. + * + * @return string + */ + public function spec() + { + return $this->toIso8601String(); + } + + /** + * Convert the date period into an array without changing current iteration state. + * + * @return array + */ + public function toArray() + { + $state = array( + $this->key, + $this->current ? $this->current->copy() : null, + $this->validationResult, + ); + + $result = iterator_to_array($this); + + list( + $this->key, + $this->current, + $this->validationResult + ) = $state; + + return $result; + } + + /** + * Count dates in the date period. + * + * @return int + */ + public function count() + { + return count($this->toArray()); + } + + /** + * Return the first date in the date period. + * + * @return Carbon|null + */ + public function first() + { + if ($array = $this->toArray()) { + return $array[0]; + } + } + + /** + * Return the last date in the date period. + * + * @return Carbon|null + */ + public function last() + { + if ($array = $this->toArray()) { + return $array[count($array) - 1]; + } + } + + /** + * Call given macro. + * + * @param string $name + * @param array $parameters + * + * @return mixed + */ + protected function callMacro($name, $parameters) + { + $macro = static::$macros[$name]; + + $reflection = new ReflectionFunction($macro); + + $reflectionParameters = $reflection->getParameters(); + + $expectedCount = count($reflectionParameters); + $actualCount = count($parameters); + + if ($expectedCount > $actualCount && $reflectionParameters[$expectedCount - 1]->name === 'self') { + for ($i = $actualCount; $i < $expectedCount - 1; $i++) { + $parameters[] = $reflectionParameters[$i]->getDefaultValue(); + } + + $parameters[] = $this; + } + + if ($macro instanceof Closure && method_exists($macro, 'bindTo')) { + $macro = $macro->bindTo($this, get_class($this)); + } + + return call_user_func_array($macro, $parameters); + } + + /** + * Convert the date period into a string. + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Add aliases for setters. + * + * CarbonPeriod::days(3)->hours(5)->invert() + * ->sinceNow()->until('2010-01-10') + * ->filter(...) + * ->count() + * + * Note: We use magic method to let static and instance aliases with the same names. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->callMacro($method, $parameters); + } + + $first = count($parameters) >= 1 ? $parameters[0] : null; + $second = count($parameters) >= 2 ? $parameters[1] : null; + + switch ($method) { + case 'start': + case 'since': + return $this->setStartDate($first, $second); + + case 'sinceNow': + return $this->setStartDate(new Carbon, $first); + + case 'end': + case 'until': + return $this->setEndDate($first, $second); + + case 'untilNow': + return $this->setEndDate(new Carbon, $first); + + case 'dates': + case 'between': + return $this->setDates($first, $second); + + case 'recurrences': + case 'times': + return $this->setRecurrences($first); + + case 'options': + return $this->setOptions($first); + + case 'toggle': + return $this->toggleOptions($first, $second); + + case 'filter': + case 'push': + return $this->addFilter($first, $second); + + case 'prepend': + return $this->prependFilter($first, $second); + + case 'filters': + return $this->setFilters($first ?: array()); + + case 'interval': + case 'each': + case 'every': + case 'step': + case 'stepBy': + return $this->setDateInterval($first); + + case 'invert': + return $this->invertDateInterval(); + + case 'years': + case 'year': + case 'months': + case 'month': + case 'weeks': + case 'week': + case 'days': + case 'dayz': + case 'day': + case 'hours': + case 'hour': + case 'minutes': + case 'minute': + case 'seconds': + case 'second': + return $this->setDateInterval(call_user_func( + // Override default P1D when instantiating via fluent setters. + array($this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method), + count($parameters) === 0 ? 1 : $first + )); + } + + throw new BadMethodCallException("Method $method does not exist."); + } +} diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/af.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/af.php index a8610d6..5cf6a8d 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/af.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/af.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 jaar|:count jare', - 'y' => '1 jaar|:count jare', - 'month' => '1 maand|:count maande', - 'm' => '1 maand|:count maande', - 'week' => '1 week|:count weke', - 'w' => '1 week|:count weke', - 'day' => '1 dag|:count dae', - 'd' => '1 dag|:count dae', - 'hour' => '1 uur|:count ure', - 'h' => '1 uur|:count ure', - 'minute' => '1 minuut|:count minute', - 'min' => '1 minuut|:count minute', - 'second' => '1 sekond|:count sekondes', - 's' => '1 sekond|:count sekondes', + 'year' => ':count jaar|:count jare', + 'y' => ':count jaar|:count jare', + 'month' => ':count maand|:count maande', + 'm' => ':count maand|:count maande', + 'week' => ':count week|:count weke', + 'w' => ':count week|:count weke', + 'day' => ':count dag|:count dae', + 'd' => ':count dag|:count dae', + 'hour' => ':count uur|:count ure', + 'h' => ':count uur|:count ure', + 'minute' => ':count minuut|:count minute', + 'min' => ':count minuut|:count minute', + 'second' => ':count sekond|:count sekondes', + 's' => ':count sekond|:count sekondes', 'ago' => ':time terug', 'from_now' => ':time van nou af', 'after' => ':time na', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ar.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ar.php index 253cf50..de8f6b8 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/ar.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ar.php @@ -14,8 +14,8 @@ return array( 'y' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf]:count سنة', 'month' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر', 'm' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر', - 'week' => '{0}إسبوع|{1}إسبوع|{2}إسبوعين|[3,10]:count أسابيع|[11,Inf]:count إسبوع', - 'w' => '{0}إسبوع|{1}إسبوع|{2}إسبوعين|[3,10]:count أسابيع|[11,Inf]:count إسبوع', + 'week' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf]:count أسبوع', + 'w' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf]:count أسبوع', 'day' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم', 'd' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم', 'hour' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf]:count ساعة', @@ -25,7 +25,7 @@ return array( 'second' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية', 's' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية', 'ago' => 'منذ :time', - 'from_now' => 'من الآن :time', + 'from_now' => ':time من الآن', 'after' => 'بعد :time', 'before' => 'قبل :time', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php new file mode 100644 index 0000000..846ae02 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة', + 'y' => '[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة', + 'month' => '[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ', + 'm' => '[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ', + 'week' => '[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع', + 'w' => '[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع', + 'day' => '[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم', + 'd' => '[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم', + 'hour' => '[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة', + 'h' => '[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة', + 'minute' => '[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة', + 'min' => '[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة', + 'second' => '[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة', + 's' => '[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة', + 'ago' => 'مُنْذُ :time', + 'from_now' => 'مِنَ الْآن :time', + 'after' => 'بَعْدَ :time', + 'before' => 'قَبْلَ :time', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/az.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/az.php index e4f3789..25f5c4a 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/az.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/az.php @@ -24,8 +24,17 @@ return array( 'min' => ':count dəqiqə', 'second' => ':count saniyə', 's' => ':count saniyə', - 'ago' => ':time öncə', + 'ago' => ':time əvvəl', 'from_now' => ':time sonra', 'after' => ':time sonra', - 'before' => ':time öncə', + 'before' => ':time əvvəl', + 'diff_now' => 'indi', + 'diff_yesterday' => 'dünən', + 'diff_tomorrow' => 'sabah', + 'diff_before_yesterday' => 'srağagün', + 'diff_after_tomorrow' => 'birisi gün', + 'period_recurrences' => ':count dəfədən bir', + 'period_interval' => 'hər :interval', + 'period_start_date' => ':date tarixindən başlayaraq', + 'period_end_date' => ':date tarixinədək', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/bg.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/bg.php index 309934b..d9e510b 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/bg.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/bg.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 година|:count години', - 'y' => '1 година|:count години', - 'month' => '1 месец|:count месеца', - 'm' => '1 месец|:count месеца', - 'week' => '1 седмица|:count седмици', - 'w' => '1 седмица|:count седмици', - 'day' => '1 ден|:count дни', - 'd' => '1 ден|:count дни', - 'hour' => '1 час|:count часа', - 'h' => '1 час|:count часа', - 'minute' => '1 минута|:count минути', - 'm' => '1 минута|:count минути', - 'second' => '1 секунда|:count секунди', - 's' => '1 секунда|:count секунди', + 'year' => ':count година|:count години', + 'y' => ':count година|:count години', + 'month' => ':count месец|:count месеца', + 'm' => ':count месец|:count месеца', + 'week' => ':count седмица|:count седмици', + 'w' => ':count седмица|:count седмици', + 'day' => ':count ден|:count дни', + 'd' => ':count ден|:count дни', + 'hour' => ':count час|:count часа', + 'h' => ':count час|:count часа', + 'minute' => ':count минута|:count минути', + 'min' => ':count минута|:count минути', + 'second' => ':count секунда|:count секунди', + 's' => ':count секунда|:count секунди', 'ago' => 'преди :time', 'from_now' => ':time от сега', 'after' => 'след :time', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/bn.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/bn.php index a930df3..5817599 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/bn.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/bn.php @@ -10,22 +10,29 @@ */ return array( - 'year' => '১ বছর|:count বছর', - 'y' => '১ বছর|:count বছর', - 'month' => '১ মাস|:count মাস', - 'm' => '১ মাস|:count মাস', - 'week' => '১ সপ্তাহ|:count সপ্তাহ', - 'w' => '১ সপ্তাহ|:count সপ্তাহ', - 'day' => '১ দিন|:count দিন', - 'd' => '১ দিন|:count দিন', - 'hour' => '১ ঘন্টা|:count ঘন্টা', - 'h' => '১ ঘন্টা|:count ঘন্টা', - 'minute' => '১ মিনিট|:count মিনিট', - 'min' => '১ মিনিট|:count মিনিট', - 'second' => '১ সেকেন্ড|:count সেকেন্ড', - 's' => '১ সেকেন্ড|:count সেকেন্ড', - 'ago' => ':time পূর্বে', - 'from_now' => 'এখন থেকে :time', - 'after' => ':time পরে', - 'before' => ':time আগে', + 'year' => '১ বছর|:count বছর', + 'y' => '১ বছর|:count বছর', + 'month' => '১ মাস|:count মাস', + 'm' => '১ মাস|:count মাস', + 'week' => '১ সপ্তাহ|:count সপ্তাহ', + 'w' => '১ সপ্তাহ|:count সপ্তাহ', + 'day' => '১ দিন|:count দিন', + 'd' => '১ দিন|:count দিন', + 'hour' => '১ ঘন্টা|:count ঘন্টা', + 'h' => '১ ঘন্টা|:count ঘন্টা', + 'minute' => '১ মিনিট|:count মিনিট', + 'min' => '১ মিনিট|:count মিনিট', + 'second' => '১ সেকেন্ড|:count সেকেন্ড', + 's' => '১ সেকেন্ড|:count সেকেন্ড', + 'ago' => ':time পূর্বে', + 'from_now' => 'এখন থেকে :time', + 'after' => ':time পরে', + 'before' => ':time আগে', + 'diff_now' => 'এখন', + 'diff_yesterday' => 'গতকাল', + 'diff_tomorrow' => 'আগামীকাল', + 'period_recurrences' => ':count বার|:count বার', + 'period_interval' => 'প্রতি :interval', + 'period_start_date' => ':date থেকে', + 'period_end_date' => ':date পর্যন্ত', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php new file mode 100644 index 0000000..7a9b05a --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count godina|:count godine|:count godina', + 'y' => ':count godina|:count godine|:count godina', + 'month' => ':count mjesec|:count mjeseca|:count mjeseci', + 'm' => ':count mjesec|:count mjeseca|:count mjeseci', + 'week' => ':count nedjelja|:count nedjelje|:count nedjelja', + 'w' => ':count nedjelja|:count nedjelje|:count nedjelja', + 'day' => ':count dan|:count dana|:count dana', + 'd' => ':count dan|:count dana|:count dana', + 'hour' => ':count sat|:count sata|:count sati', + 'h' => ':count sat|:count sata|:count sati', + 'minute' => ':count minut|:count minuta|:count minuta', + 'min' => ':count minut|:count minuta|:count minuta', + 'second' => ':count sekund|:count sekunda|:count sekundi', + 's' => ':count sekund|:count sekunda|:count sekundi', + 'ago' => 'prije :time', + 'from_now' => 'za :time', + 'after' => 'nakon :time', + 'before' => ':time ranije', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ca.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ca.php index 91262e7..c854b5a 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/ca.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ca.php @@ -10,22 +10,31 @@ */ return array( - 'year' => '1 any|:count anys', - 'y' => '1 any|:count anys', - 'month' => '1 mes|:count mesos', - 'm' => '1 mes|:count mesos', - 'week' => '1 setmana|:count setmanes', - 'w' => '1 setmana|:count setmanes', - 'day' => '1 dia|:count dies', - 'd' => '1 dia|:count dies', - 'hour' => '1 hora|:count hores', - 'h' => '1 hora|:count hores', - 'minute' => '1 minut|:count minuts', - 'min' => '1 minut|:count minuts', - 'second' => '1 segon|:count segons', - 's' => '1 segon|:count segons', + 'year' => ':count any|:count anys', + 'y' => ':count any|:count anys', + 'month' => ':count mes|:count mesos', + 'm' => ':count mes|:count mesos', + 'week' => ':count setmana|:count setmanes', + 'w' => ':count setmana|:count setmanes', + 'day' => ':count dia|:count dies', + 'd' => ':count dia|:count dies', + 'hour' => ':count hora|:count hores', + 'h' => ':count hora|:count hores', + 'minute' => ':count minut|:count minuts', + 'min' => ':count minut|:count minuts', + 'second' => ':count segon|:count segons', + 's' => ':count segon|:count segons', 'ago' => 'fa :time', - 'from_now' => 'dins de :time', + 'from_now' => 'd\'aquí :time', 'after' => ':time després', 'before' => ':time abans', + 'diff_now' => 'ara mateix', + 'diff_yesterday' => 'ahir', + 'diff_tomorrow' => 'demà', + 'diff_before_yesterday' => "abans d'ahir", + 'diff_after_tomorrow' => 'demà passat', + 'period_recurrences' => ':count cop|:count cops', + 'period_interval' => 'cada :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'fins a :date', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/cs.php index f4aba76..a447ce2 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/cs.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/cs.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 rok|:count roky|:count let', - 'y' => '1 rok|:count roky|:count let', - 'month' => '1 měsíc|:count měsíce|:count měsíců', - 'm' => '1 měsíc|:count měsíce|:count měsíců', - 'week' => '1 týden|:count týdny|:count týdnů', - 'w' => '1 týden|:count týdny|:count týdnů', - 'day' => '1 den|:count dny|:count dní', - 'd' => '1 den|:count dny|:count dní', - 'hour' => '1 hodinu|:count hodiny|:count hodin', - 'h' => '1 hodinu|:count hodiny|:count hodin', - 'minute' => '1 minutu|:count minuty|:count minut', - 'min' => '1 minutu|:count minuty|:count minut', - 'second' => '1 sekundu|:count sekundy|:count sekund', - 's' => '1 sekundu|:count sekundy|:count sekund', + 'year' => ':count rok|:count roky|:count let', + 'y' => ':count rok|:count roky|:count let', + 'month' => ':count měsíc|:count měsíce|:count měsíců', + 'm' => ':count měsíc|:count měsíce|:count měsíců', + 'week' => ':count týden|:count týdny|:count týdnů', + 'w' => ':count týden|:count týdny|:count týdnů', + 'day' => ':count den|:count dny|:count dní', + 'd' => ':count den|:count dny|:count dní', + 'hour' => ':count hodinu|:count hodiny|:count hodin', + 'h' => ':count hodinu|:count hodiny|:count hodin', + 'minute' => ':count minutu|:count minuty|:count minut', + 'min' => ':count minutu|:count minuty|:count minut', + 'second' => ':count sekundu|:count sekundy|:count sekund', + 's' => ':count sekundu|:count sekundy|:count sekund', 'ago' => ':time nazpět', 'from_now' => 'za :time', 'after' => ':time později', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/cy.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/cy.php new file mode 100644 index 0000000..c93750e --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/cy.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +return array( + 'year' => '1 flwyddyn|:count blynedd', + 'y' => ':countbl', + 'month' => '1 mis|:count fis', + 'm' => ':countmi', + 'week' => ':count wythnos', + 'w' => ':countw', + 'day' => ':count diwrnod', + 'd' => ':countd', + 'hour' => ':count awr', + 'h' => ':counth', + 'minute' => ':count munud', + 'min' => ':countm', + 'second' => ':count eiliad', + 's' => ':counts', + 'ago' => ':time yn ôl', + 'from_now' => ':time o hyn ymlaen', + 'after' => ':time ar ôl', + 'before' => ':time o\'r blaen', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/da.php index 6710474..86507b0 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/da.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/da.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 år|:count år', - 'y' => '1 år|:count år', - 'month' => '1 måned|:count måneder', - 'm' => '1 måned|:count måneder', - 'week' => '1 uge|:count uger', - 'w' => '1 uge|:count uger', - 'day' => '1 dag|:count dage', - 'd' => '1 dag|:count dage', - 'hour' => '1 time|:count timer', - 'h' => '1 time|:count timer', - 'minute' => '1 minut|:count minutter', - 'min' => '1 minut|:count minutter', - 'second' => '1 sekund|:count sekunder', - 's' => '1 sekund|:count sekunder', + 'year' => ':count år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count måned|:count måneder', + 'm' => ':count måned|:count måneder', + 'week' => ':count uge|:count uger', + 'w' => ':count uge|:count uger', + 'day' => ':count dag|:count dage', + 'd' => ':count dag|:count dage', + 'hour' => ':count time|:count timer', + 'h' => ':count time|:count timer', + 'minute' => ':count minut|:count minutter', + 'min' => ':count minut|:count minutter', + 'second' => ':count sekund|:count sekunder', + 's' => ':count sekund|:count sekunder', 'ago' => ':time siden', 'from_now' => 'om :time', 'after' => ':time efter', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/de.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/de.php index d1c572a..5ea2a03 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/de.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/de.php @@ -10,31 +10,37 @@ */ return array( - 'year' => '1 Jahr|:count Jahre', - 'y' => '1J|:countJ', - 'month' => '1 Monat|:count Monate', - 'm' => '1Mon|:countMon', - 'week' => '1 Woche|:count Wochen', - 'w' => '1Wo|:countWo', - 'day' => '1 Tag|:count Tage', - 'd' => '1Tg|:countTg', - 'hour' => '1 Stunde|:count Stunden', - 'h' => '1Std|:countStd', - 'minute' => '1 Minute|:count Minuten', - 'min' => '1Min|:countMin', - 'second' => '1 Sekunde|:count Sekunden', - 's' => '1Sek|:countSek', + 'year' => ':count Jahr|:count Jahre', + 'y' => ':countJ|:countJ', + 'month' => ':count Monat|:count Monate', + 'm' => ':countMon|:countMon', + 'week' => ':count Woche|:count Wochen', + 'w' => ':countWo|:countWo', + 'day' => ':count Tag|:count Tage', + 'd' => ':countTg|:countTg', + 'hour' => ':count Stunde|:count Stunden', + 'h' => ':countStd|:countStd', + 'minute' => ':count Minute|:count Minuten', + 'min' => ':countMin|:countMin', + 'second' => ':count Sekunde|:count Sekunden', + 's' => ':countSek|:countSek', 'ago' => 'vor :time', 'from_now' => 'in :time', 'after' => ':time später', 'before' => ':time zuvor', - 'year_from_now' => '1 Jahr|:count Jahren', - 'month_from_now' => '1 Monat|:count Monaten', - 'week_from_now' => '1 Woche|:count Wochen', - 'day_from_now' => '1 Tag|:count Tagen', - 'year_ago' => '1 Jahr|:count Jahren', - 'month_ago' => '1 Monat|:count Monaten', - 'week_ago' => '1 Woche|:count Wochen', - 'day_ago' => '1 Tag|:count Tagen', + 'year_from_now' => ':count Jahr|:count Jahren', + 'month_from_now' => ':count Monat|:count Monaten', + 'week_from_now' => ':count Woche|:count Wochen', + 'day_from_now' => ':count Tag|:count Tagen', + 'year_ago' => ':count Jahr|:count Jahren', + 'month_ago' => ':count Monat|:count Monaten', + 'week_ago' => ':count Woche|:count Wochen', + 'day_ago' => ':count Tag|:count Tagen', + + 'diff_now' => 'Gerade eben', + 'diff_yesterday' => 'Gestern', + 'diff_tomorrow' => 'Heute', + 'diff_before_yesterday' => 'Vorgestern', + 'diff_after_tomorrow' => 'Übermorgen', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php new file mode 100644 index 0000000..e3c50b3 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', + 'y' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', + 'month' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', + 'm' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', + 'week' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', + 'w' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', + 'day' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', + 'd' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', + 'hour' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', + 'h' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', + 'minute' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', + 'min' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', + 'second' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', + 's' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', + 'ago' => ':time ކުރިން', + 'from_now' => ':time ފަހުން', + 'after' => ':time ފަހުން', + 'before' => ':time ކުރި', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/el.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/el.php index 6028074..16b3f44 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/el.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/el.php @@ -10,22 +10,22 @@ */ return array( - 'year' => '1 χρόνος|:count χρόνια', - 'y' => '1 χρόνος|:count χρόνια', - 'month' => '1 μήνας|:count μήνες', - 'm' => '1 μήνας|:count μήνες', - 'week' => '1 εβδομάδα|:count εβδομάδες', - 'w' => '1 εβδομάδα|:count εβδομάδες', - 'day' => '1 μέρα|:count μέρες', - 'd' => '1 μέρα|:count μέρες', - 'hour' => '1 ώρα|:count ώρες', - 'h' => '1 ώρα|:count ώρες', - 'minute' => '1 λεπτό|:count λεπτά', - 'min' => '1 λεπτό|:count λεπτά', - 'second' => '1 δευτερόλεπτο|:count δευτερόλεπτα', - 's' => '1 δευτερόλεπτο|:count δευτερόλεπτα', - 'ago' => 'πρίν απο :time', - 'from_now' => 'σε :time απο τώρα', + 'year' => ':count χρόνος|:count χρόνια', + 'y' => ':count χρόνος|:count χρόνια', + 'month' => ':count μήνας|:count μήνες', + 'm' => ':count μήνας|:count μήνες', + 'week' => ':count εβδομάδα|:count εβδομάδες', + 'w' => ':count εβδομάδα|:count εβδομάδες', + 'day' => ':count μέρα|:count μέρες', + 'd' => ':count μέρα|:count μέρες', + 'hour' => ':count ώρα|:count ώρες', + 'h' => ':count ώρα|:count ώρες', + 'minute' => ':count λεπτό|:count λεπτά', + 'min' => ':count λεπτό|:count λεπτά', + 'second' => ':count δευτερόλεπτο|:count δευτερόλεπτα', + 's' => ':count δευτερόλεπτο|:count δευτερόλεπτα', + 'ago' => 'πριν από :time', + 'from_now' => 'σε :time από τώρα', 'after' => ':time μετά', - 'before' => ':time πρίν', + 'before' => ':time πριν', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/en.php index 181c59b..a15c131 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/en.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/en.php @@ -10,22 +10,31 @@ */ return array( - 'year' => '1 year|:count years', - 'y' => '1yr|:countyrs', - 'month' => '1 month|:count months', - 'm' => '1mo|:countmos', - 'week' => '1 week|:count weeks', - 'w' => '1w|:countw', - 'day' => '1 day|:count days', - 'd' => '1d|:countd', - 'hour' => '1 hour|:count hours', - 'h' => '1h|:counth', - 'minute' => '1 minute|:count minutes', - 'min' => '1m|:countm', - 'second' => '1 second|:count seconds', - 's' => '1s|:counts', + 'year' => ':count year|:count years', + 'y' => ':countyr|:countyrs', + 'month' => ':count month|:count months', + 'm' => ':countmo|:countmos', + 'week' => ':count week|:count weeks', + 'w' => ':countw|:countw', + 'day' => ':count day|:count days', + 'd' => ':countd|:countd', + 'hour' => ':count hour|:count hours', + 'h' => ':counth|:counth', + 'minute' => ':count minute|:count minutes', + 'min' => ':countm|:countm', + 'second' => ':count second|:count seconds', + 's' => ':counts|:counts', 'ago' => ':time ago', 'from_now' => ':time from now', 'after' => ':time after', 'before' => ':time before', + 'diff_now' => 'just now', + 'diff_yesterday' => 'yesterday', + 'diff_tomorrow' => 'tomorrow', + 'diff_before_yesterday' => 'before yesterday', + 'diff_after_tomorrow' => 'after tomorrow', + 'period_recurrences' => 'once|:count times', + 'period_interval' => 'every :interval', + 'period_start_date' => 'from :date', + 'period_end_date' => 'to :date', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/eo.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/eo.php index ff1f531..c5b90b3 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/eo.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/eo.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 jaro|:count jaroj', - 'y' => '1 jaro|:count jaroj', - 'month' => '1 monato|:count monatoj', - 'm' => '1 monato|:count monatoj', - 'week' => '1 semajno|:count semajnoj', - 'w' => '1 semajno|:count semajnoj', - 'day' => '1 tago|:count tagoj', - 'd' => '1 tago|:count tagoj', - 'hour' => '1 horo|:count horoj', - 'h' => '1 horo|:count horoj', - 'minute' => '1 minuto|:count minutoj', - 'min' => '1 minuto|:count minutoj', - 'second' => '1 sekundo|:count sekundoj', - 's' => '1 sekundo|:count sekundoj', + 'year' => ':count jaro|:count jaroj', + 'y' => ':count jaro|:count jaroj', + 'month' => ':count monato|:count monatoj', + 'm' => ':count monato|:count monatoj', + 'week' => ':count semajno|:count semajnoj', + 'w' => ':count semajno|:count semajnoj', + 'day' => ':count tago|:count tagoj', + 'd' => ':count tago|:count tagoj', + 'hour' => ':count horo|:count horoj', + 'h' => ':count horo|:count horoj', + 'minute' => ':count minuto|:count minutoj', + 'min' => ':count minuto|:count minutoj', + 'second' => ':count sekundo|:count sekundoj', + 's' => ':count sekundo|:count sekundoj', 'ago' => 'antaŭ :time', 'from_now' => 'je :time', 'after' => ':time poste', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/es.php index fb0aff1..567a280 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/es.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/es.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 año|:count años', - 'y' => '1 año|:count años', - 'month' => '1 mes|:count meses', - 'm' => '1 mes|:count meses', - 'week' => '1 semana|:count semanas', - 'w' => '1 semana|:count semanas', - 'day' => '1 día|:count días', - 'd' => '1 día|:count días', - 'hour' => '1 hora|:count horas', - 'h' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'min' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', - 's' => '1 segundo|:count segundos', + 'year' => ':count año|:count años', + 'y' => ':count año|:count años', + 'month' => ':count mes|:count meses', + 'm' => ':count mes|:count meses', + 'week' => ':count semana|:count semanas', + 'w' => ':count semana|:count semanas', + 'day' => ':count día|:count días', + 'd' => ':count día|:count días', + 'hour' => ':count hora|:count horas', + 'h' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'min' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', + 's' => ':count segundo|:count segundos', 'ago' => 'hace :time', 'from_now' => 'dentro de :time', 'after' => ':time después', 'before' => ':time antes', + 'diff_now' => 'ahora mismo', + 'diff_yesterday' => 'ayer', + 'diff_tomorrow' => 'mañana', + 'diff_before_yesterday' => 'antier', + 'diff_after_tomorrow' => 'pasado mañana', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/et.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/et.php index 70d682d..2d9291e 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/et.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/et.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 aasta|:count aastat', - 'y' => '1 aasta|:count aastat', - 'month' => '1 kuu|:count kuud', - 'm' => '1 kuu|:count kuud', - 'week' => '1 nädal|:count nädalat', - 'w' => '1 nädal|:count nädalat', - 'day' => '1 päev|:count päeva', - 'd' => '1 päev|:count päeva', - 'hour' => '1 tund|:count tundi', - 'h' => '1 tund|:count tundi', - 'minute' => '1 minut|:count minutit', - 'min' => '1 minut|:count minutit', - 'second' => '1 sekund|:count sekundit', - 's' => '1 sekund|:count sekundit', + 'year' => ':count aasta|:count aastat', + 'y' => ':count aasta|:count aastat', + 'month' => ':count kuu|:count kuud', + 'm' => ':count kuu|:count kuud', + 'week' => ':count nädal|:count nädalat', + 'w' => ':count nädal|:count nädalat', + 'day' => ':count päev|:count päeva', + 'd' => ':count päev|:count päeva', + 'hour' => ':count tund|:count tundi', + 'h' => ':count tund|:count tundi', + 'minute' => ':count minut|:count minutit', + 'min' => ':count minut|:count minutit', + 'second' => ':count sekund|:count sekundit', + 's' => ':count sekund|:count sekundit', 'ago' => ':time tagasi', 'from_now' => ':time pärast', 'after' => ':time pärast', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/fi.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/fi.php index 46794fa..4818804 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/fi.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/fi.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 vuosi|:count vuotta', - 'y' => '1 vuosi|:count vuotta', - 'month' => '1 kuukausi|:count kuukautta', - 'm' => '1 kuukausi|:count kuukautta', - 'week' => '1 viikko|:count viikkoa', - 'w' => '1 viikko|:count viikkoa', - 'day' => '1 päivä|:count päivää', - 'd' => '1 päivä|:count päivää', - 'hour' => '1 tunti|:count tuntia', - 'h' => '1 tunti|:count tuntia', - 'minute' => '1 minuutti|:count minuuttia', - 'min' => '1 minuutti|:count minuuttia', - 'second' => '1 sekunti|:count sekuntia', - 's' => '1 sekunti|:count sekuntia', + 'year' => ':count vuosi|:count vuotta', + 'y' => ':count vuosi|:count vuotta', + 'month' => ':count kuukausi|:count kuukautta', + 'm' => ':count kuukausi|:count kuukautta', + 'week' => ':count viikko|:count viikkoa', + 'w' => ':count viikko|:count viikkoa', + 'day' => ':count päivä|:count päivää', + 'd' => ':count päivä|:count päivää', + 'hour' => ':count tunti|:count tuntia', + 'h' => ':count tunti|:count tuntia', + 'minute' => ':count minuutti|:count minuuttia', + 'min' => ':count minuutti|:count minuuttia', + 'second' => ':count sekunti|:count sekuntia', + 's' => ':count sekunti|:count sekuntia', 'ago' => ':time sitten', 'from_now' => ':time tästä hetkestä', 'after' => ':time sen jälkeen', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/fo.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/fo.php index d4d6823..d91104b 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/fo.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/fo.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 ár|:count ár', - 'y' => '1 ár|:count ár', - 'month' => '1 mánaður|:count mánaðir', - 'm' => '1 mánaður|:count mánaðir', - 'week' => '1 vika|:count vikur', - 'w' => '1 vika|:count vikur', - 'day' => '1 dag|:count dagar', - 'd' => '1 dag|:count dagar', - 'hour' => '1 tími|:count tímar', - 'h' => '1 tími|:count tímar', - 'minute' => '1 minutt|:count minuttir', - 'min' => '1 minutt|:count minuttir', - 'second' => '1 sekund|:count sekundir', - 's' => '1 sekund|:count sekundir', + 'year' => ':count ár|:count ár', + 'y' => ':count ár|:count ár', + 'month' => ':count mánaður|:count mánaðir', + 'm' => ':count mánaður|:count mánaðir', + 'week' => ':count vika|:count vikur', + 'w' => ':count vika|:count vikur', + 'day' => ':count dag|:count dagar', + 'd' => ':count dag|:count dagar', + 'hour' => ':count tími|:count tímar', + 'h' => ':count tími|:count tímar', + 'minute' => ':count minutt|:count minuttir', + 'min' => ':count minutt|:count minuttir', + 'second' => ':count sekund|:count sekundir', + 's' => ':count sekund|:count sekundir', 'ago' => ':time síðan', 'from_now' => 'um :time', 'after' => ':time aftaná', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/fr.php index be79738..0b20cdd 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/fr.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/fr.php @@ -10,22 +10,31 @@ */ return array( - 'year' => '1 an|:count ans', - 'y' => '1 an|:count ans', + 'year' => ':count an|:count ans', + 'y' => ':count an|:count ans', 'month' => ':count mois', 'm' => ':count mois', - 'week' => '1 semaine|:count semaines', - 'w' => '1 semaine|:count semaines', - 'day' => '1 jour|:count jours', - 'd' => '1 jour|:count jours', - 'hour' => '1 heure|:count heures', - 'h' => '1 heure|:count heures', - 'minute' => '1 minute|:count minutes', - 'min' => '1 minute|:count minutes', - 'second' => '1 seconde|:count secondes', - 's' => '1 seconde|:count secondes', + 'week' => ':count semaine|:count semaines', + 'w' => ':count sem.', + 'day' => ':count jour|:count jours', + 'd' => ':count j.', + 'hour' => ':count heure|:count heures', + 'h' => ':count h.', + 'minute' => ':count minute|:count minutes', + 'min' => ':count min.', + 'second' => ':count seconde|:count secondes', + 's' => ':count sec.', 'ago' => 'il y a :time', 'from_now' => 'dans :time', 'after' => ':time après', 'before' => ':time avant', + 'diff_now' => "à l'instant", + 'diff_yesterday' => 'hier', + 'diff_tomorrow' => 'demain', + 'diff_before_yesterday' => 'avant-hier', + 'diff_after_tomorrow' => 'après-demain', + 'period_recurrences' => ':count fois', + 'period_interval' => 'tous les :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'à :date', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/gl.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/gl.php index 609bf75..cd22a31 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/gl.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/gl.php @@ -10,13 +10,13 @@ */ return array( - 'year' => '1 ano|:count anos', - 'month' => '1 mes|:count meses', - 'week' => '1 semana|:count semanas', - 'day' => '1 día|:count días', - 'hour' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', + 'year' => ':count ano|:count anos', + 'month' => ':count mes|:count meses', + 'week' => ':count semana|:count semanas', + 'day' => ':count día|:count días', + 'hour' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', 'ago' => 'fai :time', 'from_now' => 'dentro de :time', 'after' => ':time despois', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/gu.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/gu.php new file mode 100644 index 0000000..7759dfc --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/gu.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count વર્ષ|:count વર્ષો', + 'y' => ':countવર્ષ|:countવર્ષો', + 'month' => ':count મહિનો|:count મહિના', + 'm' => ':countમહિનો|:countમહિના', + 'week' => ':count અઠવાડિયું|:count અઠવાડિયા', + 'w' => ':countઅઠ.|:countઅઠ.', + 'day' => ':count દિવસ|:count દિવસો', + 'd' => ':countદિ.|:countદિ.', + 'hour' => ':count કલાક|:count કલાકો', + 'h' => ':countક.|:countક.', + 'minute' => ':count મિનિટ|:count મિનિટ', + 'min' => ':countમિ.|:countમિ.', + 'second' => ':count સેકેન્ડ|:count સેકેન્ડ', + 's' => ':countસે.|:countસે.', + 'ago' => ':time પહેલા', + 'from_now' => ':time અત્યારથી', + 'after' => ':time પછી', + 'before' => ':time પહેલા', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/hi.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/hi.php new file mode 100644 index 0000000..6c670ee --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/hi.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '1 वर्ष|:count वर्षों', + 'y' => '1 वर्ष|:count वर्षों', + 'month' => '1 माह|:count महीने', + 'm' => '1 माह|:count महीने', + 'week' => '1 सप्ताह|:count सप्ताह', + 'w' => '1 सप्ताह|:count सप्ताह', + 'day' => '1 दिन|:count दिनों', + 'd' => '1 दिन|:count दिनों', + 'hour' => '1 घंटा|:count घंटे', + 'h' => '1 घंटा|:count घंटे', + 'minute' => '1 मिनट|:count मिनटों', + 'min' => '1 मिनट|:count मिनटों', + 'second' => '1 सेकंड|:count सेकंड', + 's' => '1 सेकंड|:count सेकंड', + 'ago' => ':time पूर्व', + 'from_now' => ':time से', + 'after' => ':time के बाद', + 'before' => ':time के पहले', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/hy.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/hy.php index 4b4545d..d2665f2 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/hy.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/hy.php @@ -11,21 +11,21 @@ return array( 'year' => ':count տարի', - 'y' => ':count տարի', + 'y' => ':countտ', 'month' => ':count ամիս', - 'm' => ':count ամիս', + 'm' => ':countամ', 'week' => ':count շաբաթ', - 'w' => ':count շաբաթ', + 'w' => ':countշ', 'day' => ':count օր', - 'd' => ':count օր', + 'd' => ':countօր', 'hour' => ':count ժամ', - 'h' => ':count ժամ', + 'h' => ':countժ', 'minute' => ':count րոպե', - 'min' => ':count րոպե', - 'second' => ':count վայրկյան', - 's' => ':count վայրկյան', + 'min' => ':countր', + 'second' => ':count վարկյան', + 's' => ':countվրկ', 'ago' => ':time առաջ', - 'from_now' => ':time հետո', + 'from_now' => ':time ներկա պահից', 'after' => ':time հետո', 'before' => ':time առաջ', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/is.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/is.php new file mode 100644 index 0000000..94c76a7 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/is.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '1 ár|:count ár', + 'y' => '1 ár|:count ár', + 'month' => '1 mánuður|:count mánuðir', + 'm' => '1 mánuður|:count mánuðir', + 'week' => '1 vika|:count vikur', + 'w' => '1 vika|:count vikur', + 'day' => '1 dagur|:count dagar', + 'd' => '1 dagur|:count dagar', + 'hour' => '1 klukkutími|:count klukkutímar', + 'h' => '1 klukkutími|:count klukkutímar', + 'minute' => '1 mínúta|:count mínútur', + 'min' => '1 mínúta|:count mínútur', + 'second' => '1 sekúnda|:count sekúndur', + 's' => '1 sekúnda|:count sekúndur', + 'ago' => ':time síðan', + 'from_now' => ':time síðan', + 'after' => ':time eftir', + 'before' => ':time fyrir', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/it.php index 19eedaf..70bc6d7 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/it.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 anno|:count anni', - 'y' => '1 anno|:count anni', - 'month' => '1 mese|:count mesi', - 'm' => '1 mese|:count mesi', - 'week' => '1 settimana|:count settimane', - 'w' => '1 settimana|:count settimane', - 'day' => '1 giorno|:count giorni', - 'd' => '1 giorno|:count giorni', - 'hour' => '1 ora|:count ore', - 'h' => '1 ora|:count ore', - 'minute' => '1 minuto|:count minuti', - 'min' => '1 minuto|:count minuti', - 'second' => '1 secondo|:count secondi', - 's' => '1 secondo|:count secondi', + 'year' => ':count anno|:count anni', + 'y' => ':count anno|:count anni', + 'month' => ':count mese|:count mesi', + 'm' => ':count mese|:count mesi', + 'week' => ':count settimana|:count settimane', + 'w' => ':count settimana|:count settimane', + 'day' => ':count giorno|:count giorni', + 'd' => ':count giorno|:count giorni', + 'hour' => ':count ora|:count ore', + 'h' => ':count ora|:count ore', + 'minute' => ':count minuto|:count minuti', + 'min' => ':count minuto|:count minuti', + 'second' => ':count secondo|:count secondi', + 's' => ':count secondo|:count secondi', 'ago' => ':time fa', - 'from_now' => ':time da adesso', + 'from_now' => 'tra :time', 'after' => ':time dopo', 'before' => ':time prima', + 'diff_now' => 'proprio ora', + 'diff_yesterday' => 'ieri', + 'diff_tomorrow' => 'domani', + 'diff_before_yesterday' => "l'altro ieri", + 'diff_after_tomorrow' => 'dopodomani', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ja.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ja.php index c12c199..7119547 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/ja.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ja.php @@ -10,22 +10,22 @@ */ return array( - 'year' => ':count 年', - 'y' => ':count 年', - 'month' => ':count ヶ月', - 'm' => ':count ヶ月', - 'week' => ':count 週間', - 'w' => ':count 週間', - 'day' => ':count 日', - 'd' => ':count 日', - 'hour' => ':count 時間', - 'h' => ':count 時間', - 'minute' => ':count 分', - 'min' => ':count 分', - 'second' => ':count 秒', - 's' => ':count 秒', - 'ago' => ':time 前', - 'from_now' => '今から :time', - 'after' => ':time 後', - 'before' => ':time 前', + 'year' => ':count年', + 'y' => ':count年', + 'month' => ':countヶ月', + 'm' => ':countヶ月', + 'week' => ':count週間', + 'w' => ':count週間', + 'day' => ':count日', + 'd' => ':count日', + 'hour' => ':count時間', + 'h' => ':count時間', + 'minute' => ':count分', + 'min' => ':count分', + 'second' => ':count秒', + 's' => ':count秒', + 'ago' => ':time前', + 'from_now' => '今から:time', + 'after' => ':time後', + 'before' => ':time前', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/kk.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/kk.php new file mode 100644 index 0000000..8d113af --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/kk.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +return array( + 'year' => ':count жыл', + 'y' => ':count жыл', + 'month' => ':count ай', + 'm' => ':count ай', + 'week' => ':count апта', + 'w' => ':count апта', + 'day' => ':count күн', + 'd' => ':count күн', + 'hour' => ':count сағат', + 'h' => ':count сағат', + 'minute' => ':count минут', + 'min' => ':count минут', + 'second' => ':count секунд', + 's' => ':count секунд', + 'ago' => ':time бұрын', + 'from_now' => ':time кейін', + 'after' => ':time кейін', + 'before' => ':time бұрын', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ko.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ko.php index 9eac8c9..0209164 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/ko.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ko.php @@ -26,6 +26,6 @@ return array( 's' => ':count 초', 'ago' => ':time 전', 'from_now' => ':time 후', - 'after' => ':time 뒤', - 'before' => ':time 앞', + 'after' => ':time 이후', + 'before' => ':time 이전', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/mk.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/mk.php index 51e661d..c5ec12d 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/mk.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/mk.php @@ -10,13 +10,13 @@ */ return array( - 'year' => '1 година|:count години', - 'month' => '1 месец|:count месеци', - 'week' => '1 седмица|:count седмици', - 'day' => '1 ден|:count дена', - 'hour' => '1 час|:count часа', - 'minute' => '1 минута|:count минути', - 'second' => '1 секунда|:count секунди', + 'year' => ':count година|:count години', + 'month' => ':count месец|:count месеци', + 'week' => ':count седмица|:count седмици', + 'day' => ':count ден|:count дена', + 'hour' => ':count час|:count часа', + 'minute' => ':count минута|:count минути', + 'second' => ':count секунда|:count секунди', 'ago' => 'пред :time', 'from_now' => ':time од сега', 'after' => 'по :time', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/mn.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/mn.php new file mode 100644 index 0000000..b26dce5 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/mn.php @@ -0,0 +1,62 @@ + + * + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @translator Batmandakh Erdenebileg + */ + +return array( + 'year' => ':count жил', + 'y' => ':count жил', + 'month' => ':count сар', + 'm' => ':count сар', + 'week' => ':count долоо хоног', + 'w' => ':count долоо хоног', + 'day' => ':count өдөр', + 'd' => ':count өдөр', + 'hour' => ':count цаг', + 'h' => ':countц', + 'minute' => ':count минут', + 'min' => ':countм', + 'second' => ':count секунд', + 's' => ':countс', + + 'ago' => ':timeн өмнө', + 'year_ago' => ':count жилий', + 'month_ago' => ':count сары', + 'day_ago' => ':count хоногий', + 'hour_ago' => ':count цагий', + 'minute_ago' => ':count минуты', + 'second_ago' => ':count секунды', + + 'from_now' => 'одоогоос :time', + 'year_from_now' => ':count жилийн дараа', + 'month_from_now' => ':count сарын дараа', + 'day_from_now' => ':count хоногийн дараа', + 'hour_from_now' => ':count цагийн дараа', + 'minute_from_now' => ':count минутын дараа', + 'second_from_now' => ':count секундын дараа', + + // Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action... + 'after' => ':timeн дараа', + 'year_after' => ':count жилий', + 'month_after' => ':count сары', + 'day_after' => ':count хоногий', + 'hour_after' => ':count цагий', + 'minute_after' => ':count минуты', + 'second_after' => ':count секунды', + 'before' => ':timeн өмнө', + 'year_before' => ':count жилий', + 'month_before' => ':count сары', + 'day_before' => ':count хоногий', + 'hour_before' => ':count цагий', + 'minute_before' => ':count минуты', + 'second_before' => ':count секунды', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/my.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/my.php new file mode 100644 index 0000000..e8e491e --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/my.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count နှစ်|:count နှစ်', + 'y' => ':count နှစ်|:count နှစ်', + 'month' => ':count လ|:count လ', + 'm' => ':count လ|:count လ', + 'week' => ':count ပတ်|:count ပတ်', + 'w' => ':count ပတ်|:count ပတ်', + 'day' => ':count ရက်|:count ရက်', + 'd' => ':count ရက်|:count ရက်', + 'hour' => ':count နာရီ|:count နာရီ', + 'h' => ':count နာရီ|:count နာရီ', + 'minute' => ':count မိနစ်|:count မိနစ်', + 'min' => ':count မိနစ်|:count မိနစ်', + 'second' => ':count စက္ကန့်|:count စက္ကန့်', + 's' => ':count စက္ကန့်|:count စက္ကန့်', + 'ago' => 'လွန်ခဲ့သော :time က', + 'from_now' => 'ယခုမှစ၍နောက် :time အကြာ', + 'after' => ':time ကြာပြီးနောက်', + 'before' => ':time မတိုင်ခင်', + 'diff_now' => 'အခုလေးတင်', + 'diff_yesterday' => 'မနေ့က', + 'diff_tomorrow' => 'မနက်ဖြန်', + 'diff_before_yesterday' => 'တမြန်နေ့က', + 'diff_after_tomorrow' => 'တဘက်ခါ', + 'period_recurrences' => ':count ကြိမ်', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ne.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ne.php new file mode 100644 index 0000000..0b528df --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ne.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count वर्ष', + 'y' => ':count वर्ष', + 'month' => ':count महिना', + 'm' => ':count महिना', + 'week' => ':count हप्ता', + 'w' => ':count हप्ता', + 'day' => ':count दिन', + 'd' => ':count दिन', + 'hour' => ':count घण्टा', + 'h' => ':count घण्टा', + 'minute' => ':count मिनेट', + 'min' => ':count मिनेट', + 'second' => ':count सेकेण्ड', + 's' => ':count सेकेण्ड', + 'ago' => ':time पहिले', + 'from_now' => ':time देखि', + 'after' => ':time पछि', + 'before' => ':time अघि', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/nl.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/nl.php index a398ca9..ec5a88e 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/nl.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/nl.php @@ -12,20 +12,25 @@ return array( 'year' => ':count jaar', 'y' => ':count jaar', - 'month' => '1 maand|:count maanden', - 'm' => '1 maand|:count maanden', - 'week' => '1 week|:count weken', - 'w' => '1 week|:count weken', - 'day' => '1 dag|:count dagen', - 'd' => '1 dag|:count dagen', + 'month' => ':count maand|:count maanden', + 'm' => ':count maand|:count maanden', + 'week' => ':count week|:count weken', + 'w' => ':count week|:count weken', + 'day' => ':count dag|:count dagen', + 'd' => ':count dag|:count dagen', 'hour' => ':count uur', 'h' => ':count uur', - 'minute' => '1 minuut|:count minuten', - 'min' => '1 minuut|:count minuten', - 'second' => '1 seconde|:count seconden', - 's' => '1 seconde|:count seconden', + 'minute' => ':count minuut|:count minuten', + 'min' => ':count minuut|:count minuten', + 'second' => ':count seconde|:count seconden', + 's' => ':count seconde|:count seconden', 'ago' => ':time geleden', 'from_now' => 'over :time', 'after' => ':time later', 'before' => ':time eerder', + 'diff_now' => 'nu', + 'diff_yesterday' => 'gisteren', + 'diff_tomorrow' => 'morgen', + 'diff_after_tomorrow' => 'overmorgen', + 'diff_before_yesterday' => 'eergisteren', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/no.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/no.php index 178fbdc..a6ece06 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/no.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/no.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 år|:count år', - 'y' => '1 år|:count år', - 'month' => '1 måned|:count måneder', - 'm' => '1 måned|:count måneder', - 'week' => '1 uke|:count uker', - 'w' => '1 uke|:count uker', - 'day' => '1 dag|:count dager', - 'd' => '1 dag|:count dager', - 'hour' => '1 time|:count timer', - 'h' => '1 time|:count timer', - 'minute' => '1 minutt|:count minutter', - 'min' => '1 minutt|:count minutter', - 'second' => '1 sekund|:count sekunder', - 's' => '1 sekund|:count sekunder', + 'year' => ':count år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count måned|:count måneder', + 'm' => ':count måned|:count måneder', + 'week' => ':count uke|:count uker', + 'w' => ':count uke|:count uker', + 'day' => ':count dag|:count dager', + 'd' => ':count dag|:count dager', + 'hour' => ':count time|:count timer', + 'h' => ':count time|:count timer', + 'minute' => ':count minutt|:count minutter', + 'min' => ':count minutt|:count minutter', + 'second' => ':count sekund|:count sekunder', + 's' => ':count sekund|:count sekunder', 'ago' => ':time siden', 'from_now' => 'om :time', 'after' => ':time etter', 'before' => ':time før', + 'diff_now' => 'akkurat nå', + 'diff_yesterday' => 'i går', + 'diff_tomorrow' => 'i morgen', + 'diff_before_yesterday' => 'i forgårs', + 'diff_after_tomorrow' => 'i overmorgen', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/oc.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/oc.php new file mode 100644 index 0000000..e89e94c --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/oc.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +\Symfony\Component\Translation\PluralizationRules::set(function ($number) { + return $number == 1 ? 0 : 1; +}, 'oc'); + +return array( + 'year' => ':count an|:count ans', + 'y' => ':count an|:count ans', + 'month' => ':count mes|:count meses', + 'm' => ':count mes|:count meses', + 'week' => ':count setmana|:count setmanas', + 'w' => ':count setmana|:count setmanas', + 'day' => ':count jorn|:count jorns', + 'd' => ':count jorn|:count jorns', + 'hour' => ':count ora|:count oras', + 'h' => ':count ora|:count oras', + 'minute' => ':count minuta|:count minutas', + 'min' => ':count minuta|:count minutas', + 'second' => ':count segonda|:count segondas', + 's' => ':count segonda|:count segondas', + 'ago' => 'fa :time', + 'from_now' => 'dins :time', + 'after' => ':time aprèp', + 'before' => ':time abans', + 'diff_now' => 'ara meteis', + 'diff_yesterday' => 'ièr', + 'diff_tomorrow' => 'deman', + 'diff_before_yesterday' => 'ièr delà', + 'diff_after_tomorrow' => 'deman passat', + 'period_recurrences' => ':count còp|:count còps', + 'period_interval' => 'cada :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'fins a :date', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/pl.php index bca2d7f..2308af2 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/pl.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 rok|:count lata|:count lat', - 'y' => '1 rok|:count lata|:count lat', - 'month' => '1 miesiąc|:count miesiące|:count miesięcy', - 'm' => '1 miesiąc|:count miesiące|:count miesięcy', - 'week' => '1 tydzień|:count tygodnie|:count tygodni', - 'w' => '1 tydzień|:count tygodnie|:count tygodni', - 'day' => '1 dzień|:count dni|:count dni', - 'd' => '1 dzień|:count dni|:count dni', - 'hour' => '1 godzina|:count godziny|:count godzin', - 'h' => '1 godzina|:count godziny|:count godzin', - 'minute' => '1 minuta|:count minuty|:count minut', - 'min' => '1 minuta|:count minuty|:count minut', - 'second' => '1 sekunda|:count sekundy|:count sekund', - 's' => '1 sekunda|:count sekundy|:count sekund', + 'year' => ':count rok|:count lata|:count lat', + 'y' => ':countr|:countl', + 'month' => ':count miesiąc|:count miesiące|:count miesięcy', + 'm' => ':countmies', + 'week' => ':count tydzień|:count tygodnie|:count tygodni', + 'w' => ':counttyg', + 'day' => ':count dzień|:count dni|:count dni', + 'd' => ':countd', + 'hour' => ':count godzina|:count godziny|:count godzin', + 'h' => ':countg', + 'minute' => ':count minuta|:count minuty|:count minut', + 'min' => ':countm', + 'second' => ':count sekunda|:count sekundy|:count sekund', + 's' => ':counts', 'ago' => ':time temu', 'from_now' => ':time od teraz', - 'after' => ':time przed', - 'before' => ':time po', + 'after' => ':time po', + 'before' => ':time przed', + 'diff_now' => 'przed chwilą', + 'diff_yesterday' => 'wczoraj', + 'diff_tomorrow' => 'jutro', + 'diff_before_yesterday' => 'przedwczoraj', + 'diff_after_tomorrow' => 'pojutrze', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ps.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ps.php new file mode 100644 index 0000000..15c3296 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ps.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count کال|:count کاله', + 'y' => ':countکال|:countکاله', + 'month' => ':count مياشت|:count مياشتي', + 'm' => ':countمياشت|:countمياشتي', + 'week' => ':count اونۍ|:count اونۍ', + 'w' => ':countاونۍ|:countاونۍ', + 'day' => ':count ورځ|:count ورځي', + 'd' => ':countورځ|:countورځي', + 'hour' => ':count ساعت|:count ساعته', + 'h' => ':countساعت|:countساعته', + 'minute' => ':count دقيقه|:count دقيقې', + 'min' => ':countدقيقه|:countدقيقې', + 'second' => ':count ثانيه|:count ثانيې', + 's' => ':countثانيه|:countثانيې', + 'ago' => ':time دمخه', + 'from_now' => ':time له اوس څخه', + 'after' => ':time وروسته', + 'before' => ':time دمخه', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/pt.php index f170648..392b121 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/pt.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/pt.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 ano|:count anos', - 'y' => '1 ano|:count anos', - 'month' => '1 mês|:count meses', - 'm' => '1 mês|:count meses', - 'week' => '1 semana|:count semanas', - 'w' => '1 semana|:count semanas', - 'day' => '1 dia|:count dias', - 'd' => '1 dia|:count dias', - 'hour' => '1 hora|:count horas', - 'h' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'min' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', - 's' => '1 segundo|:count segundos', + 'year' => ':count ano|:count anos', + 'y' => ':count ano|:count anos', + 'month' => ':count mês|:count meses', + 'm' => ':count mês|:count meses', + 'week' => ':count semana|:count semanas', + 'w' => ':count semana|:count semanas', + 'day' => ':count dia|:count dias', + 'd' => ':count dia|:count dias', + 'hour' => ':count hora|:count horas', + 'h' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'min' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', + 's' => ':count segundo|:count segundos', 'ago' => ':time atrás', 'from_now' => 'em :time', 'after' => ':time depois', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php index f9cbdc7..1f84eac 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php @@ -10,22 +10,31 @@ */ return array( - 'year' => '1 ano|:count anos', - 'y' => '1 ano|:count anos', - 'month' => '1 mês|:count meses', - 'm' => '1 mês|:count meses', - 'week' => '1 semana|:count semanas', - 'w' => '1 semana|:count semanas', - 'day' => '1 dia|:count dias', - 'd' => '1 dia|:count dias', - 'hour' => '1 hora|:count horas', - 'h' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'min' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', - 's' => '1 segundo|:count segundos', + 'year' => ':count ano|:count anos', + 'y' => ':counta|:counta', + 'month' => ':count mês|:count meses', + 'm' => ':countm|:countm', + 'week' => ':count semana|:count semanas', + 'w' => ':countsem|:countsem', + 'day' => ':count dia|:count dias', + 'd' => ':countd|:countd', + 'hour' => ':count hora|:count horas', + 'h' => ':counth|:counth', + 'minute' => ':count minuto|:count minutos', + 'min' => ':countmin|:countmin', + 'second' => ':count segundo|:count segundos', + 's' => ':counts|:counts', 'ago' => 'há :time', 'from_now' => 'em :time', 'after' => 'após :time', 'before' => ':time atrás', + 'diff_now' => 'agora', + 'diff_yesterday' => 'ontem', + 'diff_tomorrow' => 'amanhã', + 'diff_before_yesterday' => 'anteontem', + 'diff_after_tomorrow' => 'depois de amanhã', + 'period_recurrences' => 'uma|:count vez', + 'period_interval' => 'toda :interval', + 'period_start_date' => 'de :date', + 'period_end_date' => 'até :date', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/ru.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/ru.php index 680cbdc..6a83fb1 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/ru.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/ru.php @@ -11,19 +11,19 @@ return array( 'year' => ':count год|:count года|:count лет', - 'y' => ':count год|:count года|:count лет', + 'y' => ':count г|:count г|:count л', 'month' => ':count месяц|:count месяца|:count месяцев', - 'm' => ':count месяц|:count месяца|:count месяцев', + 'm' => ':count м|:count м|:count м', 'week' => ':count неделю|:count недели|:count недель', - 'w' => ':count неделю|:count недели|:count недель', + 'w' => ':count н|:count н|:count н', 'day' => ':count день|:count дня|:count дней', - 'd' => ':count день|:count дня|:count дней', + 'd' => ':count д|:count д|:count д', 'hour' => ':count час|:count часа|:count часов', - 'h' => ':count час|:count часа|:count часов', + 'h' => ':count ч|:count ч|:count ч', 'minute' => ':count минуту|:count минуты|:count минут', - 'min' => ':count минуту|:count минуты|:count минут', + 'min' => ':count мин|:count мин|:count мин', 'second' => ':count секунду|:count секунды|:count секунд', - 's' => ':count секунду|:count секунды|:count секунд', + 's' => ':count с|:count с|:count с', 'ago' => ':time назад', 'from_now' => 'через :time', 'after' => ':time после', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sh.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sh.php new file mode 100644 index 0000000..57f287a --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sh.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +\Symfony\Component\Translation\PluralizationRules::set(function ($number) { + return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); +}, 'sh'); + +return array( + 'year' => ':count godina|:count godine|:count godina', + 'y' => ':count godina|:count godine|:count godina', + 'month' => ':count mesec|:count meseca|:count meseci', + 'm' => ':count mesec|:count meseca|:count meseci', + 'week' => ':count nedelja|:count nedelje|:count nedelja', + 'w' => ':count nedelja|:count nedelje|:count nedelja', + 'day' => ':count dan|:count dana|:count dana', + 'd' => ':count dan|:count dana|:count dana', + 'hour' => ':count čas|:count časa|:count časova', + 'h' => ':count čas|:count časa|:count časova', + 'minute' => ':count minut|:count minuta|:count minuta', + 'min' => ':count minut|:count minuta|:count minuta', + 'second' => ':count sekund|:count sekunda|:count sekundi', + 's' => ':count sekund|:count sekunda|:count sekundi', + 'ago' => 'pre :time', + 'from_now' => 'za :time', + 'after' => 'nakon :time', + 'before' => ':time raniјe', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sk.php index 45c8f76..6101344 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sk.php @@ -26,6 +26,13 @@ return array( 's' => 'sekundu|:count sekundy|:count sekúnd', 'ago' => 'pred :time', 'from_now' => 'za :time', - 'after' => ':time neskôr', + 'after' => 'o :time neskôr', 'before' => ':time predtým', + 'year_ago' => 'rokom|:count rokmi|:count rokmi', + 'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi', + 'week_ago' => 'týždňom|:count týždňami|:count týždňami', + 'day_ago' => 'dňom|:count dňami|:count dňami', + 'hour_ago' => 'hodinou|:count hodinami|:count hodinami', + 'minute_ago' => 'minútou|:count minútami|:count minútami', + 'second_ago' => 'sekundou|:count sekundami|:count sekundami', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sl.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sl.php index fcef085..06686d1 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sl.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sl.php @@ -35,4 +35,9 @@ return array( 'from_now' => 'čez :time', 'after' => 'čez :time', 'before' => 'pred :time', + 'diff_now' => 'ravnokar', + 'diff_yesterday' => 'včeraj', + 'diff_tomorrow' => 'jutri', + 'diff_before_yesterday' => 'predvčerajšnjim', + 'diff_after_tomorrow' => 'pojutrišnjem', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sq.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sq.php index 41be251..6e138a0 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sq.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sq.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 vit|:count vjet', - 'y' => '1 vit|:count vjet', - 'month' => '1 muaj|:count muaj', - 'm' => '1 muaj|:count muaj', - 'week' => '1 javë|:count javë', - 'w' => '1 javë|:count javë', - 'day' => '1 ditë|:count ditë', - 'd' => '1 ditë|:count ditë', - 'hour' => '1 orë|:count orë', - 'h' => '1 orë|:count orë', - 'minute' => '1 minutë|:count minuta', - 'min' => '1 minutë|:count minuta', - 'second' => '1 sekondë|:count sekonda', - 's' => '1 sekondë|:count sekonda', + 'year' => ':count vit|:count vjet', + 'y' => ':count vit|:count vjet', + 'month' => ':count muaj|:count muaj', + 'm' => ':count muaj|:count muaj', + 'week' => ':count javë|:count javë', + 'w' => ':count javë|:count javë', + 'day' => ':count ditë|:count ditë', + 'd' => ':count ditë|:count ditë', + 'hour' => ':count orë|:count orë', + 'h' => ':count orë|:count orë', + 'minute' => ':count minutë|:count minuta', + 'min' => ':count minutë|:count minuta', + 'second' => ':count sekondë|:count sekonda', + 's' => ':count sekondë|:count sekonda', 'ago' => ':time më parë', 'from_now' => ':time nga tani', 'after' => ':time pas', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr.php index 70915a2..5a10642 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr.php @@ -28,4 +28,10 @@ return array( 'from_now' => ':time od sada', 'after' => 'nakon :time', 'before' => 'pre :time', + + 'year_from_now' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', + 'year_ago' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', + + 'week_from_now' => '{1} :count nedelju|{2,3,4} :count nedelje|[5,Inf[ :count nedelja', + 'week_ago' => '{1} :count nedelju|{2,3,4} :count nedelje|[5,Inf[ :count nedelja', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php new file mode 100644 index 0000000..2db83ed --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[ :count година', + 'y' => ':count г.', + 'month' => '{1} :count месец|{2,3,4}:count месеца|[5,Inf[ :count месеци', + 'm' => ':count м.', + 'week' => '{1} :count недеља|{2,3,4}:count недеље|[5,Inf[ :count недеља', + 'w' => ':count нед.', + 'day' => '{1,21,31} :count дан|[2,Inf[ :count дана', + 'd' => ':count д.', + 'hour' => '{1,21} :count сат|{2,3,4,22,23,24}:count сата|[5,Inf[ :count сати', + 'h' => ':count ч.', + 'minute' => '{1,21,31,41,51} :count минут|[2,Inf[ :count минута', + 'min' => ':count мин.', + 'second' => '{1,21,31,41,51} :count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[5,Inf[:count секунди', + 's' => ':count сек.', + 'ago' => 'пре :time', + 'from_now' => 'за :time', + 'after' => ':time након', + 'before' => ':time пре', + + 'year_from_now' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година', + 'year_ago' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година', + + 'week_from_now' => '{1} :count недељу|{2,3,4} :count недеље|[5,Inf[ :count недеља', + 'week_ago' => '{1} :count недељу|{2,3,4} :count недеље|[5,Inf[ :count недеља', + + 'diff_now' => 'управо сада', + 'diff_yesterday' => 'јуче', + 'diff_tomorrow' => 'сутра', + 'diff_before_yesterday' => 'прекјуче', + 'diff_after_tomorrow' => 'прекосутра', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php index 9b67838..18214c4 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php @@ -35,4 +35,9 @@ return array( 'week_from_now' => '{1} :count недјељу|{2,3,4} :count недјеље|[5,Inf[ :count недјеља', 'week_ago' => '{1} :count недјељу|{2,3,4} :count недјеље|[5,Inf[ :count недјеља', + 'diff_now' => 'управо сада', + 'diff_yesterday' => 'јуче', + 'diff_tomorrow' => 'сутра', + 'diff_before_yesterday' => 'прекјуче', + 'diff_after_tomorrow' => 'прекосјутра', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php index d0aaee3..2d2e288 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php @@ -35,4 +35,9 @@ return array( 'week_from_now' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja', 'week_ago' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja', + 'diff_now' => 'upravo sada', + 'diff_yesterday' => 'juče', + 'diff_tomorrow' => 'sutra', + 'diff_before_yesterday' => 'prekjuče', + 'diff_after_tomorrow' => 'preksutra', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php index d0aaee3..7ebf6f0 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php @@ -9,30 +9,4 @@ * file that was distributed with this source code. */ -return array( - 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count godine|[0,Inf[ :count godina', - 'y' => ':count g.', - 'month' => '{1} :count mjesec|{2,3,4}:count mjeseca|[5,Inf[ :count mjeseci', - 'm' => ':count mj.', - 'week' => '{1} :count nedjelja|{2,3,4}:count nedjelje|[5,Inf[ :count nedjelja', - 'w' => ':count ned.', - 'day' => '{1,21,31} :count dan|[2,Inf[ :count dana', - 'd' => ':count d.', - 'hour' => '{1,21} :count sat|{2,3,4,22,23,24}:count sata|[5,Inf[ :count sati', - 'h' => ':count č.', - 'minute' => '{1,21,31,41,51} :count minut|[2,Inf[ :count minuta', - 'min' => ':count min.', - 'second' => '{1,21,31,41,51} :count sekund|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count sekunde|[5,Inf[:count sekundi', - 's' => ':count sek.', - 'ago' => 'prije :time', - 'from_now' => 'za :time', - 'after' => ':time nakon', - 'before' => ':time prije', - - 'year_from_now' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', - 'year_ago' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', - - 'week_from_now' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja', - 'week_ago' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja', - -); +return require __DIR__.'/sr_Latn_ME.php'; diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sv.php index 6bebf7b..89a03b4 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/sv.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sv.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 år|:count år', - 'y' => '1 år|:count år', - 'month' => '1 månad|:count månader', - 'm' => '1 månad|:count månader', - 'week' => '1 vecka|:count veckor', - 'w' => '1 vecka|:count veckor', - 'day' => '1 dag|:count dagar', - 'd' => '1 dag|:count dagar', - 'hour' => '1 timme|:count timmar', - 'h' => '1 timme|:count timmar', - 'minute' => '1 minut|:count minuter', - 'min' => '1 minut|:count minuter', - 'second' => '1 sekund|:count sekunder', - 's' => '1 sekund|:count sekunder', + 'year' => ':count år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count månad|:count månader', + 'm' => ':count månad|:count månader', + 'week' => ':count vecka|:count veckor', + 'w' => ':count vecka|:count veckor', + 'day' => ':count dag|:count dagar', + 'd' => ':count dag|:count dagar', + 'hour' => ':count timme|:count timmar', + 'h' => ':count timme|:count timmar', + 'minute' => ':count minut|:count minuter', + 'min' => ':count minut|:count minuter', + 'second' => ':count sekund|:count sekunder', + 's' => ':count sekund|:count sekunder', 'ago' => ':time sedan', 'from_now' => 'om :time', 'after' => ':time efter', diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/sw.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/sw.php new file mode 100644 index 0000000..52f0342 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/sw.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => 'mwaka 1|miaka :count', + 'y' => 'mwaka 1|miaka :count', + 'month' => 'mwezi 1|miezi :count', + 'm' => 'mwezi 1|miezi :count', + 'week' => 'wiki 1|wiki :count', + 'w' => 'wiki 1|wiki :count', + 'day' => 'siku 1|siku :count', + 'd' => 'siku 1|siku :count', + 'hour' => 'saa 1|masaa :count', + 'h' => 'saa 1|masaa :count', + 'minute' => 'dakika 1|dakika :count', + 'min' => 'dakika 1|dakika :count', + 'second' => 'sekunde 1|sekunde :count', + 's' => 'sekunde 1|sekunde :count', + 'ago' => ':time ziliyopita', + 'from_now' => ':time kwanzia sasa', + 'after' => ':time baada', + 'before' => ':time kabla', +); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/th.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/th.php index c4c402e..88bb4ac 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/th.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/th.php @@ -10,22 +10,22 @@ */ return array( - 'year' => '1 ปี|:count ปี', - 'y' => '1 ปี|:count ปี', - 'month' => '1 เดือน|:count เดือน', - 'm' => '1 เดือน|:count เดือน', - 'week' => '1 สัปดาห์|:count สัปดาห์', - 'w' => '1 สัปดาห์|:count สัปดาห์', - 'day' => '1 วัน|:count วัน', - 'd' => '1 วัน|:count วัน', - 'hour' => '1 ชั่วโมง|:count ชั่วโมง', - 'h' => '1 ชั่วโมง|:count ชั่วโมง', - 'minute' => '1 นาที|:count นาที', - 'min' => '1 นาที|:count นาที', - 'second' => '1 วินาที|:count วินาที', - 's' => '1 วินาที|:count วินาที', - 'ago' => ':time ที่แล้ว', - 'from_now' => ':time จากนี้', - 'after' => 'หลัง:time', - 'before' => 'ก่อน:time', + 'year' => ':count ปี', + 'y' => ':count ปี', + 'month' => ':count เดือน', + 'm' => ':count เดือน', + 'week' => ':count สัปดาห์', + 'w' => ':count สัปดาห์', + 'day' => ':count วัน', + 'd' => ':count วัน', + 'hour' => ':count ชั่วโมง', + 'h' => ':count ชั่วโมง', + 'minute' => ':count นาที', + 'min' => ':count นาที', + 'second' => ':count วินาที', + 's' => ':count วินาที', + 'ago' => ':timeที่แล้ว', + 'from_now' => ':timeต่อจากนี้', + 'after' => ':timeหลังจากนี้', + 'before' => ':timeก่อน', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index aeebca3..8d08eaa 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -24,8 +24,17 @@ return array( 'min' => ':count хвилину|:count хвилини|:count хвилин', 'second' => ':count секунду|:count секунди|:count секунд', 's' => ':count секунду|:count секунди|:count секунд', - 'ago' => ':time назад', + 'ago' => ':time тому', 'from_now' => 'через :time', 'after' => ':time після', 'before' => ':time до', + 'diff_now' => 'щойно', + 'diff_yesterday' => 'вчора', + 'diff_tomorrow' => 'завтра', + 'diff_before_yesterday' => 'позавчора', + 'diff_after_tomorrow' => 'післязавтра', + 'period_recurrences' => 'один раз|:count рази|:count разів', + 'period_interval' => 'кожні :interval', + 'period_start_date' => 'з :date', + 'period_end_date' => 'до :date', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/uz.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/uz.php index c997f29..1cb6f71 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/uz.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/uz.php @@ -10,22 +10,22 @@ */ return array( - 'year' => ':count yil|:count yil|:count yil', - 'y' => ':count yil|:count yil|:count yil', - 'month' => ':count oy|:count oy|:count oylar', - 'm' => ':count oy|:count oy|:count oylar', - 'week' => ':count hafta|:count hafta|:count hafta', - 'w' => ':count hafta|:count hafta|:count hafta', - 'day' => ':count kun|:count kun|:count kun', - 'd' => ':count kun|:count kun|:count kun', - 'hour' => ':count soat|:count soat|:count soat', - 'h' => ':count soat|:count soat|:count soat', - 'minute' => ':count minut|:count minut|:count minut', - 'min' => ':count minut|:count minut|:count minut', - 'second' => ':count sekund|:count sekund|:count sekund', - 's' => ':count sekund|:count sekund|:count sekund', + 'year' => ':count yil', + 'y' => ':count yil', + 'month' => ':count oy', + 'm' => ':count oy', + 'week' => ':count hafta', + 'w' => ':count hafta', + 'day' => ':count kun', + 'd' => ':count kun', + 'hour' => ':count soat', + 'h' => ':count soat', + 'minute' => ':count daqiqa', + 'min' => ':count daq', + 'second' => ':count soniya', + 's' => ':count s', 'ago' => ':time avval', - 'from_now' => ':time keyin', + 'from_now' => ':time dan keyin', 'after' => ':time keyin', 'before' => ':time oldin', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php b/api/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php index 6c1d417..c848723 100644 --- a/api/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php +++ b/api/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php @@ -10,22 +10,22 @@ */ return array( - 'year' => ':count 年', - 'y' => ':count 年', - 'month' => ':count 月', - 'm' => ':count 月', - 'week' => ':count 周', - 'w' => ':count 周', - 'day' => ':count 天', - 'd' => ':count 天', - 'hour' => ':count 小時', - 'h' => ':count 小時', - 'minute' => ':count 分鐘', - 'min' => ':count 分鐘', - 'second' => ':count 秒', - 's' => ':count 秒', + 'year' => ':count年', + 'y' => ':count年', + 'month' => ':count月', + 'm' => ':count月', + 'week' => ':count週', + 'w' => ':count週', + 'day' => ':count天', + 'd' => ':count天', + 'hour' => ':count小時', + 'h' => ':count小時', + 'minute' => ':count分鐘', + 'min' => ':count分鐘', + 'second' => ':count秒', + 's' => ':count秒', 'ago' => ':time前', - 'from_now' => '距現在 :time', + 'from_now' => '距現在:time', 'after' => ':time後', 'before' => ':time前', ); diff --git a/api/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php b/api/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php new file mode 100644 index 0000000..4d83b0c --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php @@ -0,0 +1,37 @@ +app['events']; + if ($events instanceof EventDispatcher || $events instanceof Dispatcher) { + $events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) { + $service->updateLocale(); + }); + $service->updateLocale(); + } + } + + public function updateLocale() + { + $translator = $this->app['translator']; + if ($translator instanceof Translator || $translator instanceof IlluminateTranslator) { + Carbon::setLocale($translator->getLocale()); + } + } + + public function register() + { + // Needed for Laravel < 5.3 compatibility + } +} diff --git a/api/vendor/nesbot/carbon/src/Carbon/Translator.php b/api/vendor/nesbot/carbon/src/Carbon/Translator.php new file mode 100644 index 0000000..12115b0 --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Translator.php @@ -0,0 +1,143 @@ +addLoader('array', new Translation\Loader\ArrayLoader()); + parent::__construct($locale, $formatter, $cacheDir, $debug); + } + + /** + * Reset messages of a locale (all locale if no locale passed). + * Remove custom messages and reload initial messages from matching + * file in Lang directory. + * + * @param string|null $locale + * + * @return bool + */ + public function resetMessages($locale = null) + { + if ($locale === null) { + static::$messages = array(); + + return true; + } + + if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) { + static::$messages[$locale] = require $filename; + $this->addResource('array', static::$messages[$locale], $locale); + + return true; + } + + return false; + } + + /** + * Init messages language from matching file in Lang directory. + * + * @param string $locale + * + * @return bool + */ + protected function loadMessagesFromFile($locale) + { + if (isset(static::$messages[$locale])) { + return true; + } + + return $this->resetMessages($locale); + } + + /** + * Set messages of a locale and take file first if present. + * + * @param string $locale + * @param array $messages + * + * @return $this + */ + public function setMessages($locale, $messages) + { + $this->loadMessagesFromFile($locale); + $this->addResource('array', $messages, $locale); + static::$messages[$locale] = array_merge( + isset(static::$messages[$locale]) ? static::$messages[$locale] : array(), + $messages + ); + + return $this; + } + + /** + * Get messages of a locale, if none given, return all the + * languages. + * + * @param string|null $locale + * + * @return array + */ + public function getMessages($locale = null) + { + return $locale === null ? static::$messages : static::$messages[$locale]; + } + + /** + * Set the current translator locale and indicate if the source locale file exists + * + * @param string $locale locale ex. en + * + * @return bool + */ + public function setLocale($locale) + { + $locale = preg_replace_callback('/[-_]([a-z]{2,})/', function ($matches) { + // _2-letters is a region, _3+-letters is a variant + return '_'.call_user_func(strlen($matches[1]) > 2 ? 'ucfirst' : 'strtoupper', $matches[1]); + }, strtolower($locale)); + + if ($this->loadMessagesFromFile($locale)) { + parent::setLocale($locale); + + return true; + } + + return false; + } +} diff --git a/api/vendor/nesbot/carbon/src/Carbon/Upgrade.php b/api/vendor/nesbot/carbon/src/Carbon/Upgrade.php new file mode 100644 index 0000000..26449ff --- /dev/null +++ b/api/vendor/nesbot/carbon/src/Carbon/Upgrade.php @@ -0,0 +1,150 @@ + '5.8.0', + 'laravel/cashier' => '9.0.1', + 'illuminate/support' => '5.8.0', + 'laravel/dusk' => '5.0.0', + ); + + protected static $otherLibraries = array( + 'spatie/laravel-analytics' => '3.6.4', + 'jenssegers/date' => '3.5.0', + ); + + /** + * @param \UpdateHelper\UpdateHelper $helper + */ + public function check(UpdateHelper $helper) + { + $helper->write(array( + 'Carbon 1 is deprecated, see how to migrate to Carbon 2.', + 'https://carbon.nesbot.com/docs/#api-carbon-2', + )); + + if (static::SUGGEST_ON_UPDATE || static::ASK_ON_UPDATE || $helper->getIo()->isVerbose()) { + $laravelUpdate = array(); + + foreach (static::$laravelLibraries as $name => $version) { + if ($helper->hasAsDependency($name) && $helper->isDependencyLesserThan($name, $version)) { + $laravelUpdate[$name] = $version; + } + } + + if (count($laravelUpdate)) { + $output = array( + ' Please consider upgrading your Laravel dependencies to be compatible with Carbon 2:', + ); + + foreach ($laravelUpdate as $name => $version) { + $output[] = " - $name at least to version $version"; + } + + $output[] = ''; + $output[] = " If you can't update Laravel, check https://carbon.nesbot.com/ to see how to"; + $output[] = ' install Carbon 2 using alias version and our adapter kylekatarnls/laravel-carbon-2'; + $output[] = ''; + + $helper->write($output); + } + + foreach (static::$otherLibraries as $name => $version) { + if ($helper->hasAsDependency($name) && $helper->isDependencyLesserThan($name, $version)) { + $helper->write(" Please consider upgrading $name at least to $version to be compatible with Carbon 2.\n"); + } + } + + if (static::ASK_ON_UPDATE) { + static::askForUpgrade($helper); + + return; + } + } + + $path = implode(DIRECTORY_SEPARATOR, array('.', 'vendor', 'bin', 'upgrade-carbon')); + + if (!file_exists($path)) { + $path = realpath(__DIR__.'/../../bin/upgrade-carbon'); + } + + $helper->write( + ' You can run '.escapeshellarg($path). + ' to get help in updating carbon and other frameworks and libraries that depend on it.' + ); + } + + private static function getUpgradeQuestion($upgrades) + { + $message = "Do you want us to try the following upgrade:\n"; + + foreach ($upgrades as $name => $version) { + $message .= " - $name: $version\n"; + } + + return $message.'[Y/N] '; + } + + public static function askForUpgrade(UpdateHelper $helper, $upgradeIfNotInteractive = false) + { + $upgrades = array( + 'nesbot/carbon' => '^2.0.0', + ); + + foreach (array(static::$laravelLibraries, static::$otherLibraries) as $libraries) { + foreach ($libraries as $name => $version) { + if ($helper->hasAsDependency($name) && $helper->isDependencyLesserThan($name, $version)) { + $upgrades[$name] = "^$version"; + } + } + } + + $shouldUpgrade = $helper->isInteractive() + ? $helper->getIo()->askConfirmation(static::getUpgradeQuestion($upgrades)) + : $upgradeIfNotInteractive; + + if ($shouldUpgrade) { + $helper->setDependencyVersions($upgrades)->update(); + } + } + + public static function upgrade(ScriptEvent $event = null) + { + if (!$event) { + $composer = new Composer(); + $baseDir = __DIR__.'/../..'; + + if (file_exists("$baseDir/autoload.php")) { + $baseDir .= '/..'; + } + + $composer->setConfig(new Config(true, $baseDir)); + $event = new ScriptEvent( + 'upgrade-carbon', + $composer, + new ConsoleIO(new StringInput(''), new ConsoleOutput(), new HelperSet(array( + new QuestionHelper(), + ))) + ); + } + + static::askForUpgrade(new UpdateHelper($event), true); + } +} diff --git a/api/vendor/nesbot/carbon/src/JsonSerializable.php b/api/vendor/nesbot/carbon/src/JsonSerializable.php new file mode 100644 index 0000000..d34060b --- /dev/null +++ b/api/vendor/nesbot/carbon/src/JsonSerializable.php @@ -0,0 +1,18 @@ +json_encode, + * which is a value of any type other than a resource. + * + * @since 5.4.0 + */ + public function jsonSerialize(); + } +} diff --git a/api/vendor/nikic/fast-route/.travis.yml b/api/vendor/nikic/fast-route/.travis.yml index e16ed63..10f8381 100644 --- a/api/vendor/nikic/fast-route/.travis.yml +++ b/api/vendor/nikic/fast-route/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: php php: @@ -5,8 +6,15 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 - hhvm -matrix: - allow_failures: - - php: 7.0 +script: + - ./vendor/bin/phpunit + +before_install: + - travis_retry composer self-update + +install: + - composer install diff --git a/api/vendor/nikic/fast-route/FastRoute.hhi b/api/vendor/nikic/fast-route/FastRoute.hhi index c34bb8e..8d50738 100644 --- a/api/vendor/nikic/fast-route/FastRoute.hhi +++ b/api/vendor/nikic/fast-route/FastRoute.hhi @@ -34,21 +34,21 @@ namespace FastRoute { function simpleDispatcher( (function(RouteCollector): void) $routeDefinitionCallback, shape( - 'routeParser' => ?classname, - 'dataGenerator' => ?classname, - 'dispatcher' => ?classname, - 'routeCollector' => ?classname, + ?'routeParser' => classname, + ?'dataGenerator' => classname, + ?'dispatcher' => classname, + ?'routeCollector' => classname, ) $options = shape()): Dispatcher; function cachedDispatcher( (function(RouteCollector): void) $routeDefinitionCallback, shape( - 'routeParser' => ?classname, - 'dataGenerator' => ?classname, - 'dispatcher' => ?classname, - 'routeCollector' => ?classname, - 'cacheDisabled' => ?bool, - 'cacheFile' => ?string, + ?'routeParser' => classname, + ?'dataGenerator' => classname, + ?'dispatcher' => classname, + ?'routeCollector' => classname, + ?'cacheDisabled' => bool, + ?'cacheFile' => string, ) $options = shape()): Dispatcher; } diff --git a/api/vendor/nikic/fast-route/composer.json b/api/vendor/nikic/fast-route/composer.json index 62aad22..fb446a2 100644 --- a/api/vendor/nikic/fast-route/composer.json +++ b/api/vendor/nikic/fast-route/composer.json @@ -9,13 +9,16 @@ "email": "nikic@php.net" } ], - "require": { - "php": ">=5.4.0" - }, "autoload": { "psr-4": { "FastRoute\\": "src/" }, "files": ["src/functions.php"] + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" } } diff --git a/api/vendor/nikic/fast-route/psalm.xml b/api/vendor/nikic/fast-route/psalm.xml new file mode 100644 index 0000000..0dca5d7 --- /dev/null +++ b/api/vendor/nikic/fast-route/psalm.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/api/vendor/nikic/fast-route/src/BadRouteException.php b/api/vendor/nikic/fast-route/src/BadRouteException.php index 7e38479..62262ec 100644 --- a/api/vendor/nikic/fast-route/src/BadRouteException.php +++ b/api/vendor/nikic/fast-route/src/BadRouteException.php @@ -2,5 +2,6 @@ namespace FastRoute; -class BadRouteException extends \LogicException { +class BadRouteException extends \LogicException +{ } diff --git a/api/vendor/nikic/fast-route/src/DataGenerator.php b/api/vendor/nikic/fast-route/src/DataGenerator.php index 16053db..af577cd 100644 --- a/api/vendor/nikic/fast-route/src/DataGenerator.php +++ b/api/vendor/nikic/fast-route/src/DataGenerator.php @@ -2,7 +2,8 @@ namespace FastRoute; -interface DataGenerator { +interface DataGenerator +{ /** * Adds a route to the data generator. The route data uses the * same format that is returned by RouterParser::parser(). diff --git a/api/vendor/nikic/fast-route/src/DataGenerator/CharCountBased.php b/api/vendor/nikic/fast-route/src/DataGenerator/CharCountBased.php index 5c38b89..3cfeed6 100644 --- a/api/vendor/nikic/fast-route/src/DataGenerator/CharCountBased.php +++ b/api/vendor/nikic/fast-route/src/DataGenerator/CharCountBased.php @@ -2,12 +2,15 @@ namespace FastRoute\DataGenerator; -class CharCountBased extends RegexBasedAbstract { - protected function getApproxChunkSize() { +class CharCountBased extends RegexBasedAbstract +{ + protected function getApproxChunkSize() + { return 30; } - protected function processChunk($regexToRoutesMap) { + protected function processChunk($regexToRoutesMap) + { $routeMap = []; $regexes = []; diff --git a/api/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php b/api/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php index d51807f..54d9a05 100644 --- a/api/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php +++ b/api/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php @@ -2,12 +2,15 @@ namespace FastRoute\DataGenerator; -class GroupCountBased extends RegexBasedAbstract { - protected function getApproxChunkSize() { +class GroupCountBased extends RegexBasedAbstract +{ + protected function getApproxChunkSize() + { return 10; } - protected function processChunk($regexToRoutesMap) { + protected function processChunk($regexToRoutesMap) + { $routeMap = []; $regexes = []; $numGroups = 0; @@ -25,4 +28,3 @@ class GroupCountBased extends RegexBasedAbstract { return ['regex' => $regex, 'routeMap' => $routeMap]; } } - diff --git a/api/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php b/api/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php index 4152f7a..fc4dc0a 100644 --- a/api/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php +++ b/api/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php @@ -2,12 +2,15 @@ namespace FastRoute\DataGenerator; -class GroupPosBased extends RegexBasedAbstract { - protected function getApproxChunkSize() { +class GroupPosBased extends RegexBasedAbstract +{ + protected function getApproxChunkSize() + { return 10; } - protected function processChunk($regexToRoutesMap) { + protected function processChunk($regexToRoutesMap) + { $routeMap = []; $regexes = []; $offset = 1; @@ -22,4 +25,3 @@ class GroupPosBased extends RegexBasedAbstract { return ['regex' => $regex, 'routeMap' => $routeMap]; } } - diff --git a/api/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php b/api/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php index 61359f5..0aebed9 100644 --- a/api/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php +++ b/api/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php @@ -2,12 +2,15 @@ namespace FastRoute\DataGenerator; -class MarkBased extends RegexBasedAbstract { - protected function getApproxChunkSize() { +class MarkBased extends RegexBasedAbstract +{ + protected function getApproxChunkSize() + { return 30; } - protected function processChunk($regexToRoutesMap) { + protected function processChunk($regexToRoutesMap) + { $routeMap = []; $regexes = []; $markName = 'a'; @@ -22,4 +25,3 @@ class MarkBased extends RegexBasedAbstract { return ['regex' => $regex, 'routeMap' => $routeMap]; } } - diff --git a/api/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php b/api/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php index 713d897..6457290 100644 --- a/api/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php +++ b/api/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php @@ -2,18 +2,30 @@ namespace FastRoute\DataGenerator; -use FastRoute\DataGenerator; use FastRoute\BadRouteException; +use FastRoute\DataGenerator; use FastRoute\Route; -abstract class RegexBasedAbstract implements DataGenerator { +abstract class RegexBasedAbstract implements DataGenerator +{ + /** @var mixed[][] */ protected $staticRoutes = []; + + /** @var Route[][] */ protected $methodToRegexToRoutesMap = []; - protected abstract function getApproxChunkSize(); - protected abstract function processChunk($regexToRoutesMap); + /** + * @return int + */ + abstract protected function getApproxChunkSize(); - public function addRoute($httpMethod, $routeData, $handler) { + /** + * @return mixed[] + */ + abstract protected function processChunk($regexToRoutesMap); + + public function addRoute($httpMethod, $routeData, $handler) + { if ($this->isStaticRoute($routeData)) { $this->addStaticRoute($httpMethod, $routeData, $handler); } else { @@ -21,7 +33,11 @@ abstract class RegexBasedAbstract implements DataGenerator { } } - public function getData() { + /** + * @return mixed[] + */ + public function getData() + { if (empty($this->methodToRegexToRoutesMap)) { return [$this->staticRoutes, []]; } @@ -29,26 +45,41 @@ abstract class RegexBasedAbstract implements DataGenerator { return [$this->staticRoutes, $this->generateVariableRouteData()]; } - private function generateVariableRouteData() { + /** + * @return mixed[] + */ + private function generateVariableRouteData() + { $data = []; foreach ($this->methodToRegexToRoutesMap as $method => $regexToRoutesMap) { $chunkSize = $this->computeChunkSize(count($regexToRoutesMap)); $chunks = array_chunk($regexToRoutesMap, $chunkSize, true); - $data[$method] = array_map([$this, 'processChunk'], $chunks); + $data[$method] = array_map([$this, 'processChunk'], $chunks); } return $data; } - private function computeChunkSize($count) { + /** + * @param int + * @return int + */ + private function computeChunkSize($count) + { $numParts = max(1, round($count / $this->getApproxChunkSize())); - return ceil($count / $numParts); + return (int) ceil($count / $numParts); } - private function isStaticRoute($routeData) { + /** + * @param mixed[] + * @return bool + */ + private function isStaticRoute($routeData) + { return count($routeData) === 1 && is_string($routeData[0]); } - private function addStaticRoute($httpMethod, $routeData, $handler) { + private function addStaticRoute($httpMethod, $routeData, $handler) + { $routeStr = $routeData[0]; if (isset($this->staticRoutes[$httpMethod][$routeStr])) { @@ -72,7 +103,8 @@ abstract class RegexBasedAbstract implements DataGenerator { $this->staticRoutes[$httpMethod][$routeStr] = $handler; } - private function addVariableRoute($httpMethod, $routeData, $handler) { + private function addVariableRoute($httpMethod, $routeData, $handler) + { list($regex, $variables) = $this->buildRegexForRoute($routeData); if (isset($this->methodToRegexToRoutesMap[$httpMethod][$regex])) { @@ -87,7 +119,12 @@ abstract class RegexBasedAbstract implements DataGenerator { ); } - private function buildRegexForRoute($routeData) { + /** + * @param mixed[] + * @return mixed[] + */ + private function buildRegexForRoute($routeData) + { $regex = ''; $variables = []; foreach ($routeData as $part) { @@ -118,14 +155,19 @@ abstract class RegexBasedAbstract implements DataGenerator { return [$regex, $variables]; } - private function regexHasCapturingGroups($regex) { + /** + * @param string + * @return bool + */ + private function regexHasCapturingGroups($regex) + { if (false === strpos($regex, '(')) { // Needs to have at least a ( to contain a capturing group return false; } // Semi-accurate detection for capturing groups - return preg_match( + return (bool) preg_match( '~ (?: \(\?\( diff --git a/api/vendor/nikic/fast-route/src/Dispatcher.php b/api/vendor/nikic/fast-route/src/Dispatcher.php index ea98009..4ae72a3 100644 --- a/api/vendor/nikic/fast-route/src/Dispatcher.php +++ b/api/vendor/nikic/fast-route/src/Dispatcher.php @@ -2,7 +2,8 @@ namespace FastRoute; -interface Dispatcher { +interface Dispatcher +{ const NOT_FOUND = 0; const FOUND = 1; const METHOD_NOT_ALLOWED = 2; diff --git a/api/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php b/api/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php index 22ba240..ef1eec1 100644 --- a/api/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php +++ b/api/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class CharCountBased extends RegexBasedAbstract { - public function __construct($data) { +class CharCountBased extends RegexBasedAbstract +{ + public function __construct($data) + { list($this->staticRouteMap, $this->variableRouteData) = $data; } - protected function dispatchVariableRoute($routeData, $uri) { + protected function dispatchVariableRoute($routeData, $uri) + { foreach ($routeData as $data) { if (!preg_match($data['regex'], $uri . $data['suffix'], $matches)) { continue; diff --git a/api/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php b/api/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php index 0abd322..493e7a9 100644 --- a/api/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php +++ b/api/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class GroupCountBased extends RegexBasedAbstract { - public function __construct($data) { +class GroupCountBased extends RegexBasedAbstract +{ + public function __construct($data) + { list($this->staticRouteMap, $this->variableRouteData) = $data; } - protected function dispatchVariableRoute($routeData, $uri) { + protected function dispatchVariableRoute($routeData, $uri) + { foreach ($routeData as $data) { if (!preg_match($data['regex'], $uri, $matches)) { continue; diff --git a/api/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php b/api/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php index 32227d4..498220e 100644 --- a/api/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php +++ b/api/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class GroupPosBased extends RegexBasedAbstract { - public function __construct($data) { +class GroupPosBased extends RegexBasedAbstract +{ + public function __construct($data) + { list($this->staticRouteMap, $this->variableRouteData) = $data; } - protected function dispatchVariableRoute($routeData, $uri) { + protected function dispatchVariableRoute($routeData, $uri) + { foreach ($routeData as $data) { if (!preg_match($data['regex'], $uri, $matches)) { continue; diff --git a/api/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php b/api/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php index fefa711..22eb09b 100644 --- a/api/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php +++ b/api/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class MarkBased extends RegexBasedAbstract { - public function __construct($data) { +class MarkBased extends RegexBasedAbstract +{ + public function __construct($data) + { list($this->staticRouteMap, $this->variableRouteData) = $data; } - protected function dispatchVariableRoute($routeData, $uri) { + protected function dispatchVariableRoute($routeData, $uri) + { foreach ($routeData as $data) { if (!preg_match($data['regex'], $uri, $matches)) { continue; diff --git a/api/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php b/api/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php index 8823b9b..206e879 100644 --- a/api/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php +++ b/api/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php @@ -4,13 +4,21 @@ namespace FastRoute\Dispatcher; use FastRoute\Dispatcher; -abstract class RegexBasedAbstract implements Dispatcher { - protected $staticRouteMap; - protected $variableRouteData; +abstract class RegexBasedAbstract implements Dispatcher +{ + /** @var mixed[][] */ + protected $staticRouteMap = []; - protected abstract function dispatchVariableRoute($routeData, $uri); + /** @var mixed[] */ + protected $variableRouteData = []; - public function dispatch($httpMethod, $uri) { + /** + * @return mixed[] + */ + abstract protected function dispatchVariableRoute($routeData, $uri); + + public function dispatch($httpMethod, $uri) + { if (isset($this->staticRouteMap[$httpMethod][$uri])) { $handler = $this->staticRouteMap[$httpMethod][$uri]; return [self::FOUND, $handler, []]; @@ -73,8 +81,8 @@ abstract class RegexBasedAbstract implements Dispatcher { // If there are no allowed methods the route simply does not exist if ($allowedMethods) { return [self::METHOD_NOT_ALLOWED, $allowedMethods]; - } else { - return [self::NOT_FOUND]; } + + return [self::NOT_FOUND]; } } diff --git a/api/vendor/nikic/fast-route/src/Route.php b/api/vendor/nikic/fast-route/src/Route.php index d71ded1..e1bf7dd 100644 --- a/api/vendor/nikic/fast-route/src/Route.php +++ b/api/vendor/nikic/fast-route/src/Route.php @@ -2,10 +2,18 @@ namespace FastRoute; -class Route { +class Route +{ + /** @var string */ public $httpMethod; + + /** @var string */ public $regex; + + /** @var array */ public $variables; + + /** @var mixed */ public $handler; /** @@ -16,7 +24,8 @@ class Route { * @param string $regex * @param array $variables */ - public function __construct($httpMethod, $handler, $regex, $variables) { + public function __construct($httpMethod, $handler, $regex, $variables) + { $this->httpMethod = $httpMethod; $this->handler = $handler; $this->regex = $regex; @@ -30,9 +39,9 @@ class Route { * * @return bool */ - public function matches($str) { + public function matches($str) + { $regex = '~^' . $this->regex . '$~'; return (bool) preg_match($regex, $str); } } - diff --git a/api/vendor/nikic/fast-route/src/RouteCollector.php b/api/vendor/nikic/fast-route/src/RouteCollector.php index 7d7667b..c1c1762 100644 --- a/api/vendor/nikic/fast-route/src/RouteCollector.php +++ b/api/vendor/nikic/fast-route/src/RouteCollector.php @@ -2,9 +2,15 @@ namespace FastRoute; -class RouteCollector { +class RouteCollector +{ + /** @var RouteParser */ protected $routeParser; + + /** @var DataGenerator */ protected $dataGenerator; + + /** @var string */ protected $currentGroupPrefix; /** @@ -13,7 +19,8 @@ class RouteCollector { * @param RouteParser $routeParser * @param DataGenerator $dataGenerator */ - public function __construct(RouteParser $routeParser, DataGenerator $dataGenerator) { + public function __construct(RouteParser $routeParser, DataGenerator $dataGenerator) + { $this->routeParser = $routeParser; $this->dataGenerator = $dataGenerator; $this->currentGroupPrefix = ''; @@ -28,7 +35,8 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function addRoute($httpMethod, $route, $handler) { + public function addRoute($httpMethod, $route, $handler) + { $route = $this->currentGroupPrefix . $route; $routeDatas = $this->routeParser->parse($route); foreach ((array) $httpMethod as $method) { @@ -46,13 +54,14 @@ class RouteCollector { * @param string $prefix * @param callable $callback */ - public function addGroup($prefix, callable $callback) { + public function addGroup($prefix, callable $callback) + { $previousGroupPrefix = $this->currentGroupPrefix; $this->currentGroupPrefix = $previousGroupPrefix . $prefix; $callback($this); $this->currentGroupPrefix = $previousGroupPrefix; } - + /** * Adds a GET route to the collection * @@ -61,10 +70,11 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function get($route, $handler) { + public function get($route, $handler) + { $this->addRoute('GET', $route, $handler); } - + /** * Adds a POST route to the collection * @@ -73,10 +83,11 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function post($route, $handler) { + public function post($route, $handler) + { $this->addRoute('POST', $route, $handler); } - + /** * Adds a PUT route to the collection * @@ -85,10 +96,11 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function put($route, $handler) { + public function put($route, $handler) + { $this->addRoute('PUT', $route, $handler); } - + /** * Adds a DELETE route to the collection * @@ -97,10 +109,11 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function delete($route, $handler) { + public function delete($route, $handler) + { $this->addRoute('DELETE', $route, $handler); } - + /** * Adds a PATCH route to the collection * @@ -109,7 +122,8 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function patch($route, $handler) { + public function patch($route, $handler) + { $this->addRoute('PATCH', $route, $handler); } @@ -121,7 +135,8 @@ class RouteCollector { * @param string $route * @param mixed $handler */ - public function head($route, $handler) { + public function head($route, $handler) + { $this->addRoute('HEAD', $route, $handler); } @@ -130,7 +145,8 @@ class RouteCollector { * * @return array */ - public function getData() { + public function getData() + { return $this->dataGenerator->getData(); } } diff --git a/api/vendor/nikic/fast-route/src/RouteParser.php b/api/vendor/nikic/fast-route/src/RouteParser.php index c089c31..6a7685c 100644 --- a/api/vendor/nikic/fast-route/src/RouteParser.php +++ b/api/vendor/nikic/fast-route/src/RouteParser.php @@ -2,7 +2,8 @@ namespace FastRoute; -interface RouteParser { +interface RouteParser +{ /** * Parses a route string into multiple route data arrays. * @@ -29,7 +30,7 @@ interface RouteParser { * Here one route string was converted into two route data arrays. * * @param string $route Route string to parse - * + * * @return mixed[][] Array of route data arrays */ public function parse($route); diff --git a/api/vendor/nikic/fast-route/src/RouteParser/Std.php b/api/vendor/nikic/fast-route/src/RouteParser/Std.php index a6c21bd..4fbdee1 100644 --- a/api/vendor/nikic/fast-route/src/RouteParser/Std.php +++ b/api/vendor/nikic/fast-route/src/RouteParser/Std.php @@ -10,7 +10,8 @@ use FastRoute\RouteParser; * * "/user/{name}[/{id:[0-9]+}]" */ -class Std implements RouteParser { +class Std implements RouteParser +{ const VARIABLE_REGEX = <<<'REGEX' \{ \s* ([a-zA-Z_][a-zA-Z0-9_-]*) \s* @@ -21,7 +22,8 @@ class Std implements RouteParser { REGEX; const DEFAULT_DISPATCH_REGEX = '[^/]+'; - public function parse($route) { + public function parse($route) + { $routeWithoutClosingOptionals = rtrim($route, ']'); $numOptionals = strlen($route) - strlen($routeWithoutClosingOptionals); @@ -30,7 +32,7 @@ REGEX; if ($numOptionals !== count($segments) - 1) { // If there are any ] in the middle of the route, throw a more specific error message if (preg_match('~' . self::VARIABLE_REGEX . '(*SKIP)(*F) | \]~x', $routeWithoutClosingOptionals)) { - throw new BadRouteException("Optional segments can only occur at the end of a route"); + throw new BadRouteException('Optional segments can only occur at the end of a route'); } throw new BadRouteException("Number of opening '[' and closing ']' does not match"); } @@ -39,7 +41,7 @@ REGEX; $routeDatas = []; foreach ($segments as $n => $segment) { if ($segment === '' && $n !== 0) { - throw new BadRouteException("Empty optional part"); + throw new BadRouteException('Empty optional part'); } $currentRoute .= $segment; @@ -50,8 +52,12 @@ REGEX; /** * Parses a route string that does not contain optional segments. + * + * @param string + * @return mixed[] */ - private function parsePlaceholders($route) { + private function parsePlaceholders($route) + { if (!preg_match_all( '~' . self::VARIABLE_REGEX . '~x', $route, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER @@ -72,7 +78,7 @@ REGEX; $offset = $set[0][1] + strlen($set[0][0]); } - if ($offset != strlen($route)) { + if ($offset !== strlen($route)) { $routeData[] = substr($route, $offset); } diff --git a/api/vendor/nikic/fast-route/src/bootstrap.php b/api/vendor/nikic/fast-route/src/bootstrap.php index add216c..0bce3a4 100644 --- a/api/vendor/nikic/fast-route/src/bootstrap.php +++ b/api/vendor/nikic/fast-route/src/bootstrap.php @@ -4,7 +4,7 @@ namespace FastRoute; require __DIR__ . '/functions.php'; -spl_autoload_register(function($class) { +spl_autoload_register(function ($class) { if (strpos($class, 'FastRoute\\') === 0) { $name = substr($class, strlen('FastRoute')); require __DIR__ . strtr($name, '\\', DIRECTORY_SEPARATOR) . '.php'; diff --git a/api/vendor/nikic/fast-route/src/functions.php b/api/vendor/nikic/fast-route/src/functions.php index 46bc805..876a5d9 100644 --- a/api/vendor/nikic/fast-route/src/functions.php +++ b/api/vendor/nikic/fast-route/src/functions.php @@ -9,7 +9,8 @@ if (!function_exists('FastRoute\simpleDispatcher')) { * * @return Dispatcher */ - function simpleDispatcher(callable $routeDefinitionCallback, array $options = []) { + function simpleDispatcher(callable $routeDefinitionCallback, array $options = []) + { $options += [ 'routeParser' => 'FastRoute\\RouteParser\\Std', 'dataGenerator' => 'FastRoute\\DataGenerator\\GroupCountBased', @@ -32,7 +33,8 @@ if (!function_exists('FastRoute\simpleDispatcher')) { * * @return Dispatcher */ - function cachedDispatcher(callable $routeDefinitionCallback, array $options = []) { + function cachedDispatcher(callable $routeDefinitionCallback, array $options = []) + { $options += [ 'routeParser' => 'FastRoute\\RouteParser\\Std', 'dataGenerator' => 'FastRoute\\DataGenerator\\GroupCountBased', diff --git a/api/vendor/nikic/fast-route/test/Dispatcher/CharCountBasedTest.php b/api/vendor/nikic/fast-route/test/Dispatcher/CharCountBasedTest.php index 8168498..e15ff8b 100644 --- a/api/vendor/nikic/fast-route/test/Dispatcher/CharCountBasedTest.php +++ b/api/vendor/nikic/fast-route/test/Dispatcher/CharCountBasedTest.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class CharCountBasedTest extends DispatcherTest { - protected function getDispatcherClass() { +class CharCountBasedTest extends DispatcherTest +{ + protected function getDispatcherClass() + { return 'FastRoute\\Dispatcher\\CharCountBased'; } - protected function getDataGeneratorClass() { + protected function getDataGeneratorClass() + { return 'FastRoute\\DataGenerator\\CharCountBased'; } } diff --git a/api/vendor/nikic/fast-route/test/Dispatcher/DispatcherTest.php b/api/vendor/nikic/fast-route/test/Dispatcher/DispatcherTest.php index a6d6205..c2edf8c 100644 --- a/api/vendor/nikic/fast-route/test/Dispatcher/DispatcherTest.php +++ b/api/vendor/nikic/fast-route/test/Dispatcher/DispatcherTest.php @@ -3,9 +3,10 @@ namespace FastRoute\Dispatcher; use FastRoute\RouteCollector; +use PHPUnit\Framework\TestCase; -abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { - +abstract class DispatcherTest extends TestCase +{ /** * Delegate dispatcher selection to child test classes */ @@ -19,7 +20,8 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { /** * Set appropriate options for the specific Dispatcher class we're testing */ - private function generateDispatcherOptions() { + private function generateDispatcherOptions() + { return [ 'dataGenerator' => $this->getDataGeneratorClass(), 'dispatcher' => $this->getDispatcherClass() @@ -29,7 +31,8 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideFoundDispatchCases */ - public function testFoundDispatches($method, $uri, $callback, $handler, $argDict) { + public function testFoundDispatches($method, $uri, $callback, $handler, $argDict) + { $dispatcher = \FastRoute\simpleDispatcher($callback, $this->generateDispatcherOptions()); $info = $dispatcher->dispatch($method, $uri); $this->assertSame($dispatcher::FOUND, $info[0]); @@ -40,11 +43,12 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideNotFoundDispatchCases */ - public function testNotFoundDispatches($method, $uri, $callback) { + public function testNotFoundDispatches($method, $uri, $callback) + { $dispatcher = \FastRoute\simpleDispatcher($callback, $this->generateDispatcherOptions()); $routeInfo = $dispatcher->dispatch($method, $uri); - $this->assertFalse(isset($routeInfo[1]), - "NOT_FOUND result must only contain a single element in the returned info array" + $this->assertArrayNotHasKey(1, $routeInfo, + 'NOT_FOUND result must only contain a single element in the returned info array' ); $this->assertSame($dispatcher::NOT_FOUND, $routeInfo[0]); } @@ -52,11 +56,12 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideMethodNotAllowedDispatchCases */ - public function testMethodNotAllowedDispatches($method, $uri, $callback, $availableMethods) { + public function testMethodNotAllowedDispatches($method, $uri, $callback, $availableMethods) + { $dispatcher = \FastRoute\simpleDispatcher($callback, $this->generateDispatcherOptions()); $routeInfo = $dispatcher->dispatch($method, $uri); - $this->assertTrue(isset($routeInfo[1]), - "METHOD_NOT_ALLOWED result must return an array of allowed methods at index 1" + $this->assertArrayHasKey(1, $routeInfo, + 'METHOD_NOT_ALLOWED result must return an array of allowed methods at index 1' ); list($routedStatus, $methodArray) = $dispatcher->dispatch($method, $uri); @@ -68,8 +73,9 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { * @expectedException \FastRoute\BadRouteException * @expectedExceptionMessage Cannot use the same placeholder "test" twice */ - public function testDuplicateVariableNameError() { - \FastRoute\simpleDispatcher(function(RouteCollector $r) { + public function testDuplicateVariableNameError() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { $r->addRoute('GET', '/foo/{test}/{test:\d+}', 'handler0'); }, $this->generateDispatcherOptions()); } @@ -78,8 +84,9 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { * @expectedException \FastRoute\BadRouteException * @expectedExceptionMessage Cannot register two routes matching "/user/([^/]+)" for method "GET" */ - public function testDuplicateVariableRoute() { - \FastRoute\simpleDispatcher(function(RouteCollector $r) { + public function testDuplicateVariableRoute() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { $r->addRoute('GET', '/user/{id}', 'handler0'); // oops, forgot \d+ restriction ;) $r->addRoute('GET', '/user/{name}', 'handler1'); }, $this->generateDispatcherOptions()); @@ -89,8 +96,9 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { * @expectedException \FastRoute\BadRouteException * @expectedExceptionMessage Cannot register two routes matching "/user" for method "GET" */ - public function testDuplicateStaticRoute() { - \FastRoute\simpleDispatcher(function(RouteCollector $r) { + public function testDuplicateStaticRoute() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { $r->addRoute('GET', '/user', 'handler0'); $r->addRoute('GET', '/user', 'handler1'); }, $this->generateDispatcherOptions()); @@ -100,8 +108,9 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { * @expectedException \FastRoute\BadRouteException * @expectedExceptionMessage Static route "/user/nikic" is shadowed by previously defined variable route "/user/([^/]+)" for method "GET" */ - public function testShadowedStaticRoute() { - \FastRoute\simpleDispatcher(function(RouteCollector $r) { + public function testShadowedStaticRoute() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}', 'handler0'); $r->addRoute('GET', '/user/nikic', 'handler1'); }, $this->generateDispatcherOptions()); @@ -111,18 +120,20 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { * @expectedException \FastRoute\BadRouteException * @expectedExceptionMessage Regex "(en|de)" for parameter "lang" contains a capturing group */ - public function testCapturing() { - \FastRoute\simpleDispatcher(function(RouteCollector $r) { + public function testCapturing() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { $r->addRoute('GET', '/{lang:(en|de)}', 'handler0'); }, $this->generateDispatcherOptions()); } - public function provideFoundDispatchCases() { + public function provideFoundDispatchCases() + { $cases = []; // 0 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/resource/123/456', 'handler0'); }; @@ -135,7 +146,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 1 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/handler0', 'handler0'); $r->addRoute('GET', '/handler1', 'handler1'); $r->addRoute('GET', '/handler2', 'handler2'); @@ -150,7 +161,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 2 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler1'); $r->addRoute('GET', '/user/{name}', 'handler2'); @@ -198,11 +209,10 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 6 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler0'); $r->addRoute('GET', '/user/12345/extension', 'handler1'); $r->addRoute('GET', '/user/{id:[0-9]+}.{extension}', 'handler2'); - }; $method = 'GET'; @@ -214,7 +224,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 7 ----- Test GET method fallback on HEAD route miss ------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}', 'handler0'); $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler1'); $r->addRoute('GET', '/static0', 'handler2'); @@ -264,7 +274,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 11 ---- More specified routes are not shadowed by less specific of another method ------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}', 'handler0'); $r->addRoute('POST', '/user/{name:[a-z]+}', 'handler1'); }; @@ -278,7 +288,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 12 ---- Handler of more specific routes is used, if it occurs first --------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}', 'handler0'); $r->addRoute('POST', '/user/{name:[a-z]+}', 'handler1'); $r->addRoute('POST', '/user/{name}', 'handler2'); @@ -293,7 +303,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 13 ---- Route with constant suffix -----------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}', 'handler0'); $r->addRoute('GET', '/user/{name}/edit', 'handler1'); }; @@ -307,7 +317,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 14 ---- Handle multiple methods with the same handler ----------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute(['GET', 'POST'], '/user', 'handlerGetPost'); $r->addRoute(['DELETE'], '/user', 'handlerDelete'); $r->addRoute([], '/user', 'handlerNone'); @@ -318,53 +328,53 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { $cases[] = ['POST', '/user', $callback, 'handlerGetPost', $argDict]; $cases[] = ['DELETE', '/user', $callback, 'handlerDelete', $argDict]; - // 15 ---- + // 17 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('POST', '/user.json', 'handler0'); $r->addRoute('GET', '/{entity}.json', 'handler1'); }; $cases[] = ['GET', '/user.json', $callback, 'handler1', ['entity' => 'user']]; - // 16 ---- + // 18 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '', 'handler0'); }; $cases[] = ['GET', '', $callback, 'handler0', []]; - // 17 ---- + // 19 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('HEAD', '/a/{foo}', 'handler0'); $r->addRoute('GET', '/b/{foo}', 'handler1'); }; $cases[] = ['HEAD', '/b/bar', $callback, 'handler1', ['foo' => 'bar']]; - // 18 ---- + // 20 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('HEAD', '/a', 'handler0'); $r->addRoute('GET', '/b', 'handler1'); }; $cases[] = ['HEAD', '/b', $callback, 'handler1', []]; - // 19 ---- + // 21 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/foo', 'handler0'); $r->addRoute('HEAD', '/{bar}', 'handler1'); }; $cases[] = ['HEAD', '/foo', $callback, 'handler1', ['bar' => 'foo']]; - // 20 ---- + // 22 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('*', '/user', 'handler0'); $r->addRoute('*', '/{user}', 'handler1'); $r->addRoute('GET', '/user', 'handler2'); @@ -372,39 +382,49 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { $cases[] = ['GET', '/user', $callback, 'handler2', []]; - // 21 ---- + // 23 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('*', '/user', 'handler0'); $r->addRoute('GET', '/user', 'handler1'); }; $cases[] = ['POST', '/user', $callback, 'handler0', []]; - // 22 ---- + // 24 ---- $cases[] = ['HEAD', '/user', $callback, 'handler1', []]; - // 23 ---- + // 25 ---- - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/{bar}', 'handler0'); $r->addRoute('*', '/foo', 'handler1'); }; $cases[] = ['GET', '/foo', $callback, 'handler0', ['bar' => 'foo']]; + // 26 ---- + + $callback = function(RouteCollector $r) { + $r->addRoute('GET', '/user', 'handler0'); + $r->addRoute('*', '/{foo:.*}', 'handler1'); + }; + + $cases[] = ['POST', '/bar', $callback, 'handler1', ['foo' => 'bar']]; + // x --------------------------------------------------------------------------------------> return $cases; } - public function provideNotFoundDispatchCases() { + public function provideNotFoundDispatchCases() + { $cases = []; // 0 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/resource/123/456', 'handler0'); }; @@ -431,7 +451,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 3 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/handler0', 'handler0'); $r->addRoute('GET', '/handler1', 'handler1'); $r->addRoute('GET', '/handler2', 'handler2'); @@ -444,7 +464,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 4 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler1'); $r->addRoute('GET', '/user/{name}', 'handler2'); @@ -468,19 +488,20 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // reuse callback from #5 $method = 'HEAD'; - $cases[] = array($method, $uri, $callback); + $cases[] = [$method, $uri, $callback]; // x --------------------------------------------------------------------------------------> return $cases; } - public function provideMethodNotAllowedDispatchCases() { + public function provideMethodNotAllowedDispatchCases() + { $cases = []; // 0 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/resource/123/456', 'handler0'); }; @@ -492,7 +513,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 1 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/resource/123/456', 'handler0'); $r->addRoute('POST', '/resource/123/456', 'handler1'); $r->addRoute('PUT', '/resource/123/456', 'handler2'); @@ -507,7 +528,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 2 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); $r->addRoute('POST', '/user/{name}/{id:[0-9]+}', 'handler1'); $r->addRoute('PUT', '/user/{name}/{id:[0-9]+}', 'handler2'); @@ -522,7 +543,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 3 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('POST', '/user/{name}', 'handler1'); $r->addRoute('PUT', '/user/{name:[a-z]+}', 'handler2'); $r->addRoute('PATCH', '/user/{name:[a-z]+}', 'handler3'); @@ -536,7 +557,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 4 --------------------------------------------------------------------------------------> - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute(['GET', 'POST'], '/user', 'handlerGetPost'); $r->addRoute(['DELETE'], '/user', 'handlerDelete'); $r->addRoute([], '/user', 'handlerNone'); @@ -546,7 +567,7 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { // 5 - $callback = function(RouteCollector $r) { + $callback = function (RouteCollector $r) { $r->addRoute('POST', '/user.json', 'handler0'); $r->addRoute('GET', '/{entity}.json', 'handler1'); }; @@ -557,5 +578,4 @@ abstract class DispatcherTest extends \PHPUnit_Framework_TestCase { return $cases; } - } diff --git a/api/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php b/api/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php index 74820fc..f821ef5 100644 --- a/api/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php +++ b/api/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class GroupCountBasedTest extends DispatcherTest { - protected function getDispatcherClass() { +class GroupCountBasedTest extends DispatcherTest +{ + protected function getDispatcherClass() + { return 'FastRoute\\Dispatcher\\GroupCountBased'; } - protected function getDataGeneratorClass() { + protected function getDataGeneratorClass() + { return 'FastRoute\\DataGenerator\\GroupCountBased'; } } diff --git a/api/vendor/nikic/fast-route/test/Dispatcher/GroupPosBasedTest.php b/api/vendor/nikic/fast-route/test/Dispatcher/GroupPosBasedTest.php index c3d4f8d..b5c9567 100644 --- a/api/vendor/nikic/fast-route/test/Dispatcher/GroupPosBasedTest.php +++ b/api/vendor/nikic/fast-route/test/Dispatcher/GroupPosBasedTest.php @@ -2,12 +2,15 @@ namespace FastRoute\Dispatcher; -class GroupPosBasedTest extends DispatcherTest { - protected function getDispatcherClass() { +class GroupPosBasedTest extends DispatcherTest +{ + protected function getDispatcherClass() + { return 'FastRoute\\Dispatcher\\GroupPosBased'; } - protected function getDataGeneratorClass() { + protected function getDataGeneratorClass() + { return 'FastRoute\\DataGenerator\\GroupPosBased'; } } diff --git a/api/vendor/nikic/fast-route/test/Dispatcher/MarkBasedTest.php b/api/vendor/nikic/fast-route/test/Dispatcher/MarkBasedTest.php index 04b0af9..b3b27dd 100644 --- a/api/vendor/nikic/fast-route/test/Dispatcher/MarkBasedTest.php +++ b/api/vendor/nikic/fast-route/test/Dispatcher/MarkBasedTest.php @@ -2,19 +2,23 @@ namespace FastRoute\Dispatcher; -class MarkBasedTest extends DispatcherTest { - public function setUp() { +class MarkBasedTest extends DispatcherTest +{ + public function setUp() + { preg_match('/(*MARK:A)a/', 'a', $matches); if (!isset($matches['MARK'])) { $this->markTestSkipped('PHP 5.6 required for MARK support'); } } - protected function getDispatcherClass() { + protected function getDispatcherClass() + { return 'FastRoute\\Dispatcher\\MarkBased'; } - protected function getDataGeneratorClass() { + protected function getDataGeneratorClass() + { return 'FastRoute\\DataGenerator\\MarkBased'; } } diff --git a/api/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php b/api/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php index 7bc6ebb..b6fc53f 100644 --- a/api/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php +++ b/api/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php @@ -2,11 +2,16 @@ namespace FastRoute; -class HackTypecheckerTest extends \PhpUnit_Framework_TestCase { +use PHPUnit\Framework\TestCase; + +class HackTypecheckerTest extends TestCase +{ const SERVER_ALREADY_RUNNING_CODE = 77; - public function testTypechecks($recurse = true) { + + public function testTypechecks($recurse = true) + { if (!defined('HHVM_VERSION')) { - $this->markTestSkipped("HHVM only"); + $this->markTestSkipped('HHVM only'); } if (!version_compare(HHVM_VERSION, '3.9.0', '>=')) { $this->markTestSkipped('classname requires HHVM 3.9+'); @@ -15,17 +20,17 @@ class HackTypecheckerTest extends \PhpUnit_Framework_TestCase { // The typechecker recurses the whole tree, so it makes sure // that everything in fixtures/ is valid when this runs. - $output = array(); + $output = []; $exit_code = null; exec( - 'hh_server --check '.escapeshellarg(__DIR__.'/../../').' 2>&1', + 'hh_server --check ' . escapeshellarg(__DIR__ . '/../../') . ' 2>&1', $output, $exit_code ); if ($exit_code === self::SERVER_ALREADY_RUNNING_CODE) { $this->assertTrue( $recurse, - "Typechecker still running after running hh_client stop" + 'Typechecker still running after running hh_client stop' ); // Server already running - 3.10 => 3.11 regression: // https://github.com/facebook/hhvm/issues/6646 diff --git a/api/vendor/nikic/fast-route/test/RouteCollectorTest.php b/api/vendor/nikic/fast-route/test/RouteCollectorTest.php index 11bcf1c..cc54407 100644 --- a/api/vendor/nikic/fast-route/test/RouteCollectorTest.php +++ b/api/vendor/nikic/fast-route/test/RouteCollectorTest.php @@ -2,8 +2,12 @@ namespace FastRoute; -class RouteCollectorTest extends \PHPUnit_Framework_TestCase { - public function testShortcuts() { +use PHPUnit\Framework\TestCase; + +class RouteCollectorTest extends TestCase +{ + public function testShortcuts() + { $r = new DummyRouteCollector(); $r->delete('/delete', 'delete'); @@ -25,7 +29,8 @@ class RouteCollectorTest extends \PHPUnit_Framework_TestCase { $this->assertSame($expected, $r->routes); } - public function testGroups() { + public function testGroups() + { $r = new DummyRouteCollector(); $r->delete('/delete', 'delete'); @@ -87,11 +92,17 @@ class RouteCollectorTest extends \PHPUnit_Framework_TestCase { } } -class DummyRouteCollector extends RouteCollector { +class DummyRouteCollector extends RouteCollector +{ public $routes = []; - public function __construct() {} - public function addRoute($method, $route, $handler) { + + public function __construct() + { + } + + public function addRoute($method, $route, $handler) + { $route = $this->currentGroupPrefix . $route; $this->routes[] = [$method, $route, $handler]; } -} \ No newline at end of file +} diff --git a/api/vendor/nikic/fast-route/test/RouteParser/StdTest.php b/api/vendor/nikic/fast-route/test/RouteParser/StdTest.php index 41f194b..e13e4de 100644 --- a/api/vendor/nikic/fast-route/test/RouteParser/StdTest.php +++ b/api/vendor/nikic/fast-route/test/RouteParser/StdTest.php @@ -2,22 +2,28 @@ namespace FastRoute\RouteParser; -class StdTest extends \PhpUnit_Framework_TestCase { +use PHPUnit\Framework\TestCase; + +class StdTest extends TestCase +{ /** @dataProvider provideTestParse */ - public function testParse($routeString, $expectedRouteDatas) { + public function testParse($routeString, $expectedRouteDatas) + { $parser = new Std(); $routeDatas = $parser->parse($routeString); $this->assertSame($expectedRouteDatas, $routeDatas); } /** @dataProvider provideTestParseError */ - public function testParseError($routeString, $expectedExceptionMessage) { + public function testParseError($routeString, $expectedExceptionMessage) + { $parser = new Std(); $this->setExpectedException('FastRoute\\BadRouteException', $expectedExceptionMessage); $parser->parse($routeString); } - public function provideTestParse() { + public function provideTestParse() + { return [ [ '/test', @@ -112,7 +118,8 @@ class StdTest extends \PhpUnit_Framework_TestCase { ]; } - public function provideTestParseError() { + public function provideTestParseError() + { return [ [ '/test[opt', @@ -128,19 +135,19 @@ class StdTest extends \PhpUnit_Framework_TestCase { ], [ '/test[]', - "Empty optional part" + 'Empty optional part' ], [ '/test[[opt]]', - "Empty optional part" + 'Empty optional part' ], [ '[[test]]', - "Empty optional part" + 'Empty optional part' ], [ '/test[/opt]/required', - "Optional segments can only occur at the end of a route" + 'Optional segments can only occur at the end of a route' ], ]; } diff --git a/api/vendor/nikic/fast-route/test/bootstrap.php b/api/vendor/nikic/fast-route/test/bootstrap.php index 27e6d4c..3023f41 100644 --- a/api/vendor/nikic/fast-route/test/bootstrap.php +++ b/api/vendor/nikic/fast-route/test/bootstrap.php @@ -2,7 +2,7 @@ require_once __DIR__ . '/../src/functions.php'; -spl_autoload_register(function($class) { +spl_autoload_register(function ($class) { if (strpos($class, 'FastRoute\\') === 0) { $dir = strcasecmp(substr($class, -4), 'Test') ? 'src/' : 'test/'; $name = substr($class, strlen('FastRoute')); diff --git a/api/vendor/paragonie/random_compat/build-phar.sh b/api/vendor/paragonie/random_compat/build-phar.sh deleted file mode 100644 index b4a5ba3..0000000 --- a/api/vendor/paragonie/random_compat/build-phar.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) - -php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/api/vendor/paragonie/random_compat/composer.json b/api/vendor/paragonie/random_compat/composer.json index 1c5978c..794e7fe 100644 --- a/api/vendor/paragonie/random_compat/composer.json +++ b/api/vendor/paragonie/random_compat/composer.json @@ -4,6 +4,7 @@ "keywords": [ "csprng", "random", + "polyfill", "pseudorandom" ], "license": "MIT", @@ -24,7 +25,7 @@ "php": ">=5.2.0" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "*" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." diff --git a/api/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/api/vendor/paragonie/random_compat/lib/byte_safe_strings.php index 3de86b2..ef24488 100644 --- a/api/vendor/paragonie/random_compat/lib/byte_safe_strings.php +++ b/api/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -28,8 +28,9 @@ if (!is_callable('RandomCompat_strlen')) { if ( - defined('MB_OVERLOAD_STRING') && - ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING + defined('MB_OVERLOAD_STRING') + && + ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING ) { /** * strlen() implementation that isn't brittle to mbstring.func_overload @@ -82,8 +83,8 @@ if (!is_callable('RandomCompat_substr')) { if ( defined('MB_OVERLOAD_STRING') - && - ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING + && + ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING ) { /** * substr() implementation that isn't brittle to mbstring.func_overload @@ -93,7 +94,7 @@ if (!is_callable('RandomCompat_substr')) { * * @param string $binary_string * @param int $start - * @param int $length (optional) + * @param int|null $length (optional) * * @throws TypeError * @@ -118,6 +119,7 @@ if (!is_callable('RandomCompat_substr')) { * mb_substr($str, 0, NULL, '8bit') returns an empty string on * PHP 5.3, so we have to find the length ourselves. */ + /** @var int $length */ $length = RandomCompat_strlen($binary_string) - $start; } elseif (!is_int($length)) { throw new TypeError( @@ -133,7 +135,12 @@ if (!is_callable('RandomCompat_substr')) { return ''; } - return (string) mb_substr($binary_string, $start, $length, '8bit'); + return (string) mb_substr( + (string) $binary_string, + (int) $start, + (int) $length, + '8bit' + ); } } else { @@ -145,7 +152,7 @@ if (!is_callable('RandomCompat_substr')) { * * @param string $binary_string * @param int $start - * @param int $length (optional) + * @param int|null $length (optional) * * @throws TypeError * @@ -172,10 +179,17 @@ if (!is_callable('RandomCompat_substr')) { ); } - return (string) substr($binary_string, $start, $length); + return (string) substr( + (string )$binary_string, + (int) $start, + (int) $length + ); } - return (string) substr($binary_string, $start); + return (string) substr( + (string) $binary_string, + (int) $start + ); } } } diff --git a/api/vendor/paragonie/random_compat/lib/cast_to_int.php b/api/vendor/paragonie/random_compat/lib/cast_to_int.php index be7388d..1b1bbfe 100644 --- a/api/vendor/paragonie/random_compat/lib/cast_to_int.php +++ b/api/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -27,20 +27,21 @@ */ if (!is_callable('RandomCompat_intval')) { - + /** * Cast to an integer if we can, safely. - * + * * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) * (non-inclusive), it will sanely cast it to an int. If you it's equal to * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats * lose precision, so the <= and => operators might accidentally let a float * through. - * + * * @param int|float $number The number we want to convert to an int - * @param boolean $fail_open Set to true to not throw an exception - * + * @param bool $fail_open Set to true to not throw an exception + * * @return float|int + * @psalm-suppress InvalidReturnType * * @throws TypeError */ @@ -49,14 +50,16 @@ if (!is_callable('RandomCompat_intval')) { if (is_int($number) || is_float($number)) { $number += 0; } elseif (is_numeric($number)) { + /** @psalm-suppress InvalidOperand */ $number += 0; } + /** @var int|float $number */ if ( is_float($number) - && + && $number > ~PHP_INT_MAX - && + && $number < PHP_INT_MAX ) { $number = (int) $number; diff --git a/api/vendor/paragonie/random_compat/lib/error_polyfill.php b/api/vendor/paragonie/random_compat/lib/error_polyfill.php index 6a91990..c02c5c8 100644 --- a/api/vendor/paragonie/random_compat/lib/error_polyfill.php +++ b/api/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -1,12 +1,12 @@ = 50300 && is_callable('\\Sodium\\randombytes_buf')) { - require_once $RandomCompatDIR . '/random_bytes_libsodium.php'; + require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_libsodium.php'; } elseif (method_exists('Sodium', 'randombytes_buf')) { - require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php'; + require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_libsodium_legacy.php'; } } @@ -117,7 +117,7 @@ if (!is_callable('random_bytes')) { // place, that is not helpful to us here. // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php'; + require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_dev_urandom.php'; } // Unset variables after use $RandomCompat_basedir = null; @@ -159,7 +159,7 @@ if (!is_callable('random_bytes')) { extension_loaded('mcrypt') ) { // See random_bytes_mcrypt.php - require_once $RandomCompatDIR . '/random_bytes_mcrypt.php'; + require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_mcrypt.php'; } $RandomCompatUrandom = null; @@ -182,9 +182,10 @@ if (!is_callable('random_bytes')) { if (!in_array('com', $RandomCompat_disabled_classes)) { try { $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); - if (method_exists($RandomCompatCOMtest, 'GetRandom')) { + /** @psalm-suppress TypeDoesNotContainType */ + if (is_callable(array($RandomCompatCOMtest, 'GetRandom'))) { // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php'; + require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_bytes_com_dotnet.php'; } } catch (com_exception $e) { // Don't try to use it. @@ -203,8 +204,9 @@ if (!is_callable('random_bytes')) { * and hope the developer won't let it fail silently. * * @param mixed $length - * @return void + * @psalm-suppress InvalidReturnType * @throws Exception + * @return string */ function random_bytes($length) { @@ -212,12 +214,13 @@ if (!is_callable('random_bytes')) { throw new Exception( 'There is no suitable CSPRNG installed on your system' ); + return ''; } } } if (!is_callable('random_int')) { - require_once $RandomCompatDIR . '/random_int.php'; + require_once $RandomCompatDIR.DIRECTORY_SEPARATOR.'random_int.php'; } $RandomCompatDIR = null; diff --git a/api/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/api/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php index fc1926e..537d02b 100644 --- a/api/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +++ b/api/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -1,22 +1,22 @@ GetRandom($bytes, 0)); + $buf .= base64_decode((string) $util->GetRandom($bytes, 0)); if (RandomCompat_strlen($buf) >= $bytes) { /** * Return our random entropy buffer here: */ - return RandomCompat_substr($buf, 0, $bytes); + return (string) RandomCompat_substr($buf, 0, $bytes); } ++$execCount; } while ($execCount < $bytes); @@ -85,4 +88,4 @@ if (!is_callable('random_bytes')) { 'Could not gather sufficient random data' ); } -} \ No newline at end of file +} diff --git a/api/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/api/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php index df5b915..c4e31cc 100644 --- a/api/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +++ b/api/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -1,22 +1,22 @@ $st */ + $st = fstat($fp); + if (($st['mode'] & 0170000) !== 020000) { + fclose($fp); + $fp = false; + } } } - if (!empty($fp)) { + if (is_resource($fp)) { /** * stream_set_read_buffer() does not exist in HHVM * @@ -83,6 +106,7 @@ if (!is_callable('random_bytes')) { } try { + /** @var int $bytes */ $bytes = RandomCompat_intval($bytes); } catch (TypeError $ex) { throw new TypeError( @@ -103,7 +127,7 @@ if (!is_callable('random_bytes')) { * if (empty($fp)) line is logic that should only be run once per * page load. */ - if (!empty($fp)) { + if (is_resource($fp)) { /** * @var int */ @@ -123,29 +147,28 @@ if (!is_callable('random_bytes')) { */ $read = fread($fp, $remaining); if (!is_string($read)) { - if ($read === false) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - * - * @var string|bool - */ - $buf = false; - break; - } + /** + * We cannot safely read from the file. Exit the + * do-while loop and trigger the exception condition + * + * @var string|bool + */ + $buf = false; + break; } /** * Decrease the number of bytes returned from remaining */ $remaining -= RandomCompat_strlen($read); /** - * @var string|bool + * @var string $buf */ - $buf = $buf . $read; + $buf .= $read; } while ($remaining > 0); /** * Is our result valid? + * @var string|bool $buf */ if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { diff --git a/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php index 4af1a24..2e56290 100644 --- a/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ b/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -1,22 +1,22 @@ 2147483647) { $buf = ''; for ($i = 0; $i < $bytes; $i += 1073741824) { @@ -69,10 +71,11 @@ if (!is_callable('random_bytes')) { $buf .= \Sodium\randombytes_buf($n); } } else { + /** @var string|bool $buf */ $buf = \Sodium\randombytes_buf($bytes); } - if ($buf !== false) { + if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { return $buf; } diff --git a/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php index 02160b9..f78b219 100644 --- a/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php +++ b/api/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php @@ -1,22 +1,22 @@ 1073741824 ? 1073741824 : $bytes - $i; - $buf .= Sodium::randombytes_buf($n); + $buf .= Sodium::randombytes_buf((int) $n); } } else { - $buf .= Sodium::randombytes_buf($bytes); + $buf .= Sodium::randombytes_buf((int) $bytes); } if (is_string($buf)) { diff --git a/api/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/api/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php index aac9c01..0b13fa7 100644 --- a/api/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +++ b/api/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -1,22 +1,22 @@ PHP_INT_MAX. PHP will cast it to * a float and we will lose some precision. + * + * @var int|float $range */ $range = $max - $min; @@ -115,6 +124,7 @@ if (!is_callable('random_int')) { * @ref http://3v4l.org/XX9r5 (64-bit) */ $bytes = PHP_INT_SIZE; + /** @var int $mask */ $mask = ~0; } else { @@ -129,16 +139,19 @@ if (!is_callable('random_int')) { } ++$bits; $range >>= 1; + /** @var int $mask */ $mask = $mask << 1 | 1; } $valueShift = $min; } + /** @var int $val */ $val = 0; /** * Now that we have our parameters set up, let's begin generating * random integers until one falls between $min and $max */ + /** @psalm-suppress RedundantCondition */ do { /** * The rejection probability is at most 0.5, so this corresponds @@ -169,6 +182,7 @@ if (!is_callable('random_int')) { for ($i = 0; $i < $bytes; ++$i) { $val |= ord($randomByteString[$i]) << ($i * 8); } + /** @var int $val */ /** * Apply mask @@ -185,6 +199,6 @@ if (!is_callable('random_int')) { */ } while (!is_int($val) || $val > $max || $val < $min); - return (int)$val; + return (int) $val; } } diff --git a/api/vendor/paragonie/random_compat/other/build_phar.php b/api/vendor/paragonie/random_compat/other/build_phar.php deleted file mode 100644 index 70ef4b2..0000000 --- a/api/vendor/paragonie/random_compat/other/build_phar.php +++ /dev/null @@ -1,57 +0,0 @@ -buildFromDirectory(dirname(__DIR__).'/lib'); -rename( - dirname(__DIR__).'/lib/index.php', - dirname(__DIR__).'/lib/random.php' -); - -/** - * If we pass an (optional) path to a private key as a second argument, we will - * sign the Phar with OpenSSL. - * - * If you leave this out, it will produce an unsigned .phar! - */ -if ($argc > 1) { - if (!@is_readable($argv[1])) { - echo 'Could not read the private key file:', $argv[1], "\n"; - exit(255); - } - $pkeyFile = file_get_contents($argv[1]); - - $private = openssl_get_privatekey($pkeyFile); - if ($private !== false) { - $pkey = ''; - openssl_pkey_export($private, $pkey); - $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); - - /** - * Save the corresponding public key to the file - */ - if (!@is_readable($dist.'/random_compat.phar.pubkey')) { - $details = openssl_pkey_get_details($private); - file_put_contents( - $dist.'/random_compat.phar.pubkey', - $details['key'] - ); - } - } else { - echo 'An error occurred reading the private key from OpenSSL.', "\n"; - exit(255); - } -} diff --git a/api/vendor/paragonie/random_compat/psalm-autoload.php b/api/vendor/paragonie/random_compat/psalm-autoload.php deleted file mode 100644 index d71d1b8..0000000 --- a/api/vendor/paragonie/random_compat/psalm-autoload.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - - - diff --git a/api/vendor/phpdocumentor/reflection-common/.github/dependabot.yml b/api/vendor/phpdocumentor/reflection-common/.github/dependabot.yml new file mode 100644 index 0000000..c630ffa --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-common/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/api/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml b/api/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml new file mode 100644 index 0000000..484410e --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml @@ -0,0 +1,223 @@ +on: + push: + branches: + - 2.x + pull_request: +name: Qa workflow +jobs: + setup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Restore/cache vendor folder + uses: actions/cache@v1 + with: + path: vendor + key: all-build-${{ hashFiles('**/composer.lock') }} + restore-keys: | + all-build-${{ hashFiles('**/composer.lock') }} + all-build- + + - name: Restore/cache tools folder + uses: actions/cache@v1 + with: + path: tools + key: all-tools-${{ github.sha }} + restore-keys: | + all-tools-${{ github.sha }}- + all-tools- + + - name: composer + uses: docker://composer + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: install --no-interaction --prefer-dist --optimize-autoloader + + - name: Install phive + run: make install-phive + + - name: Install PHAR dependencies + run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,8A03EA3B385DBAA1 --force-accept-unsigned + + phpunit-with-coverage: + runs-on: ubuntu-latest + name: Unit tests + needs: setup + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.2 + ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 + coverage: pcov + + - name: Restore/cache tools folder + uses: actions/cache@v1 + with: + path: tools + key: all-tools-${{ github.sha }} + restore-keys: | + all-tools-${{ github.sha }}- + all-tools- + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ubuntu-latest-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ubuntu-latest-composer- + + - name: Install Composer dependencies + run: | + composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader + + - name: Run PHPUnit + run: php tools/phpunit + + phpunit: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: + - ubuntu-latest + - windows-latest + - macOS-latest + php-versions: ['7.2', '7.3', '7.4', '8.0'] + name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }} + needs: + - setup + - phpunit-with-coverage + steps: + - uses: actions/checkout@v2 + + - name: Restore/cache tools folder + uses: actions/cache@v1 + with: + path: tools + key: all-tools-${{ github.sha }} + restore-keys: | + all-tools-${{ github.sha }}- + all-tools- + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 + coverage: none + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: | + composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader + + - name: Run PHPUnit + continue-on-error: true + run: php tools/phpunit + + codestyle: + runs-on: ubuntu-latest + needs: [setup, phpunit] + steps: + - uses: actions/checkout@v2 + - name: Restore/cache vendor folder + uses: actions/cache@v1 + with: + path: vendor + key: all-build-${{ hashFiles('**/composer.lock') }} + restore-keys: | + all-build-${{ hashFiles('**/composer.lock') }} + all-build- + - name: Code style check + uses: phpDocumentor/coding-standard@latest + with: + args: -s + + phpstan: + runs-on: ubuntu-latest + needs: [setup, phpunit] + steps: + - uses: actions/checkout@v2 + - name: Restore/cache vendor folder + uses: actions/cache@v1 + with: + path: vendor + key: all-build-${{ hashFiles('**/composer.lock') }} + restore-keys: | + all-build-${{ hashFiles('**/composer.lock') }} + all-build- + - name: PHPStan + uses: phpDocumentor/phpstan-ga@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: analyse src --configuration phpstan.neon + + psalm: + runs-on: ubuntu-latest + needs: [setup, phpunit] + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.2 + ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 + tools: psalm + coverage: none + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: | + composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader + + - name: Psalm + run: psalm --output-format=github + + bc_check: + name: BC Check + runs-on: ubuntu-latest + needs: [setup, phpunit] + steps: + - uses: actions/checkout@v2 + - name: fetch tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Restore/cache vendor folder + uses: actions/cache@v1 + with: + path: vendor + key: all-build-${{ hashFiles('**/composer.lock') }} + restore-keys: | + all-build-${{ hashFiles('**/composer.lock') }} + all-build- + - name: Roave BC Check + uses: docker://nyholm/roave-bc-check-ga diff --git a/api/vendor/phpdocumentor/reflection-common/.gitignore b/api/vendor/phpdocumentor/reflection-common/.gitignore deleted file mode 100644 index c56f671..0000000 --- a/api/vendor/phpdocumentor/reflection-common/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -composer.phar -vendor/ -build/ - diff --git a/api/vendor/phpdocumentor/reflection-common/README.md b/api/vendor/phpdocumentor/reflection-common/README.md index 52b12bc..70f830d 100644 --- a/api/vendor/phpdocumentor/reflection-common/README.md +++ b/api/vendor/phpdocumentor/reflection-common/README.md @@ -1 +1,11 @@ -# ReflectionCommon +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +![Qa workflow](https://github.com/phpDocumentor/ReflectionCommon/workflows/Qa%20workflow/badge.svg) +[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/ReflectionCommon.svg)](https://coveralls.io/github/phpDocumentor/ReflectionCommon?branch=master) +[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master) +[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master) +[![Stable Version](https://img.shields.io/packagist/v/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common) +[![Unstable Version](https://img.shields.io/packagist/vpre/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common) + + +ReflectionCommon +================ diff --git a/api/vendor/phpdocumentor/reflection-common/composer.json b/api/vendor/phpdocumentor/reflection-common/composer.json index 90eee0f..4d128b4 100644 --- a/api/vendor/phpdocumentor/reflection-common/composer.json +++ b/api/vendor/phpdocumentor/reflection-common/composer.json @@ -11,19 +11,18 @@ } ], "require": { - "php": ">=5.5" + "php": "^7.2 || ^8.0" }, "autoload" : { "psr-4" : { - "phpDocumentor\\Reflection\\": ["src"] + "phpDocumentor\\Reflection\\": "src/" } }, "require-dev": { - "phpunit/phpunit": "^4.6" }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } } } diff --git a/api/vendor/phpdocumentor/reflection-common/composer.lock b/api/vendor/phpdocumentor/reflection-common/composer.lock deleted file mode 100644 index e01dc3c..0000000 --- a/api/vendor/phpdocumentor/reflection-common/composer.lock +++ /dev/null @@ -1,974 +0,0 @@ -{ - "_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", - "This file is @generated automatically" - ], - "hash": "49ee00389e4ccd00d7e93a147103b2ab", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2014-10-13 12:58:55" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03 12:10:50" - }, - { - "name": "phpspec/prophecy", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.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": "2015-04-27 22:15:08" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6b7d2094ca2a685a2cad846cb7cd7a30e8b9470f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6b7d2094ca2a685a2cad846cb7cd7a30e8b9470f", - "reference": "6b7d2094ca2a685a2cad846cb7cd7a30e8b9470f", - "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.0", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-06-01 07:35:26" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", - "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2015-04-02 05:19:05" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "Text/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2014-01-30 17:20:04" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2013-08-02 07:42:54" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "eab81d02569310739373308137284e0158424330" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/eab81d02569310739373308137284e0158424330", - "reference": "eab81d02569310739373308137284e0158424330", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-04-08 04:46:07" - }, - { - "name": "phpunit/phpunit", - "version": "4.6.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "816d12536a7a032adc3b68737f82cfbbf98b79c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/816d12536a7a032adc3b68737f82cfbbf98b79c1", - "reference": "816d12536a7a032adc3b68737f82cfbbf98b79c1", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.0,>=2.0.11", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.6.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-05-29 06:00:03" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "253c005852591fd547fc18cd5b7b43a1ec82d8f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/253c005852591fd547fc18cd5b7b43a1ec82d8f7", - "reference": "253c005852591fd547fc18cd5b7b43a1ec82d8f7", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-05-29 05:19:18" - }, - { - "name": "sebastian/comparator", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-01-29 16:28:08" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/environment", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.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 functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2015-01-01 10:01:08" - }, - { - "name": "sebastian/exporter", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "84839970d05254c73cde183a721c7af13aede943" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", - "reference": "84839970d05254c73cde183a721c7af13aede943", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2015-01-27 07:23:06" - }, - { - "name": "sebastian/global-state", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2014-10-06 09:23:50" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "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": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-01-24 09:48:32" - }, - { - "name": "sebastian/version", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", - "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-02-24 06:35:25" - }, - { - "name": "symfony/yaml", - "version": "v2.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "4a29a5248aed4fb45f626a7bbbd330291492f5c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/4a29a5248aed4fb45f626a7bbbd330291492f5c3", - "reference": "4a29a5248aed4fb45f626a7bbbd330291492f5c3", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-05-02 15:21:08" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/api/vendor/phpdocumentor/reflection-common/phpunit.xml.dist b/api/vendor/phpdocumentor/reflection-common/phpunit.xml.dist deleted file mode 100644 index 3181150..0000000 --- a/api/vendor/phpdocumentor/reflection-common/phpunit.xml.dist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - ./tests/unit/ - - - - - src - - - - - - - - diff --git a/api/vendor/phpdocumentor/reflection-common/src/Element.php b/api/vendor/phpdocumentor/reflection-common/src/Element.php index 712e30e..8923e4f 100644 --- a/api/vendor/phpdocumentor/reflection-common/src/Element.php +++ b/api/vendor/phpdocumentor/reflection-common/src/Element.php @@ -1,11 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -19,22 +20,16 @@ interface File { /** * Returns the content of the file as a string. - * - * @return string */ - public function getContents(); + public function getContents() : string; /** * Returns md5 hash of the file. - * - * @return string */ - public function md5(); + public function md5() : string; /** * Returns an relative path to the file. - * - * @return string */ - public function path(); + public function path() : string; } diff --git a/api/vendor/phpdocumentor/reflection-common/src/Fqsen.php b/api/vendor/phpdocumentor/reflection-common/src/Fqsen.php index c7be3f1..8fc5d34 100644 --- a/api/vendor/phpdocumentor/reflection-common/src/Fqsen.php +++ b/api/vendor/phpdocumentor/reflection-common/src/Fqsen.php @@ -1,47 +1,60 @@ name = $matches[2]; } else { $matches = explode('\\', $fqsen); - $this->name = trim(end($matches), '()'); + $name = end($matches); + assert(is_string($name)); + $this->name = trim($name, '()'); } } /** * converts this class to string. - * - * @return string */ - public function __toString() + public function __toString() : string { return $this->fqsen; } /** * Returns the name of the element without path. - * - * @return string */ - public function getName() + public function getName() : string { return $this->name; } diff --git a/api/vendor/phpdocumentor/reflection-common/src/Location.php b/api/vendor/phpdocumentor/reflection-common/src/Location.php index 5760321..177deed 100644 --- a/api/vendor/phpdocumentor/reflection-common/src/Location.php +++ b/api/vendor/phpdocumentor/reflection-common/src/Location.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -14,10 +15,12 @@ namespace phpDocumentor\Reflection; /** * The location where an element occurs within a file. + * + * @psalm-immutable */ final class Location { - /** @var int */ + /** @var int */ private $lineNumber = 0; /** @var int */ @@ -25,32 +28,25 @@ final class Location /** * Initializes the location for an element using its line number in the file and optionally the column number. - * - * @param int $lineNumber - * @param int $columnNumber */ - public function __construct($lineNumber, $columnNumber = 0) + public function __construct(int $lineNumber, int $columnNumber = 0) { - $this->lineNumber = $lineNumber; + $this->lineNumber = $lineNumber; $this->columnNumber = $columnNumber; } /** * Returns the line number that is covered by this location. - * - * @return integer */ - public function getLineNumber() + public function getLineNumber() : int { return $this->lineNumber; } /** * Returns the column number (character position on a line) for this location object. - * - * @return integer */ - public function getColumnNumber() + public function getColumnNumber() : int { return $this->columnNumber; } diff --git a/api/vendor/phpdocumentor/reflection-common/src/Project.php b/api/vendor/phpdocumentor/reflection-common/src/Project.php index 3ed1e39..57839fd 100644 --- a/api/vendor/phpdocumentor/reflection-common/src/Project.php +++ b/api/vendor/phpdocumentor/reflection-common/src/Project.php @@ -1,11 +1,13 @@ assertEquals($name, $instance->getName()); - } - - /** - * Data provider for ValidFormats tests. Contains a complete list from psr-5 draft. - * - * @return array - */ - public function validFqsenProvider() - { - return [ - ['\\', ''], - ['\My\Space', 'Space'], - ['\My\Space\myFunction()', 'myFunction'], - ['\My\Space\MY_CONSTANT', 'MY_CONSTANT'], - ['\My\Space\MY_CONSTANT2', 'MY_CONSTANT2'], - ['\My\Space\MyClass', 'MyClass'], - ['\My\Space\MyInterface', 'MyInterface'], - ['\My\Space\MyTrait', 'MyTrait'], - ['\My\Space\MyClass::myMethod()', 'myMethod'], - ['\My\Space\MyClass::$my_property', 'my_property'], - ['\My\Space\MyClass::MY_CONSTANT', 'MY_CONSTANT'], - ]; - } - - /** - * @param string $fqsen - * @covers ::__construct - * @dataProvider invalidFqsenProvider - * @expectedException \InvalidArgumentException - */ - public function testInValidFormats($fqsen) - { - new Fqsen($fqsen); - } - - /** - * Data provider for invalidFormats tests. Contains a complete list from psr-5 draft. - * - * @return array - */ - public function invalidFqsenProvider() - { - return [ - ['\My\*'], - ['\My\Space\.()'], - ['My\Space'], - ]; - } - - /** - * @covers ::__construct - * @covers ::__toString - */ - public function testToString() - { - $className = new Fqsen('\\phpDocumentor\\Application'); - - $this->assertEquals('\\phpDocumentor\\Application', (string)$className); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/.gitignore b/api/vendor/phpdocumentor/reflection-docblock/.gitignore deleted file mode 100644 index 3ce5adb..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea -vendor diff --git a/api/vendor/phpdocumentor/reflection-docblock/.scrutinizer.yml b/api/vendor/phpdocumentor/reflection-docblock/.scrutinizer.yml deleted file mode 100644 index 5061d52..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/.scrutinizer.yml +++ /dev/null @@ -1,32 +0,0 @@ -before_commands: - - "composer install --no-dev --prefer-source" - -tools: - external_code_coverage: true - php_code_sniffer: - enabled: true - config: - standard: PSR2 - filter: - paths: ["src/*", "tests/*"] - php_cpd: - enabled: true - excluded_dirs: ["tests", "vendor"] - php_loc: - enabled: true - excluded_dirs: ["tests", "vendor"] - php_mess_detector: - enabled: true - config: - ruleset: phpmd.xml.dist - design_rules: { eval_expression: false } - filter: - paths: ["src/*"] - php_pdepend: - enabled: true - excluded_dirs: ["tests", "vendor"] - php_analyzer: - enabled: true - filter: - paths: ["src/*", "tests/*"] - sensiolabs_security_checker: true diff --git a/api/vendor/phpdocumentor/reflection-docblock/.travis.yml b/api/vendor/phpdocumentor/reflection-docblock/.travis.yml deleted file mode 100644 index 920958d..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: php -php: - - 5.5 - - 5.6 - - 7.0 - - hhvm - - nightly - -matrix: - allow_failures: - - php: - - hhvm - - nightly - -cache: - directories: - - $HOME/.composer/cache - -script: - - vendor/bin/phpunit --coverage-clover=coverage.clover -v - - composer update --no-interaction --prefer-source - - vendor/bin/phpunit -v - -before_script: - - composer install --no-interaction - -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover - -notifications: - irc: "irc.freenode.org#phpdocumentor" - email: - - mike.vanriel@naenius.com - - ashnazg@php.net - - boen.robot@gmail.com diff --git a/api/vendor/phpdocumentor/reflection-docblock/README.md b/api/vendor/phpdocumentor/reflection-docblock/README.md index a1984a1..51f1088 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/README.md +++ b/api/vendor/phpdocumentor/reflection-docblock/README.md @@ -1,5 +1,13 @@ -The ReflectionDocBlock Component [![Build Status](https://secure.travis-ci.org/phpDocumentor/ReflectionDocBlock.png)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock) -================================ +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +![Qa workflow](https://github.com/phpDocumentor/ReflectionDocBlock/workflows/Qa%20workflow/badge.svg) +[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/ReflectionDocBlock.svg)](https://coveralls.io/github/phpDocumentor/ReflectionDocBlock?branch=master) +[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionDocBlock.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master) +[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionDocBlock.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master) +[![Stable Version](https://img.shields.io/packagist/v/phpdocumentor/reflection-docblock.svg)](https://packagist.org/packages/phpdocumentor/reflection-docblock) +[![Unstable Version](https://img.shields.io/packagist/vpre/phpdocumentor/reflection-docblock.svg)](https://packagist.org/packages/phpdocumentor/reflection-docblock) + +ReflectionDocBlock +================== Introduction ------------ @@ -10,16 +18,12 @@ that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock. -> **Note**: *this is a core component of phpDocumentor and is constantly being -> optimized for performance.* - Installation ------------ -You can install the component in the following ways: - -* Use the official Github repository (https://github.com/phpDocumentor/ReflectionDocBlock) -* Via Composer (http://packagist.org/packages/phpdocumentor/reflection-docblock) +```bash +composer require phpdocumentor/reflection-docblock +``` Usage ----- @@ -31,8 +35,8 @@ instantiated using its `createInstance` factory method like this: $factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); ``` -Then we can use the `create` method of the factory to interpret the DocBlock. -Please note that it is also possible to provide a class that has the +Then we can use the `create` method of the factory to interpret the DocBlock. +Please note that it is also possible to provide a class that has the `getDocComment()` method, such as an object of type `ReflectionClass`, the create method will read that if it exists. @@ -52,18 +56,20 @@ $docblock = $factory->create($docComment); ``` The `create` method will yield an object of type `\phpDocumentor\Reflection\DocBlock` -whose methods can be queried as shown in the following example. +whose methods can be queried: ```php -// Should contain the summary for this DocBlock +// Contains the summary for this DocBlock $summary = $docblock->getSummary(); -// Contains an object of type \phpDocumentor\Reflection\DocBlock\Description; -// you can either cast it to string or use the render method to get a string -// representation of the Description. +// Contains \phpDocumentor\Reflection\DocBlock\Description object $description = $docblock->getDescription(); + +// You can either cast it to string +$description = (string) $docblock->getDescription(); + +// Or use the render method to get a string representation of the Description. +$description = $docblock->getDescription()->render(); ``` -> For more examples it would be best to review the scripts in the `/examples` -> folder. - +> For more examples it would be best to review the scripts in the [`/examples` folder](/examples). diff --git a/api/vendor/phpdocumentor/reflection-docblock/composer.json b/api/vendor/phpdocumentor/reflection-docblock/composer.json index 85be2fd..d907630 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/composer.json +++ b/api/vendor/phpdocumentor/reflection-docblock/composer.json @@ -1,28 +1,42 @@ { - "name": "phpdocumentor/reflection-docblock", + "name": "phpdocumentor/reflection-docblock", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "type": "library", + "type": "library", "license": "MIT", "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" - }, - "autoload": { - "psr-4": {"phpDocumentor\\Reflection\\": ["src/"]} - }, - "autoload-dev": { - "psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]} + "php": "^7.2 || ^8.0", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1", + "phpdocumentor/reflection-common": "^2.2", + "ext-filter": "*" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "phpDocumentor\\Reflection\\": ["tests/unit", "tests/integration"] + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/composer.lock b/api/vendor/phpdocumentor/reflection-docblock/composer.lock deleted file mode 100644 index b4da3c1..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/composer.lock +++ /dev/null @@ -1,1120 +0,0 @@ -{ - "_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", - "This file is @generated automatically" - ], - "hash": "9dfabded4193c3fd2ec85874de3b2e3c", - "content-hash": "69f6ae6608b8524fa04ddb0264bbf091", - "packages": [ - { - "name": "phpdocumentor/reflection-common", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "9969bd1c9661a73fdab104df7dbf132639d5c4d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/9969bd1c9661a73fdab104df7dbf132639d5c4d8", - "reference": "9969bd1c9661a73fdab104df7dbf132639d5c4d8", - "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-06-12 22:21:38" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", - "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-06-10 07:14:17" - }, - { - "name": "webmozart/assert", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "b8ef76d0f0c3b9a0a1bc987085fe0a0ddba984ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/b8ef76d0f0c3b9a0a1bc987085fe0a0ddba984ab", - "reference": "b8ef76d0f0c3b9a0a1bc987085fe0a0ddba984ab", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-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": "2015-05-12 15:19:25" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" - }, - "type": "library", - "autoload": { - "classmap": [ - "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "time": "2015-05-11 14:41:42" - }, - { - "name": "mockery/mockery", - "version": "0.9.4", - "source": { - "type": "git", - "url": "https://github.com/padraic/mockery.git", - "reference": "70bba85e4aabc9449626651f48b9018ede04f86b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/70bba85e4aabc9449626651f48b9018ede04f86b", - "reference": "70bba85e4aabc9449626651f48b9018ede04f86b", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~1.1", - "lib-pcre": ">=7.0", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2015-04-02 19:54:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.1.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "631e365cf26bb2c078683e8d9bcf8bc631ac4d44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/631e365cf26bb2c078683e8d9bcf8bc631ac4d44", - "reference": "631e365cf26bb2c078683e8d9bcf8bc631ac4d44", - "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.0", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-06-19 07:11:55" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2013-10-10 15:34:57" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/83fe1bdc5d47658b727595c14da140da92b3d66d", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2015-06-13 07:35:30" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-06-19 03:43:16" - }, - { - "name": "phpunit/phpunit", - "version": "4.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2e8580deebb7d1ac92ac878595e6bffe01069c2a", - "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a", - "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" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-01-27 16:06:15" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "92408bb1968a81b3217a6fdf6c1a198da83caa35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/92408bb1968a81b3217a6fdf6c1a198da83caa35", - "reference": "92408bb1968a81b3217a6fdf6c1a198da83caa35", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-06-11 15:55:48" - }, - { - "name": "sebastian/comparator", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-01-29 16:28:08" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/environment", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.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 functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2015-01-01 10:01:08" - }, - { - "name": "sebastian/exporter", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "84839970d05254c73cde183a721c7af13aede943" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", - "reference": "84839970d05254c73cde183a721c7af13aede943", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2015-01-27 07:23:06" - }, - { - "name": "sebastian/global-state", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2014-10-06 09:23:50" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "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": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-01-24 09:48:32" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "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" - }, - { - "name": "symfony/yaml", - "version": "v2.7.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "9808e75c609a14f6db02f70fccf4ca4aab53c160" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/9808e75c609a14f6db02f70fccf4ca4aab53c160", - "reference": "9808e75c609a14f6db02f70fccf4ca4aab53c160", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-06-10 15:30:22" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "phpdocumentor/reflection-common": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.5" - }, - "platform-dev": [] -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/examples/01-interpreting-a-simple-docblock.php b/api/vendor/phpdocumentor/reflection-docblock/examples/01-interpreting-a-simple-docblock.php deleted file mode 100644 index 6d67dea..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/examples/01-interpreting-a-simple-docblock.php +++ /dev/null @@ -1,27 +0,0 @@ -create($docComment); - -// Should contain the first line of the DocBlock -$summary = $docblock->getSummary(); - -// Contains an object of type Description; you can either cast it to string or use -// the render method to get a string representation of the Description. -// -// In subsequent examples we will be fiddling a bit more with the Description. -$description = $docblock->getDescription(); diff --git a/api/vendor/phpdocumentor/reflection-docblock/examples/02-interpreting-tags.php b/api/vendor/phpdocumentor/reflection-docblock/examples/02-interpreting-tags.php deleted file mode 100644 index 2399588..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/examples/02-interpreting-tags.php +++ /dev/null @@ -1,24 +0,0 @@ -create($docComment); - -// You can check if a DocBlock has one or more see tags -$hasSeeTag = $docblock->hasTag('see'); - -// Or we can get a complete list of all tags -$tags = $docblock->getTags(); - -// But we can also grab all tags of a specific type, such as `see` -$seeTags = $docblock->getTagsByName('see'); diff --git a/api/vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php b/api/vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php deleted file mode 100644 index 6bc10ba..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php +++ /dev/null @@ -1,27 +0,0 @@ -create($docComment); - -// Create the serializer that will reconstitute the DocBlock back to its original form. -$serializer = new Serializer(); - -// Reconstitution is performed by the `getDocComment()` method. -$reconstitutedDocComment = $serializer->getDocComment($docblock); - diff --git a/api/vendor/phpdocumentor/reflection-docblock/examples/04-adding-your-own-tag.php b/api/vendor/phpdocumentor/reflection-docblock/examples/04-adding-your-own-tag.php deleted file mode 100644 index 026d606..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/examples/04-adding-your-own-tag.php +++ /dev/null @@ -1,135 +0,0 @@ - Important: Tag classes that act as Factories using the `create` method should implement the TagFactory interface. - */ -final class MyTag extends BaseTag implements StaticMethod -{ - /** - * A required property that is used by Formatters to reconstitute the complete tag line. - * - * @see Formatter - * - * @var string - */ - protected $name = 'my-tag'; - - /** - * The constructor for this Tag; this should contain all properties for this object. - * - * @param Description $description An example of how to add a Description to the tag; the Description is often - * an optional variable so passing null is allowed in this instance (though you can - * also construct an empty description object). - * - * @see BaseTag for the declaration of the description property and getDescription method. - */ - public function __construct(Description $description = null) - { - $this->description = $description; - } - - /** - * A static Factory that creates a new instance of the current Tag. - * - * In this example the MyTag tag can be created by passing a description text as $body. Because we have added - * a $descriptionFactory that is type-hinted as DescriptionFactory we can now construct a new Description object - * and pass that to the constructor. - * - * > You could directly instantiate a Description object here but that won't be parsed for inline tags and Types - * > won't be resolved. The DescriptionFactory will take care of those actions. - * - * The `create` method's interface states that this method only features a single parameter (`$body`) but the - * {@see TagFactory} will read the signature of this method and if it has more parameters then it will try - * to find declarations for it in the ServiceLocator of the TagFactory (see {@see TagFactory::$serviceLocator}). - * - * > Important: all properties following the `$body` should default to `null`, otherwise PHP will error because - * > it no longer matches the interface. This is why you often see the default tags check that an optional argument - * > is not null nonetheless. - * - * @param string $body - * @param DescriptionFactory $descriptionFactory - * @param Context|null $context The Context is used to resolve Types and FQSENs, although optional - * it is highly recommended to pass it. If you omit it then it is assumed that - * the DocBlock is in the global namespace and has no `use` statements. - * - * @see Tag for the interface declaration of the `create` method. - * @see Tag::create() for more information on this method's workings. - * - * @return MyTag - */ - public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null) - { - Assert::string($body); - Assert::notNull($descriptionFactory); - - return new static($descriptionFactory->create($body, $context)); - } - - /** - * Returns a rendition of the original tag line. - * - * This method is used to reconstitute a DocBlock into its original form by the {@see Serializer}. It should - * feature all parts of the tag so that the serializer can put it back together. - * - * @return string - */ - public function __toString() - { - return (string)$this->description; - } -} - -$docComment = << MyTag::class]; - -// Do pass the list of custom tags to the Factory for the DocBlockFactory. -$factory = DocBlockFactory::createInstance($customTags); -// You can also add Tags later using `$factory->registerTagHandler()` with a tag name and Tag class name. - -// Create the DocBlock -$docblock = $factory->create($docComment); - -// Take a look: the $customTagObjects now contain an array with your newly added tag -$customTagObjects = $docblock->getTagsByName('my-tag'); - -// As an experiment: let's reconstitute the DocBlock and observe that because we added a __toString() method -// to the tag class that we can now also see it. -$serializer = new Serializer(); -$reconstitutedDocComment = $serializer->getDocComment($docblock); diff --git a/api/vendor/phpdocumentor/reflection-docblock/examples/playing-with-descriptions/02-escaping.php b/api/vendor/phpdocumentor/reflection-docblock/examples/playing-with-descriptions/02-escaping.php deleted file mode 100644 index 5ec772f..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/examples/playing-with-descriptions/02-escaping.php +++ /dev/null @@ -1,47 +0,0 @@ -create($docComment); - -// Escaping is automatic so this happens in the DescriptionFactory. -$description = $docblock->getDescription(); - -// This is the rendition that we will receive of the Description. -$receivedDocComment = <<render(); diff --git a/api/vendor/phpdocumentor/reflection-docblock/phpmd.xml.dist b/api/vendor/phpdocumentor/reflection-docblock/phpmd.xml.dist deleted file mode 100644 index 9abf85c..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/phpmd.xml.dist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - 40 - - - diff --git a/api/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist b/api/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist deleted file mode 100644 index 3c2e9a3..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - ./tests/unit - - - ./tests/integration - - - - - ./src/ - - - ./vendor/ - - - - - - diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php index 3991140..cc33e60 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php @@ -1,112 +1,96 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection; use phpDocumentor\Reflection\DocBlock\Tag; +use phpDocumentor\Reflection\DocBlock\Tags\TagWithType; use Webmozart\Assert\Assert; final class DocBlock { /** @var string The opening line for this docblock. */ - private $summary = ''; + private $summary; /** @var DocBlock\Description The actual description for this docblock. */ - private $description = null; + private $description; /** @var Tag[] An array containing all the tags in this docblock; except inline. */ - private $tags = array(); + private $tags = []; - /** @var Types\Context Information about the context of this DocBlock. */ - private $context = null; + /** @var Types\Context|null Information about the context of this DocBlock. */ + private $context; - /** @var Location Information about the location of this DocBlock. */ - private $location = null; + /** @var Location|null Information about the location of this DocBlock. */ + private $location; /** @var bool Is this DocBlock (the start of) a template? */ - private $isTemplateStart = false; + private $isTemplateStart; /** @var bool Does this DocBlock signify the end of a DocBlock template? */ - private $isTemplateEnd = false; + private $isTemplateEnd; /** - * @param string $summary - * @param DocBlock\Description $description * @param DocBlock\Tag[] $tags - * @param Types\Context $context The context in which the DocBlock occurs. - * @param Location $location The location within the file that this DocBlock occurs in. - * @param bool $isTemplateStart - * @param bool $isTemplateEnd + * @param Types\Context $context The context in which the DocBlock occurs. + * @param Location $location The location within the file that this DocBlock occurs in. */ public function __construct( - $summary = '', - DocBlock\Description $description = null, + string $summary = '', + ?DocBlock\Description $description = null, array $tags = [], - Types\Context $context = null, - Location $location = null, - $isTemplateStart = false, - $isTemplateEnd = false - ) - { - Assert::string($summary); - Assert::boolean($isTemplateStart); - Assert::boolean($isTemplateEnd); + ?Types\Context $context = null, + ?Location $location = null, + bool $isTemplateStart = false, + bool $isTemplateEnd = false + ) { Assert::allIsInstanceOf($tags, Tag::class); - $this->summary = $summary; + $this->summary = $summary; $this->description = $description ?: new DocBlock\Description(''); foreach ($tags as $tag) { $this->addTag($tag); } - $this->context = $context; + $this->context = $context; $this->location = $location; - $this->isTemplateEnd = $isTemplateEnd; + $this->isTemplateEnd = $isTemplateEnd; $this->isTemplateStart = $isTemplateStart; } - /** - * @return string - */ - public function getSummary() + public function getSummary(): string { return $this->summary; } - /** - * @return DocBlock\Description - */ - public function getDescription() + public function getDescription(): DocBlock\Description { return $this->description; } /** * Returns the current context. - * - * @return Types\Context */ - public function getContext() + public function getContext(): ?Types\Context { return $this->context; } /** * Returns the current location. - * - * @return Location */ - public function getLocation() + public function getLocation(): ?Location { return $this->location; } @@ -129,10 +113,8 @@ final class DocBlock * elements that follow until another DocBlock is found that contains the closing marker (`#@-`). * * @see self::isTemplateEnd() for the check whether a closing marker was provided. - * - * @return boolean */ - public function isTemplateStart() + public function isTemplateStart(): bool { return $this->isTemplateStart; } @@ -141,10 +123,8 @@ final class DocBlock * Returns whether this DocBlock is the end of a Template section. * * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality. - * - * @return boolean */ - public function isTemplateEnd() + public function isTemplateEnd(): bool { return $this->isTemplateEnd; } @@ -154,7 +134,7 @@ final class DocBlock * * @return Tag[] */ - public function getTags() + public function getTags(): array { return $this->tags; } @@ -167,15 +147,35 @@ final class DocBlock * * @return Tag[] */ - public function getTagsByName($name) + public function getTagsByName(string $name): array { - Assert::string($name); + $result = []; - $result = array(); - - /** @var Tag $tag */ foreach ($this->getTags() as $tag) { - if ($tag->getName() != $name) { + if ($tag->getName() !== $name) { + continue; + } + + $result[] = $tag; + } + + return $result; + } + + /** + * Returns an array of tags with type matching the given name. If no tags are found + * an empty array is returned. + * + * @param string $name String to search by. + * + * @return TagWithType[] + */ + public function getTagsWithTypeByName(string $name): array + { + $result = []; + + foreach ($this->getTagsByName($name) as $tag) { + if (!$tag instanceof TagWithType) { continue; } @@ -189,16 +189,11 @@ final class DocBlock * Checks if a tag of a certain type is present in this DocBlock. * * @param string $name Tag name to check for. - * - * @return bool */ - public function hasTag($name) + public function hasTag(string $name): bool { - Assert::string($name); - - /** @var Tag $tag */ foreach ($this->getTags() as $tag) { - if ($tag->getName() == $name) { + if ($tag->getName() === $name) { return true; } } @@ -206,14 +201,27 @@ final class DocBlock return false; } + /** + * Remove a tag from this DocBlock. + * + * @param Tag $tagToRemove The tag to remove. + */ + public function removeTag(Tag $tagToRemove): void + { + foreach ($this->tags as $key => $tag) { + if ($tag === $tagToRemove) { + unset($this->tags[$key]); + break; + } + } + } + /** * Adds a tag to this DocBlock. * * @param Tag $tag The tag to add. - * - * @return void */ - private function addTag(Tag $tag) + private function addTag(Tag $tag): void { $this->tags[] = $tag; } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php index d1d7fc6..a31b289 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -14,7 +15,8 @@ namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock\Tags\Formatter; use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter; -use Webmozart\Assert\Assert; + +use function vsprintf; /** * Object representing to description for a DocBlock. @@ -59,26 +61,37 @@ class Description /** * Initializes a Description with its body (template) and a listing of the tags used in the body template. * - * @param string $bodyTemplate * @param Tag[] $tags */ - public function __construct($bodyTemplate, array $tags = []) + public function __construct(string $bodyTemplate, array $tags = []) { - Assert::string($bodyTemplate); - $this->bodyTemplate = $bodyTemplate; - $this->tags = $tags; + $this->tags = $tags; + } + + /** + * Returns the body template. + */ + public function getBodyTemplate(): string + { + return $this->bodyTemplate; + } + + /** + * Returns the tags for this DocBlock. + * + * @return Tag[] + */ + public function getTags(): array + { + return $this->tags; } /** * Renders this description as a string where the provided formatter will format the tags in the expected string * format. - * - * @param Formatter|null $formatter - * - * @return string */ - public function render(Formatter $formatter = null) + public function render(?Formatter $formatter = null): string { if ($formatter === null) { $formatter = new PassthroughFormatter(); @@ -88,15 +101,14 @@ class Description foreach ($this->tags as $tag) { $tags[] = '{' . $formatter->format($tag) . '}'; } + return vsprintf($this->bodyTemplate, $tags); } /** * Returns a plain string representation of this description. - * - * @return string */ - public function __toString() + public function __toString(): string { return $this->render(); } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php index f34d0f7..1a519ec 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php @@ -1,18 +1,32 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; + +use function count; +use function implode; +use function ltrim; +use function min; +use function str_replace; +use function strlen; +use function strpos; +use function substr; +use function trim; + +use const PREG_SPLIT_DELIM_CAPTURE; /** * Creates a new Description object given a body of text. @@ -38,8 +52,6 @@ class DescriptionFactory /** * Initializes this factory with the means to construct (inline) tags. - * - * @param TagFactory $tagFactory */ public function __construct(TagFactory $tagFactory) { @@ -48,27 +60,36 @@ class DescriptionFactory /** * Returns the parsed text of this description. - * - * @param string $contents - * @param TypeContext $context - * - * @return Description */ - public function create($contents, TypeContext $context = null) + public function create(string $contents, ?TypeContext $context = null): Description { - list($text, $tags) = $this->parse($this->lex($contents), $context); + $tokens = $this->lex($contents); + $count = count($tokens); + $tagCount = 0; + $tags = []; - return new Description($text, $tags); + for ($i = 1; $i < $count; $i += 2) { + $tags[] = $this->tagFactory->create($tokens[$i], $context); + $tokens[$i] = '%' . ++$tagCount . '$s'; + } + + //In order to allow "literal" inline tags, the otherwise invalid + //sequence "{@}" is changed to "@", and "{}" is changed to "}". + //"%" is escaped to "%%" because of vsprintf. + //See unit tests for examples. + for ($i = 0; $i < $count; $i += 2) { + $tokens[$i] = str_replace(['{@}', '{}', '%'], ['@', '}', '%%'], $tokens[$i]); + } + + return new Description(implode('', $tokens), $tags); } /** * Strips the contents from superfluous whitespace and splits the description into a series of tokens. * - * @param string $contents - * * @return string[] A series of tokens of which the description text is composed. */ - private function lex($contents) + private function lex(string $contents): array { $contents = $this->removeSuperfluousStartingWhitespace($contents); @@ -77,7 +98,7 @@ class DescriptionFactory return [$contents]; } - return preg_split( + return Utils::pregSplit( '/\{ # "{@}" is not a valid inline tag. This ensures that we do not treat it as one, but treat it literally. (?!@\}) @@ -103,41 +124,11 @@ class DescriptionFactory ) \}/Sux', $contents, - null, + 0, PREG_SPLIT_DELIM_CAPTURE ); } - /** - * Parses the stream of tokens in to a new set of tokens containing Tags. - * - * @param string[] $tokens - * @param TypeContext $context - * - * @return string[]|Tag[] - */ - private function parse($tokens, TypeContext $context) - { - $count = count($tokens); - $tagCount = 0; - $tags = []; - - for ($i = 1; $i < $count; $i += 2) { - $tags[] = $this->tagFactory->create($tokens[$i], $context); - $tokens[$i] = '%' . ++$tagCount . '$s'; - } - - //In order to allow "literal" inline tags, the otherwise invalid - //sequence "{@}" is changed to "@", and "{}" is changed to "}". - //"%" is escaped to "%%" because of vsprintf. - //See unit tests for examples. - for ($i = 0; $i < $count; $i += 2) { - $tokens[$i] = str_replace(['{@}', '{}', '%'], ['@', '}', '%%'], $tokens[$i]); - } - - return [implode('', $tokens), $tags]; - } - /** * Removes the superfluous from a multi-line description. * @@ -151,14 +142,10 @@ class DescriptionFactory * * If we do not normalize the indentation then we have superfluous whitespace on the second and subsequent * lines and this may cause rendering issues when, for example, using a Markdown converter. - * - * @param string $contents - * - * @return string */ - private function removeSuperfluousStartingWhitespace($contents) + private function removeSuperfluousStartingWhitespace(string $contents): string { - $lines = explode("\n", $contents); + $lines = Utils::pregSplit("/\r\n?|\n/", $contents); // if there is only one line then we don't have lines with superfluous whitespace and // can use the contents as-is @@ -168,9 +155,9 @@ class DescriptionFactory // determine how many whitespace characters need to be stripped $startingSpaceCount = 9999999; - for ($i = 1; $i < count($lines); $i++) { + for ($i = 1, $iMax = count($lines); $i < $iMax; ++$i) { // lines with a no length do not count as they are not indented at all - if (strlen(trim($lines[$i])) === 0) { + if (trim($lines[$i]) === '') { continue; } @@ -181,12 +168,11 @@ class DescriptionFactory // strip the number of spaces from each line if ($startingSpaceCount > 0) { - for ($i = 1; $i < count($lines); $i++) { + for ($i = 1, $iMax = count($lines); $i < $iMax; ++$i) { $lines[$i] = substr($lines[$i], $startingSpaceCount); } } return implode("\n", $lines); } - } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php index 3cc5dab..6a6b472 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php @@ -1,19 +1,31 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ -namespace phpDocumentor\Reflection; +namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock\Tags\Example; +use function array_slice; +use function file; +use function getcwd; +use function implode; +use function is_readable; +use function rtrim; +use function sprintf; +use function trim; + +use const DIRECTORY_SEPARATOR; + /** * Class used to find an example file's location based on a given ExampleDescriptor. */ @@ -23,22 +35,18 @@ class ExampleFinder private $sourceDirectory = ''; /** @var string[] */ - private $exampleDirectories = array(); + private $exampleDirectories = []; /** * Attempts to find the example contents for the given descriptor. - * - * @param Example $example - * - * @return string */ - public function find(Example $example) + public function find(Example $example): string { $filename = $example->getFilePath(); $file = $this->getExampleFileContents($filename); if (!$file) { - return "** File not found : {$filename} **"; + return sprintf('** File not found : %s **', $filename); } return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount())); @@ -46,22 +54,16 @@ class ExampleFinder /** * Registers the project's root directory where an 'examples' folder can be expected. - * - * @param string $directory - * - * @return void */ - public function setSourceDirectory($directory = '') + public function setSourceDirectory(string $directory = ''): void { $this->sourceDirectory = $directory; } /** * Returns the project's root directory where an 'examples' folder can be expected. - * - * @return string */ - public function getSourceDirectory() + public function getSourceDirectory(): string { return $this->sourceDirectory; } @@ -71,7 +73,7 @@ class ExampleFinder * * @param string[] $directories */ - public function setExampleDirectories(array $directories) + public function setExampleDirectories(array $directories): void { $this->exampleDirectories = $directories; } @@ -81,7 +83,7 @@ class ExampleFinder * * @return string[] */ - public function getExampleDirectories() + public function getExampleDirectories(): array { return $this->exampleDirectories; } @@ -97,11 +99,9 @@ class ExampleFinder * 3. Checks the 'examples' folder in the current working directory for examples * 4. Checks the path relative to the current working directory for the given filename * - * @param string $filename - * - * @return string|null + * @return string[] all lines of the example file */ - private function getExampleFileContents($filename) + private function getExampleFileContents(string $filename): ?array { $normalizedPath = null; @@ -123,42 +123,31 @@ class ExampleFinder } } - return $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : null; + $lines = $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : false; + + return $lines !== false ? $lines : null; } /** * Get example filepath based on the example directory inside your project. - * - * @param string $file - * - * @return string */ - private function getExamplePathFromExampleDirectory($file) + private function getExamplePathFromExampleDirectory(string $file): string { return getcwd() . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR . $file; } /** * Returns a path to the example file in the given directory.. - * - * @param string $directory - * @param string $file - * - * @return string */ - private function constructExamplePath($directory, $file) + private function constructExamplePath(string $directory, string $file): string { return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file; } /** * Get example filepath based on sourcecode. - * - * @param string $file - * - * @return string */ - private function getExamplePathFromSource($file) + private function getExamplePathFromSource(string $file): string { return sprintf( '%s%s%s', diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php index 7f1c89d..77e5fb5 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php @@ -1,19 +1,27 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock; -use Webmozart\Assert\Assert; +use phpDocumentor\Reflection\DocBlock\Tags\Formatter; +use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter; + +use function sprintf; +use function str_repeat; +use function str_replace; +use function strlen; +use function wordwrap; /** * Converts a DocBlock back from an object to a complete DocComment including Asterisks. @@ -30,27 +38,37 @@ class Serializer protected $isFirstLineIndented = true; /** @var int|null The max length of a line. */ - protected $lineLength = null; + protected $lineLength; + + /** @var Formatter A custom tag formatter. */ + protected $tagFormatter; + /** @var string */ + private $lineEnding; /** * Create a Serializer instance. * - * @param int $indent The number of times the indent string is repeated. - * @param string $indentString The string to indent the comment with. - * @param bool $indentFirstLine Whether to indent the first line. - * @param int|null $lineLength The max length of a line or NULL to disable line wrapping. + * @param int $indent The number of times the indent string is repeated. + * @param string $indentString The string to indent the comment with. + * @param bool $indentFirstLine Whether to indent the first line. + * @param int|null $lineLength The max length of a line or NULL to disable line wrapping. + * @param Formatter $tagFormatter A custom tag formatter, defaults to PassthroughFormatter. + * @param string $lineEnding Line ending used in the output, by default \n is used. */ - public function __construct($indent = 0, $indentString = ' ', $indentFirstLine = true, $lineLength = null) - { - Assert::integer($indent); - Assert::string($indentString); - Assert::boolean($indentFirstLine); - Assert::nullOrInteger($lineLength); - - $this->indent = $indent; - $this->indentString = $indentString; + public function __construct( + int $indent = 0, + string $indentString = ' ', + bool $indentFirstLine = true, + ?int $lineLength = null, + ?Formatter $tagFormatter = null, + string $lineEnding = "\n" + ) { + $this->indent = $indent; + $this->indentString = $indentString; $this->isFirstLineIndented = $indentFirstLine; - $this->lineLength = $lineLength; + $this->lineLength = $lineLength; + $this->tagFormatter = $tagFormatter ?: new PassthroughFormatter(); + $this->lineEnding = $lineEnding; } /** @@ -60,9 +78,9 @@ class Serializer * * @return string The serialized doc block. */ - public function getDocComment(DocBlock $docblock) + public function getDocComment(DocBlock $docblock): string { - $indent = str_repeat($this->indentString, $this->indent); + $indent = str_repeat($this->indentString, $this->indent); $firstIndent = $this->isFirstLineIndented ? $indent : ''; // 3 === strlen(' * ') $wrapLength = $this->lineLength ? $this->lineLength - strlen($indent) - 3 : null; @@ -75,67 +93,63 @@ class Serializer ) ); - $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n"; + $comment = $firstIndent . "/**\n"; + if ($text) { + $comment .= $indent . ' * ' . $text . "\n"; + $comment .= $indent . " *\n"; + } + $comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment); - $comment .= $indent . ' */'; - return $comment; + return str_replace("\n", $this->lineEnding, $comment . $indent . ' */'); } - /** - * @param $indent - * @param $text - * @return mixed - */ - private function removeTrailingSpaces($indent, $text) + private function removeTrailingSpaces(string $indent, string $text): string { - return str_replace("\n{$indent} * \n", "\n{$indent} *\n", $text); + return str_replace( + sprintf("\n%s * \n", $indent), + sprintf("\n%s *\n", $indent), + $text + ); } - /** - * @param $indent - * @param $text - * @return mixed - */ - private function addAsterisksForEachLine($indent, $text) + private function addAsterisksForEachLine(string $indent, string $text): string { - return str_replace("\n", "\n{$indent} * ", $text); + return str_replace( + "\n", + sprintf("\n%s * ", $indent), + $text + ); } - /** - * @param DocBlock $docblock - * @param $wrapLength - * @return string - */ - private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength) + private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, ?int $wrapLength): string { - $text = $docblock->getSummary() . ((string)$docblock->getDescription() ? "\n\n" . $docblock->getDescription() + $text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription() : ''); if ($wrapLength !== null) { $text = wordwrap($text, $wrapLength); + return $text; } + return $text; } - /** - * @param DocBlock $docblock - * @param $wrapLength - * @param $indent - * @param $comment - * @return string - */ - private function addTagBlock(DocBlock $docblock, $wrapLength, $indent, $comment) + private function addTagBlock(DocBlock $docblock, ?int $wrapLength, string $indent, string $comment): string { foreach ($docblock->getTags() as $tag) { - $formatter = new DocBlock\Tags\Formatter\PassthroughFormatter(); - $tagText = $formatter->format($tag); + $tagText = $this->tagFormatter->format($tag); if ($wrapLength !== null) { $tagText = wordwrap($tagText, $wrapLength); } - $tagText = str_replace("\n", "\n{$indent} * ", $tagText); - $comment .= "{$indent} * {$tagText}\n"; + $tagText = str_replace( + "\n", + sprintf("\n%s * ", $indent), + $tagText + ); + + $comment .= sprintf("%s * %s\n", $indent, $tagText); } return $comment; diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php index 0a65646..8d76595 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php @@ -1,23 +1,54 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod; +use InvalidArgumentException; +use phpDocumentor\Reflection\DocBlock\Tags\Author; +use phpDocumentor\Reflection\DocBlock\Tags\Covers; +use phpDocumentor\Reflection\DocBlock\Tags\Deprecated; use phpDocumentor\Reflection\DocBlock\Tags\Generic; +use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag; +use phpDocumentor\Reflection\DocBlock\Tags\Link as LinkTag; +use phpDocumentor\Reflection\DocBlock\Tags\Method; +use phpDocumentor\Reflection\DocBlock\Tags\Param; +use phpDocumentor\Reflection\DocBlock\Tags\Property; +use phpDocumentor\Reflection\DocBlock\Tags\PropertyRead; +use phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite; +use phpDocumentor\Reflection\DocBlock\Tags\Return_; +use phpDocumentor\Reflection\DocBlock\Tags\See as SeeTag; +use phpDocumentor\Reflection\DocBlock\Tags\Since; +use phpDocumentor\Reflection\DocBlock\Tags\Source; +use phpDocumentor\Reflection\DocBlock\Tags\Throws; +use phpDocumentor\Reflection\DocBlock\Tags\Uses; +use phpDocumentor\Reflection\DocBlock\Tags\Var_; +use phpDocumentor\Reflection\DocBlock\Tags\Version; use phpDocumentor\Reflection\FqsenResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use ReflectionMethod; +use ReflectionNamedType; +use ReflectionParameter; use Webmozart\Assert\Assert; +use function array_merge; +use function array_slice; +use function call_user_func_array; +use function count; +use function get_class; +use function preg_match; +use function strpos; +use function trim; + /** * Creates a Tag object given the contents of a tag. * @@ -38,41 +69,47 @@ use Webmozart\Assert\Assert; final class StandardTagFactory implements TagFactory { /** PCRE regular expression matching a tag name. */ - const REGEX_TAGNAME = '[\w\-\_\\\\]+'; + public const REGEX_TAGNAME = '[\w\-\_\\\\:]+'; /** - * @var string[] An array with a tag as a key, and an FQCN to a class that handles it as an array value. + * @var array> An array with a tag as a key, and an + * FQCN to a class that handles it as an array value. */ private $tagHandlerMappings = [ - 'author' => '\phpDocumentor\Reflection\DocBlock\Tags\Author', - 'covers' => '\phpDocumentor\Reflection\DocBlock\Tags\Covers', - 'deprecated' => '\phpDocumentor\Reflection\DocBlock\Tags\Deprecated', + 'author' => Author::class, + 'covers' => Covers::class, + 'deprecated' => Deprecated::class, // 'example' => '\phpDocumentor\Reflection\DocBlock\Tags\Example', - 'link' => '\phpDocumentor\Reflection\DocBlock\Tags\Link', - 'method' => '\phpDocumentor\Reflection\DocBlock\Tags\Method', - 'param' => '\phpDocumentor\Reflection\DocBlock\Tags\Param', - 'property-read' => '\phpDocumentor\Reflection\DocBlock\Tags\PropertyRead', - 'property' => '\phpDocumentor\Reflection\DocBlock\Tags\Property', - 'property-write' => '\phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite', - 'return' => '\phpDocumentor\Reflection\DocBlock\Tags\Return_', - 'see' => '\phpDocumentor\Reflection\DocBlock\Tags\See', - 'since' => '\phpDocumentor\Reflection\DocBlock\Tags\Since', - 'source' => '\phpDocumentor\Reflection\DocBlock\Tags\Source', - 'throw' => '\phpDocumentor\Reflection\DocBlock\Tags\Throws', - 'throws' => '\phpDocumentor\Reflection\DocBlock\Tags\Throws', - 'uses' => '\phpDocumentor\Reflection\DocBlock\Tags\Uses', - 'var' => '\phpDocumentor\Reflection\DocBlock\Tags\Var_', - 'version' => '\phpDocumentor\Reflection\DocBlock\Tags\Version' + 'link' => LinkTag::class, + 'method' => Method::class, + 'param' => Param::class, + 'property-read' => PropertyRead::class, + 'property' => Property::class, + 'property-write' => PropertyWrite::class, + 'return' => Return_::class, + 'see' => SeeTag::class, + 'since' => Since::class, + 'source' => Source::class, + 'throw' => Throws::class, + 'throws' => Throws::class, + 'uses' => Uses::class, + 'var' => Var_::class, + 'version' => Version::class, ]; /** - * @var \ReflectionParameter[][] a lazy-loading cache containing parameters for each tagHandler that has been used. + * @var array> An array with a anotation s a key, and an + * FQCN to a class that handles it as an array value. + */ + private $annotationMappings = []; + + /** + * @var ReflectionParameter[][] a lazy-loading cache containing parameters + * for each tagHandler that has been used. */ private $tagHandlerParameterCache = []; - /** - * @var FqsenResolver - */ + /** @var FqsenResolver */ private $fqsenResolver; /** @@ -87,12 +124,11 @@ final class StandardTagFactory implements TagFactory * If no tag handlers are provided than the default list in the {@see self::$tagHandlerMappings} property * is used. * - * @param FqsenResolver $fqsenResolver - * @param string[] $tagHandlers - * * @see self::registerTagHandler() to add a new tag handler to the existing default list. + * + * @param array> $tagHandlers */ - public function __construct(FqsenResolver $fqsenResolver, array $tagHandlers = null) + public function __construct(FqsenResolver $fqsenResolver, ?array $tagHandlers = null) { $this->fqsenResolver = $fqsenResolver; if ($tagHandlers !== null) { @@ -102,48 +138,38 @@ final class StandardTagFactory implements TagFactory $this->addService($fqsenResolver, FqsenResolver::class); } - /** - * {@inheritDoc} - */ - public function create($tagLine, TypeContext $context = null) + public function create(string $tagLine, ?TypeContext $context = null): Tag { - if (! $context) { + if (!$context) { $context = new TypeContext(''); } - list($tagName, $tagBody) = $this->extractTagParts($tagLine); + [$tagName, $tagBody] = $this->extractTagParts($tagLine); - return $this->createTag($tagBody, $tagName, $context); + return $this->createTag(trim($tagBody), $tagName, $context); } /** - * {@inheritDoc} + * @param mixed $value */ - public function addParameter($name, $value) + public function addParameter(string $name, $value): void { $this->serviceLocator[$name] = $value; } - /** - * {@inheritDoc} - */ - public function addService($service, $alias = null) + public function addService(object $service, ?string $alias = null): void { $this->serviceLocator[$alias ?: get_class($service)] = $service; } - /** - * {@inheritDoc} - */ - public function registerTagHandler($tagName, $handler) + public function registerTagHandler(string $tagName, string $handler): void { Assert::stringNotEmpty($tagName); - Assert::stringNotEmpty($handler); Assert::classExists($handler); - Assert::implementsInterface($handler, StaticMethod::class); + Assert::implementsInterface($handler, Tag::class); if (strpos($tagName, '\\') && $tagName[0] !== '\\') { - throw new \InvalidArgumentException( + throw new InvalidArgumentException( 'A namespaced tag must have a leading backslash as it must be fully qualified' ); } @@ -154,15 +180,13 @@ final class StandardTagFactory implements TagFactory /** * Extracts all components for a tag. * - * @param string $tagLine - * * @return string[] */ - private function extractTagParts($tagLine) + private function extractTagParts(string $tagLine): array { - $matches = array(); - if (! preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)?/us', $tagLine, $matches)) { - throw new \InvalidArgumentException( + $matches = []; + if (!preg_match('/^@(' . self::REGEX_TAGNAME . ')((?:[\s\(\{])\s*([^\s].*)|$)/us', $tagLine, $matches)) { + throw new InvalidArgumentException( 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' ); } @@ -177,44 +201,43 @@ final class StandardTagFactory implements TagFactory /** * Creates a new tag object with the given name and body or returns null if the tag name was recognized but the * body was invalid. - * - * @param string $body - * @param string $name - * @param TypeContext $context - * - * @return Tag|null */ - private function createTag($body, $name, TypeContext $context) + private function createTag(string $body, string $name, TypeContext $context): Tag { $handlerClassName = $this->findHandlerClassName($name, $context); $arguments = $this->getArgumentsForParametersFromWiring( $this->fetchParametersForHandlerFactoryMethod($handlerClassName), $this->getServiceLocatorWithDynamicParameters($context, $name, $body) - ) - ; + ); - return call_user_func_array([$handlerClassName, 'create'], $arguments); + try { + $callable = [$handlerClassName, 'create']; + Assert::isCallable($callable); + /** @phpstan-var callable(string): ?Tag $callable */ + $tag = call_user_func_array($callable, $arguments); + + return $tag ?? InvalidTag::create($body, $name); + } catch (InvalidArgumentException $e) { + return InvalidTag::create($body, $name)->withError($e); + } } /** * Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`). * - * @param string $tagName - * @param TypeContext $context - * - * @return string + * @return class-string */ - private function findHandlerClassName($tagName, TypeContext $context) + private function findHandlerClassName(string $tagName, TypeContext $context): string { $handlerClassName = Generic::class; if (isset($this->tagHandlerMappings[$tagName])) { $handlerClassName = $this->tagHandlerMappings[$tagName]; } elseif ($this->isAnnotation($tagName)) { // TODO: Annotation support is planned for a later stage and as such is disabled for now - // $tagName = (string)$this->fqsenResolver->resolve($tagName, $context); - // if (isset($this->annotationMappings[$tagName])) { - // $handlerClassName = $this->annotationMappings[$tagName]; - // } + $tagName = (string) $this->fqsenResolver->resolve($tagName, $context); + if (isset($this->annotationMappings[$tagName])) { + $handlerClassName = $this->annotationMappings[$tagName]; + } } return $handlerClassName; @@ -223,17 +246,28 @@ final class StandardTagFactory implements TagFactory /** * Retrieves the arguments that need to be passed to the Factory Method with the given Parameters. * - * @param \ReflectionParameter[] $parameters - * @param mixed[] $locator + * @param ReflectionParameter[] $parameters + * @param mixed[] $locator * * @return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters * is provided with this method. */ - private function getArgumentsForParametersFromWiring($parameters, $locator) + private function getArgumentsForParametersFromWiring(array $parameters, array $locator): array { $arguments = []; - foreach ($parameters as $index => $parameter) { - $typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null; + foreach ($parameters as $parameter) { + $type = $parameter->getType(); + $typeHint = null; + if ($type instanceof ReflectionNamedType) { + $typeHint = $type->getName(); + if ($typeHint === 'self') { + $declaringClass = $parameter->getDeclaringClass(); + if ($declaringClass !== null) { + $typeHint = $declaringClass->getName(); + } + } + } + if (isset($locator[$typeHint])) { $arguments[] = $locator[$typeHint]; continue; @@ -255,14 +289,14 @@ final class StandardTagFactory implements TagFactory * Retrieves a series of ReflectionParameter objects for the static 'create' method of the given * tag handler class name. * - * @param string $handlerClassName + * @param class-string $handlerClassName * - * @return \ReflectionParameter[] + * @return ReflectionParameter[] */ - private function fetchParametersForHandlerFactoryMethod($handlerClassName) + private function fetchParametersForHandlerFactoryMethod(string $handlerClassName): array { - if (! isset($this->tagHandlerParameterCache[$handlerClassName])) { - $methodReflection = new \ReflectionMethod($handlerClassName, 'create'); + if (!isset($this->tagHandlerParameterCache[$handlerClassName])) { + $methodReflection = new ReflectionMethod($handlerClassName, 'create'); $this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters(); } @@ -270,39 +304,39 @@ final class StandardTagFactory implements TagFactory } /** - * Returns a copy of this class' Service Locator with added dynamic parameters, such as the tag's name, body and - * Context. + * Returns a copy of this class' Service Locator with added dynamic parameters, + * such as the tag's name, body and Context. * - * @param TypeContext $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs. - * @param string $tagName The name of the tag that may be passed onto the factory method of the Tag class. - * @param string $tagBody The body of the tag that may be passed onto the factory method of the Tag class. + * @param TypeContext $context The Context (namespace and aliasses) that may be + * passed and is used to resolve FQSENs. + * @param string $tagName The name of the tag that may be + * passed onto the factory method of the Tag class. + * @param string $tagBody The body of the tag that may be + * passed onto the factory method of the Tag class. * * @return mixed[] */ - private function getServiceLocatorWithDynamicParameters(TypeContext $context, $tagName, $tagBody) - { - $locator = array_merge( + private function getServiceLocatorWithDynamicParameters( + TypeContext $context, + string $tagName, + string $tagBody + ): array { + return array_merge( $this->serviceLocator, [ - 'name' => $tagName, - 'body' => $tagBody, - TypeContext::class => $context + 'name' => $tagName, + 'body' => $tagBody, + TypeContext::class => $context, ] ); - - return $locator; } /** * Returns whether the given tag belongs to an annotation. * - * @param string $tagContent - * * @todo this method should be populated once we implement Annotation notation support. - * - * @return bool */ - private function isAnnotation($tagContent) + private function isAnnotation(string $tagContent): bool { // 1. Contains a namespace separator // 2. Contains parenthesis diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php index e765367..7cf07b4 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,11 +17,15 @@ use phpDocumentor\Reflection\DocBlock\Tags\Formatter; interface Tag { - public function getName(); + public function getName(): string; - public static function create($body); + /** + * @return Tag|mixed Class that implements Tag + * @phpstan-return ?Tag + */ + public static function create(string $body); - public function render(Formatter $formatter = null); + public function render(?Formatter $formatter = null): string; - public function __toString(); + public function __toString(): string; } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php index 3c1d113..c0868dc 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php @@ -1,17 +1,19 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock; +use InvalidArgumentException; use phpDocumentor\Reflection\Types\Context as TypeContext; interface TagFactory @@ -34,12 +36,20 @@ interface TagFactory * * These parameters are injected at the last moment and will override any existing parameter with those names. * - * @param string $name - * @param mixed $value - * - * @return void + * @param mixed $value */ - public function addParameter($name, $value); + public function addParameter(string $name, $value): void; + + /** + * Factory method responsible for instantiating the correct sub type. + * + * @param string $tagLine The text for this tag, including description. + * + * @return Tag A new tag object. + * + * @throws InvalidArgumentException If an invalid tag line was presented. + */ + public function create(string $tagLine, ?TypeContext $context = null): Tag; /** * Registers a service with the Service Locator using the FQCN of the class or the alias, if provided. @@ -49,45 +59,26 @@ interface TagFactory * * Because interfaces are regularly used as type-hints this method provides an alias parameter; if the FQCN of the * interface is passed as alias then every time that interface is requested the provided service will be returned. - * - * @param object $service - * @param string $alias - * - * @return void */ - public function addService($service); - - /** - * Factory method responsible for instantiating the correct sub type. - * - * @param string $tagLine The text for this tag, including description. - * @param TypeContext $context - * - * @throws \InvalidArgumentException if an invalid tag line was presented. - * - * @return Tag A new tag object. - */ - public function create($tagLine, TypeContext $context = null); + public function addService(object $service): void; /** * Registers a handler for tags. * - * If you want to use your own tags then you can use this method to instruct the TagFactory to register the name - * of a tag with the FQCN of a 'Tag Handler'. The Tag handler should implement the {@see Tag} interface (and thus - * the create method). + * If you want to use your own tags then you can use this method to instruct the TagFactory + * to register the name of a tag with the FQCN of a 'Tag Handler'. The Tag handler should implement + * the {@see Tag} interface (and thus the create method). * - * @param string $tagName Name of tag to register a handler for. When registering a namespaced tag, the full - * name, along with a prefixing slash MUST be provided. - * @param string $handler FQCN of handler. + * @param string $tagName Name of tag to register a handler for. When registering a namespaced + * tag, the full name, along with a prefixing slash MUST be provided. + * @param class-string $handler FQCN of handler. * - * @throws \InvalidArgumentException if the tag name is not a string - * @throws \InvalidArgumentException if the tag name is namespaced (contains backslashes) but does not start with - * a backslash - * @throws \InvalidArgumentException if the handler is not a string - * @throws \InvalidArgumentException if the handler is not an existing class - * @throws \InvalidArgumentException if the handler does not implement the {@see Tag} interface - * - * @return void + * @throws InvalidArgumentException If the tag name is not a string. + * @throws InvalidArgumentException If the tag name is namespaced (contains backslashes) but + * does not start with a backslash. + * @throws InvalidArgumentException If the handler is not a string. + * @throws InvalidArgumentException If the handler is not an existing class. + * @throws InvalidArgumentException If the handler does not implement the {@see Tag} interface. */ - public function registerTagHandler($tagName, $handler); + public function registerTagHandler(string $tagName, string $handler): void; } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php index 41a2788..ae09ecf 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php @@ -1,18 +1,25 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; -use Webmozart\Assert\Assert; +use InvalidArgumentException; + +use function filter_var; +use function preg_match; +use function trim; + +use const FILTER_VALIDATE_EMAIL; /** * Reflection class for an {@}author tag in a Docblock. @@ -23,23 +30,18 @@ final class Author extends BaseTag implements Factory\StaticMethod protected $name = 'author'; /** @var string The name of the author */ - private $authorName = ''; + private $authorName; /** @var string The email of the author */ - private $authorEmail = ''; + private $authorEmail; /** * Initializes this tag with the author name and e-mail. - * - * @param string $authorName - * @param string $authorEmail */ - public function __construct($authorName, $authorEmail) + public function __construct(string $authorName, string $authorEmail) { - Assert::string($authorName); - Assert::string($authorEmail); if ($authorEmail && !filter_var($authorEmail, FILTER_VALIDATE_EMAIL)) { - throw new \InvalidArgumentException('The author tag does not have a valid e-mail address'); + throw new InvalidArgumentException('The author tag does not have a valid e-mail address'); } $this->authorName = $authorName; @@ -51,7 +53,7 @@ final class Author extends BaseTag implements Factory\StaticMethod * * @return string The author's name. */ - public function getAuthorName() + public function getAuthorName(): string { return $this->authorName; } @@ -61,39 +63,39 @@ final class Author extends BaseTag implements Factory\StaticMethod * * @return string The author's email. */ - public function getEmail() + public function getEmail(): string { return $this->authorEmail; } /** * Returns this tag in string form. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->authorName . '<' . $this->authorEmail . '>'; + if ($this->authorEmail) { + $authorEmail = '<' . $this->authorEmail . '>'; + } else { + $authorEmail = ''; + } + + $authorName = $this->authorName; + + return $authorName . ($authorEmail !== '' ? ($authorName !== '' ? ' ' : '') . $authorEmail : ''); } /** - * Attempts to create a new Author object based on †he tag body. - * - * @param string $body - * - * @return static + * Attempts to create a new Author object based on the tag body. */ - public static function create($body) + public static function create(string $body): ?self { - Assert::string($body); - $splitTagContent = preg_match('/^([^\<]*)(?:\<([^\>]*)\>)?$/u', $body, $matches); if (!$splitTagContent) { return null; } $authorName = trim($matches[1]); - $email = isset($matches[2]) ? trim($matches[2]) : ''; + $email = isset($matches[2]) ? trim($matches[2]) : ''; return new static($authorName, $email); } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php index 14bb717..a28d5bf 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php @@ -1,13 +1,14 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; @@ -31,17 +32,17 @@ abstract class BaseTag implements DocBlock\Tag * * @return string The name of this tag. */ - public function getName() + public function getName(): string { return $this->name; } - public function getDescription() + public function getDescription(): ?Description { return $this->description; } - public function render(Formatter $formatter = null) + public function render(?Formatter $formatter = null): string { if ($formatter === null) { $formatter = new Formatter\PassthroughFormatter(); diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php index 31b4f82..3eff9d8 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php @@ -1,84 +1,101 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; +use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Fqsen; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\Types\Context as TypeContext; use phpDocumentor\Reflection\FqsenResolver; +use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_key_exists; +use function explode; + /** * Reflection class for a @covers tag in a Docblock. */ final class Covers extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'covers'; /** @var Fqsen */ - private $refers = null; + private $refers; /** * Initializes this tag. - * - * @param Fqsen $refers - * @param Description $description */ - public function __construct(Fqsen $refers, Description $description = null) + public function __construct(Fqsen $refers, ?Description $description = null) { - $this->refers = $refers; + $this->refers = $refers; $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - DescriptionFactory $descriptionFactory = null, - FqsenResolver $resolver = null, - TypeContext $context = null - ) - { - Assert::string($body); - Assert::notEmpty($body); + string $body, + ?DescriptionFactory $descriptionFactory = null, + ?FqsenResolver $resolver = null, + ?TypeContext $context = null + ): self { + Assert::stringNotEmpty($body); + Assert::notNull($descriptionFactory); + Assert::notNull($resolver); - $parts = preg_split('/\s+/Su', $body, 2); + $parts = Utils::pregSplit('/\s+/Su', $body, 2); return new static( - $resolver->resolve($parts[0], $context), - $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context) + self::resolveFqsen($parts[0], $resolver, $context), + $descriptionFactory->create($parts[1] ?? '', $context) ); } + private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen + { + Assert::notNull($fqsenResolver); + $fqsenParts = explode('::', $parts); + $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); + + if (!array_key_exists(1, $fqsenParts)) { + return $resolved; + } + + return new Fqsen($resolved . '::' . $fqsenParts[1]); + } + /** * Returns the structural element this tag refers to. - * - * @return Fqsen */ - public function getReference() + public function getReference(): Fqsen { return $this->refers; } /** * Returns a string representation of this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->refers . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $refers = (string) $this->refers; + + return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php index 7c1039f..dbcad28 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php @@ -1,34 +1,38 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; -use phpDocumentor\Reflection\Types\Context as TypeContext; use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\Types\Context as TypeContext; use Webmozart\Assert\Assert; +use function preg_match; + /** * Reflection class for a {@}deprecated tag in a Docblock. */ final class Deprecated extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'deprecated'; /** * PCRE regular expression matching a version vector. * Assumes the "x" modifier. */ - const REGEX_VECTOR = '(?: + public const REGEX_VECTOR = '(?: # Normal release vectors. \d\S* | @@ -40,23 +44,25 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod [^\s\:]+\:\s*\$[^\$]+\$ )'; - /** @var string The version vector. */ - private $version = ''; + /** @var string|null The version vector. */ + private $version; - public function __construct($version = null, Description $description = null) + public function __construct(?string $version = null, ?Description $description = null) { - Assert::nullOrStringNotEmpty($version); + Assert::nullOrNotEmpty($version); - $this->version = $version; + $this->version = $version; $this->description = $description; } /** * @return static */ - public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) - { - Assert::nullOrString($body); + public static function create( + ?string $body, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { if (empty($body)) { return new static(); } @@ -65,33 +71,39 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { return new static( null, - null !== $descriptionFactory ? $descriptionFactory->create($body, $context) : null + $descriptionFactory !== null ? $descriptionFactory->create($body, $context) : null ); } + Assert::notNull($descriptionFactory); + return new static( $matches[1], - $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context) + $descriptionFactory->create($matches[2] ?? '', $context) ); } /** * Gets the version section of the tag. - * - * @return string */ - public function getVersion() + public function getVersion(): ?string { return $this->version; } /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->version . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $version = (string) $this->version; + + return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php index 571ef8d..825355a 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php @@ -1,86 +1,135 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; use phpDocumentor\Reflection\DocBlock\Tag; +use Webmozart\Assert\Assert; + +use function array_key_exists; +use function preg_match; +use function rawurlencode; +use function str_replace; +use function strpos; +use function trim; /** * Reflection class for a {@}example tag in a Docblock. */ -final class Example extends BaseTag +final class Example implements Tag, Factory\StaticMethod { - /** - * @var string Path to a file to use as an example. May also be an absolute URI. - */ - private $filePath = ''; + /** @var string Path to a file to use as an example. May also be an absolute URI. */ + private $filePath; /** * @var bool Whether the file path component represents an URI. This determines how the file portion * appears at {@link getContent()}. */ - private $isURI = false; + private $isURI; - /** - * {@inheritdoc} - */ - public function getContent() + /** @var int */ + private $startingLine; + + /** @var int */ + private $lineCount; + + /** @var string|null */ + private $content; + + public function __construct( + string $filePath, + bool $isURI, + int $startingLine, + int $lineCount, + ?string $content + ) { + Assert::stringNotEmpty($filePath); + Assert::greaterThanEq($startingLine, 1); + Assert::greaterThanEq($lineCount, 0); + + $this->filePath = $filePath; + $this->startingLine = $startingLine; + $this->lineCount = $lineCount; + if ($content !== null) { + $this->content = trim($content); + } + + $this->isURI = $isURI; + } + + public function getContent(): string { - if (null === $this->description) { - $filePath = '"' . $this->filePath . '"'; + if ($this->content === null || $this->content === '') { + $filePath = $this->filePath; if ($this->isURI) { $filePath = $this->isUriRelative($this->filePath) ? str_replace('%2F', '/', rawurlencode($this->filePath)) - :$this->filePath; + : $this->filePath; } - $this->description = $filePath . ' ' . parent::getContent(); + return trim($filePath); } - return $this->description; + return $this->content; } - /** - * {@inheritdoc} - */ - public static function create($body) + public function getDescription(): ?string + { + return $this->content; + } + + public static function create(string $body): ?Tag { // File component: File path in quotes or File URI / Source information - if (! preg_match('/^(?:\"([^\"]+)\"|(\S+))(?:\s+(.*))?$/sux', $body, $matches)) { + if (!preg_match('/^\s*(?:(\"[^\"]+\")|(\S+))(?:\s+(.*))?$/sux', $body, $matches)) { return null; } $filePath = null; $fileUri = null; - if ('' !== $matches[1]) { + if ($matches[1] !== '') { $filePath = $matches[1]; } else { $fileUri = $matches[2]; } $startingLine = 1; - $lineCount = null; + $lineCount = 0; $description = null; - // Starting line / Number of lines / Description - if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $matches[3], $matches)) { - $startingLine = (int)$matches[1]; - if (isset($matches[2]) && $matches[2] !== '') { - $lineCount = (int)$matches[2]; - } + if (array_key_exists(3, $matches)) { $description = $matches[3]; + + // Starting line / Number of lines / Description + if (preg_match('/^([1-9]\d*)(?:\s+((?1))\s*)?(.*)$/sux', $matches[3], $contentMatches)) { + $startingLine = (int) $contentMatches[1]; + if (isset($contentMatches[2])) { + $lineCount = (int) $contentMatches[2]; + } + + if (array_key_exists(3, $contentMatches)) { + $description = $contentMatches[3]; + } + } } - return new static($filePath, $fileUri, $startingLine, $lineCount, $description); + return new static( + $filePath ?? ($fileUri ?? ''), + $fileUri !== null, + $startingLine, + $lineCount, + $description + ); } /** @@ -89,70 +138,63 @@ final class Example extends BaseTag * @return string Path to a file to use as an example. * May also be an absolute URI. */ - public function getFilePath() + public function getFilePath(): string { - return $this->filePath; - } - - /** - * Sets the file path. - * - * @param string $filePath The new file path to use for the example. - * - * @return $this - */ - public function setFilePath($filePath) - { - $this->isURI = false; - $this->filePath = trim($filePath); - - $this->description = null; - return $this; - } - - /** - * Sets the file path as an URI. - * - * This function is equivalent to {@link setFilePath()}, except that it - * converts an URI to a file path before that. - * - * There is no getFileURI(), as {@link getFilePath()} is compatible. - * - * @param string $uri The new file URI to use as an example. - * - * @return $this - */ - public function setFileURI($uri) - { - $this->isURI = true; - $this->description = null; - - $this->filePath = $this->isUriRelative($uri) - ? rawurldecode(str_replace(array('/', '\\'), '%2F', $uri)) - : $this->filePath = $uri; - - return $this; + return trim($this->filePath, '"'); } /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->filePath . ($this->description ? ' ' . $this->description->render() : ''); + $filePath = $this->filePath; + $isDefaultLine = $this->startingLine === 1 && $this->lineCount === 0; + $startingLine = !$isDefaultLine ? (string) $this->startingLine : ''; + $lineCount = !$isDefaultLine ? (string) $this->lineCount : ''; + $content = (string) $this->content; + + return $filePath + . ($startingLine !== '' + ? ($filePath !== '' ? ' ' : '') . $startingLine + : '') + . ($lineCount !== '' + ? ($filePath !== '' || $startingLine !== '' ? ' ' : '') . $lineCount + : '') + . ($content !== '' + ? ($filePath !== '' || $startingLine !== '' || $lineCount !== '' ? ' ' : '') . $content + : ''); } /** * Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute). - * - * @param string $uri - * - * @return bool */ - private function isUriRelative($uri) + private function isUriRelative(string $uri): bool { - return false === strpos($uri, ':'); + return strpos($uri, ':') === false; + } + + public function getStartingLine(): int + { + return $this->startingLine; + } + + public function getLineCount(): int + { + return $this->lineCount; + } + + public function getName(): string + { + return 'example'; + } + + public function render(?Formatter $formatter = null): string + { + if ($formatter === null) { + $formatter = new Formatter\PassthroughFormatter(); + } + + return $formatter->format($this); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php index 98aea45..f6f0bb5 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php @@ -1,18 +1,25 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags\Factory; +/** + * @deprecated This contract is totally covered by Tag contract. Every class using StaticMethod also use Tag + */ interface StaticMethod { - public static function create($body); + /** + * @return mixed + */ + public static function create(string $body); } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php deleted file mode 100644 index b9ca0b8..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php +++ /dev/null @@ -1,18 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags\Factory; - -interface Strategy -{ - public function create($body); -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php index 64b2c60..36b9983 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -18,10 +19,6 @@ interface Formatter { /** * Formats a tag into a string representation according to a specific format, such as Markdown. - * - * @param Tag $tag - * - * @return string */ - public function format(Tag $tag); + public function format(Tag $tag): string; } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php new file mode 100644 index 0000000..9464434 --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php @@ -0,0 +1,50 @@ +maxLen = max($this->maxLen, strlen($tag->getName())); + } + } + + /** + * Formats the given tag to return a simple plain text version. + */ + public function format(Tag $tag): string + { + return '@' . $tag->getName() . + str_repeat( + ' ', + $this->maxLen - strlen($tag->getName()) + 1 + ) . + $tag; + } +} diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php index aa97572..2afdfe5 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -15,17 +16,15 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter; use phpDocumentor\Reflection\DocBlock\Tag; use phpDocumentor\Reflection\DocBlock\Tags\Formatter; +use function trim; + class PassthroughFormatter implements Formatter { /** * Formats the given tag to return a simple plain text version. - * - * @param Tag $tag - * - * @return string */ - public function format(Tag $tag) + public function format(Tag $tag): string { - return '@' . $tag->getName() . ' ' . (string)$tag; + return trim('@' . $tag->getName() . ' ' . $tag); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php index e4c53e0..bc1ab10 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php @@ -1,88 +1,86 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; +use InvalidArgumentException; use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\DocBlock\StandardTagFactory; use phpDocumentor\Reflection\Types\Context as TypeContext; use Webmozart\Assert\Assert; +use function preg_match; + /** * Parses a tag definition for a DocBlock. */ -class Generic extends BaseTag implements Factory\StaticMethod +final class Generic extends BaseTag implements Factory\StaticMethod { /** * Parses a tag and populates the member variables. * - * @param string $name Name of the tag. + * @param string $name Name of the tag. * @param Description $description The contents of the given tag. */ - public function __construct($name, Description $description = null) + public function __construct(string $name, ?Description $description = null) { $this->validateTagName($name); - $this->name = $name; + $this->name = $name; $this->description = $description; } /** * Creates a new tag that represents any unknown tag type. * - * @param string $body - * @param string $name - * @param DescriptionFactory $descriptionFactory - * @param TypeContext $context - * * @return static */ public static function create( - $body, - $name = '', - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { - Assert::string($body); + string $body, + string $name = '', + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($name); Assert::notNull($descriptionFactory); - $description = $descriptionFactory && $body ? $descriptionFactory->create($body, $context) : null; + $description = $body !== '' ? $descriptionFactory->create($body, $context) : null; return new static($name, $description); } /** * Returns the tag as a serialized string - * - * @return string */ - public function __toString() + public function __toString(): string { - return ($this->description ? $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + return $description; } /** * Validates if the tag name matches the expected format, otherwise throws an exception. - * - * @param string $name - * - * @return void */ - private function validateTagName($name) + private function validateTagName(string $name): void { - if (! preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) { - throw new \InvalidArgumentException( + if (!preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) { + throw new InvalidArgumentException( 'The tag name "' . $name . '" is not wellformed. Tags may only consist of letters, underscores, ' . 'hyphens and backslashes.' ); diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php new file mode 100644 index 0000000..4e6abb8 --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php @@ -0,0 +1,145 @@ +name = $name; + $this->body = $body; + } + + public function getException(): ?Throwable + { + return $this->throwable; + } + + public function getName(): string + { + return $this->name; + } + + public static function create(string $body, string $name = ''): self + { + return new self($name, $body); + } + + public function withError(Throwable $exception): self + { + $this->flattenExceptionBacktrace($exception); + $tag = new self($this->name, $this->body); + $tag->throwable = $exception; + + return $tag; + } + + /** + * Removes all complex types from backtrace + * + * Not all objects are serializable. So we need to remove them from the + * stored exception to be sure that we do not break existing library usage. + */ + private function flattenExceptionBacktrace(Throwable $exception): void + { + $traceProperty = (new ReflectionClass(Exception::class))->getProperty('trace'); + $traceProperty->setAccessible(true); + + do { + $trace = $exception->getTrace(); + if (isset($trace[0]['args'])) { + $trace = array_map( + function (array $call): array { + $call['args'] = array_map([$this, 'flattenArguments'], $call['args'] ?? []); + + return $call; + }, + $trace + ); + } + + $traceProperty->setValue($exception, $trace); + $exception = $exception->getPrevious(); + } while ($exception !== null); + + $traceProperty->setAccessible(false); + } + + /** + * @param mixed $value + * + * @return mixed + * + * @throws ReflectionException + */ + private function flattenArguments($value) + { + if ($value instanceof Closure) { + $closureReflection = new ReflectionFunction($value); + $value = sprintf( + '(Closure at %s:%s)', + $closureReflection->getFileName(), + $closureReflection->getStartLine() + ); + } elseif (is_object($value)) { + $value = sprintf('object(%s)', get_class($value)); + } elseif (is_resource($value)) { + $value = sprintf('resource(%s)', get_resource_type($value)); + } elseif (is_array($value)) { + $value = array_map([$this, 'flattenArguments'], $value); + } + + return $value; + } + + public function render(?Formatter $formatter = null): string + { + if ($formatter === null) { + $formatter = new Formatter\PassthroughFormatter(); + } + + return $formatter->format($this); + } + + public function __toString(): string + { + return $this->body; + } +} diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php index 9c0e367..ee242e3 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php @@ -1,13 +1,14 @@ - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; @@ -15,63 +16,63 @@ namespace phpDocumentor\Reflection\DocBlock\Tags; use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; /** - * Reflection class for a @link tag in a Docblock. + * Reflection class for a {@}link tag in a Docblock. */ final class Link extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'link'; /** @var string */ - private $link = ''; + private $link; /** * Initializes a link to a URL. - * - * @param string $link - * @param Description $description */ - public function __construct($link, Description $description = null) + public function __construct(string $link, ?Description $description = null) { - Assert::string($link); - - $this->link = $link; + $this->link = $link; $this->description = $description; } - /** - * {@inheritdoc} - */ - public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) - { - Assert::string($body); + public static function create( + string $body, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::notNull($descriptionFactory); - $parts = preg_split('/\s+/Su', $body, 2); + $parts = Utils::pregSplit('/\s+/Su', $body, 2); $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; return new static($parts[0], $description); } /** - * Gets the link - * - * @return string - */ - public function getLink() + * Gets the link + */ + public function getLink(): string { return $this->link; } /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->link . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $link = $this->link; + + return $link . ($description !== '' ? ($link !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php index d600aaa..f08bfff 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php @@ -1,53 +1,74 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; +use InvalidArgumentException; use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\TypeResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Types\Mixed_; use phpDocumentor\Reflection\Types\Void_; use Webmozart\Assert\Assert; +use function array_keys; +use function explode; +use function implode; +use function is_string; +use function preg_match; +use function sort; +use function strpos; +use function substr; +use function trim; +use function var_export; + /** * Reflection class for an {@}method in a Docblock. */ final class Method extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'method'; /** @var string */ - private $methodName = ''; + private $methodName; - /** @var string[] */ - private $arguments = []; + /** + * @phpstan-var array + * @var array> + */ + private $arguments; /** @var bool */ - private $isStatic = false; + private $isStatic; /** @var Type */ private $returnType; + /** + * @param array> $arguments + * @phpstan-param array $arguments + */ public function __construct( - $methodName, + string $methodName, array $arguments = [], - Type $returnType = null, - $static = false, - Description $description = null + ?Type $returnType = null, + bool $static = false, + ?Description $description = null ) { Assert::stringNotEmpty($methodName); - Assert::boolean($static); if ($returnType === null) { $returnType = new Void_(); @@ -60,17 +81,15 @@ final class Method extends BaseTag implements Factory\StaticMethod $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): ?self { Assert::stringNotEmpty($body); - Assert::allNotNull([ $typeResolver, $descriptionFactory ]); + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); // 1. none or more whitespace // 2. optionally the keyword "static" followed by whitespace @@ -81,8 +100,9 @@ final class Method extends BaseTag implements Factory\StaticMethod // 5. then a word with underscores, followed by ( and any character // until a ) and whitespace : as method name with signature // 6. any remaining text : as description - if (!preg_match( - '/^ + if ( + !preg_match( + '/^ # Static keyword # Declares a static method ONLY if type is also present (?: @@ -92,18 +112,18 @@ final class Method extends BaseTag implements Factory\StaticMethod # Return type (?: ( - (?:[\w\|_\\\\]+) - # array notation - (?:\[\])* - )? + (?:[\w\|_\\\\]*\$this[\w\|_\\\\]*) + | + (?: + (?:[\w\|_\\\\]+) + # array notation + (?:\[\])* + )*+ + ) \s+ )? - # Legacy method name (not captured) - (?: - [\w_]+\(\)\s+ - )? # Method name - ([\w\|_\\\\]+) + ([\w_]+) # Arguments (?: \(([^\)]*)\) @@ -112,38 +132,44 @@ final class Method extends BaseTag implements Factory\StaticMethod # Description (.*) $/sux', - $body, - $matches - )) { + $body, + $matches + ) + ) { return null; } - list(, $static, $returnType, $methodName, $arguments, $description) = $matches; + [, $static, $returnType, $methodName, $argumentLines, $description] = $matches; + + $static = $static === 'static'; + + if ($returnType === '') { + $returnType = 'void'; + } - $static = $static === 'static'; $returnType = $typeResolver->resolve($returnType, $context); $description = $descriptionFactory->create($description, $context); - if ('' !== $arguments) { - $arguments = explode(',', $arguments); - foreach($arguments as &$argument) { + /** @phpstan-var array $arguments */ + $arguments = []; + if ($argumentLines !== '') { + $argumentsExploded = explode(',', $argumentLines); + foreach ($argumentsExploded as $argument) { $argument = explode(' ', self::stripRestArg(trim($argument)), 2); - if ($argument[0][0] === '$') { + if (strpos($argument[0], '$') === 0) { $argumentName = substr($argument[0], 1); - $argumentType = new Void_(); + $argumentType = new Mixed_(); } else { $argumentType = $typeResolver->resolve($argument[0], $context); $argumentName = ''; if (isset($argument[1])) { - $argument[1] = self::stripRestArg($argument[1]); + $argument[1] = self::stripRestArg($argument[1]); $argumentName = substr($argument[1], 1); } } - $argument = [ 'name' => $argumentName, 'type' => $argumentType]; + $arguments[] = ['name' => $argumentName, 'type' => $argumentType]; } - } else { - $arguments = []; } return new static($methodName, $arguments, $returnType, $static, $description); @@ -151,18 +177,17 @@ final class Method extends BaseTag implements Factory\StaticMethod /** * Retrieves the method name. - * - * @return string */ - public function getMethodName() + public function getMethodName(): string { return $this->methodName; } /** - * @return string[] + * @return array> + * @phpstan-return array */ - public function getArguments() + public function getArguments(): array { return $this->arguments; } @@ -172,54 +197,78 @@ final class Method extends BaseTag implements Factory\StaticMethod * * @return bool TRUE if the method declaration is for a static method, FALSE otherwise. */ - public function isStatic() + public function isStatic(): bool { return $this->isStatic; } - /** - * @return Type - */ - public function getReturnType() + public function getReturnType(): Type { return $this->returnType; } - public function __toString() + public function __toString(): string { $arguments = []; foreach ($this->arguments as $argument) { $arguments[] = $argument['type'] . ' $' . $argument['name']; } - return ($this->isStatic() ? 'static ' : '') - . (string)$this->returnType . ' ' - . $this->methodName - . '(' . implode(', ', $arguments) . ')' - . ($this->description ? ' ' . $this->description->render() : ''); + $argumentStr = '(' . implode(', ', $arguments) . ')'; + + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $static = $this->isStatic ? 'static' : ''; + + $returnType = (string) $this->returnType; + + $methodName = $this->methodName; + + return $static + . ($returnType !== '' ? ($static !== '' ? ' ' : '') . $returnType : '') + . ($methodName !== '' ? ($static !== '' || $returnType !== '' ? ' ' : '') . $methodName : '') + . $argumentStr + . ($description !== '' ? ' ' . $description : ''); } - private function filterArguments($arguments) + /** + * @param mixed[][]|string[] $arguments + * @phpstan-param array $arguments + * + * @return mixed[][] + * @phpstan-return array + */ + private function filterArguments(array $arguments = []): array { - foreach ($arguments as &$argument) { + $result = []; + foreach ($arguments as $argument) { if (is_string($argument)) { - $argument = [ 'name' => $argument ]; + $argument = ['name' => $argument]; } - if (! isset($argument['type'])) { - $argument['type'] = new Void_(); + + if (!isset($argument['type'])) { + $argument['type'] = new Mixed_(); } + $keys = array_keys($argument); - if ($keys !== [ 'name', 'type' ]) { - throw new \InvalidArgumentException( + sort($keys); + if ($keys !== ['name', 'type']) { + throw new InvalidArgumentException( 'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true) ); } + + $result[] = $argument; } - return $arguments; + return $result; } - private static function stripRestArg($argument) + private static function stripRestArg(string $argument): string { if (strpos($argument, '...') === 0) { $argument = trim(substr($argument, 3)); diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php index 1a51dc0..3399649 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -17,125 +18,157 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\TypeResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_shift; +use function array_unshift; +use function implode; +use function strpos; +use function substr; + +use const PREG_SPLIT_DELIM_CAPTURE; + /** * Reflection class for the {@}param tag in a Docblock. */ -final class Param extends BaseTag implements Factory\StaticMethod +final class Param extends TagWithType implements Factory\StaticMethod { - /** @var string */ - protected $name = 'param'; - - /** @var Type */ - private $type; - - /** @var string */ - private $variableName = ''; + /** @var string|null */ + private $variableName; /** @var bool determines whether this is a variadic argument */ - private $isVariadic = false; + private $isVariadic; - /** - * @param string $variableName - * @param Type $type - * @param bool $isVariadic - * @param Description $description - */ - public function __construct($variableName, Type $type = null, $isVariadic = false, Description $description = null) - { - Assert::string($variableName); - Assert::boolean($isVariadic); + /** @var bool determines whether this is passed by reference */ + private $isReference; + public function __construct( + ?string $variableName, + ?Type $type = null, + bool $isVariadic = false, + ?Description $description = null, + bool $isReference = false + ) { + $this->name = 'param'; $this->variableName = $variableName; - $this->type = $type; - $this->isVariadic = $isVariadic; - $this->description = $description; + $this->type = $type; + $this->isVariadic = $isVariadic; + $this->description = $description; + $this->isReference = $isReference; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE); - $type = null; + [$firstPart, $body] = self::extractTypeFromBody($body); + + $type = null; + $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); $variableName = ''; - $isVariadic = false; + $isVariadic = false; + $isReference = false; // if the first item that is encountered is not a variable; it is a type - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) { - $type = $typeResolver->resolve(array_shift($parts), $context); - array_shift($parts); + if ($firstPart && !self::strStartsWithVariable($firstPart)) { + $type = $typeResolver->resolve($firstPart, $context); + } else { + // first part is not a type; we should prepend it to the parts array for further processing + array_unshift($parts, $firstPart); } - // if the next item starts with a $ or ...$ it must be the variable name - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')) { + // if the next item starts with a $ or ...$ or &$ or &...$ it must be the variable name + if (isset($parts[0]) && self::strStartsWithVariable($parts[0])) { $variableName = array_shift($parts); - array_shift($parts); - - if (substr($variableName, 0, 3) === '...') { - $isVariadic = true; - $variableName = substr($variableName, 3); + if ($type) { + array_shift($parts); } - if (substr($variableName, 0, 1) === '$') { + Assert::notNull($variableName); + + if (strpos($variableName, '$') === 0) { $variableName = substr($variableName, 1); + } elseif (strpos($variableName, '&$') === 0) { + $isReference = true; + $variableName = substr($variableName, 2); + } elseif (strpos($variableName, '...$') === 0) { + $isVariadic = true; + $variableName = substr($variableName, 4); + } elseif (strpos($variableName, '&...$') === 0) { + $isVariadic = true; + $isReference = true; + $variableName = substr($variableName, 5); } } $description = $descriptionFactory->create(implode('', $parts), $context); - return new static($variableName, $type, $isVariadic, $description); + return new static($variableName, $type, $isVariadic, $description, $isReference); } /** * Returns the variable's name. - * - * @return string */ - public function getVariableName() + public function getVariableName(): ?string { return $this->variableName; } - /** - * Returns the variable's type or null if unknown. - * - * @return Type|null - */ - public function getType() - { - return $this->type; - } - /** * Returns whether this tag is variadic. - * - * @return boolean */ - public function isVariadic() + public function isVariadic(): bool { return $this->isVariadic; } /** - * Returns a string representation for this tag. - * - * @return string + * Returns whether this tag is passed by reference. */ - public function __toString() + public function isReference(): bool { - return ($this->type ? $this->type . ' ' : '') - . ($this->isVariadic() ? '...' : '') - . '$' . $this->variableName - . ($this->description ? ' ' . $this->description : ''); + return $this->isReference; + } + + /** + * Returns a string representation for this tag. + */ + public function __toString(): string + { + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $variableName = ''; + if ($this->variableName) { + $variableName .= ($this->isReference ? '&' : '') . ($this->isVariadic ? '...' : ''); + $variableName .= '$' . $this->variableName; + } + + $type = (string) $this->type; + + return $type + . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') + . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); + } + + private static function strStartsWithVariable(string $str): bool + { + return strpos($str, '$') === 0 + || + strpos($str, '...$') === 0 + || + strpos($str, '&$') === 0 + || + strpos($str, '&...$') === 0; } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php index 3c59713..2521fb3 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -17,66 +18,68 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\TypeResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_shift; +use function array_unshift; +use function implode; +use function strpos; +use function substr; + +use const PREG_SPLIT_DELIM_CAPTURE; + /** * Reflection class for a {@}property tag in a Docblock. */ -class Property extends BaseTag implements Factory\StaticMethod +final class Property extends TagWithType implements Factory\StaticMethod { - /** @var string */ - protected $name = 'property'; + /** @var string|null */ + protected $variableName; - /** @var Type */ - private $type; - - /** @var string */ - protected $variableName = ''; - - /** - * @param string $variableName - * @param Type $type - * @param Description $description - */ - public function __construct($variableName, Type $type = null, Description $description = null) + public function __construct(?string $variableName, ?Type $type = null, ?Description $description = null) { Assert::string($variableName); + $this->name = 'property'; $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; + $this->type = $type; + $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE); - $type = null; + [$firstPart, $body] = self::extractTypeFromBody($body); + $type = null; + $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); $variableName = ''; // if the first item that is encountered is not a variable; it is a type - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) { - $type = $typeResolver->resolve(array_shift($parts), $context); - array_shift($parts); + if ($firstPart && $firstPart[0] !== '$') { + $type = $typeResolver->resolve($firstPart, $context); + } else { + // first part is not a type; we should prepend it to the parts array for further processing + array_unshift($parts, $firstPart); } - // if the next item starts with a $ or ...$ it must be the variable name - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + // if the next item starts with a $ it must be the variable name + if (isset($parts[0]) && strpos($parts[0], '$') === 0) { $variableName = array_shift($parts); - array_shift($parts); - - if (substr($variableName, 0, 1) === '$') { - $variableName = substr($variableName, 1); + if ($type) { + array_shift($parts); } + + Assert::notNull($variableName); + + $variableName = substr($variableName, 1); } $description = $descriptionFactory->create(implode('', $parts), $context); @@ -86,33 +89,33 @@ class Property extends BaseTag implements Factory\StaticMethod /** * Returns the variable's name. - * - * @return string */ - public function getVariableName() + public function getVariableName(): ?string { return $this->variableName; } - /** - * Returns the variable's type or null if unknown. - * - * @return Type|null - */ - public function getType() - { - return $this->type; - } - /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return ($this->type ? $this->type . ' ' : '') - . '$' . $this->variableName - . ($this->description ? ' ' . $this->description : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + if ($this->variableName) { + $variableName = '$' . $this->variableName; + } else { + $variableName = ''; + } + + $type = (string) $this->type; + + return $type + . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') + . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php index bf2b805..9491b39 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -17,66 +18,68 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\TypeResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_shift; +use function array_unshift; +use function implode; +use function strpos; +use function substr; + +use const PREG_SPLIT_DELIM_CAPTURE; + /** * Reflection class for a {@}property-read tag in a Docblock. */ -class PropertyRead extends BaseTag implements Factory\StaticMethod +final class PropertyRead extends TagWithType implements Factory\StaticMethod { - /** @var string */ - protected $name = 'property-read'; + /** @var string|null */ + protected $variableName; - /** @var Type */ - private $type; - - /** @var string */ - protected $variableName = ''; - - /** - * @param string $variableName - * @param Type $type - * @param Description $description - */ - public function __construct($variableName, Type $type = null, Description $description = null) + public function __construct(?string $variableName, ?Type $type = null, ?Description $description = null) { Assert::string($variableName); + $this->name = 'property-read'; $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; + $this->type = $type; + $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE); - $type = null; + [$firstPart, $body] = self::extractTypeFromBody($body); + $type = null; + $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); $variableName = ''; // if the first item that is encountered is not a variable; it is a type - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) { - $type = $typeResolver->resolve(array_shift($parts), $context); - array_shift($parts); + if ($firstPart && $firstPart[0] !== '$') { + $type = $typeResolver->resolve($firstPart, $context); + } else { + // first part is not a type; we should prepend it to the parts array for further processing + array_unshift($parts, $firstPart); } - // if the next item starts with a $ or ...$ it must be the variable name - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + // if the next item starts with a $ it must be the variable name + if (isset($parts[0]) && strpos($parts[0], '$') === 0) { $variableName = array_shift($parts); - array_shift($parts); - - if (substr($variableName, 0, 1) === '$') { - $variableName = substr($variableName, 1); + if ($type) { + array_shift($parts); } + + Assert::notNull($variableName); + + $variableName = substr($variableName, 1); } $description = $descriptionFactory->create(implode('', $parts), $context); @@ -86,33 +89,33 @@ class PropertyRead extends BaseTag implements Factory\StaticMethod /** * Returns the variable's name. - * - * @return string */ - public function getVariableName() + public function getVariableName(): ?string { return $this->variableName; } - /** - * Returns the variable's type or null if unknown. - * - * @return Type|null - */ - public function getType() - { - return $this->type; - } - /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return ($this->type ? $this->type . ' ' : '') - . '$' . $this->variableName - . ($this->description ? ' ' . $this->description : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + if ($this->variableName) { + $variableName = '$' . $this->variableName; + } else { + $variableName = ''; + } + + $type = (string) $this->type; + + return $type + . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') + . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php index db37e0f..2bfdac6 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -17,66 +18,68 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\TypeResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_shift; +use function array_unshift; +use function implode; +use function strpos; +use function substr; + +use const PREG_SPLIT_DELIM_CAPTURE; + /** * Reflection class for a {@}property-write tag in a Docblock. */ -class PropertyWrite extends BaseTag implements Factory\StaticMethod +final class PropertyWrite extends TagWithType implements Factory\StaticMethod { /** @var string */ - protected $name = 'property-write'; + protected $variableName; - /** @var Type */ - private $type; - - /** @var string */ - protected $variableName = ''; - - /** - * @param string $variableName - * @param Type $type - * @param Description $description - */ - public function __construct($variableName, Type $type = null, Description $description = null) + public function __construct(?string $variableName, ?Type $type = null, ?Description $description = null) { Assert::string($variableName); + $this->name = 'property-write'; $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; + $this->type = $type; + $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE); - $type = null; + [$firstPart, $body] = self::extractTypeFromBody($body); + $type = null; + $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); $variableName = ''; // if the first item that is encountered is not a variable; it is a type - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) { - $type = $typeResolver->resolve(array_shift($parts), $context); - array_shift($parts); + if ($firstPart && $firstPart[0] !== '$') { + $type = $typeResolver->resolve($firstPart, $context); + } else { + // first part is not a type; we should prepend it to the parts array for further processing + array_unshift($parts, $firstPart); } - // if the next item starts with a $ or ...$ it must be the variable name - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + // if the next item starts with a $ it must be the variable name + if (isset($parts[0]) && strpos($parts[0], '$') === 0) { $variableName = array_shift($parts); - array_shift($parts); - - if (substr($variableName, 0, 1) === '$') { - $variableName = substr($variableName, 1); + if ($type) { + array_shift($parts); } + + Assert::notNull($variableName); + + $variableName = substr($variableName, 1); } $description = $descriptionFactory->create(implode('', $parts), $context); @@ -86,33 +89,33 @@ class PropertyWrite extends BaseTag implements Factory\StaticMethod /** * Returns the variable's name. - * - * @return string */ - public function getVariableName() + public function getVariableName(): ?string { return $this->variableName; } - /** - * Returns the variable's type or null if unknown. - * - * @return Type|null - */ - public function getType() - { - return $this->type; - } - /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return ($this->type ? $this->type . ' ' : '') - . '$' . $this->variableName - . ($this->description ? ' ' . $this->description : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + if ($this->variableName) { + $variableName = '$' . $this->variableName; + } else { + $variableName = ''; + } + + $type = (string) $this->type; + + return $type + . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') + . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php new file mode 100644 index 0000000..532003d --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php @@ -0,0 +1,38 @@ +fqsen = $fqsen; + } + + /** + * @return string string representation of the referenced fqsen + */ + public function __toString(): string + { + return (string) $this->fqsen; + } +} diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php new file mode 100644 index 0000000..e7dea86 --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php @@ -0,0 +1,22 @@ +uri = $uri; + } + + public function __toString(): string + { + return $this->uri; + } +} diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php index 09a5870..f021b60 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -22,52 +23,42 @@ use Webmozart\Assert\Assert; /** * Reflection class for a {@}return tag in a Docblock. */ -final class Return_ extends BaseTag implements Factory\StaticMethod +final class Return_ extends TagWithType implements Factory\StaticMethod { - protected $name = 'return'; - - /** @var Type */ - private $type; - - public function __construct(Type $type, Description $description = null) + public function __construct(Type $type, ?Description $description = null) { - $this->type = $type; + $this->name = 'return'; + $this->type = $type; $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) - { - Assert::string($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/\s+/Su', $body, 2); + [$type, $description] = self::extractTypeFromBody($body); - $type = $typeResolver->resolve(isset($parts[0]) ? $parts[0] : '', $context); - $description = $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context); + $type = $typeResolver->resolve($type, $context); + $description = $descriptionFactory->create($description, $context); return new static($type, $description); } - /** - * Returns the type section of the variable. - * - * @return Type - */ - public function getType() + public function __toString(): string { - return $this->type; - } + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } - public function __toString() - { - return $this->type . ' ' . $this->description; + $type = $this->type ? '' . $this->type : 'mixed'; + + return $type . ($description !== '' ? ' ' . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php index 64ee3d8..a194c7d 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php @@ -1,81 +1,106 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; +use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen as FqsenRef; +use phpDocumentor\Reflection\DocBlock\Tags\Reference\Reference; +use phpDocumentor\Reflection\DocBlock\Tags\Reference\Url; use phpDocumentor\Reflection\Fqsen; use phpDocumentor\Reflection\FqsenResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; -use phpDocumentor\Reflection\DocBlock\Description; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_key_exists; +use function explode; +use function preg_match; + /** * Reflection class for an {@}see tag in a Docblock. */ -class See extends BaseTag implements Factory\StaticMethod +final class See extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'see'; - /** @var Fqsen */ - protected $refers = null; + /** @var Reference */ + protected $refers; /** * Initializes this tag. - * - * @param Fqsen $refers - * @param Description $description */ - public function __construct(Fqsen $refers, Description $description = null) + public function __construct(Reference $refers, ?Description $description = null) { - $this->refers = $refers; + $this->refers = $refers; $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - FqsenResolver $resolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { - Assert::string($body); - Assert::allNotNull([$resolver, $descriptionFactory]); + string $body, + ?FqsenResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { + Assert::notNull($descriptionFactory); - $parts = preg_split('/\s+/Su', $body, 2); + $parts = Utils::pregSplit('/\s+/Su', $body, 2); $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; - return new static($resolver->resolve($parts[0], $context), $description); + // https://tools.ietf.org/html/rfc2396#section-3 + if (preg_match('#\w://\w#', $parts[0])) { + return new static(new Url($parts[0]), $description); + } + + return new static(new FqsenRef(self::resolveFqsen($parts[0], $typeResolver, $context)), $description); + } + + private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen + { + Assert::notNull($fqsenResolver); + $fqsenParts = explode('::', $parts); + $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); + + if (!array_key_exists(1, $fqsenParts)) { + return $resolved; + } + + return new Fqsen($resolved . '::' . $fqsenParts[1]); } /** - * Returns the structural element this tag refers to. - * - * @return Fqsen + * Returns the ref of this tag. */ - public function getReference() + public function getReference(): Reference { return $this->refers; } /** * Returns a string representation of this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->refers . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $refers = (string) $this->refers; + + return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php index 3d002ed..54af43c 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php @@ -1,34 +1,38 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; -use phpDocumentor\Reflection\Types\Context as TypeContext; use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\Types\Context as TypeContext; use Webmozart\Assert\Assert; +use function preg_match; + /** * Reflection class for a {@}since tag in a Docblock. */ final class Since extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'since'; /** * PCRE regular expression matching a version vector. * Assumes the "x" modifier. */ - const REGEX_VECTOR = '(?: + public const REGEX_VECTOR = '(?: # Normal release vectors. \d\S* | @@ -40,55 +44,60 @@ final class Since extends BaseTag implements Factory\StaticMethod [^\s\:]+\:\s*\$[^\$]+\$ )'; - /** @var string The version vector. */ - private $version = ''; + /** @var string|null The version vector. */ + private $version; - public function __construct($version = null, Description $description = null) + public function __construct(?string $version = null, ?Description $description = null) { - Assert::nullOrStringNotEmpty($version); + Assert::nullOrNotEmpty($version); $this->version = $version; $this->description = $description; } - /** - * @return static - */ - public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) - { - Assert::nullOrString($body); + public static function create( + ?string $body, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): ?self { if (empty($body)) { return new static(); } $matches = []; - if (! preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { + if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { return null; } + Assert::notNull($descriptionFactory); + return new static( $matches[1], - $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context) + $descriptionFactory->create($matches[2] ?? '', $context) ); } /** * Gets the version section of the tag. - * - * @return string */ - public function getVersion() + public function getVersion(): ?string { return $this->version; } /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->version . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $version = (string) $this->version; + + return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php index b0646b9..8b8c0fb 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -17,6 +18,8 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Types\Context as TypeContext; use Webmozart\Assert\Assert; +use function preg_match; + /** * Reflection class for a {@}source tag in a Docblock. */ @@ -26,26 +29,30 @@ final class Source extends BaseTag implements Factory\StaticMethod protected $name = 'source'; /** @var int The starting line, relative to the structural element's location. */ - private $startingLine = 1; + private $startingLine; /** @var int|null The number of lines, relative to the starting line. NULL means "to the end". */ - private $lineCount = null; + private $lineCount; - public function __construct($startingLine, $lineCount = null, Description $description = null) + /** + * @param int|string $startingLine should be a to int convertible value + * @param int|string|null $lineCount should be a to int convertible value + */ + public function __construct($startingLine, $lineCount = null, ?Description $description = null) { Assert::integerish($startingLine); Assert::nullOrIntegerish($lineCount); - $this->startingLine = (int)$startingLine; - $this->lineCount = $lineCount !== null ? (int)$lineCount : null; + $this->startingLine = (int) $startingLine; + $this->lineCount = $lineCount !== null ? (int) $lineCount : null; $this->description = $description; } - /** - * {@inheritdoc} - */ - public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) - { + public static function create( + string $body, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($body); Assert::notNull($descriptionFactory); @@ -55,14 +62,15 @@ final class Source extends BaseTag implements Factory\StaticMethod // Starting line / Number of lines / Description if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $body, $matches)) { - $startingLine = (int)$matches[1]; + $startingLine = (int) $matches[1]; if (isset($matches[2]) && $matches[2] !== '') { - $lineCount = (int)$matches[2]; + $lineCount = (int) $matches[2]; } + $description = $matches[3]; } - return new static($startingLine, $lineCount, $descriptionFactory->create($description, $context)); + return new static($startingLine, $lineCount, $descriptionFactory->create($description ?? '', $context)); } /** @@ -71,7 +79,7 @@ final class Source extends BaseTag implements Factory\StaticMethod * @return int The starting line, relative to the structural element's * location. */ - public function getStartingLine() + public function getStartingLine(): int { return $this->startingLine; } @@ -82,15 +90,27 @@ final class Source extends BaseTag implements Factory\StaticMethod * @return int|null The number of lines, relative to the starting line. NULL * means "to the end". */ - public function getLineCount() + public function getLineCount(): ?int { return $this->lineCount; } - public function __toString() + public function __toString(): string { - return $this->startingLine - . ($this->lineCount !== null ? ' ' . $this->lineCount : '') - . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $startingLine = (string) $this->startingLine; + + $lineCount = $this->lineCount !== null ? ' ' . $this->lineCount : ''; + + return $startingLine + . $lineCount + . ($description !== '' + ? ' ' . $description + : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php new file mode 100644 index 0000000..158578b --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php @@ -0,0 +1,66 @@ +type; + } + + /** + * @return string[] + */ + protected static function extractTypeFromBody(string $body): array + { + $type = ''; + $nestingLevel = 0; + for ($i = 0, $iMax = strlen($body); $i < $iMax; $i++) { + $character = $body[$i]; + + if ($nestingLevel === 0 && trim($character) === '') { + break; + } + + $type .= $character; + if (in_array($character, ['<', '(', '[', '{'])) { + $nestingLevel++; + continue; + } + + if (in_array($character, ['>', ')', ']', '}'])) { + $nestingLevel--; + continue; + } + } + + $description = trim(substr($body, strlen($type))); + + return [$type, $description]; + } +} diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php index 349e773..f21c910 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -22,51 +23,42 @@ use Webmozart\Assert\Assert; /** * Reflection class for a {@}throws tag in a Docblock. */ -final class Throws extends BaseTag implements Factory\StaticMethod +final class Throws extends TagWithType implements Factory\StaticMethod { - protected $name = 'throws'; - - /** @var Type */ - private $type; - - public function __construct(Type $type, Description $description = null) + public function __construct(Type $type, ?Description $description = null) { + $this->name = 'throws'; $this->type = $type; $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { - Assert::string($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/\s+/Su', $body, 2); + [$type, $description] = self::extractTypeFromBody($body); - $type = $typeResolver->resolve(isset($parts[0]) ? $parts[0] : '', $context); - $description = $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context); + $type = $typeResolver->resolve($type, $context); + $description = $descriptionFactory->create($description, $context); return new static($type, $description); } - /** - * Returns the type section of the variable. - * - * @return Type - */ - public function getType() + public function __toString(): string { - return $this->type; - } + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } - public function __toString() - { - return $this->type . ' ' . $this->description; + $type = (string) $this->type; + + return $type . ($description !== '' ? ($type !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php index 00dc3e3..b72f403 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php @@ -1,13 +1,14 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; @@ -17,67 +18,83 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Fqsen; use phpDocumentor\Reflection\FqsenResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_key_exists; +use function explode; + /** * Reflection class for a {@}uses tag in a Docblock. */ final class Uses extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'uses'; /** @var Fqsen */ - protected $refers = null; + protected $refers; /** * Initializes this tag. - * - * @param Fqsen $refers - * @param Description $description */ - public function __construct(Fqsen $refers, Description $description = null) + public function __construct(Fqsen $refers, ?Description $description = null) { $this->refers = $refers; $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - FqsenResolver $resolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { - Assert::string($body); - Assert::allNotNull([$resolver, $descriptionFactory]); + string $body, + ?FqsenResolver $resolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { + Assert::notNull($resolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/\s+/Su', $body, 2); + $parts = Utils::pregSplit('/\s+/Su', $body, 2); return new static( - $resolver->resolve($parts[0], $context), - $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context) + self::resolveFqsen($parts[0], $resolver, $context), + $descriptionFactory->create($parts[1] ?? '', $context) ); } + private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen + { + Assert::notNull($fqsenResolver); + $fqsenParts = explode('::', $parts); + $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); + + if (!array_key_exists(1, $fqsenParts)) { + return $resolved; + } + + return new Fqsen($resolved . '::' . $fqsenParts[1]); + } + /** * Returns the structural element this tag refers to. - * - * @return Fqsen */ - public function getReference() + public function getReference(): Fqsen { return $this->refers; } /** * Returns a string representation of this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->refers . ' ' . $this->description->render(); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $refers = (string) $this->refers; + + return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php index e23c694..fa1f9db 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -17,66 +18,69 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\TypeResolver; use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\Utils; use Webmozart\Assert\Assert; +use function array_shift; +use function array_unshift; +use function implode; +use function strpos; +use function substr; + +use const PREG_SPLIT_DELIM_CAPTURE; + /** * Reflection class for a {@}var tag in a Docblock. */ -class Var_ extends BaseTag implements Factory\StaticMethod +final class Var_ extends TagWithType implements Factory\StaticMethod { - /** @var string */ - protected $name = 'var'; - - /** @var Type */ - private $type; - - /** @var string */ + /** @var string|null */ protected $variableName = ''; - /** - * @param string $variableName - * @param Type $type - * @param Description $description - */ - public function __construct($variableName, Type $type = null, Description $description = null) + public function __construct(?string $variableName, ?Type $type = null, ?Description $description = null) { Assert::string($variableName); + $this->name = 'var'; $this->variableName = $variableName; $this->type = $type; $this->description = $description; } - /** - * {@inheritdoc} - */ public static function create( - $body, - TypeResolver $typeResolver = null, - DescriptionFactory $descriptionFactory = null, - TypeContext $context = null - ) { + string $body, + ?TypeResolver $typeResolver = null, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): self { Assert::stringNotEmpty($body); - Assert::allNotNull([$typeResolver, $descriptionFactory]); + Assert::notNull($typeResolver); + Assert::notNull($descriptionFactory); - $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE); + [$firstPart, $body] = self::extractTypeFromBody($body); + + $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); $type = null; $variableName = ''; // if the first item that is encountered is not a variable; it is a type - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) { - $type = $typeResolver->resolve(array_shift($parts), $context); - array_shift($parts); + if ($firstPart && $firstPart[0] !== '$') { + $type = $typeResolver->resolve($firstPart, $context); + } else { + // first part is not a type; we should prepend it to the parts array for further processing + array_unshift($parts, $firstPart); } - // if the next item starts with a $ or ...$ it must be the variable name - if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + // if the next item starts with a $ it must be the variable name + if (isset($parts[0]) && strpos($parts[0], '$') === 0) { $variableName = array_shift($parts); - array_shift($parts); - - if (substr($variableName, 0, 1) === '$') { - $variableName = substr($variableName, 1); + if ($type) { + array_shift($parts); } + + Assert::notNull($variableName); + + $variableName = substr($variableName, 1); } $description = $descriptionFactory->create(implode('', $parts), $context); @@ -86,33 +90,33 @@ class Var_ extends BaseTag implements Factory\StaticMethod /** * Returns the variable's name. - * - * @return string */ - public function getVariableName() + public function getVariableName(): ?string { return $this->variableName; } - /** - * Returns the variable's type or null if unknown. - * - * @return Type|null - */ - public function getType() - { - return $this->type; - } - /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return ($this->type ? $this->type . ' ' : '') - . '$' . $this->variableName - . ($this->description ? ' ' . $this->description : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + if ($this->variableName) { + $variableName = '$' . $this->variableName; + } else { + $variableName = ''; + } + + $type = (string) $this->type; + + return $type + . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') + . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php index 3e0e5be..f46e4b8 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php @@ -1,34 +1,38 @@ - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org + * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock\Tags; -use phpDocumentor\Reflection\Types\Context as TypeContext; use phpDocumentor\Reflection\DocBlock\Description; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\Types\Context as TypeContext; use Webmozart\Assert\Assert; +use function preg_match; + /** * Reflection class for a {@}version tag in a Docblock. */ final class Version extends BaseTag implements Factory\StaticMethod { + /** @var string */ protected $name = 'version'; /** * PCRE regular expression matching a version vector. * Assumes the "x" modifier. */ - const REGEX_VECTOR = '(?: + public const REGEX_VECTOR = '(?: # Normal release vectors. \d\S* | @@ -40,23 +44,22 @@ final class Version extends BaseTag implements Factory\StaticMethod [^\s\:]+\:\s*\$[^\$]+\$ )'; - /** @var string The version vector. */ - private $version = ''; + /** @var string|null The version vector. */ + private $version; - public function __construct($version = null, Description $description = null) + public function __construct(?string $version = null, ?Description $description = null) { Assert::nullOrStringNotEmpty($version); - $this->version = $version; + $this->version = $version; $this->description = $description; } - /** - * @return static - */ - public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) - { - Assert::nullOrString($body); + public static function create( + ?string $body, + ?DescriptionFactory $descriptionFactory = null, + ?TypeContext $context = null + ): ?self { if (empty($body)) { return new static(); } @@ -66,29 +69,38 @@ final class Version extends BaseTag implements Factory\StaticMethod return null; } + $description = null; + if ($descriptionFactory !== null) { + $description = $descriptionFactory->create($matches[2] ?? '', $context); + } + return new static( $matches[1], - $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context) + $description ); } /** * Gets the version section of the tag. - * - * @return string */ - public function getVersion() + public function getVersion(): ?string { return $this->version; } /** * Returns a string representation for this tag. - * - * @return string */ - public function __toString() + public function __toString(): string { - return $this->version . ($this->description ? ' ' . $this->description->render() : ''); + if ($this->description) { + $description = $this->description->render(); + } else { + $description = ''; + } + + $version = (string) $this->version; + + return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); } } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php index 9ec2455..37f72dd 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php @@ -1,23 +1,38 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection; +use InvalidArgumentException; +use LogicException; use phpDocumentor\Reflection\DocBlock\DescriptionFactory; use phpDocumentor\Reflection\DocBlock\StandardTagFactory; use phpDocumentor\Reflection\DocBlock\Tag; use phpDocumentor\Reflection\DocBlock\TagFactory; use Webmozart\Assert\Assert; +use function array_shift; +use function count; +use function explode; +use function is_object; +use function method_exists; +use function preg_match; +use function preg_replace; +use function str_replace; +use function strpos; +use function substr; +use function trim; + final class DocBlockFactory implements DocBlockFactoryInterface { /** @var DocBlock\DescriptionFactory */ @@ -28,27 +43,22 @@ final class DocBlockFactory implements DocBlockFactoryInterface /** * Initializes this factory with the required subcontractors. - * - * @param DescriptionFactory $descriptionFactory - * @param TagFactory $tagFactory */ public function __construct(DescriptionFactory $descriptionFactory, TagFactory $tagFactory) { $this->descriptionFactory = $descriptionFactory; - $this->tagFactory = $tagFactory; + $this->tagFactory = $tagFactory; } /** * Factory method for easy instantiation. * - * @param string[] $additionalTags - * - * @return DocBlockFactory + * @param array> $additionalTags */ - public static function createInstance(array $additionalTags = []) + public static function createInstance(array $additionalTags = []): self { - $fqsenResolver = new FqsenResolver(); - $tagFactory = new StandardTagFactory($fqsenResolver); + $fqsenResolver = new FqsenResolver(); + $tagFactory = new StandardTagFactory($fqsenResolver); $descriptionFactory = new DescriptionFactory($tagFactory); $tagFactory->addService($descriptionFactory); @@ -65,20 +75,18 @@ final class DocBlockFactory implements DocBlockFactoryInterface /** * @param object|string $docblock A string containing the DocBlock to parse or an object supporting the * getDocComment method (such as a ReflectionClass object). - * @param Types\Context $context - * @param Location $location - * - * @return DocBlock */ - public function create($docblock, Types\Context $context = null, Location $location = null) + public function create($docblock, ?Types\Context $context = null, ?Location $location = null): DocBlock { if (is_object($docblock)) { if (!method_exists($docblock, 'getDocComment')) { $exceptionMessage = 'Invalid object passed; the given object must support the getDocComment method'; - throw new \InvalidArgumentException($exceptionMessage); + + throw new InvalidArgumentException($exceptionMessage); } $docblock = $docblock->getDocComment(); + Assert::string($docblock); } Assert::stringNotEmpty($docblock); @@ -88,14 +96,13 @@ final class DocBlockFactory implements DocBlockFactoryInterface } $parts = $this->splitDocBlock($this->stripDocComment($docblock)); - list($templateMarker, $summary, $description, $tags) = $parts; + + [$templateMarker, $summary, $description, $tags] = $parts; return new DocBlock( $summary, $description ? $this->descriptionFactory->create($description, $context) : null, - array_filter($this->parseTagBlock($tags, $context), function($tag) { - return $tag instanceof Tag; - }), + $this->parseTagBlock($tags, $context), $context, $location, $templateMarker === '#@+', @@ -103,7 +110,10 @@ final class DocBlockFactory implements DocBlockFactoryInterface ); } - public function registerTagHandler($tagName, $handler) + /** + * @param class-string $handler + */ + public function registerTagHandler(string $tagName, string $handler): void { $this->tagFactory->registerTagHandler($tagName, $handler); } @@ -112,43 +122,46 @@ final class DocBlockFactory implements DocBlockFactoryInterface * Strips the asterisks from the DocBlock comment. * * @param string $comment String containing the comment text. - * - * @return string */ - private function stripDocComment($comment) + private function stripDocComment(string $comment): string { - $comment = trim(preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', '$1', $comment)); + $comment = preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]?(.*)?#u', '$1', $comment); + Assert::string($comment); + $comment = trim($comment); // reg ex above is not able to remove */ from a single line docblock - if (substr($comment, -2) == '*/') { + if (substr($comment, -2) === '*/') { $comment = trim(substr($comment, 0, -2)); } - return str_replace(array("\r\n", "\r"), "\n", $comment); + return str_replace(["\r\n", "\r"], "\n", $comment); } + // phpcs:disable /** * Splits the DocBlock into a template marker, summary, description and block of tags. * * @param string $comment Comment to split into the sub-parts. * - * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split. + * @return string[] containing the template marker (if any), summary, description and a string containing the tags. + * * @author Mike van Riel for extending the regex with template marker support. * - * @return string[] containing the template marker (if any), summary, description and a string containing the tags. + * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split. */ - private function splitDocBlock($comment) + private function splitDocBlock(string $comment) : array { + // phpcs:enable // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the // performance impact of running a regular expression if (strpos($comment, '@') === 0) { - return array('', '', '', $comment); + return ['', '', '', $comment]; } // clears all extra horizontal whitespace from the line endings to prevent parsing issues $comment = preg_replace('/\h*$/Sum', '', $comment); - + Assert::string($comment); /* * Splits the docblock into a template marker, summary, description and tags section. * @@ -176,7 +189,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface [^\n.]+ (?: (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines - [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line + [\n.]* (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line [^\n.]+ # Include anything else )* \.? @@ -214,20 +227,21 @@ final class DocBlockFactory implements DocBlockFactoryInterface /** * Creates the tag objects. * - * @param string $tags Tag block to parse. + * @param string $tags Tag block to parse. * @param Types\Context $context Context of the parsed Tag * * @return DocBlock\Tag[] */ - private function parseTagBlock($tags, Types\Context $context) + private function parseTagBlock(string $tags, Types\Context $context): array { $tags = $this->filterTagBlock($tags); - if (!$tags) { + if ($tags === null) { return []; } - $result = $this->splitTagBlockIntoTagLines($tags); - foreach ($result as $key => $tagLine) { + $result = []; + $lines = $this->splitTagBlockIntoTagLines($tags); + foreach ($lines as $key => $tagLine) { $result[$key] = $this->tagFactory->create(trim($tagLine), $context); } @@ -235,40 +249,36 @@ final class DocBlockFactory implements DocBlockFactoryInterface } /** - * @param string $tags - * * @return string[] */ - private function splitTagBlockIntoTagLines($tags) + private function splitTagBlockIntoTagLines(string $tags): array { - $result = array(); - foreach (explode("\n", $tags) as $tag_line) { - if (isset($tag_line[0]) && ($tag_line[0] === '@')) { - $result[] = $tag_line; + $result = []; + foreach (explode("\n", $tags) as $tagLine) { + if ($tagLine !== '' && strpos($tagLine, '@') === 0) { + $result[] = $tagLine; } else { - $result[count($result) - 1] .= "\n" . $tag_line; + $result[count($result) - 1] .= "\n" . $tagLine; } } return $result; } - /** - * @param $tags - * @return string - */ - private function filterTagBlock($tags) + private function filterTagBlock(string $tags): ?string { $tags = trim($tags); if (!$tags) { return null; } - if ('@' !== $tags[0]) { + if ($tags[0] !== '@') { // @codeCoverageIgnoreStart // Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that // we didn't foresee. - throw new \LogicException('A tag block started with text instead of an at-sign(@): ' . $tags); + + throw new LogicException('A tag block started with text instead of an at-sign(@): ' . $tags); + // @codeCoverageIgnoreEnd } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php index b353342..9995c0c 100644 --- a/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php +++ b/api/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php @@ -1,23 +1,23 @@ > $additionalTags */ - public static function createInstance(array $additionalTags = []); + public static function createInstance(array $additionalTags = []): DocBlockFactory; /** - * @param string $docblock - * @param Types\Context $context - * @param Location $location - * - * @return DocBlock + * @param string|object $docblock */ - public function create($docblock, Types\Context $context = null, Location $location = null); + public function create($docblock, ?Types\Context $context = null, ?Location $location = null): DocBlock; } diff --git a/api/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php b/api/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php new file mode 100644 index 0000000..b8b6da8 --- /dev/null +++ b/api/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php @@ -0,0 +1,44 @@ + - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\StandardTagFactory; -use phpDocumentor\Reflection\DocBlock\Tag; -use phpDocumentor\Reflection\DocBlock\Tags\See; - -/** - * @coversNothing - */ -class InterpretingDocBlocksTest extends \PHPUnit_Framework_TestCase -{ - public function testInterpretingASimpleDocBlock() - { - /** - * @var DocBlock $docblock - * @var string $summary - * @var Description $description - */ - include(__DIR__ . '/../../examples/01-interpreting-a-simple-docblock.php'); - - $descriptionText = <<assertInstanceOf(DocBlock::class, $docblock); - $this->assertSame('This is an example of a summary.', $summary); - $this->assertInstanceOf(Description::class, $description); - $this->assertSame($descriptionText, $description->render()); - $this->assertEmpty($docblock->getTags()); - } - - public function testInterpretingTags() - { - /** - * @var DocBlock $docblock - * @var boolean $hasSeeTag - * @var Tag[] $tags - * @var See[] $seeTags - */ - include(__DIR__ . '/../../examples/02-interpreting-tags.php'); - - $this->assertTrue($hasSeeTag); - $this->assertCount(1, $tags); - $this->assertCount(1, $seeTags); - - $this->assertInstanceOf(See::class, $tags[0]); - $this->assertInstanceOf(See::class, $seeTags[0]); - - $seeTag = $seeTags[0]; - $this->assertSame('\\' . StandardTagFactory::class, (string)$seeTag->getReference()); - $this->assertSame('', (string)$seeTag->getDescription()); - } - - public function testDescriptionsCanEscapeAtSignsAndClosingBraces() - { - /** - * @var string $docComment - * @var DocBlock $docblock - * @var Description $description - * @var string $receivedDocComment - * @var string $foundDescription - */ - - include(__DIR__ . '/../../examples/playing-with-descriptions/02-escaping.php'); - $this->assertSame(<<<'DESCRIPTION' -You can escape the @-sign by surrounding it with braces, for example: @. And escape a closing brace within an -inline tag by adding an opening brace in front of it like this: }. - -Here are example texts where you can see how they could be used in a real life situation: - - This is a text with an {@internal inline tag where a closing brace (}) is shown}. - Or an {@internal inline tag with a literal {@link} in it}. - -Do note that an {@internal inline tag that has an opening brace ({) does not break out}. -DESCRIPTION - , - $foundDescription - ) - ; - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/integration/ReconstitutingADocBlockTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/integration/ReconstitutingADocBlockTest.php deleted file mode 100644 index 92ac22e..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/integration/ReconstitutingADocBlockTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\StandardTagFactory; -use phpDocumentor\Reflection\DocBlock\Tag; -use phpDocumentor\Reflection\DocBlock\Tags\See; - -/** - * @coversNothing - */ -class ReconstitutingADocBlockTest extends \PHPUnit_Framework_TestCase -{ - public function testReconstituteADocBlock() - { - /** - * @var string $docComment - * @var string $reconstitutedDocComment - */ - include(__DIR__ . '/../../examples/03-reconstituting-a-docblock.php'); - - $this->assertSame($docComment, $reconstitutedDocComment); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/integration/UsingTagsTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/integration/UsingTagsTest.php deleted file mode 100644 index 984811b..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/integration/UsingTagsTest.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\StandardTagFactory; -use phpDocumentor\Reflection\DocBlock\Tag; -use phpDocumentor\Reflection\DocBlock\Tags\See; - -/** - * @coversNothing - */ -class UsingTagsTest extends \PHPUnit_Framework_TestCase -{ - public function testAddingYourOwnTagUsingAStaticMethodAsFactory() - { - /** - * @var object[] $customTagObjects - * @var string $docComment - * @var string $reconstitutedDocComment - */ - include(__DIR__ . '/../../examples/04-adding-your-own-tag.php'); - - $this->assertInstanceOf(\MyTag::class, $customTagObjects[0]); - $this->assertSame('my-tag', $customTagObjects[0]->getName()); - $this->assertSame('I have a description', (string)$customTagObjects[0]->getDescription()); - $this->assertSame($docComment, $reconstitutedDocComment); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionFactoryTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionFactoryTest.php deleted file mode 100644 index d3043f9..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionFactoryTest.php +++ /dev/null @@ -1,174 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Tags\Link; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @covers :: - */ -class DescriptionFactoryTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - * @dataProvider provideSimpleExampleDescriptions - */ - public function testDescriptionCanParseASimpleString($contents) - { - $tagFactory = m::mock(TagFactory::class); - $tagFactory->shouldReceive('create')->never(); - - $factory = new DescriptionFactory($tagFactory); - $description = $factory->create($contents, new Context('')); - - $this->assertSame($contents, $description->render()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - * @dataProvider provideEscapeSequences - */ - public function testEscapeSequences($contents, $expected) - { - $tagFactory = m::mock(TagFactory::class); - $tagFactory->shouldReceive('create')->never(); - - $factory = new DescriptionFactory($tagFactory); - $description = $factory->create($contents, new Context('')); - - $this->assertSame($expected, $description->render()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - * @uses phpDocumentor\Reflection\DocBlock\Tags\Link - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testDescriptionCanParseAStringWithInlineTag() - { - $contents = 'This is text for a {@link http://phpdoc.org/ description} that uses an inline tag.'; - $context = new Context(''); - $tagFactory = m::mock(TagFactory::class); - $tagFactory->shouldReceive('create') - ->once() - ->with('@link http://phpdoc.org/ description', $context) - ->andReturn(new Link('http://phpdoc.org/', new Description('description'))) - ; - - $factory = new DescriptionFactory($tagFactory); - $description = $factory->create($contents, $context); - - $this->assertSame($contents, $description->render()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - * @uses phpDocumentor\Reflection\DocBlock\Tags\Link - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testDescriptionCanParseAStringStartingWithInlineTag() - { - $contents = '{@link http://phpdoc.org/ This} is text for a description that starts with an inline tag.'; - $context = new Context(''); - $tagFactory = m::mock(TagFactory::class); - $tagFactory->shouldReceive('create') - ->once() - ->with('@link http://phpdoc.org/ This', $context) - ->andReturn(new Link('http://phpdoc.org/', new Description('This'))) - ; - - $factory = new DescriptionFactory($tagFactory); - $description = $factory->create($contents, $context); - - $this->assertSame($contents, $description->render()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testIfSuperfluousStartingSpacesAreRemoved() - { - $factory = new DescriptionFactory(m::mock(TagFactory::class)); - $descriptionText = <<create($descriptionText, new Context('')); - - $this->assertSame($expectedDescription, $description->render()); - } - - /** - * Provides a series of example strings that the parser should correctly interpret and return. - * - * @return string[][] - */ - public function provideSimpleExampleDescriptions() - { - return [ - ['This is text for a description.'], - ['This is text for a description containing { that is literal.'], - ['This is text for a description containing } that is literal.'], - ['This is text for a description with {just a text} that is not a tag.'], - ]; - } - - public function provideEscapeSequences() - { - return [ - ['This is text for a description with a {@}.', 'This is text for a description with a @.'], - ['This is text for a description with a {}.', 'This is text for a description with a }.'], - ]; - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionTest.php deleted file mode 100644 index b5917a9..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionTest.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter; -use phpDocumentor\Reflection\DocBlock\Tags\Generic; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Description - */ -class DescriptionTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::render - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic - * @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - */ - public function testDescriptionCanRenderUsingABodyWithPlaceholdersAndTags() - { - $body = 'This is a %1$s body.'; - $expected = 'This is a {@internal significant } body.'; - $tags = [new Generic('internal', new Description('significant '))]; - - $fixture = new Description($body, $tags); - - // without formatter (thus the PassthroughFormatter by default) - $this->assertSame($expected, $fixture->render()); - - // with a custom formatter - $formatter = m::mock(PassthroughFormatter::class); - $formatter->shouldReceive('format')->with($tags[0])->andReturn('@internal significant '); - $this->assertSame($expected, $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::render - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic - * @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - */ - public function testDescriptionCanBeCastToString() - { - $body = 'This is a %1$s body.'; - $expected = 'This is a {@internal significant } body.'; - $tags = [new Generic('internal', new Description('significant '))]; - - $fixture = new Description($body, $tags); - - $this->assertSame($expected, (string)$fixture); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testBodyTemplateMustBeAString() - { - new Description([]); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/SerializerTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/SerializerTest.php deleted file mode 100644 index cb2b400..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/SerializerTest.php +++ /dev/null @@ -1,201 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Serializer - * @covers :: - */ -class SerializerTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::getDocComment - * @uses phpDocumentor\Reflection\DocBlock\Description - * @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses phpDocumentor\Reflection\DocBlock - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Tags\Generic - */ - public function testReconstructsADocCommentFromADocBlock() - { - $expected = <<<'DOCCOMMENT' -/** - * This is a summary - * - * This is a description - * - * @unknown-tag Test description for the unknown tag - */ -DOCCOMMENT; - - $fixture = new Serializer(); - - $docBlock = new DocBlock( - 'This is a summary', - new Description('This is a description'), - [ - new DocBlock\Tags\Generic('unknown-tag', new Description('Test description for the unknown tag')) - ] - ); - - $this->assertSame($expected, $fixture->getDocComment($docBlock)); - } - - /** - * @covers ::__construct - * @covers ::getDocComment - * @uses phpDocumentor\Reflection\DocBlock\Description - * @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses phpDocumentor\Reflection\DocBlock - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Tags\Generic - */ - public function testAddPrefixToDocBlock() - { - $expected = <<<'DOCCOMMENT' -aa/** -aa * This is a summary -aa * -aa * This is a description -aa * -aa * @unknown-tag Test description for the unknown tag -aa */ -DOCCOMMENT; - - $fixture = new Serializer(2, 'a'); - - $docBlock = new DocBlock( - 'This is a summary', - new Description('This is a description'), - [ - new DocBlock\Tags\Generic('unknown-tag', new Description('Test description for the unknown tag')) - ] - ); - - $this->assertSame($expected, $fixture->getDocComment($docBlock)); - } - - /** - * @covers ::__construct - * @covers ::getDocComment - * @uses phpDocumentor\Reflection\DocBlock\Description - * @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses phpDocumentor\Reflection\DocBlock - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Tags\Generic - */ - public function testAddPrefixToDocBlockExceptFirstLine() - { - $expected = <<<'DOCCOMMENT' -/** -aa * This is a summary -aa * -aa * This is a description -aa * -aa * @unknown-tag Test description for the unknown tag -aa */ -DOCCOMMENT; - - $fixture = new Serializer(2, 'a', false); - - $docBlock = new DocBlock( - 'This is a summary', - new Description('This is a description'), - [ - new DocBlock\Tags\Generic('unknown-tag', new Description('Test description for the unknown tag')) - ] - ); - - $this->assertSame($expected, $fixture->getDocComment($docBlock)); - } - - /** - * @covers ::__construct - * @covers ::getDocComment - * @uses phpDocumentor\Reflection\DocBlock\Description - * @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses phpDocumentor\Reflection\DocBlock - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Tags\Generic - */ - public function testWordwrapsAroundTheGivenAmountOfCharacters() - { - $expected = <<<'DOCCOMMENT' -/** - * This is a - * summary - * - * This is a - * description - * - * @unknown-tag - * Test - * description - * for the - * unknown tag - */ -DOCCOMMENT; - - $fixture = new Serializer(0, '', true, 15); - - $docBlock = new DocBlock( - 'This is a summary', - new Description('This is a description'), - [ - new DocBlock\Tags\Generic('unknown-tag', new Description('Test description for the unknown tag')) - ] - ); - - $this->assertSame($expected, $fixture->getDocComment($docBlock)); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfIndentIsNotAnInteger() - { - new Serializer([]); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfIndentStringIsNotAString() - { - new Serializer(0, []); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfIndentFirstLineIsNotABoolean() - { - new Serializer(0, '', []); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfLineLengthIsNotNullNorAnInteger() - { - new Serializer(0, '', false, []); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/StandardTagFactoryTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/StandardTagFactoryTest.php deleted file mode 100644 index 0247da0..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/StandardTagFactoryTest.php +++ /dev/null @@ -1,361 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Tags\Author; -use phpDocumentor\Reflection\DocBlock\Tags\Formatter; -use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter; -use phpDocumentor\Reflection\DocBlock\Tags\Generic; -use phpDocumentor\Reflection\DocBlock\Tags\Return_; -use phpDocumentor\Reflection\DocBlock\Tags\See; -use phpDocumentor\Reflection\Fqsen; -use phpDocumentor\Reflection\FqsenResolver; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass phpDocumentor\Reflection\DocBlock\StandardTagFactory - * @covers :: - */ -class StandardTagFactoryTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @uses phpDocumentor\Reflection\DocBlock\Tags\Generic - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testCreatingAGenericTag() - { - $expectedTagName = 'unknown-tag'; - $expectedDescriptionText = 'This is a description'; - $expectedDescription = new Description($expectedDescriptionText); - $context = new Context(''); - - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory - ->shouldReceive('create') - ->once() - ->with($expectedDescriptionText, $context) - ->andReturn($expectedDescription) - ; - - $tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class)); - $tagFactory->addService($descriptionFactory, DescriptionFactory::class); - - /** @var Generic $tag */ - $tag = $tagFactory->create('@' . $expectedTagName . ' This is a description', $context); - - $this->assertInstanceOf(Generic::class, $tag); - $this->assertSame($expectedTagName, $tag->getName()); - $this->assertSame($expectedDescription, $tag->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @uses phpDocumentor\Reflection\DocBlock\Tags\Author - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - */ - public function testCreatingASpecificTag() - { - $context = new Context(''); - $tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class)); - - /** @var Author $tag */ - $tag = $tagFactory->create('@author Mike van Riel ', $context); - - $this->assertInstanceOf(Author::class, $tag); - $this->assertSame('author', $tag->getName()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @uses phpDocumentor\Reflection\DocBlock\Tags\See - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - */ - public function testAnEmptyContextIsCreatedIfNoneIsProvided() - { - $fqsen = '\Tag'; - $resolver = m::mock(FqsenResolver::class) - ->shouldReceive('resolve') - ->with('Tag', m::type(Context::class)) - ->andReturn(new Fqsen($fqsen)) - ->getMock() - ; - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory->shouldIgnoreMissing(); - - $tagFactory = new StandardTagFactory($resolver); - $tagFactory->addService($descriptionFactory, DescriptionFactory::class); - - /** @var See $tag */ - $tag = $tagFactory->create('@see Tag'); - - $this->assertInstanceOf(See::class, $tag); - $this->assertSame($fqsen, (string)$tag->getReference()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @uses phpDocumentor\Reflection\DocBlock\Tags\Author - * @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag - */ - public function testPassingYourOwnSetOfTagHandlers() - { - $context = new Context(''); - $tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class), ['user' => Author::class]); - - /** @var Author $tag */ - $tag = $tagFactory->create('@user Mike van Riel ', $context); - - $this->assertInstanceOf(Author::class, $tag); - $this->assertSame('author', $tag->getName()); - } - - /** - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The tag "@user/myuser" does not seem to be wellformed, please check it for errors - */ - public function testExceptionIsThrownIfProvidedTagIsNotWellformed() - { - $this->markTestIncomplete( - 'For some reason this test fails; once I have access to a RegEx analyzer I will have to test the regex' - ) - ; - $tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class)); - $tagFactory->create('@user[myuser'); - } - - /** - * @covers ::__construct - * @covers ::addParameter - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - */ - public function testAddParameterToServiceLocator() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - $tagFactory->addParameter('myParam', 'myValue'); - - $this->assertAttributeSame( - [FqsenResolver::class => $resolver, 'myParam' => 'myValue'], - 'serviceLocator', - $tagFactory - ) - ; - } - - /** - * @covers ::addService - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - */ - public function testAddServiceToServiceLocator() - { - $service = new PassthroughFormatter(); - - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - $tagFactory->addService($service); - - $this->assertAttributeSame( - [FqsenResolver::class => $resolver, PassthroughFormatter::class => $service], - 'serviceLocator', - $tagFactory - ) - ; - } - - /** - * @covers ::addService - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - */ - public function testInjectConcreteServiceForInterfaceToServiceLocator() - { - $interfaceName = Formatter::class; - $service = new PassthroughFormatter(); - - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - $tagFactory->addService($service, $interfaceName); - - $this->assertAttributeSame( - [FqsenResolver::class => $resolver, $interfaceName => $service], - 'serviceLocator', - $tagFactory - ) - ; - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::create - * @uses phpDocumentor\Reflection\DocBlock\Tags\Author - */ - public function testRegisteringAHandlerForANewTag() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('my-tag', Author::class); - - // Assert by trying to create one - $tag = $tagFactory->create('@my-tag Mike van Riel '); - $this->assertInstanceOf(Author::class, $tag); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedTagNameIsNotAString() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler([], Author::class); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedTagNameIsEmpty() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('', Author::class); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('Name\Spaced\Tag', Author::class); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAString() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('my-tag', []); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('my-tag', ''); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('my-tag', 'IDoNotExist'); - } - - /** - * @covers ::registerTagHandler - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @expectedException \InvalidArgumentException - */ - public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface() - { - $resolver = m::mock(FqsenResolver::class); - $tagFactory = new StandardTagFactory($resolver); - - $tagFactory->registerTagHandler('my-tag', 'stdClass'); - } - - /** - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct - * @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService - * @uses phpDocumentor\Reflection\Docblock\Description - * @uses phpDocumentor\Reflection\Docblock\Tags\Return_ - * @uses phpDocumentor\Reflection\Docblock\Tags\BaseTag - */ - public function testReturntagIsMappedCorrectly() - { - $context = new Context(''); - - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory - ->shouldReceive('create') - ->once() - ->with('', $context) - ->andReturn(new Description('')) - ; - - $typeResolver = new TypeResolver(); - - $tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class)); - $tagFactory->addService($descriptionFactory, DescriptionFactory::class); - $tagFactory->addService($typeResolver, TypeResolver::class); - - - /** @var Return_ $tag */ - $tag = $tagFactory->create('@return mixed', $context); - - $this->assertInstanceOf(Return_::class, $tag); - $this->assertSame('return', $tag->getName()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/AuthorTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/AuthorTest.php deleted file mode 100644 index a54954f..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/AuthorTest.php +++ /dev/null @@ -1,148 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Author - * @covers :: - */ -class AuthorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Author('Mike van Riel', 'mike@phpdoc.org'); - - $this->assertSame('author', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Author('Mike van Riel', 'mike@phpdoc.org'); - - $this->assertSame('@author Mike van Riel', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Author('Mike van Riel', 'mike@phpdoc.org'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getAuthorName - */ - public function testHasTheAuthorName() - { - $expected = 'Mike van Riel'; - - $fixture = new Author($expected, 'mike@phpdoc.org'); - - $this->assertSame($expected, $fixture->getAuthorName()); - } - - /** - * @covers ::__construct - * @covers ::getAuthorName - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfAuthorNameIsNotAString() - { - new Author([], 'mike@phpdoc.org'); - } - - /** - * @covers ::__construct - * @covers ::getEmail - */ - public function testHasTheAuthorMailAddress() - { - $expected = 'mike@phpdoc.org'; - - $fixture = new Author('Mike van Riel', $expected); - - $this->assertSame($expected, $fixture->getEmail()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfEmailIsNotAString() - { - new Author('Mike van Riel', []); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testInitializationFailsIfEmailIsNotValid() - { - new Author('Mike van Riel', 'mike'); - } - - /** - * @covers ::__construct - * @covers ::__toString - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Author('Mike van Riel', 'mike@phpdoc.org'); - - $this->assertSame('Mike van Riel', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Author:: - */ - public function testFactoryMethod() - { - $fixture = Author::create('Mike van Riel '); - - $this->assertSame('Mike van Riel', (string)$fixture); - $this->assertSame('Mike van Riel', $fixture->getAuthorName()); - $this->assertSame('mike@phpdoc.org', $fixture->getEmail()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Author:: - */ - public function testFactoryMethodReturnsNullIfItCouldNotReadBody() - { - $this->assertNull(Author::create('dfgr<')); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/CoversTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/CoversTest.php deleted file mode 100644 index a2b5e4b..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/CoversTest.php +++ /dev/null @@ -1,155 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Fqsen; -use phpDocumentor\Reflection\FqsenResolver; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Covers - * @covers :: - */ -class CoversTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Covers(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('covers', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Covers(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('@covers \DateTime Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Covers(new Fqsen('\DateTime'), new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getReference - */ - public function testHasReferenceToFqsen() - { - $expected = new Fqsen('\DateTime'); - - $fixture = new Covers($expected); - - $this->assertSame($expected, $fixture->getReference()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Covers(new Fqsen('\DateTime'), $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Covers(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('\DateTime Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\FqsenResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Fqsen - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = m::mock(FqsenResolver::class); - $context = new Context(''); - - $fqsen = new Fqsen('\DateTime'); - $description = new Description('My Description'); - - $descriptionFactory - ->shouldReceive('create')->with('My Description', $context)->andReturn($description); - $resolver->shouldReceive('resolve')->with('DateTime', $context)->andReturn($fqsen); - - $fixture = Covers::create('DateTime My Description', $descriptionFactory, $resolver, $context); - - $this->assertSame('\DateTime My Description', (string)$fixture); - $this->assertSame($fqsen, $fixture->getReference()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - $this->assertNull(Covers::create([])); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotEmpty() - { - $this->assertNull(Covers::create('')); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/DeprecatedTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/DeprecatedTest.php deleted file mode 100644 index 8be9ad7..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/DeprecatedTest.php +++ /dev/null @@ -1,166 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Deprecated - * @covers :: - */ -class DeprecatedTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Deprecated('1.0', new Description('Description')); - - $this->assertSame('deprecated', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Deprecated('1.0', new Description('Description')); - - $this->assertSame('@deprecated 1.0 Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Deprecated('1.0', new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVersion - */ - public function testHasVersionNumber() - { - $expected = '1.0'; - - $fixture = new Deprecated($expected); - - $this->assertSame($expected, $fixture->getVersion()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Deprecated('1.0', $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Deprecated('1.0', new Description('Description')); - - $this->assertSame('1.0 Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $version = '1.0'; - $description = new Description('My Description'); - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Deprecated::create('1.0 My Description', $descriptionFactory, $context); - - $this->assertSame('1.0 My Description', (string)$fixture); - $this->assertSame($version, $fixture->getVersion()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethodCreatesEmptyDeprecatedTag() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory->shouldReceive('create')->never(); - - $fixture = Deprecated::create('', $descriptionFactory, new Context('')); - - $this->assertSame('', (string)$fixture); - $this->assertSame(null, $fixture->getVersion()); - $this->assertSame(null, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfVersionIsNotString() - { - $this->assertNull(Deprecated::create([])); - } - - /** - * @covers ::create - */ - public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex() - { - $this->assertEquals(new Deprecated(), Deprecated::create('dkhf<')); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/Formatter/PassthroughFormatterTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/Formatter/PassthroughFormatterTest.php deleted file mode 100644 index 045a197..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/Formatter/PassthroughFormatterTest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\Tags\Generic; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - */ -class PassthroughFormatterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::format - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic - */ - public function testFormatterCallsToStringAndReturnsAStandardRepresentation() - { - $expected = '@unknown-tag This is a description'; - - $fixture = new PassthroughFormatter(); - - $this->assertSame( - $expected, - $fixture->format(new Generic('unknown-tag', new Description('This is a description'))) - ); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/GenericTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/GenericTest.php deleted file mode 100644 index 02fa530..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/GenericTest.php +++ /dev/null @@ -1,146 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @generic http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Generic - * @covers :: - */ -class GenericTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Generic('generic', new Description('Description')); - - $this->assertSame('generic', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Generic('generic', new Description('Description')); - - $this->assertSame('@generic Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Generic('generic', new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Generic('generic', $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Generic('generic', new Description('Description')); - - $this->assertSame('Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $generics = 'generic'; - $description = new Description('My Description'); - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Generic::create('My Description', 'generic', $descriptionFactory, $context); - - $this->assertSame('My Description', (string)$fixture); - $this->assertSame($generics, $fixture->getName()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfNameIsNotString() - { - Generic::create('', []); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfNameIsNotEmpty() - { - Generic::create('', ''); - } - - /** - * @covers ::create - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfNameContainsIllegalCharacters() - { - Generic::create('', 'name/myname'); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/LinkTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/LinkTest.php deleted file mode 100644 index 9940aec..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/LinkTest.php +++ /dev/null @@ -1,158 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Link - * @covers :: - */ -class LinkTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Link('http://this.is.my/link', new Description('Description')); - - $this->assertSame('link', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Link('http://this.is.my/link', new Description('Description')); - - $this->assertSame('@link http://this.is.my/link Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Link('http://this.is.my/link', new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getLink - */ - public function testHasLinkUrl() - { - $expected = 'http://this.is.my/link'; - - $fixture = new Link($expected); - - $this->assertSame($expected, $fixture->getLink()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Link('http://this.is.my/link', $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Link('http://this.is.my/link', new Description('Description')); - - $this->assertSame('http://this.is.my/link Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Link:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $links = 'http://this.is.my/link'; - $description = new Description('My Description'); - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Link::create('http://this.is.my/link My Description', $descriptionFactory, $context); - - $this->assertSame('http://this.is.my/link My Description', (string)$fixture); - $this->assertSame($links, $fixture->getLink()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Link:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethodCreatesEmptyLinkTag() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory->shouldReceive('create')->never(); - - $fixture = Link::create('', $descriptionFactory, new Context('')); - - $this->assertSame('', (string)$fixture); - $this->assertSame('', $fixture->getLink()); - $this->assertSame(null, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfVersionIsNotString() - { - $this->assertNull(Link::create([])); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/MethodTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/MethodTest.php deleted file mode 100644 index 5d6e981..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/MethodTest.php +++ /dev/null @@ -1,437 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Array_; -use phpDocumentor\Reflection\Types\Compound; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\Integer; -use phpDocumentor\Reflection\Types\Object_; -use phpDocumentor\Reflection\Types\String_; -use phpDocumentor\Reflection\Types\Void_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Method - * @covers :: - */ -class MethodTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Method('myMethod'); - - $this->assertSame('method', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::isStatic - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $arguments = [ - ['name' => 'argument1', 'type' => new String_()], - ['name' => 'argument2', 'type' => new Object_()] - ]; - $fixture = new Method('myMethod', $arguments, new Void_(), true, new Description('My Description')); - - $this->assertSame( - '@method static void myMethod(string $argument1, object $argument2) My Description', - $fixture->render() - ); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Method('myMethod'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getMethodName - */ - public function testHasMethodName() - { - $expected = 'myMethod'; - - $fixture = new Method($expected); - - $this->assertSame($expected, $fixture->getMethodName()); - } - - /** - * @covers ::__construct - * @covers ::getArguments - */ - public function testHasArguments() - { - $arguments = [ - [ 'name' => 'argument1', 'type' => new String_() ] - ]; - - $fixture = new Method('myMethod', $arguments); - - $this->assertSame($arguments, $fixture->getArguments()); - } - - /** - * @covers ::__construct - * @covers ::getArguments - */ - public function testArgumentsMayBePassedAsString() - { - $arguments = ['argument1']; - $expected = [ - [ 'name' => $arguments[0], 'type' => new Void_() ] - ]; - - $fixture = new Method('myMethod', $arguments); - - $this->assertEquals($expected, $fixture->getArguments()); - } - - /** - * @covers ::__construct - * @covers ::getArguments - */ - public function testArgumentTypeCanBeInferredAsVoid() - { - $arguments = [ [ 'name' => 'argument1' ] ]; - $expected = [ - [ 'name' => $arguments[0]['name'], 'type' => new Void_() ] - ]; - - $fixture = new Method('myMethod', $arguments); - - $this->assertEquals($expected, $fixture->getArguments()); - } - - /** - * @covers ::create - */ - public function testRestArgumentIsParsedAsRegularArg() - { - $expected = [ - [ 'name' => 'arg1', 'type' => new Void_() ], - [ 'name' => 'rest', 'type' => new Void_() ], - [ 'name' => 'rest2', 'type' => new Array_() ], - ]; - - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = new TypeResolver(); - $context = new Context(''); - $description = new Description(''); - $descriptionFactory->shouldReceive('create')->with('', $context)->andReturn($description); - - $fixture = Method::create( - 'void myMethod($arg1, ...$rest, array ... $rest2)', - $resolver, - $descriptionFactory, - $context - ); - - $this->assertEquals($expected, $fixture->getArguments()); - } - - /** - * @covers ::__construct - * @covers ::getReturnType - */ - public function testHasReturnType() - { - $expected = new String_(); - - $fixture = new Method('myMethod', [], $expected); - - $this->assertSame($expected, $fixture->getReturnType()); - } - - /** - * @covers ::__construct - * @covers ::getReturnType - */ - public function testReturnTypeCanBeInferredAsVoid() - { - $fixture = new Method('myMethod', []); - - $this->assertEquals(new Void_(), $fixture->getReturnType()); - } - - /** - * @covers ::__construct - * @covers ::isStatic - */ - public function testMethodCanBeStatic() - { - $expected = false; - $fixture = new Method('myMethod', [], null, $expected); - $this->assertSame($expected, $fixture->isStatic()); - - $expected = true; - $fixture = new Method('myMethod', [], null, $expected); - $this->assertSame($expected, $fixture->isStatic()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Method('myMethod', [], null, false, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::isStatic - */ - public function testStringRepresentationIsReturned() - { - $arguments = [ - ['name' => 'argument1', 'type' => new String_()], - ['name' => 'argument2', 'type' => new Object_()] - ]; - $fixture = new Method('myMethod', $arguments, new Void_(), true, new Description('My Description')); - - $this->assertSame( - 'static void myMethod(string $argument1, object $argument2) My Description', - (string)$fixture - ); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Fqsen - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = new TypeResolver(); - $context = new Context(''); - - $description = new Description('My Description'); - $expectedArguments = [ - [ 'name' => 'argument1', 'type' => new String_() ], - [ 'name' => 'argument2', 'type' => new Void_() ] - ]; - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Method::create( - 'static void myMethod(string $argument1, $argument2) My Description', - $resolver, - $descriptionFactory, - $context - ); - - $this->assertSame('static void myMethod(string $argument1, void $argument2) My Description', (string)$fixture); - $this->assertSame('myMethod', $fixture->getMethodName()); - $this->assertEquals($expectedArguments, $fixture->getArguments()); - $this->assertInstanceOf(Void_::class, $fixture->getReturnType()); - $this->assertSame($description, $fixture->getDescription()); - } - - public function collectionReturnTypesProvider() - { - return [ - ['int[]', Array_::class, Integer::class, Compound::class], - ['int[][]', Array_::class, Array_::class, Compound::class], - ['Object[]', Array_::class, Object_::class, Compound::class], - ['array[]', Array_::class, Array_::class, Compound::class], - ]; - } - - /** - * @dataProvider collectionReturnTypesProvider - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method:: - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\Types\Array_ - * @uses \phpDocumentor\Reflection\Types\Compound - * @uses \phpDocumentor\Reflection\Types\Integer - * @uses \phpDocumentor\Reflection\Types\Object_ - * @param string $returnType - * @param string $expectedType - * @param string $expectedValueType - * @param string null $expectedKeyType - */ - public function testCollectionReturnTypes( - $returnType, - $expectedType, - $expectedValueType = null, - $expectedKeyType = null - ) { $resolver = new TypeResolver(); - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory->shouldReceive('create')->with('', null)->andReturn(new Description('')); - - $fixture = Method::create("$returnType myMethod(\$arg)", $resolver, $descriptionFactory); - $returnType = $fixture->getReturnType(); - $this->assertInstanceOf($expectedType, $returnType); - - if ($returnType instanceof Array_) { - $this->assertInstanceOf($expectedValueType, $returnType->getValueType()); - $this->assertInstanceOf($expectedKeyType, $returnType->getKeyType()); - } - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - Method::create([]); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsEmpty() - { - Method::create(''); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodReturnsNullIfBodyIsIncorrect() - { - $this->assertNull(Method::create('body(')); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Method::create('body'); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Method::create('body', new TypeResolver()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testCreationFailsIfBodyIsNotString() - { - new Method([]); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testCreationFailsIfBodyIsEmpty() - { - new Method(''); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testCreationFailsIfStaticIsNotBoolean() - { - new Method('body', [], null, []); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testCreationFailsIfArgumentRecordContainsInvalidEntry() - { - new Method('body', [ [ 'name' => 'myName', 'unknown' => 'nah' ] ]); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Method:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Fqsen - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testCreateMethodParenthesisMissing() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = new TypeResolver(); - $context = new Context(''); - - $description = new Description('My Description'); - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Method::create( - 'static void myMethod My Description', - $resolver, - $descriptionFactory, - $context - ); - - $this->assertSame('static void myMethod() My Description', (string)$fixture); - $this->assertSame('myMethod', $fixture->getMethodName()); - $this->assertEquals([], $fixture->getArguments()); - $this->assertInstanceOf(Void_::class, $fixture->getReturnType()); - $this->assertSame($description, $fixture->getDescription()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ParamTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ParamTest.php deleted file mode 100644 index 0c718ab..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ParamTest.php +++ /dev/null @@ -1,228 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Param - * @covers :: - */ -class ParamTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Param('myParameter', null, false, new Description('Description')); - - $this->assertSame('param', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::isVariadic - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Param('myParameter', new String_(), true, new Description('Description')); - $this->assertSame('@param string ...$myParameter Description', $fixture->render()); - - $fixture = new Param('myParameter', new String_(), false, new Description('Description')); - $this->assertSame('@param string $myParameter Description', $fixture->render()); - - $fixture = new Param('myParameter', null, false, new Description('Description')); - $this->assertSame('@param $myParameter Description', $fixture->render()); - - $fixture = new Param('myParameter'); - $this->assertSame('@param $myParameter', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Param('myParameter'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVariableName - */ - public function testHasVariableName() - { - $expected = 'myParameter'; - - $fixture = new Param($expected); - - $this->assertSame($expected, $fixture->getVariableName()); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new Param('myParameter', $expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers ::isVariadic - */ - public function testIfParameterIsVariadic() - { - $fixture = new Param('myParameter', new String_(), false); - $this->assertFalse($fixture->isVariadic()); - - $fixture = new Param('myParameter', new String_(), true); - $this->assertTrue($fixture->isVariadic()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Param('1.0', null, false, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::isVariadic - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Param('myParameter', new String_(), true, new Description('Description')); - - $this->assertSame('string ...$myParameter Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $typeResolver = new TypeResolver(); - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Param::create('string ...$myParameter My Description', $typeResolver, $descriptionFactory, $context); - - $this->assertSame('string ...$myParameter My Description', (string)$fixture); - $this->assertSame('myParameter', $fixture->getVariableName()); - $this->assertInstanceOf(String_::class, $fixture->getType()); - $this->assertTrue($fixture->isVariadic()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Param:: - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfEmptyBodyIsGiven() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - Param::create('', new TypeResolver(), $descriptionFactory); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - Param::create([]); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Param::create('body'); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\TypeResolver - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Param::create('body', new TypeResolver()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfVariableNameIsNotString() - { - new Param([]); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfVariadicIsNotBoolean() - { - new Param('', null, []); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyReadTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyReadTest.php deleted file mode 100644 index c3fb770..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyReadTest.php +++ /dev/null @@ -1,201 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead - * @covers :: - */ -class PropertyReadTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new PropertyRead('myProperty', null, new Description('Description')); - - $this->assertSame('property-read', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new PropertyRead('myProperty', new String_(), new Description('Description')); - $this->assertSame('@property-read string $myProperty Description', $fixture->render()); - - $fixture = new PropertyRead('myProperty', null, new Description('Description')); - $this->assertSame('@property-read $myProperty Description', $fixture->render()); - - $fixture = new PropertyRead('myProperty'); - $this->assertSame('@property-read $myProperty', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new PropertyRead('myProperty'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVariableName - */ - public function testHasVariableName() - { - $expected = 'myProperty'; - - $fixture = new PropertyRead($expected); - - $this->assertSame($expected, $fixture->getVariableName()); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new PropertyRead('myProperty', $expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new PropertyRead('1.0', null, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - */ - public function testStringRepresentationIsReturned() - { - $fixture = new PropertyRead('myProperty', new String_(), new Description('Description')); - - $this->assertSame('string $myProperty Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $typeResolver = new TypeResolver(); - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = PropertyRead::create('string $myProperty My Description', $typeResolver, $descriptionFactory, - $context); - - $this->assertSame('string $myProperty My Description', (string)$fixture); - $this->assertSame('myProperty', $fixture->getVariableName()); - $this->assertInstanceOf(String_::class, $fixture->getType()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead:: - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfEmptyBodyIsGiven() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - PropertyRead::create('', new TypeResolver(), $descriptionFactory); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - PropertyRead::create([]); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - PropertyRead::create('body'); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\TypeResolver - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - PropertyRead::create('body', new TypeResolver()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfVariableNameIsNotString() - { - new PropertyRead([]); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyTest.php deleted file mode 100644 index 908dfb2..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyTest.php +++ /dev/null @@ -1,200 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Property - * @covers :: - */ -class PropertyTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Property('myProperty', null, new Description('Description')); - - $this->assertSame('property', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Property('myProperty', new String_(), new Description('Description')); - $this->assertSame('@property string $myProperty Description', $fixture->render()); - - $fixture = new Property('myProperty', null, new Description('Description')); - $this->assertSame('@property $myProperty Description', $fixture->render()); - - $fixture = new Property('myProperty'); - $this->assertSame('@property $myProperty', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Property('myProperty'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVariableName - */ - public function testHasVariableName() - { - $expected = 'myProperty'; - - $fixture = new Property($expected); - - $this->assertSame($expected, $fixture->getVariableName()); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new Property('myProperty', $expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Property('1.0', null, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Property('myProperty', new String_(), new Description('Description')); - - $this->assertSame('string $myProperty Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Property:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $typeResolver = new TypeResolver(); - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Property::create('string $myProperty My Description', $typeResolver, $descriptionFactory, $context); - - $this->assertSame('string $myProperty My Description', (string)$fixture); - $this->assertSame('myProperty', $fixture->getVariableName()); - $this->assertInstanceOf(String_::class, $fixture->getType()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Property:: - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfEmptyBodyIsGiven() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - Property::create('', new TypeResolver(), $descriptionFactory); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - Property::create([]); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Property::create('body'); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\TypeResolver - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Property::create('body', new TypeResolver()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfVariableNameIsNotString() - { - new Property([]); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyWriteTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyWriteTest.php deleted file mode 100644 index 5ea6524..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyWriteTest.php +++ /dev/null @@ -1,201 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite - * @covers :: - */ -class PropertyWriteTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new PropertyWrite('myProperty', null, new Description('Description')); - - $this->assertSame('property-write', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new PropertyWrite('myProperty', new String_(), new Description('Description')); - $this->assertSame('@property-write string $myProperty Description', $fixture->render()); - - $fixture = new PropertyWrite('myProperty', null, new Description('Description')); - $this->assertSame('@property-write $myProperty Description', $fixture->render()); - - $fixture = new PropertyWrite('myProperty'); - $this->assertSame('@property-write $myProperty', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new PropertyWrite('myProperty'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVariableName - */ - public function testHasVariableName() - { - $expected = 'myProperty'; - - $fixture = new PropertyWrite($expected); - - $this->assertSame($expected, $fixture->getVariableName()); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new PropertyWrite('myProperty', $expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new PropertyWrite('1.0', null, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - */ - public function testStringRepresentationIsReturned() - { - $fixture = new PropertyWrite('myProperty', new String_(), new Description('Description')); - - $this->assertSame('string $myProperty Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $typeResolver = new TypeResolver(); - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = PropertyWrite::create('string $myProperty My Description', $typeResolver, $descriptionFactory, - $context); - - $this->assertSame('string $myProperty My Description', (string)$fixture); - $this->assertSame('myProperty', $fixture->getVariableName()); - $this->assertInstanceOf(String_::class, $fixture->getType()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite:: - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfEmptyBodyIsGiven() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - PropertyWrite::create('', new TypeResolver(), $descriptionFactory); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - PropertyWrite::create([]); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - PropertyWrite::create('body'); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\TypeResolver - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - PropertyWrite::create('body', new TypeResolver()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfVariableNameIsNotString() - { - new PropertyWrite([]); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ReturnTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ReturnTest.php deleted file mode 100644 index 2bc5439..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ReturnTest.php +++ /dev/null @@ -1,170 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Return_ - * @covers :: - */ -class ReturnTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Return_(new String_(), new Description('Description')); - - $this->assertSame('return', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Return_(new String_(), new Description('Description')); - - $this->assertSame('@return string Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Return_(new String_(), new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new Return_($expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Return_(new String_(), $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Return_(new String_(), new Description('Description')); - - $this->assertSame('string Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = new TypeResolver(); - $context = new Context(''); - - $type = new String_(); - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Return_::create('string My Description', $resolver, $descriptionFactory, $context); - - $this->assertSame('string My Description', (string)$fixture); - $this->assertEquals($type, $fixture->getType()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - $this->assertNull(Return_::create([])); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotEmpty() - { - $this->assertNull(Return_::create('')); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Return_::create('body'); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Return_::create('body', new TypeResolver()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SeeTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SeeTest.php deleted file mode 100644 index 8d3e3e8..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SeeTest.php +++ /dev/null @@ -1,173 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Fqsen; -use phpDocumentor\Reflection\FqsenResolver; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\See - * @covers :: - */ -class SeeTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\See::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new See(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('see', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\See::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\See::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new See(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('@see \DateTime Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\See::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new See(new Fqsen('\DateTime'), new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getReference - */ - public function testHasReferenceToFqsen() - { - $expected = new Fqsen('\DateTime'); - - $fixture = new See($expected); - - $this->assertSame($expected, $fixture->getReference()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new See(new Fqsen('\DateTime'), $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new See(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('\DateTime Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\See:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\FqsenResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Fqsen - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = m::mock(FqsenResolver::class); - $context = new Context(''); - - $fqsen = new Fqsen('\DateTime'); - $description = new Description('My Description'); - - $descriptionFactory - ->shouldReceive('create')->with('My Description', $context)->andReturn($description); - $resolver->shouldReceive('resolve')->with('DateTime', $context)->andReturn($fqsen); - - $fixture = See::create('DateTime My Description', $resolver, $descriptionFactory, $context); - - $this->assertSame('\DateTime My Description', (string)$fixture); - $this->assertSame($fqsen, $fixture->getReference()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - $this->assertNull(See::create([])); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotEmpty() - { - $this->assertNull(See::create('')); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - See::create('body'); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - See::create('body', new FqsenResolver()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SinceTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SinceTest.php deleted file mode 100644 index 3f42db5..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SinceTest.php +++ /dev/null @@ -1,166 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Since - * @covers :: - */ -class SinceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Since('1.0', new Description('Description')); - - $this->assertSame('since', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Since('1.0', new Description('Description')); - - $this->assertSame('@since 1.0 Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Since('1.0', new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVersion - */ - public function testHasVersionNumber() - { - $expected = '1.0'; - - $fixture = new Since($expected); - - $this->assertSame($expected, $fixture->getVersion()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Since('1.0', $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Since('1.0', new Description('Description')); - - $this->assertSame('1.0 Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Since:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $version = '1.0'; - $description = new Description('My Description'); - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Since::create('1.0 My Description', $descriptionFactory, $context); - - $this->assertSame('1.0 My Description', (string)$fixture); - $this->assertSame($version, $fixture->getVersion()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Since:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethodCreatesEmptySinceTag() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory->shouldReceive('create')->never(); - - $fixture = Since::create('', $descriptionFactory, new Context('')); - - $this->assertSame('', (string)$fixture); - $this->assertSame(null, $fixture->getVersion()); - $this->assertSame(null, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfSinceIsNotString() - { - $this->assertNull(Since::create([])); - } - - /** - * @covers ::create - */ - public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex() - { - $this->assertNull(Since::create('dkhf<')); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SourceTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SourceTest.php deleted file mode 100644 index cbf01f6..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SourceTest.php +++ /dev/null @@ -1,199 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Source - * @covers :: - */ -class SourceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Source(1, null, new Description('Description')); - - $this->assertSame('source', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Source(1, 10, new Description('Description')); - $this->assertSame('@source 1 10 Description', $fixture->render()); - - $fixture = new Source(1, null, new Description('Description')); - $this->assertSame('@source 1 Description', $fixture->render()); - - $fixture = new Source(1); - $this->assertSame('@source 1', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Source(1); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getStartingLine - */ - public function testHasStartingLine() - { - $expected = 1; - - $fixture = new Source($expected); - - $this->assertSame($expected, $fixture->getStartingLine()); - } - - /** - * @covers ::__construct - * @covers ::getLineCount - */ - public function testHasLineCount() - { - $expected = 2; - - $fixture = new Source(1, $expected); - - $this->assertSame($expected, $fixture->getLineCount()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Source('1', null, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Source(1, 10, new Description('Description')); - - $this->assertSame('1 10 Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Source:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Source::create('1 10 My Description', $descriptionFactory, $context); - - $this->assertSame('1 10 My Description', (string)$fixture); - $this->assertSame(1, $fixture->getStartingLine()); - $this->assertSame(10, $fixture->getLineCount()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Source:: - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfEmptyBodyIsGiven() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - Source::create('', $descriptionFactory); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - Source::create([]); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\TypeResolver - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Source::create('1'); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfStartingLineIsNotInteger() - { - new Source('blabla'); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfLineCountIsNotIntegerOrNull() - { - new Source('1', []); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ThrowsTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ThrowsTest.php deleted file mode 100644 index 657d6ca..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ThrowsTest.php +++ /dev/null @@ -1,170 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Throws - * @covers :: - */ -class ThrowsTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Throws(new String_(), new Description('Description')); - - $this->assertSame('throws', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Throws(new String_(), new Description('Description')); - - $this->assertSame('@throws string Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Throws(new String_(), new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new Throws($expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Throws(new String_(), $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Throws(new String_(), new Description('Description')); - - $this->assertSame('string Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = new TypeResolver(); - $context = new Context(''); - - $type = new String_(); - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Throws::create('string My Description', $resolver, $descriptionFactory, $context); - - $this->assertSame('string My Description', (string)$fixture); - $this->assertEquals($type, $fixture->getType()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - $this->assertNull(Throws::create([])); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotEmpty() - { - $this->assertNull(Throws::create('')); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Throws::create('body'); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Throws::create('body', new TypeResolver()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/UsesTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/UsesTest.php deleted file mode 100644 index 419f7e3..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/UsesTest.php +++ /dev/null @@ -1,174 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Fqsen; -use phpDocumentor\Reflection\FqsenResolver; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Uses - * @covers :: - */ -class UsesTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Uses(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('uses', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Uses(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('@uses \DateTime Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Uses(new Fqsen('\DateTime'), new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getReference - */ - public function testHasReferenceToFqsen() - { - $expected = new Fqsen('\DateTime'); - - $fixture = new Uses($expected); - - $this->assertSame($expected, $fixture->getReference()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Uses(new Fqsen('\DateTime'), $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Uses(new Fqsen('\DateTime'), new Description('Description')); - - $this->assertSame('\DateTime Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\FqsenResolver - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Fqsen - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $resolver = m::mock(FqsenResolver::class); - $context = new Context(''); - - $fqsen = new Fqsen('\DateTime'); - $description = new Description('My Description'); - - $descriptionFactory - ->shouldReceive('create')->with('My Description', $context)->andReturn($description) - ; - $resolver->shouldReceive('resolve')->with('DateTime', $context)->andReturn($fqsen); - - $fixture = Uses::create('DateTime My Description', $resolver, $descriptionFactory, $context); - - $this->assertSame('\DateTime My Description', (string)$fixture); - $this->assertSame($fqsen, $fixture->getReference()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - $this->assertNull(Uses::create([])); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotEmpty() - { - $this->assertNull(Uses::create('')); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Uses::create('body'); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Uses::create('body', new FqsenResolver()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VarTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VarTest.php deleted file mode 100644 index 34f290a..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VarTest.php +++ /dev/null @@ -1,200 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\TypeResolver; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\String_; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Var_ - * @covers :: - */ -class VarTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Var_('myVariable', null, new Description('Description')); - - $this->assertSame('var', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Var_('myVariable', new String_(), new Description('Description')); - $this->assertSame('@var string $myVariable Description', $fixture->render()); - - $fixture = new Var_('myVariable', null, new Description('Description')); - $this->assertSame('@var $myVariable Description', $fixture->render()); - - $fixture = new Var_('myVariable'); - $this->assertSame('@var $myVariable', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Var_('myVariable'); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVariableName - */ - public function testHasVariableName() - { - $expected = 'myVariable'; - - $fixture = new Var_($expected); - - $this->assertSame($expected, $fixture->getVariableName()); - } - - /** - * @covers ::__construct - * @covers ::getType - */ - public function testHasType() - { - $expected = new String_(); - - $fixture = new Var_('myVariable', $expected); - - $this->assertSame($expected, $fixture->getType()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Var_('1.0', null, $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\String_ - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Var_('myVariable', new String_(), new Description('Description')); - - $this->assertSame('string $myVariable Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $typeResolver = new TypeResolver(); - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $description = new Description('My Description'); - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Var_::create('string $myVariable My Description', $typeResolver, $descriptionFactory, $context); - - $this->assertSame('string $myVariable My Description', (string)$fixture); - $this->assertSame('myVariable', $fixture->getVariableName()); - $this->assertInstanceOf(String_::class, $fixture->getType()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_:: - * @uses \phpDocumentor\Reflection\TypeResolver - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfEmptyBodyIsGiven() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - Var_::create('', new TypeResolver(), $descriptionFactory); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfBodyIsNotString() - { - Var_::create([]); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfResolverIsNull() - { - Var_::create('body'); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\TypeResolver - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfDescriptionFactoryIsNull() - { - Var_::create('body', new TypeResolver()); - } - - /** - * @covers ::__construct - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfVariableNameIsNotString() - { - new Var_([]); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VersionTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VersionTest.php deleted file mode 100644 index 5c487fd..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VersionTest.php +++ /dev/null @@ -1,166 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tags; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\Tags\Version - * @covers :: - */ -class VersionTest extends \PHPUnit_Framework_TestCase -{ - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfCorrectTagNameIsReturned() - { - $fixture = new Version('1.0', new Description('Description')); - - $this->assertSame('version', $fixture->getName()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName - */ - public function testIfTagCanBeRenderedUsingDefaultFormatter() - { - $fixture = new Version('1.0', new Description('Description')); - - $this->assertSame('@version 1.0 Description', $fixture->render()); - } - - /** - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render - */ - public function testIfTagCanBeRenderedUsingSpecificFormatter() - { - $fixture = new Version('1.0', new Description('Description')); - - $formatter = m::mock(Formatter::class); - $formatter->shouldReceive('format')->with($fixture)->andReturn('Rendered output'); - - $this->assertSame('Rendered output', $fixture->render($formatter)); - } - - /** - * @covers ::__construct - * @covers ::getVersion - */ - public function testHasVersionNumber() - { - $expected = '1.0'; - - $fixture = new Version($expected); - - $this->assertSame($expected, $fixture->getVersion()); - } - - /** - * @covers ::__construct - * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testHasDescription() - { - $expected = new Description('Description'); - - $fixture = new Version('1.0', $expected); - - $this->assertSame($expected, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::__toString - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testStringRepresentationIsReturned() - { - $fixture = new Version('1.0', new Description('Description')); - - $this->assertSame('1.0 Description', (string)$fixture); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Version:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethod() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $context = new Context(''); - - $version = '1.0'; - $description = new Description('My Description'); - - $descriptionFactory->shouldReceive('create')->with('My Description', $context)->andReturn($description); - - $fixture = Version::create('1.0 My Description', $descriptionFactory, $context); - - $this->assertSame('1.0 My Description', (string)$fixture); - $this->assertSame($version, $fixture->getVersion()); - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::create - * @uses \phpDocumentor\Reflection\DocBlock\Tags\Version:: - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testFactoryMethodCreatesEmptyVersionTag() - { - $descriptionFactory = m::mock(DescriptionFactory::class); - $descriptionFactory->shouldReceive('create')->never(); - - $fixture = Version::create('', $descriptionFactory, new Context('')); - - $this->assertSame('', (string)$fixture); - $this->assertSame(null, $fixture->getVersion()); - $this->assertSame(null, $fixture->getDescription()); - } - - /** - * @covers ::create - * @expectedException \InvalidArgumentException - */ - public function testFactoryMethodFailsIfVersionIsNotString() - { - $this->assertNull(Version::create([])); - } - - /** - * @covers ::create - */ - public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex() - { - $this->assertNull(Version::create('dkhf<')); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockFactoryTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockFactoryTest.php deleted file mode 100644 index f1261b6..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockFactoryTest.php +++ /dev/null @@ -1,290 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Description; -use phpDocumentor\Reflection\DocBlock\DescriptionFactory; -use phpDocumentor\Reflection\DocBlock\Tag; -use phpDocumentor\Reflection\DocBlock\TagFactory; -use phpDocumentor\Reflection\DocBlock\Tags\Param; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass phpDocumentor\Reflection\DocBlockFactory - * @covers :: - * @uses \Webmozart\Assert\Assert - * @uses phpDocumentor\Reflection\DocBlock - */ -class DocBlockFactoryTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::createInstance - * @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory - * @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory - */ - public function testCreateFactoryUsingFactoryMethod() - { - $fixture = DocBlockFactory::createInstance(); - - $this->assertInstanceOf(DocBlockFactory::class, $fixture); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testCreateDocBlockFromReflection() - { - $fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class)); - - $docBlock = '/** This is a DocBlock */'; - $classReflector = m::mock(\ReflectionClass::class); - $classReflector->shouldReceive('getDocComment')->andReturn($docBlock); - $docblock = $fixture->create($classReflector); - - $this->assertInstanceOf(DocBlock::class, $docblock); - $this->assertSame('This is a DocBlock', $docblock->getSummary()); - $this->assertEquals(new Description(''), $docblock->getDescription()); - $this->assertSame([], $docblock->getTags()); - $this->assertEquals(new Context(''), $docblock->getContext()); - $this->assertNull($docblock->getLocation()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testCreateDocBlockFromStringWithDocComment() - { - $fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class)); - - $docblock = $fixture->create('/** This is a DocBlock */'); - - $this->assertInstanceOf(DocBlock::class, $docblock); - $this->assertSame('This is a DocBlock', $docblock->getSummary()); - $this->assertEquals(new Description(''), $docblock->getDescription()); - $this->assertSame([], $docblock->getTags()); - $this->assertEquals(new Context(''), $docblock->getContext()); - $this->assertNull($docblock->getLocation()); - } - - /** - * @covers ::create - * @covers ::__construct - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testCreateDocBlockFromStringWithoutDocComment() - { - $fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class)); - - $docblock = $fixture->create('This is a DocBlock'); - - $this->assertInstanceOf(DocBlock::class, $docblock); - $this->assertSame('This is a DocBlock', $docblock->getSummary()); - $this->assertEquals(new Description(''), $docblock->getDescription()); - $this->assertSame([], $docblock->getTags()); - $this->assertEquals(new Context(''), $docblock->getContext()); - $this->assertNull($docblock->getLocation()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses phpDocumentor\Reflection\DocBlock\Description - * @dataProvider provideSummaryAndDescriptions - */ - public function testSummaryAndDescriptionAreSeparated($given, $summary, $description) - { - $tagFactory = m::mock(TagFactory::class); - $fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory); - - $docblock = $fixture->create($given); - - $this->assertSame($summary, $docblock->getSummary()); - $this->assertEquals(new Description($description), $docblock->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testDescriptionsRetainFormatting() - { - $tagFactory = m::mock(TagFactory::class); - $fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory); - - $given = <<create($given); - - $this->assertEquals(new Description($description), $docblock->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::create - * @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testTagsAreInterpretedUsingFactory() - { - $tagString = << This is with - multiline description. -TAG; - - $tag = m::mock(Tag::class); - $tagFactory = m::mock(TagFactory::class); - $tagFactory->shouldReceive('create')->with($tagString, m::type(Context::class))->andReturn($tag); - - $fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory); - - $given = << This is with - * multiline description. - */ -DOCBLOCK; - - $docblock = $fixture->create($given, new Context('')); - - $this->assertEquals([$tag], $docblock->getTags()); - } - - public function provideSummaryAndDescriptions() - { - return [ - ['This is a DocBlock', 'This is a DocBlock', ''], - [ - 'This is a DocBlock. This should still be summary.', - 'This is a DocBlock. This should still be summary.', - '' - ], - [ - <<shouldReceive('create')->with(m::any(), $context)->andReturn(new Param('param')); - $docblock = $fixture->create('/** @param MyType $param */', $context); - } - - /** - * @covers ::__construct - * @covers ::create - * - * @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory - * @uses phpDocumentor\Reflection\DocBlock\Description - */ - public function testTagsAreFilteredForNullValues() - { - $tagString = << This is with - multiline description. -TAG; - - $tagFactory = m::mock(TagFactory::class); - $tagFactory->shouldReceive('create')->with($tagString, m::any())->andReturn(null); - - $fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory); - - $given = << This is with - * multiline description. - */ -DOCBLOCK; - - $docblock = $fixture->create($given, new Context('')); - - $this->assertEquals([], $docblock->getTags()); - } -} diff --git a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockTest.php b/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockTest.php deleted file mode 100644 index 4a8d4de..0000000 --- a/api/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockTest.php +++ /dev/null @@ -1,252 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use Mockery as m; -use phpDocumentor\Reflection\Types\Context; - -/** - * @coversDefaultClass phpDocumentor\Reflection\DocBlock - * @covers :: - * @uses \Webmozart\Assert\Assert - */ -class DocBlockTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::getSummary - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testDocBlockCanHaveASummary() - { - $summary = 'This is a summary'; - - $fixture = new DocBlock($summary); - - $this->assertSame($summary, $fixture->getSummary()); - } - - /** - * @covers ::__construct - * - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfSummaryIsNotAString() - { - new DocBlock([]); - } - - /** - * @covers ::__construct - * - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfTemplateStartIsNotABoolean() - { - new DocBlock('', null, [], null, null, ['is not boolean']); - } - - /** - * @covers ::__construct - * - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfTemplateEndIsNotABoolean() - { - new DocBlock('', null, [], null, null, false, ['is not boolean']); - } - - /** - * @covers ::__construct - * @covers ::getDescription - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testDocBlockCanHaveADescription() - { - $description = new DocBlock\Description(''); - - $fixture = new DocBlock('', $description); - - $this->assertSame($description, $fixture->getDescription()); - } - - /** - * @covers ::__construct - * @covers ::getTags - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tag - */ - public function testDocBlockCanHaveTags() - { - $tags = [ - m::mock(DocBlock\Tag::class) - ]; - - $fixture = new DocBlock('', null, $tags); - - $this->assertSame($tags, $fixture->getTags()); - } - - /** - * @covers ::__construct - * @covers ::getTags - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tag - * - * @expectedException \InvalidArgumentException - */ - public function testDocBlockAllowsOnlyTags() - { - $tags = [ - null - ]; - - $fixture = new DocBlock('', null, $tags); - } - - /** - * @covers ::__construct - * @covers ::getTagsByName - * - * @uses \phpDocumentor\Reflection\DocBlock::getTags - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tag - */ - public function testFindTagsInDocBlockByName() - { - $tag1 = m::mock(DocBlock\Tag::class); - $tag2 = m::mock(DocBlock\Tag::class); - $tag3 = m::mock(DocBlock\Tag::class); - $tags = [$tag1, $tag2, $tag3]; - - $tag1->shouldReceive('getName')->andReturn('abc'); - $tag2->shouldReceive('getName')->andReturn('abcd'); - $tag3->shouldReceive('getName')->andReturn('ab'); - - $fixture = new DocBlock('', null, $tags); - - $this->assertSame([$tag2], $fixture->getTagsByName('abcd')); - $this->assertSame([], $fixture->getTagsByName('Ebcd')); - } - - /** - * @covers ::__construct - * @covers ::getTagsByName - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfNameForTagsIsNotString() - { - $fixture = new DocBlock(); - $fixture->getTagsByName([]); - } - - /** - * @covers ::__construct - * @covers ::hasTag - * - * @uses \phpDocumentor\Reflection\DocBlock::getTags - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\DocBlock\Tag - */ - public function testCheckIfThereAreTagsWithAGivenName() - { - $tag1 = m::mock(DocBlock\Tag::class); - $tag2 = m::mock(DocBlock\Tag::class); - $tag3 = m::mock(DocBlock\Tag::class); - $tags = [$tag1, $tag2, $tag3]; - - $tag1->shouldReceive('getName')->twice()->andReturn('abc'); - $tag2->shouldReceive('getName')->twice()->andReturn('abcd'); - $tag3->shouldReceive('getName')->once(); - - $fixture = new DocBlock('', null, $tags); - - $this->assertTrue($fixture->hasTag('abcd')); - $this->assertFalse($fixture->hasTag('Ebcd')); - } - - /** - * @covers ::__construct - * @covers ::hasTag - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfNameForCheckingTagsIsNotString() - { - $fixture = new DocBlock(); - $fixture->hasTag([]); - } - - /** - * @covers ::__construct - * @covers ::getContext - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Types\Context - */ - public function testDocBlockKnowsInWhichNamespaceItIsAndWhichAliasesThereAre() - { - $context = new Context(''); - - $fixture = new DocBlock('', null, [], $context); - - $this->assertSame($context, $fixture->getContext()); - } - - /** - * @covers ::__construct - * @covers ::getLocation - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - * @uses \phpDocumentor\Reflection\Location - */ - public function testDocBlockKnowsAtWhichLineItIs() - { - $location = new Location(10); - - $fixture = new DocBlock('', null, [], null, $location); - - $this->assertSame($location, $fixture->getLocation()); - } - - /** - * @covers ::__construct - * @covers ::isTemplateStart - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testDocBlockKnowsIfItIsTheStartOfADocBlockTemplate() - { - $fixture = new DocBlock('', null, [], null, null, true); - - $this->assertTrue($fixture->isTemplateStart()); - } - - /** - * @covers ::__construct - * @covers ::isTemplateEnd - * - * @uses \phpDocumentor\Reflection\DocBlock\Description - */ - public function testDocBlockKnowsIfItIsTheEndOfADocBlockTemplate() - { - $fixture = new DocBlock('', null, [], null, null, false, true); - - $this->assertTrue($fixture->isTemplateEnd()); - } -} diff --git a/api/vendor/phpdocumentor/type-resolver/.gitignore b/api/vendor/phpdocumentor/type-resolver/.gitignore deleted file mode 100644 index 82cfc4e..0000000 --- a/api/vendor/phpdocumentor/type-resolver/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.idea -composer.lock -vendor diff --git a/api/vendor/phpdocumentor/type-resolver/.scrutinizer.yml b/api/vendor/phpdocumentor/type-resolver/.scrutinizer.yml deleted file mode 100644 index 7d7372a..0000000 --- a/api/vendor/phpdocumentor/type-resolver/.scrutinizer.yml +++ /dev/null @@ -1,31 +0,0 @@ -before_commands: - - "composer install --no-dev --prefer-source" - -tools: - external_code_coverage: true - php_code_sniffer: - config: - standard: PSR2 - filter: - paths: ["src/*", "tests/*"] - php_cpd: - enabled: true - excluded_dirs: ["tests", "vendor"] - php_loc: - enabled: true - excluded_dirs: ["tests", "vendor"] - php_mess_detector: - enabled: true - config: - ruleset: phpmd.xml.dist - design_rules: { eval_expression: false } - filter: - paths: ["src/*"] - php_pdepend: - enabled: true - excluded_dirs: ["tests", "vendor"] - php_analyzer: - enabled: true - filter: - paths: ["src/*", "tests/*"] - sensiolabs_security_checker: true diff --git a/api/vendor/phpdocumentor/type-resolver/.travis.yml b/api/vendor/phpdocumentor/type-resolver/.travis.yml deleted file mode 100644 index c882b14..0000000 --- a/api/vendor/phpdocumentor/type-resolver/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: php -php: - - 5.5 - - 5.6 - - 7.0 - - hhvm - - nightly - -matrix: - allow_failures: - - php: - - hhvm - - nightly - -cache: - directories: - - $HOME/.composer/cache - -script: - - vendor/bin/phpunit --coverage-clover=coverage.clover -v - - composer update --no-interaction --prefer-source - - vendor/bin/phpunit -v - -before_script: - - composer install --no-interaction - -after_script: - - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi - -notifications: - irc: "irc.freenode.org#phpdocumentor" - email: - - me@mikevanriel.com - - ashnazg@php.net diff --git a/api/vendor/phpdocumentor/type-resolver/.yamllint.yaml b/api/vendor/phpdocumentor/type-resolver/.yamllint.yaml new file mode 100644 index 0000000..55695cd --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/.yamllint.yaml @@ -0,0 +1,65 @@ +extends: "default" + +ignore: | + .build/ + .notes/ + vendor/ +rules: + braces: + max-spaces-inside-empty: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + min-spaces-inside: 1 + brackets: + max-spaces-inside-empty: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 0 + min-spaces-inside: 0 + colons: + max-spaces-after: 1 + max-spaces-before: 0 + commas: + max-spaces-after: 1 + max-spaces-before: 0 + min-spaces-after: 1 + comments: + ignore-shebangs: true + min-spaces-from-content: 1 + require-starting-space: true + comments-indentation: "enable" + document-end: + present: false + document-start: + present: false + indentation: + check-multi-line-strings: false + indent-sequences: true + spaces: 2 + empty-lines: + max-end: 0 + max-start: 0 + max: 1 + empty-values: + forbid-in-block-mappings: true + forbid-in-flow-mappings: true + hyphens: + max-spaces-after: 2 + key-duplicates: "enable" + key-ordering: "disable" + line-length: "disable" + new-line-at-end-of-file: "enable" + new-lines: + type: "unix" + octal-values: + forbid-implicit-octal: true + quoted-strings: + quote-type: "double" + trailing-spaces: "enable" + truthy: + allowed-values: + - "false" + - "true" + +yaml-files: + - "*.yaml" + - "*.yml" diff --git a/api/vendor/phpdocumentor/type-resolver/README.md b/api/vendor/phpdocumentor/type-resolver/README.md index ca8147b..f30d3a2 100644 --- a/api/vendor/phpdocumentor/type-resolver/README.md +++ b/api/vendor/phpdocumentor/type-resolver/README.md @@ -1,3 +1,11 @@ +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +![](https://github.com/phpdocumentor/typeresolver/workflows/Qa%20workflow/badge.svg?branch=1.x) +[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/TypeResolver.svg)](https://coveralls.io/github/phpDocumentor/TypeResolver?branch=1.x) +[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/TypeResolver.svg)](https://scrutinizer-ci.com/g/phpDocumentor/TypeResolver/?branch=1.x) +[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/TypeResolver.svg)](https://scrutinizer-ci.com/g/phpDocumentor/TypeResolver/?branch=1.x) +![Packagist Version](https://img.shields.io/packagist/v/phpdocumentor/type-resolver?label=Packagist%20stable) +![Packagist Version](https://img.shields.io/packagist/vpre/phpdocumentor/type-resolver?label=Packagist%20unstable) + TypeResolver and FqsenResolver ============================== @@ -22,8 +30,7 @@ The easiest way to install this library is with [Composer](https://getcomposer.o ## Examples -Ready to dive in and don't want to read through all that text below? Just consult the [examples](examples) folder and -check which type of action that your want to accomplish. +Ready to dive in and don't want to read through all that text below? Just consult the [examples](examples) folder and check which type of action that your want to accomplish. ## On Types and Element Names @@ -39,6 +46,7 @@ The TypeResolver can resolve: - a php primitive or pseudo-primitive such as a string or void (`@var string` or `@return void`). - a composite such as an array of string (`@var string[]`). - a compound such as a string or integer (`@var string|integer`). +- an array expression (`@var (string|TypeResolver)[]`) - an object or interface such as the TypeResolver class (`@var TypeResolver` or `@var \phpDocumentor\Reflection\TypeResolver`) @@ -58,44 +66,45 @@ Where the FqsenResolver can resolve: ## Resolving a type -In order to resolve a type you will have to instantiate the class `\phpDocumentor\Reflection\TypeResolver` -and call its `resolve` method like this: +In order to resolve a type you will have to instantiate the class `\phpDocumentor\Reflection\TypeResolver` and call its `resolve` method like this: - $typeResolver = new \phpDocumentor\Reflection\TypeResolver(); - $type = $typeResolver->resolve('string|integer'); +```php +$typeResolver = new \phpDocumentor\Reflection\TypeResolver(); +$type = $typeResolver->resolve('string|integer'); +``` In this example you will receive a Value Object of class `\phpDocumentor\Reflection\Types\Compound` that has two elements, one of type `\phpDocumentor\Reflection\Types\String_` and one of type `\phpDocumentor\Reflection\Types\Integer`. -The real power of this resolver is in its capability to expand partial class names into fully qualified class names; but -in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver -in which namespace the given expression occurs and which namespace aliases (or imports) apply. +The real power of this resolver is in its capability to expand partial class names into fully qualified class names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. + +### Resolving nullable types + +Php 7.1 introduced nullable types e.g. `?string`. Type resolver will resolve the original type without the nullable notation `?` +just like it would do without the `?`. After that the type is wrapped in a `\phpDocumentor\Reflection\Types\Nullable` object. +The `Nullable` type has a method to fetch the actual type. ## Resolving an FQSEN -A Fully Qualified Structural Element Name is a reference to another element in your code bases and can be resolved using -the `\phpDocumentor\Reflection\FqsenResolver` class' `resolve` method, like this: +A Fully Qualified Structural Element Name is a reference to another element in your code bases and can be resolved using the `\phpDocumentor\Reflection\FqsenResolver` class' `resolve` method, like this: - $fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); - $fqsen = $fqsenResolver->resolve('\phpDocumentor\Reflection\FqsenResolver::resolve()'); +```php +$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); +$fqsen = $fqsenResolver->resolve('\phpDocumentor\Reflection\FqsenResolver::resolve()'); +``` -In this example we resolve a Fully Qualified Structural Element Name (meaning that it includes the full namespace, class -name and element name) and receive a Value Object of type `\phpDocumentor\Reflection\Fqsen`. +In this example we resolve a Fully Qualified Structural Element Name (meaning that it includes the full namespace, class name and element name) and receive a Value Object of type `\phpDocumentor\Reflection\Fqsen`. -The real power of this resolver is in its capability to expand partial element names into Fully Qualified Structural -Element Names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will -inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. +The real power of this resolver is in its capability to expand partial element names into Fully Qualified Structural Element Names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. ## Resolving partial Classes and Structural Element Names -Perhaps the best feature of this library is that it knows how to resolve partial class names into fully qualified class -names. +Perhaps the best feature of this library is that it knows how to resolve partial class names into fully qualified class names. For example, you have this file: ```php - '\phpDocumentor\Reflection\Types'] - ); +```php +$context = new \phpDocumentor\Reflection\Types\Context( + '\My\Example', + [ 'Types' => '\phpDocumentor\Reflection\Types'] +); +``` -Or by using the `\phpDocumentor\Reflection\Types\ContextFactory` to instantiate a new context based on a Reflector -object or by providing the namespace that you'd like to extract and the source code of the file in which the given -type expression occurs. +Or by using the `\phpDocumentor\Reflection\Types\ContextFactory` to instantiate a new context based on a Reflector object or by providing the namespace that you'd like to extract and the source code of the file in which the given type expression occurs. - $contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); - $context = $contextFactory->createFromReflector(new ReflectionMethod('\My\Example\Classy', '__construct')); +```php +$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); +$context = $contextFactory->createFromReflector(new ReflectionMethod('\My\Example\Classy', '__construct')); +``` or - $contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); - $context = $contextFactory->createForNamespace('\My\Example', file_get_contents('My/Example/Classy.php')); +```php +$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); +$context = $contextFactory->createForNamespace('\My\Example', file_get_contents('My/Example/Classy.php')); +``` ### Using the Context -After you have obtained a Context it is just a matter of passing it along with the `resolve` method of either Resolver -class as second argument and the Resolvers will take this into account when resolving partial names. +After you have obtained a Context it is just a matter of passing it along with the `resolve` method of either Resolver class as second argument and the Resolvers will take this into account when resolving partial names. To obtain the resolved class name for the `@var` tag in the example above you can do: - $typeResolver = new \phpDocumentor\Reflection\TypeResolver(); - $type = $typeResolver->resolve('Types\Context', $context); +```php +$typeResolver = new \phpDocumentor\Reflection\TypeResolver(); +$type = $typeResolver->resolve('Types\Context', $context); +``` -When you do this you will receive an object of class `\phpDocumentor\Reflection\Types\Object_` for which you can call -the `getFqsen` method to receive a Value Object that represents the complete FQSEN. So that would be -`phpDocumentor\Reflection\Types\Context`. +When you do this you will receive an object of class `\phpDocumentor\Reflection\Types\Object_` for which you can call the `getFqsen` method to receive a Value Object that represents the complete FQSEN. So that would be `phpDocumentor\Reflection\Types\Context`. > Why is the FQSEN wrapped in another object `Object_`? > -> The resolve method of the TypeResolver only returns object with the interface `Type` and the FQSEN is a common -> type that does not represent a Type. Also: in some cases a type can represent an "Untyped Object", meaning that it -> is an object (signified by the `object` keyword) but does not refer to a specific element using an FQSEN. +> The resolve method of the TypeResolver only returns object with the interface `Type` and the FQSEN is a common type that does not represent a Type. Also: in some cases a type can represent an "Untyped Object", meaning that it is an object (signified by the `object` keyword) but does not refer to a specific element using an FQSEN. -Another example is on how to resolve the FQSEN of a method as can be seen with the `@see` tag in the example above. To -resolve that you can do the following: +Another example is on how to resolve the FQSEN of a method as can be seen with the `@see` tag in the example above. To resolve that you can do the following: - $fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); - $type = $fqsenResolver->resolve('Classy::otherFunction()', $context); +```php +$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); +$type = $fqsenResolver->resolve('Classy::otherFunction()', $context); +``` -Because Classy is a Class in the current namespace its FQSEN will have the `My\Example` namespace and by calling the -`resolve` method of the FQSEN Resolver you will receive an `Fqsen` object that refers to -`\My\Example\Classy::otherFunction()`. +Because Classy is a Class in the current namespace its FQSEN will have the `My\Example` namespace and by calling the `resolve` method of the FQSEN Resolver you will receive an `Fqsen` object that refers to `\My\Example\Classy::otherFunction()`. diff --git a/api/vendor/phpdocumentor/type-resolver/composer-require-checker.json b/api/vendor/phpdocumentor/type-resolver/composer-require-checker.json new file mode 100644 index 0000000..137522d --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/composer-require-checker.json @@ -0,0 +1,16 @@ +{ + "symbol-whitelist" : [ + "null", "true", "false", + "static", "self", "parent", + "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", "XSLTProcessor", + "T_NAME_QUALIFIED", "T_NAME_FULLY_QUALIFIED" + ], + "php-core-extensions" : [ + "Core", + "pcre", + "Reflection", + "tokenizer", + "SPL", + "standard" + ] +} diff --git a/api/vendor/phpdocumentor/type-resolver/composer.json b/api/vendor/phpdocumentor/type-resolver/composer.json index abaa965..a7ae10f 100644 --- a/api/vendor/phpdocumentor/type-resolver/composer.json +++ b/api/vendor/phpdocumentor/type-resolver/composer.json @@ -1,27 +1,48 @@ { - "name": "phpdocumentor/type-resolver", - "type": "library", + "name": "phpdocumentor/type-resolver", + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "type": "library", "license": "MIT", "authors": [ - {"name": "Mike van Riel", "email": "me@mikevanriel.com"} + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } ], "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" - }, - "autoload": { - "psr-4": {"phpDocumentor\\Reflection\\": ["src/"]} - }, - "autoload-dev": { - "psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]} + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^5.2||^4.8.24", - "mockery/mockery": "^0.9.4" + "ext-tokenizer": "*", + "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.1", + "vimeo/psalm": "^4.25", + "rector/rector": "^0.13.9" + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "phpDocumentor\\Reflection\\": ["tests/unit", "tests/benchmark"] + } }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" + } + }, + "config": { + "platform": { + "php": "7.4.0" + }, + "allow-plugins": { + "phpstan/extension-installer": true } } } diff --git a/api/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php b/api/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php deleted file mode 100644 index 682b1d3..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php +++ /dev/null @@ -1,13 +0,0 @@ -resolve('string|integer')); - -// Will return the string "string|int" -var_dump((string)$typeResolver->resolve('string|integer')); diff --git a/api/vendor/phpdocumentor/type-resolver/examples/02-resolving-classes.php b/api/vendor/phpdocumentor/type-resolver/examples/02-resolving-classes.php deleted file mode 100644 index 70aa5e4..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/02-resolving-classes.php +++ /dev/null @@ -1,12 +0,0 @@ - 'Mockery' ]); -var_dump((string)$typeResolver->resolve('Types\Resolver|m\MockInterface', $context)); diff --git a/api/vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php b/api/vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php deleted file mode 100644 index 4f4282e..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php +++ /dev/null @@ -1,17 +0,0 @@ -resolve('Types\Resolver::resolveFqsen()', $context)); - -// Property named: \phpDocumentor\Types\Types\Resolver::$keyWords -var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context)); diff --git a/api/vendor/phpdocumentor/type-resolver/examples/04-discovering-the-context-using-class-reflection.php b/api/vendor/phpdocumentor/type-resolver/examples/04-discovering-the-context-using-class-reflection.php deleted file mode 100644 index 957c97d..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/04-discovering-the-context-using-class-reflection.php +++ /dev/null @@ -1,30 +0,0 @@ -createFromReflector(new ReflectionClass('My\\Example\\Classy')); - -// Class named: \phpDocumentor\Reflection\Types\Resolver -var_dump((string)$typeResolver->resolve('Types\Resolver', $context)); - -// String -var_dump((string)$typeResolver->resolve('string', $context)); - -// Property named: \phpDocumentor\Reflection\Types\Resolver::$keyWords -var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context)); - -// Class named: \My\Example\string -// - Shows the difference between the FqsenResolver and TypeResolver; the FqsenResolver will assume -// that the given value is not a type but most definitely a reference to another element. This is -// because conflicts between type keywords and class names can exist and if you know a reference -// is not a type but an element you can force that keywords are resolved. -var_dump((string)$fqsenResolver->resolve('string', $context)); diff --git a/api/vendor/phpdocumentor/type-resolver/examples/05-discovering-the-context-using-method-reflection.php b/api/vendor/phpdocumentor/type-resolver/examples/05-discovering-the-context-using-method-reflection.php deleted file mode 100644 index 10c0c88..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/05-discovering-the-context-using-method-reflection.php +++ /dev/null @@ -1,30 +0,0 @@ -createFromReflector(new ReflectionMethod('My\\Example\\Classy', '__construct')); - -// Class named: \phpDocumentor\Reflection\Types\Resolver -var_dump((string)$typeResolver->resolve('Types\Resolver', $context)); - -// String -var_dump((string)$typeResolver->resolve('string', $context)); - -// Property named: \phpDocumentor\Reflection\Types\Resolver::$keyWords -var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context)); - -// Class named: \My\Example\string -// - Shows the difference between the FqsenResolver and TypeResolver; the FqsenResolver will assume -// that the given value is not a type but most definitely a reference to another element. This is -// because conflicts between type keywords and class names can exist and if you know a reference -// is not a type but an element you can force that keywords are resolved. -var_dump((string)$fqsenResolver->resolve('string', $context)); diff --git a/api/vendor/phpdocumentor/type-resolver/examples/06-discovering-the-context-using-file-contents.php b/api/vendor/phpdocumentor/type-resolver/examples/06-discovering-the-context-using-file-contents.php deleted file mode 100644 index a93728c..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/06-discovering-the-context-using-file-contents.php +++ /dev/null @@ -1,22 +0,0 @@ -createForNamespace('My\Example', file_get_contents('Classy.php')); - -// Class named: \phpDocumentor\Reflection\Types\Resolver -var_dump((string)$typeResolver->resolve('Types\Resolver', $context)); - -// String -var_dump((string)$typeResolver->resolve('string', $context)); - -// Property named: \phpDocumentor\Reflection\Types\Resolver::$keyWords -var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context)); diff --git a/api/vendor/phpdocumentor/type-resolver/examples/Classy.php b/api/vendor/phpdocumentor/type-resolver/examples/Classy.php deleted file mode 100644 index 0705266..0000000 --- a/api/vendor/phpdocumentor/type-resolver/examples/Classy.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - 40 - - - diff --git a/api/vendor/phpdocumentor/type-resolver/phpunit.xml.dist b/api/vendor/phpdocumentor/type-resolver/phpunit.xml.dist deleted file mode 100644 index 3246bef..0000000 --- a/api/vendor/phpdocumentor/type-resolver/phpunit.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/unit - - - - - ./src/ - - - ./examples/ - ./vendor/ - - - - - - diff --git a/api/vendor/phpdocumentor/type-resolver/rector.php b/api/vendor/phpdocumentor/type-resolver/rector.php new file mode 100644 index 0000000..b285d6c --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/rector.php @@ -0,0 +1,26 @@ +paths([ + __DIR__ . '/src', + __DIR__ . '/tests/unit' + ]); + + // register a single rule + $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + $rectorConfig->rule(Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class); + $rectorConfig->rule(Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector::class); + $rectorConfig->rule(Rector\PHPUnit\Rector\Class_\AddProphecyTraitRector::class); + $rectorConfig->importNames(); + + // define sets of rules + $rectorConfig->sets([ + LevelSetList::UP_TO_PHP_74 + ]); +}; diff --git a/api/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php b/api/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php index a0e0041..068fa20 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php +++ b/api/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php @@ -1,25 +1,36 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection; +use InvalidArgumentException; use phpDocumentor\Reflection\Types\Context; +use function explode; +use function implode; +use function strpos; + +/** + * Resolver for Fqsen using Context information + * + * @psalm-immutable + */ class FqsenResolver { /** @var string Definition of the NAMESPACE operator in PHP */ - const OPERATOR_NAMESPACE = '\\'; + private const OPERATOR_NAMESPACE = '\\'; - public function resolve($fqsen, Context $context = null) + public function resolve(string $fqsen, ?Context $context = null): Fqsen { if ($context === null) { $context = new Context(''); @@ -34,12 +45,8 @@ class FqsenResolver /** * Tests whether the given type is a Fully Qualified Structural Element Name. - * - * @param string $type - * - * @return bool */ - private function isFqsen($type) + private function isFqsen(string $type): bool { return strpos($type, self::OPERATOR_NAMESPACE) === 0; } @@ -48,12 +55,9 @@ class FqsenResolver * Resolves a partial Structural Element Name (i.e. `Reflection\DocBlock`) to its FQSEN representation * (i.e. `\phpDocumentor\Reflection\DocBlock`) based on the Namespace and aliases mentioned in the Context. * - * @param string $type - * @param Context $context - * - * @return Fqsen + * @throws InvalidArgumentException When type is not a valid FQSEN. */ - private function resolvePartialStructuralElementName($type, Context $context) + private function resolvePartialStructuralElementName(string $type, Context $context): Fqsen { $typeParts = explode(self::OPERATOR_NAMESPACE, $type, 2); @@ -62,7 +66,7 @@ class FqsenResolver // if the first segment is not an alias; prepend namespace name and return if (!isset($namespaceAliases[$typeParts[0]])) { $namespace = $context->getNamespace(); - if ('' !== $namespace) { + if ($namespace !== '') { $namespace .= self::OPERATOR_NAMESPACE; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/PseudoType.php b/api/vendor/phpdocumentor/type-resolver/src/PseudoType.php new file mode 100644 index 0000000..dd91ed7 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/PseudoType.php @@ -0,0 +1,19 @@ +minValue = $minValue; + $this->maxValue = $maxValue; + } + + public function underlyingType(): Type + { + return new Integer(); + } + + public function getMinValue(): string + { + return $this->minValue; + } + + public function getMaxValue(): string + { + return $this->maxValue; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + return 'int<' . $this->minValue . ', ' . $this->maxValue . '>'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php b/api/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php new file mode 100644 index 0000000..f9f0c6b --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php @@ -0,0 +1,50 @@ +valueType instanceof Mixed_) { + return 'list'; + } + + return 'list<' . $this->valueType . '>'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php b/api/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php new file mode 100644 index 0000000..690f782 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php @@ -0,0 +1,39 @@ + - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection; +/** + * @psalm-immutable + */ interface Type { - public function __toString(); + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/TypeResolver.php b/api/vendor/phpdocumentor/type-resolver/src/TypeResolver.php index 3a68a4d..e5695b8 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/TypeResolver.php +++ b/api/vendor/phpdocumentor/type-resolver/src/TypeResolver.php @@ -1,64 +1,156 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection; +use ArrayIterator; +use InvalidArgumentException; +use phpDocumentor\Reflection\PseudoTypes\CallableString; +use phpDocumentor\Reflection\PseudoTypes\False_; +use phpDocumentor\Reflection\PseudoTypes\HtmlEscapedString; +use phpDocumentor\Reflection\PseudoTypes\IntegerRange; +use phpDocumentor\Reflection\PseudoTypes\List_; +use phpDocumentor\Reflection\PseudoTypes\LiteralString; +use phpDocumentor\Reflection\PseudoTypes\LowercaseString; +use phpDocumentor\Reflection\PseudoTypes\NegativeInteger; +use phpDocumentor\Reflection\PseudoTypes\NonEmptyLowercaseString; +use phpDocumentor\Reflection\PseudoTypes\NonEmptyString; +use phpDocumentor\Reflection\PseudoTypes\Numeric_; +use phpDocumentor\Reflection\PseudoTypes\NumericString; +use phpDocumentor\Reflection\PseudoTypes\PositiveInteger; +use phpDocumentor\Reflection\PseudoTypes\TraitString; +use phpDocumentor\Reflection\PseudoTypes\True_; use phpDocumentor\Reflection\Types\Array_; +use phpDocumentor\Reflection\Types\ArrayKey; +use phpDocumentor\Reflection\Types\Boolean; +use phpDocumentor\Reflection\Types\Callable_; +use phpDocumentor\Reflection\Types\ClassString; +use phpDocumentor\Reflection\Types\Collection; use phpDocumentor\Reflection\Types\Compound; use phpDocumentor\Reflection\Types\Context; +use phpDocumentor\Reflection\Types\Expression; +use phpDocumentor\Reflection\Types\Float_; +use phpDocumentor\Reflection\Types\Integer; +use phpDocumentor\Reflection\Types\InterfaceString; +use phpDocumentor\Reflection\Types\Intersection; +use phpDocumentor\Reflection\Types\Iterable_; +use phpDocumentor\Reflection\Types\Mixed_; +use phpDocumentor\Reflection\Types\Never_; +use phpDocumentor\Reflection\Types\Null_; +use phpDocumentor\Reflection\Types\Nullable; use phpDocumentor\Reflection\Types\Object_; +use phpDocumentor\Reflection\Types\Parent_; +use phpDocumentor\Reflection\Types\Resource_; +use phpDocumentor\Reflection\Types\Scalar; +use phpDocumentor\Reflection\Types\Self_; +use phpDocumentor\Reflection\Types\Static_; +use phpDocumentor\Reflection\Types\String_; +use phpDocumentor\Reflection\Types\This; +use phpDocumentor\Reflection\Types\Void_; +use RuntimeException; + +use function array_key_exists; +use function array_key_last; +use function array_pop; +use function array_values; +use function class_exists; +use function class_implements; +use function count; +use function current; +use function in_array; +use function is_numeric; +use function preg_split; +use function strpos; +use function strtolower; +use function trim; + +use const PREG_SPLIT_DELIM_CAPTURE; +use const PREG_SPLIT_NO_EMPTY; final class TypeResolver { /** @var string Definition of the ARRAY operator for types */ - const OPERATOR_ARRAY = '[]'; + private const OPERATOR_ARRAY = '[]'; /** @var string Definition of the NAMESPACE operator in PHP */ - const OPERATOR_NAMESPACE = '\\'; + private const OPERATOR_NAMESPACE = '\\'; - /** @var string[] List of recognized keywords and unto which Value Object they map */ - private $keywords = array( - 'string' => 'phpDocumentor\Reflection\Types\String_', - 'int' => 'phpDocumentor\Reflection\Types\Integer', - 'integer' => 'phpDocumentor\Reflection\Types\Integer', - 'bool' => 'phpDocumentor\Reflection\Types\Boolean', - 'boolean' => 'phpDocumentor\Reflection\Types\Boolean', - 'float' => 'phpDocumentor\Reflection\Types\Float_', - 'double' => 'phpDocumentor\Reflection\Types\Float_', - 'object' => 'phpDocumentor\Reflection\Types\Object_', - 'mixed' => 'phpDocumentor\Reflection\Types\Mixed', - 'array' => 'phpDocumentor\Reflection\Types\Array_', - 'resource' => 'phpDocumentor\Reflection\Types\Resource', - 'void' => 'phpDocumentor\Reflection\Types\Void_', - 'null' => 'phpDocumentor\Reflection\Types\Null_', - 'scalar' => 'phpDocumentor\Reflection\Types\Scalar', - 'callback' => 'phpDocumentor\Reflection\Types\Callable_', - 'callable' => 'phpDocumentor\Reflection\Types\Callable_', - 'false' => 'phpDocumentor\Reflection\Types\Boolean', - 'true' => 'phpDocumentor\Reflection\Types\Boolean', - 'self' => 'phpDocumentor\Reflection\Types\Self_', - '$this' => 'phpDocumentor\Reflection\Types\This', - 'static' => 'phpDocumentor\Reflection\Types\Static_' - ); + /** @var int the iterator parser is inside a compound context */ + private const PARSER_IN_COMPOUND = 0; - /** @var FqsenResolver */ - private $fqsenResolver; + /** @var int the iterator parser is inside a nullable expression context */ + private const PARSER_IN_NULLABLE = 1; + + /** @var int the iterator parser is inside an array expression context */ + private const PARSER_IN_ARRAY_EXPRESSION = 2; + + /** @var int the iterator parser is inside a collection expression context */ + private const PARSER_IN_COLLECTION_EXPRESSION = 3; + + /** + * @var array List of recognized keywords and unto which Value Object they map + * @psalm-var array> + */ + private array $keywords = [ + 'string' => String_::class, + 'class-string' => ClassString::class, + 'interface-string' => InterfaceString::class, + 'html-escaped-string' => HtmlEscapedString::class, + 'lowercase-string' => LowercaseString::class, + 'non-empty-lowercase-string' => NonEmptyLowercaseString::class, + 'non-empty-string' => NonEmptyString::class, + 'numeric-string' => NumericString::class, + 'numeric' => Numeric_::class, + 'trait-string' => TraitString::class, + 'int' => Integer::class, + 'integer' => Integer::class, + 'positive-int' => PositiveInteger::class, + 'negative-int' => NegativeInteger::class, + 'bool' => Boolean::class, + 'boolean' => Boolean::class, + 'real' => Float_::class, + 'float' => Float_::class, + 'double' => Float_::class, + 'object' => Object_::class, + 'mixed' => Mixed_::class, + 'array' => Array_::class, + 'array-key' => ArrayKey::class, + 'resource' => Resource_::class, + 'void' => Void_::class, + 'null' => Null_::class, + 'scalar' => Scalar::class, + 'callback' => Callable_::class, + 'callable' => Callable_::class, + 'callable-string' => CallableString::class, + 'false' => False_::class, + 'true' => True_::class, + 'literal-string' => LiteralString::class, + 'self' => Self_::class, + '$this' => This::class, + 'static' => Static_::class, + 'parent' => Parent_::class, + 'iterable' => Iterable_::class, + 'never' => Never_::class, + 'list' => List_::class, + ]; + + /** @psalm-readonly */ + private FqsenResolver $fqsenResolver; /** * Initializes this TypeResolver with the means to create and resolve Fqsen objects. - * - * @param FqsenResolver $fqsenResolver */ - public function __construct(FqsenResolver $fqsenResolver = null) + public function __construct(?FqsenResolver $fqsenResolver = null) { $this->fqsenResolver = $fqsenResolver ?: new FqsenResolver(); } @@ -73,72 +165,253 @@ final class TypeResolver * This method only works as expected if the namespace and aliases are set; * no dynamic reflection is being performed here. * - * @param string $type The relative or absolute type. - * @param Context $context - * - * @uses Context::getNamespace() to determine with what to prefix the type name. * @uses Context::getNamespaceAliases() to check whether the first part of the relative type name should not be - * replaced with another namespace. + * replaced with another namespace. + * @uses Context::getNamespace() to determine with what to prefix the type name. * - * @return Type|null + * @param string $type The relative or absolute type. */ - public function resolve($type, Context $context = null) + public function resolve(string $type, ?Context $context = null): Type { - if (!is_string($type)) { - throw new \InvalidArgumentException( - 'Attempted to resolve type but it appeared not to be a string, received: ' . var_export($type, true) - ); - } - $type = trim($type); if (!$type) { - throw new \InvalidArgumentException('Attempted to resolve "' . $type . '" but it appears to be empty'); + throw new InvalidArgumentException('Attempted to resolve "' . $type . '" but it appears to be empty'); } if ($context === null) { $context = new Context(''); } + // split the type string into tokens `|`, `?`, `<`, `>`, `,`, `(`, `)`, `[]`, '<', '>' and type names + $tokens = preg_split( + '/(\\||\\?|<|>|&|, ?|\\(|\\)|\\[\\]+)/', + $type, + -1, + PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE + ); + + if ($tokens === false) { + throw new InvalidArgumentException('Unable to split the type string "' . $type . '" into tokens'); + } + + /** @var ArrayIterator $tokenIterator */ + $tokenIterator = new ArrayIterator($tokens); + + return $this->parseTypes($tokenIterator, $context, self::PARSER_IN_COMPOUND); + } + + /** + * Analyse each tokens and creates types + * + * @param ArrayIterator $tokens the iterator on tokens + * @param int $parserContext on of self::PARSER_* constants, indicating + * the context where we are in the parsing + */ + private function parseTypes(ArrayIterator $tokens, Context $context, int $parserContext): Type + { + $types = []; + $token = ''; + $compoundToken = '|'; + while ($tokens->valid()) { + $token = $tokens->current(); + if ($token === null) { + throw new RuntimeException( + 'Unexpected nullable character' + ); + } + + if ($token === '|' || $token === '&') { + if (count($types) === 0) { + throw new RuntimeException( + 'A type is missing before a type separator' + ); + } + + if ( + !in_array($parserContext, [ + self::PARSER_IN_COMPOUND, + self::PARSER_IN_ARRAY_EXPRESSION, + self::PARSER_IN_COLLECTION_EXPRESSION, + self::PARSER_IN_NULLABLE, + ], true) + ) { + throw new RuntimeException( + 'Unexpected type separator' + ); + } + + $compoundToken = $token; + $tokens->next(); + } elseif ($token === '?') { + if ( + !in_array($parserContext, [ + self::PARSER_IN_COMPOUND, + self::PARSER_IN_ARRAY_EXPRESSION, + self::PARSER_IN_COLLECTION_EXPRESSION, + self::PARSER_IN_NULLABLE, + ], true) + ) { + throw new RuntimeException( + 'Unexpected nullable character' + ); + } + + $tokens->next(); + $type = $this->parseTypes($tokens, $context, self::PARSER_IN_NULLABLE); + $types[] = new Nullable($type); + } elseif ($token === '(') { + $tokens->next(); + $type = $this->parseTypes($tokens, $context, self::PARSER_IN_ARRAY_EXPRESSION); + + $token = $tokens->current(); + if ($token === null) { // Someone did not properly close their array expression .. + break; + } + + $tokens->next(); + + $resolvedType = new Expression($type); + + $types[] = $resolvedType; + } elseif ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION && isset($token[0]) && $token[0] === ')') { + break; + } elseif ($token === '<') { + if (count($types) === 0) { + throw new RuntimeException( + 'Unexpected collection operator "<", class name is missing' + ); + } + + $classType = array_pop($types); + if ($classType !== null) { + if ((string) $classType === 'class-string') { + $types[] = $this->resolveClassString($tokens, $context); + } elseif ((string) $classType === 'int') { + $types[] = $this->resolveIntRange($tokens); + } elseif ((string) $classType === 'interface-string') { + $types[] = $this->resolveInterfaceString($tokens, $context); + } else { + $types[] = $this->resolveCollection($tokens, $classType, $context); + } + } + + $tokens->next(); + } elseif ( + $parserContext === self::PARSER_IN_COLLECTION_EXPRESSION + && ($token === '>' || trim($token) === ',') + ) { + break; + } elseif ($token === self::OPERATOR_ARRAY) { + $last = array_key_last($types); + if ($last === null) { + throw new InvalidArgumentException('Unexpected array operator'); + } + + $lastItem = $types[$last]; + if ($lastItem instanceof Expression) { + $lastItem = $lastItem->getValueType(); + } + + $types[$last] = new Array_($lastItem); + + $tokens->next(); + } else { + $types[] = $this->resolveSingleType($token, $context); + $tokens->next(); + } + } + + if ($token === '|' || $token === '&') { + throw new RuntimeException( + 'A type is missing after a type separator' + ); + } + + if (count($types) === 0) { + if ($parserContext === self::PARSER_IN_NULLABLE) { + throw new RuntimeException( + 'A type is missing after a nullable character' + ); + } + + if ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION) { + throw new RuntimeException( + 'A type is missing in an array expression' + ); + } + + if ($parserContext === self::PARSER_IN_COLLECTION_EXPRESSION) { + throw new RuntimeException( + 'A type is missing in a collection expression' + ); + } + } elseif (count($types) === 1) { + return current($types); + } + + if ($compoundToken === '|') { + return new Compound(array_values($types)); + } + + return new Intersection(array_values($types)); + } + + /** + * resolve the given type into a type object + * + * @param string $type the type string, representing a single type + * + * @return Type|Array_|Object_ + * + * @psalm-mutation-free + */ + private function resolveSingleType(string $type, Context $context): object + { switch (true) { case $this->isKeyword($type): return $this->resolveKeyword($type); - case ($this->isCompoundType($type)): - return $this->resolveCompoundType($type, $context); - case $this->isTypedArray($type): - return $this->resolveTypedArray($type, $context); + case $this->isFqsen($type): return $this->resolveTypedObject($type); + case $this->isPartialStructuralElementName($type): return $this->resolveTypedObject($type, $context); + // @codeCoverageIgnoreStart default: // I haven't got the foggiest how the logic would come here but added this as a defense. - throw new \RuntimeException( + throw new RuntimeException( 'Unable to resolve type "' . $type . '", there is no known method to resolve it' ); } + // @codeCoverageIgnoreEnd } /** * Adds a keyword to the list of Keywords and associates it with a specific Value Object. * - * @param string $keyword - * @param string $typeClassName - * - * @return void + * @psalm-param class-string $typeClassName */ - public function addKeyword($keyword, $typeClassName) + public function addKeyword(string $keyword, string $typeClassName): void { if (!class_exists($typeClassName)) { - throw new \InvalidArgumentException( + throw new InvalidArgumentException( 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class' . ' but we could not find the class ' . $typeClassName ); } - if (!in_array(Type::class, class_implements($typeClassName))) { - throw new \InvalidArgumentException( + $interfaces = class_implements($typeClassName); + if ($interfaces === false) { + throw new InvalidArgumentException( + 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class' + . ' but we could not find the class ' . $typeClassName + ); + } + + if (!in_array(Type::class, $interfaces, true)) { + throw new InvalidArgumentException( 'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"' ); } @@ -146,28 +419,16 @@ final class TypeResolver $this->keywords[$keyword] = $typeClassName; } - /** - * Detects whether the given type represents an array. - * - * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. - * - * @return bool - */ - private function isTypedArray($type) - { - return substr($type, -2) === self::OPERATOR_ARRAY; - } - /** * Detects whether the given type represents a PHPDoc keyword. * * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. * - * @return bool + * @psalm-mutation-free */ - private function isKeyword($type) + private function isKeyword(string $type): bool { - return in_array(strtolower($type), array_keys($this->keywords), true); + return array_key_exists(strtolower($type), $this->keywords); } /** @@ -175,58 +436,29 @@ final class TypeResolver * * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. * - * @return bool + * @psalm-mutation-free */ - private function isPartialStructuralElementName($type) + private function isPartialStructuralElementName(string $type): bool { - return ($type[0] !== self::OPERATOR_NAMESPACE) && !$this->isKeyword($type); + return (isset($type[0]) && $type[0] !== self::OPERATOR_NAMESPACE) && !$this->isKeyword($type); } /** * Tests whether the given type is a Fully Qualified Structural Element Name. * - * @param string $type - * - * @return bool + * @psalm-mutation-free */ - private function isFqsen($type) + private function isFqsen(string $type): bool { return strpos($type, self::OPERATOR_NAMESPACE) === 0; } - /** - * Tests whether the given type is a compound type (i.e. `string|int`). - * - * @param string $type - * - * @return bool - */ - private function isCompoundType($type) - { - return strpos($type, '|') !== false; - } - - /** - * Resolves the given typed array string (i.e. `string[]`) into an Array object with the right types set. - * - * @param string $type - * @param Context $context - * - * @return Array_ - */ - private function resolveTypedArray($type, Context $context) - { - return new Array_($this->resolve(substr($type, 0, -2), $context)); - } - /** * Resolves the given keyword (such as `string`) into a Type object representing that keyword. * - * @param string $type - * - * @return Type + * @psalm-mutation-free */ - private function resolveKeyword($type) + private function resolveKeyword(string $type): Type { $className = $this->keywords[strtolower($type)]; @@ -236,31 +468,251 @@ final class TypeResolver /** * Resolves the given FQSEN string into an FQSEN object. * - * @param string $type - * - * @return Object_ + * @psalm-mutation-free */ - private function resolveTypedObject($type, Context $context = null) + private function resolveTypedObject(string $type, ?Context $context = null): Object_ { return new Object_($this->fqsenResolver->resolve($type, $context)); } /** - * Resolves a compound type (i.e. `string|int`) into the appropriate Type objects or FQSEN. + * Resolves class string * - * @param string $type - * @param Context $context - * - * @return Compound + * @param ArrayIterator $tokens */ - private function resolveCompoundType($type, Context $context) + private function resolveClassString(ArrayIterator $tokens, Context $context): Type { - $types = []; + $tokens->next(); - foreach (explode('|', $type) as $part) { - $types[] = $this->resolve($part, $context); + $classType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); + + if (!$classType instanceof Object_ || $classType->getFqsen() === null) { + throw new RuntimeException( + $classType . ' is not a class string' + ); } - return new Compound($types); + $token = $tokens->current(); + if ($token !== '>') { + if (empty($token)) { + throw new RuntimeException( + 'class-string: ">" is missing' + ); + } + + throw new RuntimeException( + 'Unexpected character "' . $token . '", ">" is missing' + ); + } + + return new ClassString($classType->getFqsen()); + } + + /** + * Resolves integer ranges + * + * @param ArrayIterator $tokens + */ + private function resolveIntRange(ArrayIterator $tokens): Type + { + $tokens->next(); + + $token = ''; + $minValue = null; + $maxValue = null; + $commaFound = false; + $tokenCounter = 0; + while ($tokens->valid()) { + $tokenCounter++; + $token = $tokens->current(); + if ($token === null) { + throw new RuntimeException( + 'Unexpected nullable character' + ); + } + + $token = trim($token); + + if ($token === '>') { + break; + } + + if ($token === ',') { + $commaFound = true; + } + + if ($commaFound === false && $minValue === null) { + if (is_numeric($token) || $token === 'max' || $token === 'min') { + $minValue = $token; + } + } + + if ($commaFound === true && $maxValue === null) { + if (is_numeric($token) || $token === 'max' || $token === 'min') { + $maxValue = $token; + } + } + + $tokens->next(); + } + + if ($token !== '>') { + if (empty($token)) { + throw new RuntimeException( + 'interface-string: ">" is missing' + ); + } + + throw new RuntimeException( + 'Unexpected character "' . $token . '", ">" is missing' + ); + } + + if ($minValue === null || $maxValue === null || $tokenCounter > 4) { + throw new RuntimeException( + 'int has not the correct format' + ); + } + + return new IntegerRange($minValue, $maxValue); + } + + /** + * Resolves class string + * + * @param ArrayIterator $tokens + */ + private function resolveInterfaceString(ArrayIterator $tokens, Context $context): Type + { + $tokens->next(); + + $classType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); + + if (!$classType instanceof Object_ || $classType->getFqsen() === null) { + throw new RuntimeException( + $classType . ' is not a interface string' + ); + } + + $token = $tokens->current(); + if ($token !== '>') { + if (empty($token)) { + throw new RuntimeException( + 'interface-string: ">" is missing' + ); + } + + throw new RuntimeException( + 'Unexpected character "' . $token . '", ">" is missing' + ); + } + + return new InterfaceString($classType->getFqsen()); + } + + /** + * Resolves the collection values and keys + * + * @param ArrayIterator $tokens + * + * @return Array_|Iterable_|Collection + */ + private function resolveCollection(ArrayIterator $tokens, Type $classType, Context $context): Type + { + $isArray = ((string) $classType === 'array'); + $isIterable = ((string) $classType === 'iterable'); + $isList = ((string) $classType === 'list'); + + // allow only "array", "iterable" or class name before "<" + if ( + !$isArray && !$isIterable && !$isList + && (!$classType instanceof Object_ || $classType->getFqsen() === null) + ) { + throw new RuntimeException( + $classType . ' is not a collection' + ); + } + + $tokens->next(); + + $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); + $keyType = null; + + $token = $tokens->current(); + if ($token !== null && trim($token) === ',' && !$isList) { + // if we have a comma, then we just parsed the key type, not the value type + $keyType = $valueType; + if ($isArray) { + // check the key type for an "array" collection. We allow only + // strings or integers. + if ( + !$keyType instanceof ArrayKey && + !$keyType instanceof String_ && + !$keyType instanceof Integer && + !$keyType instanceof Compound + ) { + throw new RuntimeException( + 'An array can have only integers or strings as keys' + ); + } + + if ($keyType instanceof Compound) { + foreach ($keyType->getIterator() as $item) { + if ( + !$item instanceof ArrayKey && + !$item instanceof String_ && + !$item instanceof Integer + ) { + throw new RuntimeException( + 'An array can have only integers or strings as keys' + ); + } + } + } + } + + $tokens->next(); + // now let's parse the value type + $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); + } + + $token = $tokens->current(); + if ($token !== '>') { + if (empty($token)) { + throw new RuntimeException( + 'Collection: ">" is missing' + ); + } + + throw new RuntimeException( + 'Unexpected character "' . $token . '", ">" is missing' + ); + } + + if ($isArray) { + return new Array_($valueType, $keyType); + } + + if ($isIterable) { + return new Iterable_($valueType, $keyType); + } + + if ($isList) { + return new List_($valueType); + } + + if ($classType instanceof Object_) { + return $this->makeCollectionFromObject($classType, $valueType, $keyType); + } + + throw new RuntimeException('Invalid $classType provided'); + } + + /** + * @psalm-pure + */ + private function makeCollectionFromObject(Object_ $object, Type $valueType, ?Type $keyType = null): Collection + { + return new Collection($object->getFqsen(), $valueType, $keyType); } } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php b/api/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php new file mode 100644 index 0000000..ee8ace8 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php @@ -0,0 +1,83 @@ +valueType = $valueType; + $this->defaultKeyType = new Compound([new String_(), new Integer()]); + $this->keyType = $keyType; + } + + /** + * Returns the type for the keys of this array. + */ + public function getKeyType(): Type + { + return $this->keyType ?? $this->defaultKeyType; + } + + /** + * Returns the type for the values of this array. + */ + public function getValueType(): Type + { + return $this->valueType; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + if ($this->keyType) { + return 'array<' . $this->keyType . ',' . $this->valueType . '>'; + } + + if ($this->valueType instanceof Mixed_) { + return 'array'; + } + + if ($this->valueType instanceof Compound) { + return '(' . $this->valueType . ')[]'; + } + + return $this->valueType . '[]'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php b/api/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php new file mode 100644 index 0000000..257ed51 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php @@ -0,0 +1,124 @@ + + */ +abstract class AggregatedType implements Type, IteratorAggregate +{ + /** + * @psalm-allow-private-mutation + * @var array + */ + private array $types = []; + + private string $token; + + /** + * @param array $types + */ + public function __construct(array $types, string $token) + { + foreach ($types as $type) { + $this->add($type); + } + + $this->token = $token; + } + + /** + * Returns the type at the given index. + */ + public function get(int $index): ?Type + { + if (!$this->has($index)) { + return null; + } + + return $this->types[$index]; + } + + /** + * Tests if this compound type has a type with the given index. + */ + public function has(int $index): bool + { + return array_key_exists($index, $this->types); + } + + /** + * Tests if this compound type contains the given type. + */ + public function contains(Type $type): bool + { + foreach ($this->types as $typePart) { + // if the type is duplicate; do not add it + if ((string) $typePart === (string) $type) { + return true; + } + } + + return false; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + return implode($this->token, $this->types); + } + + /** + * @return ArrayIterator + */ + public function getIterator(): ArrayIterator + { + return new ArrayIterator($this->types); + } + + /** + * @psalm-suppress ImpureMethodCall + */ + private function add(Type $type): void + { + if ($type instanceof self) { + foreach ($type->getIterator() as $subType) { + $this->add($subType); + } + + return; + } + + // if the type is duplicate; do not add it + if ($this->contains($type)) { + return; + } + + $this->types[] = $type; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php b/api/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php new file mode 100644 index 0000000..cf86df0 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php @@ -0,0 +1,42 @@ + - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\Types; -use phpDocumentor\Reflection\Fqsen; -use phpDocumentor\Reflection\Type; - /** * Represents an array type as described in the PSR-5, the PHPDoc Standard. * * An array can be represented in two forms: * - * 1. Untyped (`array`), where the key and value type is unknown and hence classified as 'Mixed'. + * 1. Untyped (`array`), where the key and value type is unknown and hence classified as 'Mixed_'. * 2. Types (`string[]`), where the value type is provided by preceding an opening and closing square bracket with a * type name. + * + * @psalm-immutable */ -final class Array_ implements Type +class Array_ extends AbstractList { - /** @var Type */ - private $valueType; - - /** @var Type */ - private $keyType; - - /** - * Initializes this representation of an array with the given Type or Fqsen. - * - * @param Type $valueType - * @param Type $keyType - */ - public function __construct(Type $valueType = null, Type $keyType = null) - { - if ($keyType === null) { - $keyType = new Compound([ new String_(), new Integer() ]); - } - if ($valueType === null) { - $valueType = new Mixed(); - } - - $this->valueType = $valueType; - $this->keyType = $keyType; - } - - /** - * Returns the type for the keys of this array. - * - * @return Type - */ - public function getKeyType() - { - return $this->keyType; - } - - /** - * Returns the value for the keys of this array. - * - * @return Type - */ - public function getValueType() - { - return $this->valueType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string - */ - public function __toString() - { - if ($this->valueType instanceof Mixed) { - return 'array'; - } - - return $this->valueType . '[]'; - } } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php index f82b19e..8b1a3f3 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing a Boolean type. + * + * @psalm-immutable */ -final class Boolean implements Type +class Boolean implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'bool'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php index 68ebfbd..4e67aa4 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing a Callable type. + * + * @psalm-immutable */ final class Callable_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'callable'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/ClassString.php b/api/vendor/phpdocumentor/type-resolver/src/Types/ClassString.php new file mode 100644 index 0000000..b54c549 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/ClassString.php @@ -0,0 +1,61 @@ +fqsen = $fqsen; + } + + public function underlyingType(): Type + { + return new String_(); + } + + /** + * Returns the FQSEN associated with this object. + */ + public function getFqsen(): ?Fqsen + { + return $this->fqsen; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + if ($this->fqsen === null) { + return 'class-string'; + } + + return 'class-string<' . (string) $this->fqsen . '>'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Collection.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Collection.php new file mode 100644 index 0000000..dbf3f19 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Collection.php @@ -0,0 +1,67 @@ +` + * 2. `ACollectionObject` + * + * - ACollectionObject can be 'array' or an object that can act as an array + * - aValueType and aKeyType can be any type expression + * + * @psalm-immutable + */ +final class Collection extends AbstractList +{ + private ?Fqsen $fqsen; + + /** + * Initializes this representation of an array with the given Type or Fqsen. + */ + public function __construct(?Fqsen $fqsen, Type $valueType, ?Type $keyType = null) + { + parent::__construct($valueType, $keyType); + + $this->fqsen = $fqsen; + } + + /** + * Returns the FQSEN associated with this object. + */ + public function getFqsen(): ?Fqsen + { + return $this->fqsen; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + $objectType = (string) ($this->fqsen ?? 'object'); + + if ($this->keyType === null) { + return $objectType . '<' . $this->valueType . '>'; + } + + return $objectType . '<' . $this->keyType . ',' . $this->valueType . '>'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Compound.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Compound.php index 3e5ebb5..ad426cc 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Compound.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Compound.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -20,63 +21,18 @@ use phpDocumentor\Reflection\Type; * A Compound Type is not so much a special keyword or object reference but is a series of Types that are separated * using an OR operator (`|`). This combination of types signifies that whatever is associated with this compound type * may contain a value with any of the given types. + * + * @psalm-immutable */ -final class Compound implements Type +final class Compound extends AggregatedType { - /** @var Type[] */ - private $types = []; - /** * Initializes a compound type (i.e. `string|int`) and tests if the provided types all implement the Type interface. * - * @param Type[] $types + * @param array $types */ public function __construct(array $types) { - foreach ($types as $type) { - if (!$type instanceof Type) { - throw new \InvalidArgumentException('A compound type can only have other types as elements'); - } - } - - $this->types = $types; - } - - /** - * Returns the type at the given index. - * - * @param integer $index - * - * @return Type|null - */ - public function get($index) - { - if (!$this->has($index)) { - return null; - } - - return $this->types[$index]; - } - - /** - * Tests if this compound type has a type with the given index. - * - * @param integer $index - * - * @return bool - */ - public function has($index) - { - return isset($this->types[$index]); - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string - */ - public function __toString() - { - return implode('|', $this->types); + parent::__construct($types, '|'); } } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Context.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Context.php index cc95342..17aa506 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Context.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Context.php @@ -1,17 +1,22 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\Types; +use function strlen; +use function substr; +use function trim; + /** * Provides information about the Context in which the DocBlock occurs that receives this context. * @@ -25,32 +30,39 @@ namespace phpDocumentor\Reflection\Types; * * @see ContextFactory::createFromClassReflector() * @see ContextFactory::createForNamespace() + * + * @psalm-immutable */ final class Context { /** @var string The current namespace. */ - private $namespace = ''; + private string $namespace; - /** @var array List of namespace aliases => Fully Qualified Namespace. */ - private $namespaceAliases = []; + /** + * @var string[] List of namespace aliases => Fully Qualified Namespace. + * @psalm-var array + */ + private array $namespaceAliases; /** * Initializes the new context and normalizes all passed namespaces to be in Qualified Namespace Name (QNN) * format (without a preceding `\`). * - * @param string $namespace The namespace where this DocBlock resides in. - * @param array $namespaceAliases List of namespace aliases => Fully Qualified Namespace. + * @param string $namespace The namespace where this DocBlock resides in. + * @param string[] $namespaceAliases List of namespace aliases => Fully Qualified Namespace. + * @psalm-param array $namespaceAliases */ - public function __construct($namespace, array $namespaceAliases = []) + public function __construct(string $namespace, array $namespaceAliases = []) { - $this->namespace = ('global' !== $namespace && 'default' !== $namespace) - ? trim((string)$namespace, '\\') + $this->namespace = $namespace !== 'global' && $namespace !== 'default' + ? trim($namespace, '\\') : ''; foreach ($namespaceAliases as $alias => $fqnn) { if ($fqnn[0] === '\\') { $fqnn = substr($fqnn, 1); } + if ($fqnn[strlen($fqnn) - 1] === '\\') { $fqnn = substr($fqnn, 0, -1); } @@ -63,10 +75,8 @@ final class Context /** * Returns the Qualified Namespace Name (thus without `\` in front) where the associated element is in. - * - * @return string */ - public function getNamespace() + public function getNamespace(): string { return $this->namespace; } @@ -76,8 +86,9 @@ final class Context * the alias for the imported Namespace. * * @return string[] + * @psalm-return array */ - public function getNamespaceAliases() + public function getNamespaceAliases(): array { return $this->namespaceAliases; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php b/api/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php index 147df69..892ee0f 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php @@ -1,17 +1,60 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\Types; +use ArrayIterator; +use InvalidArgumentException; +use ReflectionClass; +use ReflectionClassConstant; +use ReflectionMethod; +use ReflectionParameter; +use ReflectionProperty; +use Reflector; +use RuntimeException; +use UnexpectedValueException; + +use function define; +use function defined; +use function file_exists; +use function file_get_contents; +use function get_class; +use function in_array; +use function is_string; +use function strrpos; +use function substr; +use function token_get_all; +use function trim; + +use const T_AS; +use const T_CLASS; +use const T_CURLY_OPEN; +use const T_DOLLAR_OPEN_CURLY_BRACES; +use const T_NAME_FULLY_QUALIFIED; +use const T_NAME_QUALIFIED; +use const T_NAMESPACE; +use const T_NS_SEPARATOR; +use const T_STRING; +use const T_USE; + +if (!defined('T_NAME_QUALIFIED')) { + define('T_NAME_QUALIFIED', 'T_NAME_QUALIFIED'); +} + +if (!defined('T_NAME_FULLY_QUALIFIED')) { + define('T_NAME_FULLY_QUALIFIED', 'T_NAME_FULLY_QUALIFIED'); +} + /** * Convenience class to create a Context for DocBlocks when not using the Reflection Component of phpDocumentor. * @@ -24,31 +67,92 @@ namespace phpDocumentor\Reflection\Types; final class ContextFactory { /** The literal used at the end of a use statement. */ - const T_LITERAL_END_OF_USE = ';'; + private const T_LITERAL_END_OF_USE = ';'; /** The literal used between sets of use statements */ - const T_LITERAL_USE_SEPARATOR = ','; + private const T_LITERAL_USE_SEPARATOR = ','; /** * Build a Context given a Class Reflection. * - * @param \ReflectionClass $reflector - * * @see Context for more information on Contexts. - * - * @return Context */ - public function createFromReflector(\Reflector $reflector) + public function createFromReflector(Reflector $reflector): Context { - if (method_exists($reflector, 'getDeclaringClass')) { - $reflector = $reflector->getDeclaringClass(); + if ($reflector instanceof ReflectionClass) { + //phpcs:ignore SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.MissingVariable + /** @var ReflectionClass $reflector */ + + return $this->createFromReflectionClass($reflector); } - $fileName = $reflector->getFileName(); - $namespace = $reflector->getNamespaceName(); + if ($reflector instanceof ReflectionParameter) { + return $this->createFromReflectionParameter($reflector); + } - if (file_exists($fileName)) { - return $this->createForNamespace($namespace, file_get_contents($fileName)); + if ($reflector instanceof ReflectionMethod) { + return $this->createFromReflectionMethod($reflector); + } + + if ($reflector instanceof ReflectionProperty) { + return $this->createFromReflectionProperty($reflector); + } + + if ($reflector instanceof ReflectionClassConstant) { + return $this->createFromReflectionClassConstant($reflector); + } + + throw new UnexpectedValueException('Unhandled \Reflector instance given: ' . get_class($reflector)); + } + + private function createFromReflectionParameter(ReflectionParameter $parameter): Context + { + $class = $parameter->getDeclaringClass(); + if (!$class) { + throw new InvalidArgumentException('Unable to get class of ' . $parameter->getName()); + } + + return $this->createFromReflectionClass($class); + } + + private function createFromReflectionMethod(ReflectionMethod $method): Context + { + $class = $method->getDeclaringClass(); + + return $this->createFromReflectionClass($class); + } + + private function createFromReflectionProperty(ReflectionProperty $property): Context + { + $class = $property->getDeclaringClass(); + + return $this->createFromReflectionClass($class); + } + + private function createFromReflectionClassConstant(ReflectionClassConstant $constant): Context + { + //phpcs:ignore SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.MissingVariable + /** @phpstan-var ReflectionClass $class */ + $class = $constant->getDeclaringClass(); + + return $this->createFromReflectionClass($class); + } + + /** + * @phpstan-param ReflectionClass $class + */ + private function createFromReflectionClass(ReflectionClass $class): Context + { + $fileName = $class->getFileName(); + $namespace = $class->getNamespaceName(); + + if (is_string($fileName) && file_exists($fileName)) { + $contents = file_get_contents($fileName); + if ($contents === false) { + throw new RuntimeException('Unable to read file "' . $fileName . '"'); + } + + return $this->createForNamespace($namespace, $contents); } return new Context($namespace, []); @@ -57,22 +161,22 @@ final class ContextFactory /** * Build a Context for a namespace in the provided file contents. * - * @param string $namespace It does not matter if a `\` precedes the namespace name, this method first normalizes. - * @param string $fileContents the file's contents to retrieve the aliases from with the given namespace. - * * @see Context for more information on Contexts. * - * @return Context + * @param string $namespace It does not matter if a `\` precedes the namespace name, + * this method first normalizes. + * @param string $fileContents The file's contents to retrieve the aliases from with the given namespace. */ - public function createForNamespace($namespace, $fileContents) + public function createForNamespace(string $namespace, string $fileContents): Context { - $namespace = trim($namespace, '\\'); - $useStatements = []; + $namespace = trim($namespace, '\\'); + $useStatements = []; $currentNamespace = ''; - $tokens = new \ArrayIterator(token_get_all($fileContents)); + $tokens = new ArrayIterator(token_get_all($fileContents)); while ($tokens->valid()) { - switch ($tokens->current()[0]) { + $currentToken = $tokens->current(); + switch ($currentToken[0]) { case T_NAMESPACE: $currentNamespace = $this->parseNamespace($tokens); break; @@ -80,30 +184,37 @@ final class ContextFactory // Fast-forward the iterator through the class so that any // T_USE tokens found within are skipped - these are not // valid namespace use statements so should be ignored. - $braceLevel = 0; + $braceLevel = 0; $firstBraceFound = false; while ($tokens->valid() && ($braceLevel > 0 || !$firstBraceFound)) { - if ($tokens->current() === '{' - || $tokens->current()[0] === T_CURLY_OPEN - || $tokens->current()[0] === T_DOLLAR_OPEN_CURLY_BRACES) { + $currentToken = $tokens->current(); + if ( + $currentToken === '{' + || in_array($currentToken[0], [T_CURLY_OPEN, T_DOLLAR_OPEN_CURLY_BRACES], true) + ) { if (!$firstBraceFound) { $firstBraceFound = true; } - $braceLevel++; + + ++$braceLevel; } - if ($tokens->current() === '}') { - $braceLevel--; + if ($currentToken === '}') { + --$braceLevel; } + $tokens->next(); } + break; case T_USE: if ($currentNamespace === $namespace) { - $useStatements = array_merge($useStatements, $this->parseUseStatement($tokens)); + $useStatements += $this->parseUseStatement($tokens); } + break; } + $tokens->next(); } @@ -113,18 +224,16 @@ final class ContextFactory /** * Deduce the name from tokens when we are at the T_NAMESPACE token. * - * @param \ArrayIterator $tokens - * - * @return string + * @param ArrayIterator $tokens */ - private function parseNamespace(\ArrayIterator $tokens) + private function parseNamespace(ArrayIterator $tokens): string { // skip to the first string or namespace separator $this->skipToNextStringOrNamespaceSeparator($tokens); $name = ''; - while ($tokens->valid() && ($tokens->current()[0] === T_STRING || $tokens->current()[0] === T_NS_SEPARATOR) - ) { + $acceptedTokens = [T_STRING, T_NS_SEPARATOR, T_NAME_QUALIFIED]; + while ($tokens->valid() && in_array($tokens->current()[0], $acceptedTokens, true)) { $name .= $tokens->current()[1]; $tokens->next(); } @@ -135,22 +244,22 @@ final class ContextFactory /** * Deduce the names of all imports when we are at the T_USE token. * - * @param \ArrayIterator $tokens + * @param ArrayIterator $tokens * * @return string[] + * @psalm-return array */ - private function parseUseStatement(\ArrayIterator $tokens) + private function parseUseStatement(ArrayIterator $tokens): array { $uses = []; - $continue = true; - while ($continue) { + while ($tokens->valid()) { $this->skipToNextStringOrNamespaceSeparator($tokens); - list($alias, $fqnn) = $this->extractUseStatement($tokens); - $uses[$alias] = $fqnn; - if ($tokens->current()[0] === self::T_LITERAL_END_OF_USE) { - $continue = false; + $uses += $this->extractUseStatements($tokens); + $currentToken = $tokens->current(); + if ($currentToken[0] === self::T_LITERAL_END_OF_USE) { + return $uses; } } @@ -160,51 +269,152 @@ final class ContextFactory /** * Fast-forwards the iterator as longs as we don't encounter a T_STRING or T_NS_SEPARATOR token. * - * @param \ArrayIterator $tokens - * - * @return void + * @param ArrayIterator $tokens */ - private function skipToNextStringOrNamespaceSeparator(\ArrayIterator $tokens) + private function skipToNextStringOrNamespaceSeparator(ArrayIterator $tokens): void { - while ($tokens->valid() && ($tokens->current()[0] !== T_STRING) && ($tokens->current()[0] !== T_NS_SEPARATOR)) { + while ($tokens->valid()) { + $currentToken = $tokens->current(); + if (in_array($currentToken[0], [T_STRING, T_NS_SEPARATOR], true)) { + break; + } + + if ($currentToken[0] === T_NAME_QUALIFIED) { + break; + } + + if (defined('T_NAME_FULLY_QUALIFIED') && $currentToken[0] === T_NAME_FULLY_QUALIFIED) { + break; + } + $tokens->next(); } } /** * Deduce the namespace name and alias of an import when we are at the T_USE token or have not reached the end of - * a USE statement yet. + * a USE statement yet. This will return a key/value array of the alias => namespace. * - * @param \ArrayIterator $tokens + * @param ArrayIterator $tokens * - * @return string + * @return string[] + * @psalm-return array + * + * @psalm-suppress TypeDoesNotContainType */ - private function extractUseStatement(\ArrayIterator $tokens) + private function extractUseStatements(ArrayIterator $tokens): array { - $result = ['']; - while ($tokens->valid() - && ($tokens->current()[0] !== self::T_LITERAL_USE_SEPARATOR) - && ($tokens->current()[0] !== self::T_LITERAL_END_OF_USE) - ) { - if ($tokens->current()[0] === T_AS) { - $result[] = ''; + $extractedUseStatements = []; + $groupedNs = ''; + $currentNs = ''; + $currentAlias = ''; + $state = 'start'; + + while ($tokens->valid()) { + $currentToken = $tokens->current(); + $tokenId = is_string($currentToken) ? $currentToken : $currentToken[0]; + $tokenValue = is_string($currentToken) ? null : $currentToken[1]; + switch ($state) { + case 'start': + switch ($tokenId) { + case T_STRING: + case T_NS_SEPARATOR: + $currentNs .= (string) $tokenValue; + $currentAlias = $tokenValue; + break; + case T_NAME_QUALIFIED: + case T_NAME_FULLY_QUALIFIED: + $currentNs .= (string) $tokenValue; + $currentAlias = substr( + (string) $tokenValue, + (int) (strrpos((string) $tokenValue, '\\')) + 1 + ); + break; + case T_CURLY_OPEN: + case '{': + $state = 'grouped'; + $groupedNs = $currentNs; + break; + case T_AS: + $state = 'start-alias'; + break; + case self::T_LITERAL_USE_SEPARATOR: + case self::T_LITERAL_END_OF_USE: + $state = 'end'; + break; + default: + break; + } + + break; + case 'start-alias': + switch ($tokenId) { + case T_STRING: + $currentAlias = $tokenValue; + break; + case self::T_LITERAL_USE_SEPARATOR: + case self::T_LITERAL_END_OF_USE: + $state = 'end'; + break; + default: + break; + } + + break; + case 'grouped': + switch ($tokenId) { + case T_STRING: + case T_NS_SEPARATOR: + $currentNs .= (string) $tokenValue; + $currentAlias = $tokenValue; + break; + case T_AS: + $state = 'grouped-alias'; + break; + case self::T_LITERAL_USE_SEPARATOR: + $state = 'grouped'; + $extractedUseStatements[(string) $currentAlias] = $currentNs; + $currentNs = $groupedNs; + $currentAlias = ''; + break; + case self::T_LITERAL_END_OF_USE: + $state = 'end'; + break; + default: + break; + } + + break; + case 'grouped-alias': + switch ($tokenId) { + case T_STRING: + $currentAlias = $tokenValue; + break; + case self::T_LITERAL_USE_SEPARATOR: + $state = 'grouped'; + $extractedUseStatements[(string) $currentAlias] = $currentNs; + $currentNs = $groupedNs; + $currentAlias = ''; + break; + case self::T_LITERAL_END_OF_USE: + $state = 'end'; + break; + default: + break; + } } - if ($tokens->current()[0] === T_STRING || $tokens->current()[0] === T_NS_SEPARATOR) { - $result[count($result) - 1] .= $tokens->current()[1]; + + if ($state === 'end') { + break; } + $tokens->next(); } - if (count($result) == 1) { - $backslashPos = strrpos($result[0], '\\'); - - if (false !== $backslashPos) { - $result[] = substr($result[0], $backslashPos + 1); - } else { - $result[] = $result[0]; - } + if ($groupedNs !== $currentNs) { + $extractedUseStatements[(string) $currentAlias] = $currentNs; } - return array_reverse($result); + return $extractedUseStatements; } } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Expression.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Expression.php new file mode 100644 index 0000000..2b6b095 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Expression.php @@ -0,0 +1,50 @@ +valueType = $valueType; + } + + /** + * Returns the value for the keys of this array. + */ + public function getValueType(): Type + { + return $this->valueType; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + return '(' . $this->valueType . ')'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Float_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Float_.php index e58d896..86138c0 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Float_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Float_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing a Float. + * + * @psalm-immutable */ final class Float_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'float'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Integer.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Integer.php index be4555e..10ce3c5 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Integer.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Integer.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -14,14 +15,17 @@ namespace phpDocumentor\Reflection\Types; use phpDocumentor\Reflection\Type; -final class Integer implements Type +/** + * Value object representing Integer type + * + * @psalm-immutable + */ +class Integer implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'int'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/InterfaceString.php b/api/vendor/phpdocumentor/type-resolver/src/Types/InterfaceString.php new file mode 100644 index 0000000..0b7dbb8 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/InterfaceString.php @@ -0,0 +1,55 @@ +fqsen = $fqsen; + } + + /** + * Returns the FQSEN associated with this object. + */ + public function getFqsen(): ?Fqsen + { + return $this->fqsen; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + if ($this->fqsen === null) { + return 'interface-string'; + } + + return 'interface-string<' . (string) $this->fqsen . '>'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php new file mode 100644 index 0000000..ced37b6 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php @@ -0,0 +1,37 @@ + $types + */ + public function __construct(array $types) + { + parent::__construct($types, '&'); + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php new file mode 100644 index 0000000..1ca069f --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php @@ -0,0 +1,38 @@ +keyType) { + return 'iterable<' . $this->keyType . ',' . $this->valueType . '>'; + } + + if ($this->valueType instanceof Mixed_) { + return 'iterable'; + } + + return 'iterable<' . $this->valueType . '>'; + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Mixed.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php similarity index 69% rename from api/vendor/phpdocumentor/type-resolver/src/Types/Mixed.php rename to api/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php index 79695f4..56d1b6d 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Mixed.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing an unknown, or mixed, type. + * + * @psalm-immutable */ -final class Mixed implements Type +final class Mixed_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'mixed'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Never_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Never_.php new file mode 100644 index 0000000..40a99c9 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Never_.php @@ -0,0 +1,35 @@ + - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing a null value or type. + * + * @psalm-immutable */ final class Null_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'null'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Nullable.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Nullable.php new file mode 100644 index 0000000..52c3d53 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Nullable.php @@ -0,0 +1,51 @@ +realType = $realType; + } + + /** + * Provide access to the actual type directly, if needed. + */ + public function getActualType(): Type + { + return $this->realType; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + */ + public function __toString(): string + { + return '?' . $this->realType->__toString(); + } +} diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Object_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Object_.php index b337c71..feb6ee3 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Object_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Object_.php @@ -1,43 +1,48 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\Types; +use InvalidArgumentException; use phpDocumentor\Reflection\Fqsen; use phpDocumentor\Reflection\Type; +use function strpos; + /** * Value Object representing an object. * * An object can be either typed or untyped. When an object is typed it means that it has an identifier, the FQSEN, * pointing to an element in PHP. Object types that are untyped do not refer to a specific class but represent objects * in general. + * + * @psalm-immutable */ final class Object_ implements Type { - /** @var Fqsen|null */ - private $fqsen; + private ?Fqsen $fqsen; /** * Initializes this object with an optional FQSEN, if not provided this object is considered 'untyped'. * - * @param Fqsen $fqsen + * @throws InvalidArgumentException When provided $fqsen is not a valid type. */ - public function __construct(Fqsen $fqsen = null) + public function __construct(?Fqsen $fqsen = null) { - if (strpos((string)$fqsen, '::') !== false || strpos((string)$fqsen, '()') !== false) { - throw new \InvalidArgumentException( + if (strpos((string) $fqsen, '::') !== false || strpos((string) $fqsen, '()') !== false) { + throw new InvalidArgumentException( 'Object types can only refer to a class, interface or trait but a method, function, constant or ' - . 'property was received: ' . (string)$fqsen + . 'property was received: ' . (string) $fqsen ); } @@ -46,23 +51,16 @@ final class Object_ implements Type /** * Returns the FQSEN associated with this object. - * - * @return Fqsen|null */ - public function getFqsen() + public function getFqsen(): ?Fqsen { return $this->fqsen; } - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string - */ - public function __toString() + public function __toString(): string { if ($this->fqsen) { - return (string)$this->fqsen; + return (string) $this->fqsen; } return 'object'; diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php new file mode 100644 index 0000000..3483859 --- /dev/null +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php @@ -0,0 +1,34 @@ + - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing the 'resource' Type. + * + * @psalm-immutable */ -final class Resource implements Type +final class Resource_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'resource'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php index 1e2a660..80241c2 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing the 'scalar' pseudo-type, which is either a string, integer, float or boolean. + * + * @psalm-immutable */ final class Scalar implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'scalar'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Self_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Self_.php index 1ba3fc5..5096126 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Self_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Self_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -18,15 +19,15 @@ use phpDocumentor\Reflection\Type; * Value Object representing the 'self' type. * * Self, as a Type, represents the class in which the associated element was defined. + * + * @psalm-immutable */ final class Self_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'self'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Static_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Static_.php index 9eb6729..6fe365f 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Static_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Static_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -23,15 +24,15 @@ use phpDocumentor\Reflection\Type; * * See the documentation on late static binding in the PHP Documentation for more information on the difference between * static and self. + * + * @psalm-immutable */ final class Static_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'static'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/String_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/String_.php index 8db5968..a4bb47f 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/String_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/String_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -16,15 +17,15 @@ use phpDocumentor\Reflection\Type; /** * Value Object representing the type 'string'. + * + * @psalm-immutable */ -final class String_ implements Type +class String_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'string'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/This.php b/api/vendor/phpdocumentor/type-resolver/src/Types/This.php index c098a93..602fc69 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/This.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/This.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -19,15 +20,15 @@ use phpDocumentor\Reflection\Type; * * $this, as a Type, represents the instance of the class associated with the element as it was called. $this is * commonly used when documenting fluent interfaces since it represents that the same object is returned. + * + * @psalm-immutable */ final class This implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return '$this'; } diff --git a/api/vendor/phpdocumentor/type-resolver/src/Types/Void_.php b/api/vendor/phpdocumentor/type-resolver/src/Types/Void_.php index 3d1be27..23a601d 100644 --- a/api/vendor/phpdocumentor/type-resolver/src/Types/Void_.php +++ b/api/vendor/phpdocumentor/type-resolver/src/Types/Void_.php @@ -1,12 +1,13 @@ - * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -15,19 +16,19 @@ namespace phpDocumentor\Reflection\Types; use phpDocumentor\Reflection\Type; /** - * Value Object representing the pseudo-type 'void'. + * Value Object representing the return-type 'void'. * * Void is generally only used when working with return types as it signifies that the method intentionally does not * return any value. + * + * @psalm-immutable */ final class Void_ implements Type { /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ - public function __toString() + public function __toString(): string { return 'void'; } diff --git a/api/vendor/phpdocumentor/type-resolver/tests/unit/TypeResolverTest.php b/api/vendor/phpdocumentor/type-resolver/tests/unit/TypeResolverTest.php deleted file mode 100644 index f226f8e..0000000 --- a/api/vendor/phpdocumentor/type-resolver/tests/unit/TypeResolverTest.php +++ /dev/null @@ -1,395 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use Mockery as m; -use phpDocumentor\Reflection\Types\Array_; -use phpDocumentor\Reflection\Types\Compound; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\Object_; - -/** - * @coversDefaultClass phpDocumentor\Reflection\TypeResolver - */ -class TypeResolverTest extends \PHPUnit_Framework_TestCase -{ - /** - * @param string $keyword - * @param string $expectedClass - * - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Array_ - * @uses phpDocumentor\Reflection\Types\Object_ - * - * @dataProvider provideKeywords - */ - public function testResolvingKeywords($keyword, $expectedClass) - { - $fixture = new TypeResolver(); - - $resolvedType = $fixture->resolve($keyword, new Context('')); - - $this->assertInstanceOf($expectedClass, $resolvedType); - } - - /** - * @param string $fqsen - * - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Object_ - * @uses phpDocumentor\Reflection\Fqsen - * @uses phpDocumentor\Reflection\FqsenResolver - * - * @dataProvider provideFqcn - */ - public function testResolvingFQSENs($fqsen) - { - $fixture = new TypeResolver(); - - /** @var Object_ $resolvedType */ - $resolvedType = $fixture->resolve($fqsen, new Context('')); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Object_', $resolvedType); - $this->assertInstanceOf('phpDocumentor\Reflection\Fqsen', $resolvedType->getFqsen()); - $this->assertSame($fqsen, (string)$resolvedType); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Object_ - * @uses phpDocumentor\Reflection\Fqsen - * @uses phpDocumentor\Reflection\FqsenResolver - */ - public function testResolvingRelativeQSENsBasedOnNamespace() - { - $fixture = new TypeResolver(); - - /** @var Object_ $resolvedType */ - $resolvedType = $fixture->resolve('DocBlock', new Context('phpDocumentor\Reflection')); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Object_', $resolvedType); - $this->assertInstanceOf('phpDocumentor\Reflection\Fqsen', $resolvedType->getFqsen()); - $this->assertSame('\phpDocumentor\Reflection\DocBlock', (string)$resolvedType); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Object_ - * @uses phpDocumentor\Reflection\Fqsen - * @uses phpDocumentor\Reflection\FqsenResolver - */ - public function testResolvingRelativeQSENsBasedOnNamespaceAlias() - { - $fixture = new TypeResolver(); - - /** @var Object_ $resolvedType */ - $resolvedType = $fixture->resolve( - 'm\MockInterface', - new Context('phpDocumentor\Reflection', ['m' => '\Mockery']) - ); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Object_', $resolvedType); - $this->assertInstanceOf('phpDocumentor\Reflection\Fqsen', $resolvedType->getFqsen()); - $this->assertSame('\Mockery\MockInterface', (string)$resolvedType); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Array_ - * @uses phpDocumentor\Reflection\Types\String_ - */ - public function testResolvingTypedArrays() - { - $fixture = new TypeResolver(); - - /** @var Array_ $resolvedType */ - $resolvedType = $fixture->resolve('string[]', new Context('')); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $resolvedType); - $this->assertSame('string[]', (string)$resolvedType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Compound', $resolvedType->getKeyType()); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\String_', $resolvedType->getValueType()); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Array_ - * @uses phpDocumentor\Reflection\Types\String_ - */ - public function testResolvingNestedTypedArrays() - { - $fixture = new TypeResolver(); - - /** @var Array_ $resolvedType */ - $resolvedType = $fixture->resolve('string[][]', new Context('')); - - /** @var Array_ $childValueType */ - $childValueType = $resolvedType->getValueType(); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $resolvedType); - - $this->assertSame('string[][]', (string)$resolvedType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Compound', $resolvedType->getKeyType()); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $childValueType); - - $this->assertSame('string[]', (string)$childValueType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Compound', $childValueType->getKeyType()); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\String_', $childValueType->getValueType()); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Compound - * @uses phpDocumentor\Reflection\Types\String_ - * @uses phpDocumentor\Reflection\Types\Object_ - * @uses phpDocumentor\Reflection\Fqsen - * @uses phpDocumentor\Reflection\FqsenResolver - */ - public function testResolvingCompoundTypes() - { - $fixture = new TypeResolver(); - - /** @var Compound $resolvedType */ - $resolvedType = $fixture->resolve('string|Reflection\DocBlock', new Context('phpDocumentor')); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Compound', $resolvedType); - $this->assertSame('string|\phpDocumentor\Reflection\DocBlock', (string)$resolvedType); - - /** @var String $secondType */ - $firstType = $resolvedType->get(0); - - /** @var Object_ $secondType */ - $secondType = $resolvedType->get(1); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\String_', $firstType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Object_', $secondType); - $this->assertInstanceOf('phpDocumentor\Reflection\Fqsen', $secondType->getFqsen()); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Compound - * @uses phpDocumentor\Reflection\Types\Array_ - * @uses phpDocumentor\Reflection\Types\Object_ - * @uses phpDocumentor\Reflection\Fqsen - * @uses phpDocumentor\Reflection\FqsenResolver - */ - public function testResolvingCompoundTypedArrayTypes() - { - $fixture = new TypeResolver(); - - /** @var Compound $resolvedType */ - $resolvedType = $fixture->resolve('\stdClass[]|Reflection\DocBlock[]', new Context('phpDocumentor')); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Compound', $resolvedType); - $this->assertSame('\stdClass[]|\phpDocumentor\Reflection\DocBlock[]', (string)$resolvedType); - - /** @var Array_ $secondType */ - $firstType = $resolvedType->get(0); - - /** @var Array_ $secondType */ - $secondType = $resolvedType->get(1); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $firstType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $secondType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Object_', $firstType->getValueType()); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Object_', $secondType->getValueType()); - } - - /** - * This test asserts that the parameter order is correct. - * - * When you pass two arrays separated by the compound operator (i.e. 'integer[]|string[]') then we always split the - * expression in its compound parts and then we parse the types with the array operators. If we were to switch the - * order around then 'integer[]|string[]' would read as an array of string or integer array; which is something - * other than what we intend. - * - * @covers ::__construct - * @covers ::resolve - * @covers :: - * - * @uses phpDocumentor\Reflection\Types\Context - * @uses phpDocumentor\Reflection\Types\Compound - * @uses phpDocumentor\Reflection\Types\Array_ - * @uses phpDocumentor\Reflection\Types\Integer - * @uses phpDocumentor\Reflection\Types\String_ - */ - public function testResolvingCompoundTypesWithTwoArrays() - { - $fixture = new TypeResolver(); - - /** @var Compound $resolvedType */ - $resolvedType = $fixture->resolve('integer[]|string[]', new Context('')); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Compound', $resolvedType); - $this->assertSame('int[]|string[]', (string)$resolvedType); - - /** @var Array_ $firstType */ - $firstType = $resolvedType->get(0); - - /** @var Array_ $secondType */ - $secondType = $resolvedType->get(1); - - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $firstType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Integer', $firstType->getValueType()); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\Array_', $secondType); - $this->assertInstanceOf('phpDocumentor\Reflection\Types\String_', $secondType->getValueType()); - } - - /** - * @covers ::__construct - * @covers ::addKeyword - * @uses phpDocumentor\Reflection\TypeResolver::resolve - * @uses phpDocumentor\Reflection\TypeResolver:: - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testAddingAKeyword() - { - // Assign - $typeMock = m::mock(Type::class); - - // Act - $fixture = new TypeResolver(); - $fixture->addKeyword('mock', get_class($typeMock)); - - // Assert - $result = $fixture->resolve('mock', new Context('')); - $this->assertInstanceOf(get_class($typeMock), $result); - $this->assertNotSame($typeMock, $result); - } - - /** - * @covers ::__construct - * @covers ::addKeyword - * @uses phpDocumentor\Reflection\Types\Context - * @expectedException \InvalidArgumentException - */ - public function testAddingAKeywordFailsIfTypeClassDoesNotExist() - { - $fixture = new TypeResolver(); - $fixture->addKeyword('mock', 'IDoNotExist'); - } - - /** - * @covers ::__construct - * @covers ::addKeyword - * @uses phpDocumentor\Reflection\Types\Context - * @expectedException \InvalidArgumentException - */ - public function testAddingAKeywordFailsIfTypeClassDoesNotImplementTypeInterface() - { - $fixture = new TypeResolver(); - $fixture->addKeyword('mock', 'stdClass'); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @uses phpDocumentor\Reflection\Types\Context - * - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfTypeIsEmpty() - { - $fixture = new TypeResolver(); - $fixture->resolve(' ', new Context('')); - } - - /** - * @covers ::__construct - * @covers ::resolve - * @uses phpDocumentor\Reflection\Types\Context - * - * @expectedException \InvalidArgumentException - */ - public function testExceptionIsThrownIfTypeIsNotAString() - { - $fixture = new TypeResolver(); - $fixture->resolve(['a'], new Context('')); - } - - /** - * Returns a list of keywords and expected classes that are created from them. - * - * @return string[][] - */ - public function provideKeywords() - { - return [ - ['string', 'phpDocumentor\Reflection\Types\String_'], - ['int', 'phpDocumentor\Reflection\Types\Integer'], - ['integer', 'phpDocumentor\Reflection\Types\Integer'], - ['float', 'phpDocumentor\Reflection\Types\Float_'], - ['double', 'phpDocumentor\Reflection\Types\Float_'], - ['bool', 'phpDocumentor\Reflection\Types\Boolean'], - ['boolean', 'phpDocumentor\Reflection\Types\Boolean'], - ['resource', 'phpDocumentor\Reflection\Types\Resource'], - ['null', 'phpDocumentor\Reflection\Types\Null_'], - ['callable', 'phpDocumentor\Reflection\Types\Callable_'], - ['callback', 'phpDocumentor\Reflection\Types\Callable_'], - ['array', 'phpDocumentor\Reflection\Types\Array_'], - ['scalar', 'phpDocumentor\Reflection\Types\Scalar'], - ['object', 'phpDocumentor\Reflection\Types\Object_'], - ['mixed', 'phpDocumentor\Reflection\Types\Mixed'], - ['void', 'phpDocumentor\Reflection\Types\Void_'], - ['$this', 'phpDocumentor\Reflection\Types\This'], - ['static', 'phpDocumentor\Reflection\Types\Static_'], - ['self', 'phpDocumentor\Reflection\Types\Self_'], - ]; - } - - /** - * Provides a list of FQSENs to test the resolution patterns with. - * - * @return string[][] - */ - public function provideFqcn() - { - return [ - 'namespace' => ['\phpDocumentor\Reflection'], - 'class' => ['\phpDocumentor\Reflection\DocBlock'], - ]; - } -} diff --git a/api/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextFactoryTest.php b/api/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextFactoryTest.php deleted file mode 100644 index 20d63c9..0000000 --- a/api/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextFactoryTest.php +++ /dev/null @@ -1,188 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\Types { - -// Added imports on purpose as mock for the unit tests, please do not remove. - use Mockery as m; - use phpDocumentor\Reflection\DocBlock, - phpDocumentor\Reflection\DocBlock\Tag; - use phpDocumentor; - use \ReflectionClass; // yes, the slash is part of the test - - /** - * @coversDefaultClass \phpDocumentor\Reflection\Types\ContextFactory - * @covers :: - */ - class ContextFactoryTest extends \PHPUnit_Framework_TestCase - { - /** - * @covers ::createFromReflector - * @covers ::createForNamespace - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testReadsNamespaceFromClassReflection() - { - $fixture = new ContextFactory(); - $context = $fixture->createFromReflector(new ReflectionClass($this)); - - $this->assertSame(__NAMESPACE__, $context->getNamespace()); - } - - /** - * @covers ::createFromReflector - * @covers ::createForNamespace - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testReadsAliasesFromClassReflection() - { - $fixture = new ContextFactory(); - $expected = [ - 'm' => 'Mockery', - 'DocBlock' => 'phpDocumentor\Reflection\DocBlock', - 'Tag' => 'phpDocumentor\Reflection\DocBlock\Tag', - 'phpDocumentor' => 'phpDocumentor', - 'ReflectionClass' => 'ReflectionClass' - ]; - $context = $fixture->createFromReflector(new ReflectionClass($this)); - - $this->assertSame($expected, $context->getNamespaceAliases()); - } - - /** - * @covers ::createForNamespace - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testReadsNamespaceFromProvidedNamespaceAndContent() - { - $fixture = new ContextFactory(); - $context = $fixture->createForNamespace(__NAMESPACE__, file_get_contents(__FILE__)); - - $this->assertSame(__NAMESPACE__, $context->getNamespace()); - } - - /** - * @covers ::createForNamespace - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testReadsAliasesFromProvidedNamespaceAndContent() - { - $fixture = new ContextFactory(); - $expected = [ - 'm' => 'Mockery', - 'DocBlock' => 'phpDocumentor\Reflection\DocBlock', - 'Tag' => 'phpDocumentor\Reflection\DocBlock\Tag', - 'phpDocumentor' => 'phpDocumentor', - 'ReflectionClass' => 'ReflectionClass' - ]; - $context = $fixture->createForNamespace(__NAMESPACE__, file_get_contents(__FILE__)); - - $this->assertSame($expected, $context->getNamespaceAliases()); - } - - /** - * @covers ::createForNamespace - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testTraitUseIsNotDetectedAsNamespaceUse() - { - $php = "createForNamespace('Foo', $php); - - $this->assertSame([], $context->getNamespaceAliases()); - } - - /** - * @covers ::createForNamespace - * @uses phpDocumentor\Reflection\Types\Context - */ - public function testAllOpeningBracesAreCheckedWhenSearchingForEndOfClass() - { - $php = 'createForNamespace('Foo', $php); - - $this->assertSame([], $context->getNamespaceAliases()); - } - - /** - * @covers ::createFromReflector - */ - public function testEmptyFileName() - { - $fixture = new ContextFactory(); - $context = $fixture->createFromReflector(new \ReflectionClass('stdClass')); - - $this->assertSame([], $context->getNamespaceAliases()); - } - - /** - * @covers ::createFromReflector - */ - public function testEvalDClass() - { - eval(<<createFromReflector(new \ReflectionClass('Foo\Bar')); - - $this->assertSame([], $context->getNamespaceAliases()); - } - } -} - -namespace phpDocumentor\Reflection\Types\Mock { - // the following import should not show in the tests above - use phpDocumentor\Reflection\DocBlock\Description; -} diff --git a/api/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextTest.php b/api/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextTest.php deleted file mode 100644 index 165f415..0000000 --- a/api/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextTest.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\Types; - -use Mockery as m; - -/** - * @coversDefaultClass \phpDocumentor\Reflection\Types\Context - */ -class ContextTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers ::__construct - * @covers ::getNamespace - */ - public function testProvidesANormalizedNamespace() - { - $fixture = new Context('\My\Space'); - $this->assertSame('My\Space', $fixture->getNamespace()); - } - - /** - * @covers ::__construct - * @covers ::getNamespace - */ - public function testInterpretsNamespaceNamedGlobalAsRootNamespace() - { - $fixture = new Context('global'); - $this->assertSame('', $fixture->getNamespace()); - } - - /** - * @covers ::__construct - * @covers ::getNamespace - */ - public function testInterpretsNamespaceNamedDefaultAsRootNamespace() - { - $fixture = new Context('default'); - $this->assertSame('', $fixture->getNamespace()); - } - - /** - * @covers ::__construct - * @covers ::getNamespaceAliases - */ - public function testProvidesNormalizedNamespaceAliases() - { - $fixture = new Context('', ['Space' => '\My\Space']); - $this->assertSame(['Space' => 'My\Space'], $fixture->getNamespaceAliases()); - } -} diff --git a/api/vendor/phpspec/prophecy/.gitignore b/api/vendor/phpspec/prophecy/.gitignore deleted file mode 100644 index 88ee1c1..0000000 --- a/api/vendor/phpspec/prophecy/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.tgz -*.phar -/composer.lock -/vendor -/phpunit.xml diff --git a/api/vendor/phpspec/prophecy/.travis.yml b/api/vendor/phpspec/prophecy/.travis.yml deleted file mode 100644 index a277922..0000000 --- a/api/vendor/phpspec/prophecy/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -branches: - except: - - /^bugfix\/.*$/ - - /^feature\/.*$/ - - /^optimization\/.*$/ - -matrix: - include: - - php: 5.3 - - php: 5.4 - - php: 5.5 - - php: 5.6 - env: DEPENDENCIES='low' - - php: 5.6 - - php: 7.0 - - php: 7.1 - # Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version - - php: hhvm - sudo: required - dist: trusty - group: edge - fast_finish: true - -install: - - export COMPOSER_ROOT_VERSION=dev-master - - if [ "$DEPENDENCIES" != "low" ]; then composer update; fi; - - if [ "$DEPENDENCIES" == "low" ]; then composer update --prefer-lowest; fi; - -script: - - vendor/bin/phpspec run -fpretty -v - - vendor/bin/phpunit diff --git a/api/vendor/phpspec/prophecy/CHANGES.md b/api/vendor/phpspec/prophecy/CHANGES.md index 996567a..97baaf1 100644 --- a/api/vendor/phpspec/prophecy/CHANGES.md +++ b/api/vendor/phpspec/prophecy/CHANGES.md @@ -1,3 +1,86 @@ +1.10.3 / 2020/03/05 +=================== + +* [fixed] removed fatal error when phpdocumentor/reflection-docblock 5 parses an invalid `@method` tag (@stof) + +1.10.2 / 2020/01/20 +=================== + +* [added] support for new versions of `sebastian/comparator` and `sebastian/recursion-context` (@sebastianbergmann) + +1.10.1 / 2019/12/22 +=================== + +* [fixed] identical callables no longer match as arguments (@ciaranmcnulty) + +1.10.0 / 2019/12/17 +=================== + +* [added] shouldHaveBeenCalled evaluation happens later so un-stubbed calls don't throw (@elvetemedve) +* [added] methods can now be doubled case-insensitively to match PHP semantics (@michalbundyra) +* [fixed] reduced memory usage by optimising CachedDoubler (@DonCallisto) +* [fixed] removed fatal error nesting level when comparing large objects (@scroach) + +1.9.0 / 2019/10/03 +================== + +* [added] Add willYield feature to Method Prophecy(@tkotosz) +* [fixed] Allow `MethodProphecy::willThrow()` to accept Throwable as string (@timoschinkel ) +* [fixed] Allow new version of phpdocumentor/reflection-docblock (@ricpelo) + +1.8.1 / 2019/06/13 +================== + +* [fixed] Don't try to patch final constructors (@NiR) + +1.8.0 / 2018/08/05 +================== + +* Support for void return types without explicit will (@crellbar) +* Clearer error message for unexpected method calls (@meridius) +* Clearer error message for aggregate exceptions (@meridius) +* More verbose `shouldBeCalledOnce` expectation (@olvlvl) +* Ability to double Throwable, or methods that extend it (@ciaranmcnulty) +* [fixed] Doubling methods where class has additional arguments to interface (@webimpress) +* [fixed] Doubling methods where arguments are nullable but default is not null (@webimpress) +* [fixed] Doubling magic methods on parent class (@dsnopek) +* [fixed] Check method predictions only once (@dontub) +* [fixed] Argument::containingString throwing error when called with non-string (@dcabrejas) + +1.7.6 / 2018/04/18 +================== + +* Allow sebastian/comparator ^3.0 (@sebastianbergmann) + +1.7.5 / 2018/02/11 +================== + +* Support for object return type hints (thanks @greg0ire) + +1.7.4 / 2018/02/11 +================== + +* Fix issues with PHP 7.2 (thanks @greg0ire) +* Support object type hints in PHP 7.2 (thanks @@jansvoboda11) + +1.7.3 / 2017/11/24 +================== + +* Fix SplInfo ClassPatch to work with Symfony 4 (Thanks @gnugat) + +1.7.2 / 2017-10-04 +================== + +* Reverted "check method predictions only once" due to it breaking Spies + +1.7.1 / 2017-10-03 +================== + +* Allow PHP5 keywords methods generation on PHP7 (thanks @bycosta) +* Allow reflection-docblock v4 (thanks @GrahamCampbell) +* Check method predictions only once (thanks @dontub) +* Escape file path sent to \SplFileObjectConstructor when running on Windows (thanks @danmartin-epiphany) + 1.7.0 / 2017-03-02 ================== diff --git a/api/vendor/phpspec/prophecy/CONTRIBUTING.md b/api/vendor/phpspec/prophecy/CONTRIBUTING.md deleted file mode 100644 index 4a8169d..0000000 --- a/api/vendor/phpspec/prophecy/CONTRIBUTING.md +++ /dev/null @@ -1,22 +0,0 @@ -Contributing ------------- - -Prophecy is an open source, community-driven project. If you'd like to contribute, -feel free to do this, but remember to follow these few simple rules: - -- Make your feature addition or bug fix, -- Add either specs or examples for any changes you're making (bugfixes or additions) - (please look into `spec/` folder for some examples). This is important so we don't break - it in a future version unintentionally, -- Commit your code, but do not mess with `CHANGES.md`, - -Running tests -------------- - -Make sure that you don't break anything with your changes by running: - -```bash -$> composer install --prefer-dist -$> vendor/bin/phpspec run -$> vendor/bin/phpunit -``` diff --git a/api/vendor/phpspec/prophecy/README.md b/api/vendor/phpspec/prophecy/README.md index 65ec16c..3da9b59 100644 --- a/api/vendor/phpspec/prophecy/README.md +++ b/api/vendor/phpspec/prophecy/README.md @@ -12,7 +12,7 @@ enough to be used inside any testing framework out there with minimal effort. ```php assertEquals('hashed_pass', $user->getPassword()); } - protected function setup() + protected function setUp() { $this->prophet = new \Prophecy\Prophet; } @@ -159,7 +159,7 @@ promise, there's plenty others you can use: - `ReturnPromise` or `->willReturn(1)` - returns a value from a method call - `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call -- `ThrowPromise` or `->willThrow` - causes the method to throw specific exception +- `ThrowPromise` or `->willThrow($exception)` - causes the method to throw specific exception - `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic Keep in mind, that you can always add even more promises by implementing @@ -206,6 +206,17 @@ $user->setName('everzet')->will(function ($args) use ($user) { And now it doesn't matter how many times or in which order your methods are called. What matters is their behaviors and how well you faked it. +Note: If the method is called several times, you can use the following syntax to return different +values for each call: + +```php +$prophecy->read('123')->willReturn(1, 2, 3); +``` + +This feature is actually not recommended for most cases. Relying on the order of +calls for the same arguments tends to make test fragile, as adding one more call +can break everything. + #### Arguments wildcarding The previous example is awesome (at least I hope it is for you), but that's not diff --git a/api/vendor/phpspec/prophecy/composer.json b/api/vendor/phpspec/prophecy/composer.json index 7918065..7151160 100644 --- a/api/vendor/phpspec/prophecy/composer.json +++ b/api/vendor/phpspec/prophecy/composer.json @@ -19,20 +19,20 @@ "require": { "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", "doctrine/instantiator": "^1.0.2", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, @@ -44,7 +44,7 @@ "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.10.x-dev" } } } diff --git a/api/vendor/phpspec/prophecy/fixtures/EmptyClass.php b/api/vendor/phpspec/prophecy/fixtures/EmptyClass.php deleted file mode 100644 index 4db3b50..0000000 --- a/api/vendor/phpspec/prophecy/fixtures/EmptyClass.php +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - - - - tests - - - - - - ./src/ - - - diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php deleted file mode 100644 index b82f1b8..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php +++ /dev/null @@ -1,128 +0,0 @@ -beConstructedWith(array(42, 'zet', $object)); - - $class = get_class($object->getWrappedObject()); - $hash = spl_object_hash($object->getWrappedObject()); - - $this->__toString()->shouldReturn("exact(42), exact(\"zet\"), exact($class:$hash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); - } - - function it_generates_string_representation_from_all_tokens_imploded( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->__toString()->willReturn('token_1'); - $token2->__toString()->willReturn('token_2'); - $token3->__toString()->willReturn('token_3'); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->__toString()->shouldReturn('token_1, token_2, token_3'); - } - - function it_exposes_list_of_tokens(TokenInterface $token) - { - $this->beConstructedWith(array($token)); - - $this->getTokens()->shouldReturn(array($token)); - } - - function it_returns_score_of_1_if_there_are_no_tokens_and_arguments() - { - $this->beConstructedWith(array()); - - $this->scoreArguments(array())->shouldReturn(1); - } - - function it_should_return_match_score_based_on_all_tokens_score( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(5); - $token2->isLast()->willReturn(false); - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj))->shouldReturn(18); - } - - function it_returns_false_if_there_is_less_arguments_than_tokens( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(5); - $token2->isLast()->willReturn(false); - $token3->scoreArgument(null)->willReturn(false); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2))->shouldReturn(false); - } - - function it_returns_false_if_there_is_less_tokens_than_arguments( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(5); - $token2->isLast()->willReturn(false); - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj, 4))->shouldReturn(false); - } - - function it_should_return_false_if_one_of_the_tokens_returns_false( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(false); - $token2->isLast()->willReturn(false); - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj))->shouldReturn(false); - } - - function it_should_calculate_score_until_last_token( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - - $token2->scoreArgument(2)->willReturn(7); - $token2->isLast()->willReturn(true); - - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj))->shouldReturn(10); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php deleted file mode 100644 index a43e923..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php +++ /dev/null @@ -1,28 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function its_string_representation_is_star() - { - $this->__toString()->shouldReturn('*'); - } - - function it_scores_any_argument_as_3() - { - $this->scoreArgument(42)->shouldReturn(3); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php deleted file mode 100644 index c29076f..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php +++ /dev/null @@ -1,28 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_last() - { - $this->shouldBeLast(); - } - - function its_string_representation_is_star_with_followup() - { - $this->__toString()->shouldReturn('* [, ...]'); - } - - function it_scores_any_argument_as_2() - { - $this->scoreArgument(42)->shouldReturn(2); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php deleted file mode 100644 index 8799d6d..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php +++ /dev/null @@ -1,55 +0,0 @@ -beConstructedWith(10.12345678, 4); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Argument\Token\ApproximateValueToken'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_10_if_rounded_argument_matches_rounded_value() - { - $this->scoreArgument(10.12345)->shouldReturn(10); - } - - function it_does_not_score_if_rounded_argument_does_not_match_rounded_value() - { - $this->scoreArgument(10.1234)->shouldReturn(false); - } - - function it_uses_a_default_precision_of_zero() - { - $this->beConstructedWith(10.7); - $this->scoreArgument(11.4)->shouldReturn(10); - } - - function it_does_not_score_if_rounded_argument_is_not_numeric() - { - $this->scoreArgument('hello')->shouldReturn(false); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldBe('≅10.1235'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php deleted file mode 100644 index cc81fe0..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php +++ /dev/null @@ -1,58 +0,0 @@ -beConstructedWith(2); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_6_if_argument_array_has_proper_count() - { - $this->scoreArgument(array(1,2))->shouldReturn(6); - } - - function it_scores_6_if_argument_countable_object_has_proper_count(\Countable $countable) - { - $countable->count()->willReturn(2); - $this->scoreArgument($countable)->shouldReturn(6); - } - - function it_does_not_score_if_argument_is_neither_array_nor_countable_object() - { - $this->scoreArgument('string')->shouldBe(false); - $this->scoreArgument(5)->shouldBe(false); - $this->scoreArgument(new \stdClass)->shouldBe(false); - } - - function it_does_not_score_if_argument_array_has_wrong_count() - { - $this->scoreArgument(array(1))->shouldReturn(false); - } - - function it_does_not_score_if_argument_countable_object_has_wrong_count(\Countable $countable) - { - $countable->count()->willReturn(3); - $this->scoreArgument($countable)->shouldReturn(false); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldBe('count(2)'); - } - -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php deleted file mode 100644 index 632118a..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php +++ /dev/null @@ -1,202 +0,0 @@ -beConstructedWith($key, $value); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_holds_key_and_value($key, $value) - { - $this->getKey()->shouldBe($key); - $this->getValue()->shouldBe($value); - } - - function its_string_representation_tells_that_its_an_array_containing_the_key_value_pair($key, $value) - { - $key->__toString()->willReturn('key'); - $value->__toString()->willReturn('value'); - $this->__toString()->shouldBe('[..., key => value, ...]'); - } - - function it_wraps_non_token_value_into_ExactValueToken(TokenInterface $key, \stdClass $object) - { - $this->beConstructedWith($key, $object); - $this->getValue()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken'); - } - - function it_wraps_non_token_key_into_ExactValueToken(\stdClass $object, TokenInterface $value) - { - $this->beConstructedWith($object, $value); - $this->getKey()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken'); - } - - function it_scores_array_half_of_combined_scores_from_key_and_value_tokens($key, $value) - { - $key->scoreArgument('key')->willReturn(4); - $value->scoreArgument('value')->willReturn(6); - $this->scoreArgument(array('key'=>'value'))->shouldBe(5); - } - - function it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens( - TokenInterface $key, - TokenInterface $value, - \Iterator $object - ) { - $object->current()->will(function () use ($object) { - $object->valid()->willReturn(false); - - return 'value'; - }); - $object->key()->willReturn('key'); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $key->scoreArgument('key')->willReturn(6); - $value->scoreArgument('value')->willReturn(2); - $this->scoreArgument($object)->shouldBe(4); - } - - function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken( - TokenInterface $key, - TokenInterface $value, - \ArrayAccess $object - ) { - $key->__toString()->willReturn('any_token'); - $this->beConstructedWith($key,$value); - $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. - 'But you used `any_token`.'; - $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object); - } - - function it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens( - ExactValueToken $key, - TokenInterface $value, - \ArrayAccess $object - ) { - $object->offsetExists('key')->willReturn(true); - $object->offsetGet('key')->willReturn('value'); - $key->getValue()->willReturn('key'); - $key->scoreArgument('key')->willReturn(3); - $value->scoreArgument('value')->willReturn(1); - $this->scoreArgument($object)->shouldBe(2); - } - - function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible( - TokenInterface $key, - TokenInterface $value, - \ArrayIterator $object - ) { - $this->beConstructedWith($key, $value); - $object->current()->will(function () use ($object) { - $object->valid()->willReturn(false); - - return 'value'; - }); - $object->key()->willReturn('key'); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $this->shouldNotThrow(new InvalidArgumentException)->duringScoreArgument($object); - } - - function it_does_not_score_if_argument_is_neither_array_nor_traversable_nor_array_accessible() - { - $this->scoreArgument('string')->shouldBe(false); - $this->scoreArgument(new \stdClass)->shouldBe(false); - } - - function it_does_not_score_empty_array() - { - $this->scoreArgument(array())->shouldBe(false); - } - - function it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry($key, $value) - { - $argument = array(1 => 'foo', 2 => 'bar'); - $key->scoreArgument(1)->willReturn(true); - $key->scoreArgument(2)->willReturn(false); - $value->scoreArgument('foo')->willReturn(false); - $value->scoreArgument('bar')->willReturn(true); - $this->scoreArgument($argument)->shouldBe(false); - } - - function it_does_not_score_traversable_object_without_entries(\Iterator $object) - { - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(false); - $this->scoreArgument($object)->shouldBe(false); - } - - function it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry( - TokenInterface $key, - TokenInterface $value, - \Iterator $object - ) { - $object->current()->willReturn('foo'); - $object->current()->will(function () use ($object) { - $object->valid()->willReturn(false); - - return 'bar'; - }); - $object->key()->willReturn(1); - $object->key()->willReturn(2); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $key->scoreArgument(1)->willReturn(true); - $key->scoreArgument(2)->willReturn(false); - $value->scoreArgument('foo')->willReturn(false); - $value->scoreArgument('bar')->willReturn(true); - $this->scoreArgument($object)->shouldBe(false); - } - - function it_does_not_score_array_accessible_object_if_it_has_no_offset_with_key_token_value( - ExactValueToken $key, - \ArrayAccess $object - ) { - $object->offsetExists('key')->willReturn(false); - $key->getValue()->willReturn('key'); - $this->scoreArgument($object)->shouldBe(false); - } - - function it_does_not_score_array_accessible_object_if_key_and_value_tokens_do_not_score_same_entry( - ExactValueToken $key, - TokenInterface $value, - \ArrayAccess $object - ) { - $object->offsetExists('key')->willReturn(true); - $object->offsetGet('key')->willReturn('value'); - $key->getValue()->willReturn('key'); - $value->scoreArgument('value')->willReturn(false); - $key->scoreArgument('key')->willReturn(true); - $this->scoreArgument($object)->shouldBe(false); - } - - function its_score_is_capped_at_8($key, $value) - { - $key->scoreArgument('key')->willReturn(10); - $value->scoreArgument('value')->willReturn(10); - $this->scoreArgument(array('key'=>'value'))->shouldBe(8); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php deleted file mode 100644 index e57ff8c..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php +++ /dev/null @@ -1,96 +0,0 @@ -beConstructedWith($value); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_holds_value($value) - { - $this->getValue()->shouldBe($value); - } - - function its_string_representation_tells_that_its_an_array_containing_only_value($value) - { - $value->__toString()->willReturn('value'); - $this->__toString()->shouldBe('[value, ..., value]'); - } - - function it_wraps_non_token_value_into_ExactValueToken(\stdClass $stdClass) - { - $this->beConstructedWith($stdClass); - $this->getValue()->shouldHaveType('Prophecy\Argument\Token\ExactValueToken'); - } - - function it_does_not_score_if_argument_is_neither_array_nor_traversable() - { - $this->scoreArgument('string')->shouldBe(false); - $this->scoreArgument(new \stdClass)->shouldBe(false); - } - - function it_does_not_score_empty_array() - { - $this->scoreArgument(array())->shouldBe(false); - } - - function it_does_not_score_traversable_object_without_entries(\Iterator $object) - { - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(false); - $this->scoreArgument($object)->shouldBe(false); - } - - function it_scores_avg_of_scores_from_value_tokens($value) - { - $value->scoreArgument('value1')->willReturn(6); - $value->scoreArgument('value2')->willReturn(3); - $this->scoreArgument(array('value1', 'value2'))->shouldBe(4.5); - } - - function it_scores_false_if_entry_scores_false($value) - { - $value->scoreArgument('value1')->willReturn(6); - $value->scoreArgument('value2')->willReturn(false); - $this->scoreArgument(array('value1', 'value2'))->shouldBe(false); - } - - function it_does_not_score_array_keys($value) - { - $value->scoreArgument('value')->willReturn(6); - $value->scoreArgument('key')->shouldNotBeCalled(0); - $this->scoreArgument(array('key' => 'value'))->shouldBe(6); - } - - function it_scores_traversable_object_from_value_token(TokenInterface $value, \Iterator $object) - { - $object->current()->will(function ($args, $object) { - $object->valid()->willReturn(false); - - return 'value'; - }); - $object->key()->willReturn('key'); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $value->scoreArgument('value')->willReturn(2); - $this->scoreArgument($object)->shouldBe(2); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php deleted file mode 100644 index 4395bf0..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php +++ /dev/null @@ -1,42 +0,0 @@ -beConstructedWith('get_class'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_7_if_argument_matches_callback() - { - $this->beConstructedWith(function ($argument) { return 2 === $argument; }); - - $this->scoreArgument(2)->shouldReturn(7); - } - - function it_does_not_scores_if_argument_does_not_match_callback() - { - $this->beConstructedWith(function ($argument) { return 2 === $argument; }); - - $this->scoreArgument(5)->shouldReturn(false); - } - - function its_string_representation_should_tell_that_its_callback() - { - $this->__toString()->shouldReturn('callback()'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php deleted file mode 100644 index 14322f8..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php +++ /dev/null @@ -1,152 +0,0 @@ -beConstructedWith(42); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_holds_value() - { - $this->getValue()->shouldReturn(42); - } - - function it_scores_10_if_value_is_equal_to_argument() - { - $this->scoreArgument(42)->shouldReturn(10); - $this->scoreArgument('42')->shouldReturn(10); - } - - function it_scores_10_if_value_is_an_object_and_equal_to_argument() - { - $value = new \DateTime(); - $value2 = clone $value; - - $this->beConstructedWith($value); - $this->scoreArgument($value2)->shouldReturn(10); - } - - function it_does_not_scores_if_value_is_not_equal_to_argument() - { - $this->scoreArgument(50)->shouldReturn(false); - $this->scoreArgument(new \stdClass())->shouldReturn(false); - } - - function it_does_not_scores_if_value_an_object_and_is_not_equal_to_argument() - { - $value = new ExactValueTokenFixtureB('ABC'); - $value2 = new ExactValueTokenFixtureB('CBA'); - - $this->beConstructedWith($value); - $this->scoreArgument($value2)->shouldReturn(false); - } - - function it_does_not_scores_if_value_type_and_is_not_equal_to_argument() - { - $this->beConstructedWith(false); - $this->scoreArgument(0)->shouldReturn(false); - } - - function it_generates_proper_string_representation_for_integer() - { - $this->beConstructedWith(42); - $this->__toString()->shouldReturn('exact(42)'); - } - - function it_generates_proper_string_representation_for_string() - { - $this->beConstructedWith('some string'); - $this->__toString()->shouldReturn('exact("some string")'); - } - - function it_generates_single_line_representation_for_multiline_string() - { - $this->beConstructedWith("some\nstring"); - $this->__toString()->shouldReturn('exact("some\\nstring")'); - } - - function it_generates_proper_string_representation_for_double() - { - $this->beConstructedWith(42.3); - $this->__toString()->shouldReturn('exact(42.3)'); - } - - function it_generates_proper_string_representation_for_boolean_true() - { - $this->beConstructedWith(true); - $this->__toString()->shouldReturn('exact(true)'); - } - - function it_generates_proper_string_representation_for_boolean_false() - { - $this->beConstructedWith(false); - $this->__toString()->shouldReturn('exact(false)'); - } - - function it_generates_proper_string_representation_for_null() - { - $this->beConstructedWith(null); - $this->__toString()->shouldReturn('exact(null)'); - } - - function it_generates_proper_string_representation_for_empty_array() - { - $this->beConstructedWith(array()); - $this->__toString()->shouldReturn('exact([])'); - } - - function it_generates_proper_string_representation_for_array() - { - $this->beConstructedWith(array('zet', 42)); - $this->__toString()->shouldReturn('exact(["zet", 42])'); - } - - function it_generates_proper_string_representation_for_resource() - { - $resource = fopen(__FILE__, 'r'); - $this->beConstructedWith($resource); - $this->__toString()->shouldReturn('exact(stream:'.$resource.')'); - } - - function it_generates_proper_string_representation_for_object(\stdClass $object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ); - - $this->beConstructedWith($object); - $this->__toString()->shouldReturn("exact($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); - } -} - -class ExactValueTokenFixtureA -{ - public $errors; -} - -class ExactValueTokenFixtureB extends ExactValueTokenFixtureA -{ - public $errors; - public $value = null; - - public function __construct($value) - { - $this->value = $value; - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php deleted file mode 100644 index 00c3a21..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php +++ /dev/null @@ -1,152 +0,0 @@ -beConstructedWith(42); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Argument\Token\IdenticalValueToken'); - } - - function it_scores_11_if_string_value_is_identical_to_argument() - { - $this->beConstructedWith('foo'); - $this->scoreArgument('foo')->shouldReturn(11); - } - - function it_scores_11_if_boolean_value_is_identical_to_argument() - { - $this->beConstructedWith(false); - $this->scoreArgument(false)->shouldReturn(11); - } - - function it_scores_11_if_integer_value_is_identical_to_argument() - { - $this->beConstructedWith(31); - $this->scoreArgument(31)->shouldReturn(11); - } - - function it_scores_11_if_float_value_is_identical_to_argument() - { - $this->beConstructedWith(31.12); - $this->scoreArgument(31.12)->shouldReturn(11); - } - - function it_scores_11_if_array_value_is_identical_to_argument() - { - $this->beConstructedWith(array('foo' => 'bar')); - $this->scoreArgument(array('foo' => 'bar'))->shouldReturn(11); - } - - function it_scores_11_if_object_value_is_identical_to_argument() - { - $object = new \stdClass(); - - $this->beConstructedWith($object); - $this->scoreArgument($object)->shouldReturn(11); - } - - function it_scores_false_if_value_is_not_identical_to_argument() - { - $this->beConstructedWith(new \stdClass()); - $this->scoreArgument('foo')->shouldReturn(false); - } - - function it_scores_false_if_object_value_is_not_the_same_instance_than_argument() - { - $this->beConstructedWith(new \stdClass()); - $this->scoreArgument(new \stdClass())->shouldReturn(false); - } - - function it_scores_false_if_integer_value_is_not_identical_to_boolean_argument() - { - $this->beConstructedWith(1); - $this->scoreArgument(true)->shouldReturn(false); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_generates_proper_string_representation_for_integer() - { - $this->beConstructedWith(42); - $this->__toString()->shouldReturn('identical(42)'); - } - - function it_generates_proper_string_representation_for_string() - { - $this->beConstructedWith('some string'); - $this->__toString()->shouldReturn('identical("some string")'); - } - - function it_generates_single_line_representation_for_multiline_string() - { - $this->beConstructedWith("some\nstring"); - $this->__toString()->shouldReturn('identical("some\\nstring")'); - } - - function it_generates_proper_string_representation_for_double() - { - $this->beConstructedWith(42.3); - $this->__toString()->shouldReturn('identical(42.3)'); - } - - function it_generates_proper_string_representation_for_boolean_true() - { - $this->beConstructedWith(true); - $this->__toString()->shouldReturn('identical(true)'); - } - - function it_generates_proper_string_representation_for_boolean_false() - { - $this->beConstructedWith(false); - $this->__toString()->shouldReturn('identical(false)'); - } - - function it_generates_proper_string_representation_for_null() - { - $this->beConstructedWith(null); - $this->__toString()->shouldReturn('identical(null)'); - } - - function it_generates_proper_string_representation_for_empty_array() - { - $this->beConstructedWith(array()); - $this->__toString()->shouldReturn('identical([])'); - } - - function it_generates_proper_string_representation_for_array() - { - $this->beConstructedWith(array('zet', 42)); - $this->__toString()->shouldReturn('identical(["zet", 42])'); - } - - function it_generates_proper_string_representation_for_resource() - { - $resource = fopen(__FILE__, 'r'); - $this->beConstructedWith($resource); - $this->__toString()->shouldReturn('identical(stream:'.$resource.')'); - } - - function it_generates_proper_string_representation_for_object($object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ); - - $this->beConstructedWith($object); - $this->__toString()->shouldReturn("identical($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php deleted file mode 100644 index a79acf4..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php +++ /dev/null @@ -1,69 +0,0 @@ -beConstructedWith(array()); - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->beConstructedWith(array()); - $this->shouldNotBeLast(); - } - - function it_generates_string_representation_from_all_tokens_imploded( - TokenInterface $token1, - TokenInterface $token2, - TokenInterface $token3 - ) { - $token1->__toString()->willReturn('token_1'); - $token2->__toString()->willReturn('token_2'); - $token3->__toString()->willReturn('token_3'); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->__toString()->shouldReturn('bool(token_1 AND token_2 AND token_3)'); - } - - function it_wraps_non_token_arguments_into_ExactValueToken() - { - $this->beConstructedWith(array(15, '1985')); - $this->__toString()->shouldReturn("bool(exact(15) AND exact(\"1985\"))"); - } - - function it_scores_the_maximum_score_from_all_scores_returned_by_tokens(TokenInterface $token1, TokenInterface $token2) - { - $token1->scoreArgument(1)->willReturn(10); - $token2->scoreArgument(1)->willReturn(5); - $this->beConstructedWith(array($token1, $token2)); - $this->scoreArgument(1)->shouldReturn(10); - } - - function it_does_not_score_if_there_are_no_arguments_or_tokens() - { - $this->beConstructedWith(array()); - $this->scoreArgument('any')->shouldReturn(false); - } - - function it_does_not_score_if_either_of_tokens_does_not_score(TokenInterface $token1, TokenInterface $token2) - { - $token1->scoreArgument(1)->willReturn(10); - $token1->scoreArgument(2)->willReturn(false); - - $token2->scoreArgument(1)->willReturn(false); - $token2->scoreArgument(2)->willReturn(10); - - $this->beConstructedWith(array($token1, $token2)); - - $this->scoreArgument(1)->shouldReturn(false); - $this->scoreArgument(2)->shouldReturn(false); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php deleted file mode 100644 index c2cbbad..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php +++ /dev/null @@ -1,62 +0,0 @@ -beConstructedWith($token); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_holds_originating_token($token) - { - $this->getOriginatingToken()->shouldReturn($token); - } - - function it_has_simple_string_representation($token) - { - $token->__toString()->willReturn('value'); - $this->__toString()->shouldBe('not(value)'); - } - - function it_wraps_non_token_argument_into_ExactValueToken() - { - $this->beConstructedWith(5); - $token = $this->getOriginatingToken(); - $token->shouldhaveType('Prophecy\Argument\Token\ExactValueToken'); - $token->getValue()->shouldBe(5); - } - - function it_scores_4_if_preset_token_does_not_match_the_argument($token) - { - $token->scoreArgument('argument')->willReturn(false); - $this->scoreArgument('argument')->shouldBe(4); - } - - function it_does_not_score_if_preset_token_matches_argument($token) - { - $token->scoreArgument('argument')->willReturn(5); - $this->scoreArgument('argument')->shouldBe(false); - } - - function it_is_last_if_preset_token_is_last($token) - { - $token->isLast()->willReturn(true); - $this->shouldBeLast(); - } - - function it_is_not_last_if_preset_token_is_not_last($token) - { - $token->isLast()->willReturn(false); - $this->shouldNotBeLast(); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php deleted file mode 100644 index d71b22a..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php +++ /dev/null @@ -1,89 +0,0 @@ -beConstructedWith('getName', 'stdClass'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_8_if_argument_object_has_specific_method_state(\ReflectionClass $reflection) - { - $reflection->getName()->willReturn('stdClass'); - - $this->scoreArgument($reflection)->shouldReturn(8); - } - - function it_scores_8_if_argument_object_has_specific_property_state(\stdClass $class) - { - $class->getName = 'stdClass'; - - $this->scoreArgument($class)->shouldReturn(8); - } - - function it_does_not_score_if_argument_method_state_does_not_match() - { - $value = new ObjectStateTokenFixtureB('ABC'); - $value2 = new ObjectStateTokenFixtureB('CBA'); - - $this->beConstructedWith('getSelf', $value); - $this->scoreArgument($value2)->shouldReturn(false); - } - - function it_does_not_score_if_argument_property_state_does_not_match(\stdClass $class) - { - $class->getName = 'SplFileInfo'; - - $this->scoreArgument($class)->shouldReturn(false); - } - - function it_does_not_score_if_argument_object_does_not_have_method_or_property(ObjectStateTokenFixtureA $class) - { - $this->scoreArgument($class)->shouldReturn(false); - } - - function it_does_not_score_if_argument_is_not_object() - { - $this->scoreArgument(42)->shouldReturn(false); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldReturn('state(getName(), "stdClass")'); - } -} - -class ObjectStateTokenFixtureA -{ - public $errors; -} - -class ObjectStateTokenFixtureB extends ObjectStateTokenFixtureA -{ - public $errors; - public $value = null; - - public function __construct($value) - { - $this->value = $value; - } - - public function getSelf() - { - return $this; - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php deleted file mode 100644 index c7fd265..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php +++ /dev/null @@ -1,49 +0,0 @@ -beConstructedWith('a substring'); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Argument\Token\StringContainsToken'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_holds_value() - { - $this->getValue()->shouldReturn('a substring'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_6_if_the_argument_contains_the_value() - { - $this->scoreArgument('Argument containing a substring')->shouldReturn(6); - } - - function it_does_not_score_if_the_argument_does_not_contain_the_value() - { - $this->scoreArgument('Argument will not match')->shouldReturn(false); - } - - function its_string_representation_shows_substring() - { - $this->__toString()->shouldReturn('contains("a substring")'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php deleted file mode 100644 index 2829f31..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php +++ /dev/null @@ -1,57 +0,0 @@ -beConstructedWith('integer'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_5_if_argument_matches_simple_type() - { - $this->beConstructedWith('integer'); - - $this->scoreArgument(42)->shouldReturn(5); - } - - function it_does_not_scores_if_argument_does_not_match_simple_type() - { - $this->beConstructedWith('integer'); - - $this->scoreArgument(42.0)->shouldReturn(false); - } - - function it_scores_5_if_argument_is_an_instance_of_specified_class(\ReflectionObject $object) - { - $this->beConstructedWith('ReflectionClass'); - - $this->scoreArgument($object)->shouldReturn(5); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldReturn('type(integer)'); - } - - function it_scores_5_if_argument_is_an_instance_of_specified_interface(TokenInterface $interface) - { - $this->beConstructedWith('Prophecy\Argument\Token\TokenInterface'); - - $this->scoreArgument($interface)->shouldReturn(5); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php deleted file mode 100644 index 64232a4..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php +++ /dev/null @@ -1,107 +0,0 @@ -exact(42); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ExactValueToken'); - $token->getValue()->shouldReturn(42); - } - - function it_has_a_shortcut_for_any_argument_token() - { - $token = $this->any(); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValueToken'); - } - - function it_has_a_shortcut_for_multiple_arguments_token() - { - $token = $this->cetera(); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValuesToken'); - } - - function it_has_a_shortcut_for_type_token() - { - $token = $this->type('integer'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\TypeToken'); - } - - function it_has_a_shortcut_for_callback_token() - { - $token = $this->that('get_class'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\CallbackToken'); - } - - function it_has_a_shortcut_for_object_state_token() - { - $token = $this->which('getName', 'everzet'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ObjectStateToken'); - } - - function it_has_a_shortcut_for_logical_and_token() - { - $token = $this->allOf('integer', 5); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalAndToken'); - } - - function it_has_a_shortcut_for_array_count_token() - { - $token = $this->size(5); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayCountToken'); - } - - function it_has_a_shortcut_for_array_entry_token() - { - $token = $this->withEntry('key', 'value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); - } - - function it_has_a_shortcut_for_array_every_entry_token() - { - $token = $this->withEveryEntry('value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEveryEntryToken'); - } - - function it_has_a_shortcut_for_identical_value_token() - { - $token = $this->is('value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\IdenticalValueToken'); - } - - function it_has_a_shortcut_for_array_entry_token_matching_any_key() - { - $token = $this->containing('value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); - $token->getKey()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken'); - } - - function it_has_a_shortcut_for_array_entry_token_matching_any_value() - { - $token = $this->withKey('key'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); - $token->getValue()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken'); - } - - function it_has_a_shortcut_for_logical_not_token() - { - $token = $this->not('kagux'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalNotToken'); - } - - function it_has_a_shortcut_for_string_contains_token() - { - $token = $this->containingString('string'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\StringContainsToken'); - } - - function it_has_a_shortcut_for_approximate_token() - { - $token = $this->approximate(10); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ApproximateValueToken'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php deleted file mode 100644 index 83d61f1..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php +++ /dev/null @@ -1,180 +0,0 @@ -scoreArguments(array(5, 2, 3))->willReturn(10); - $objectProphecy->getMethodProphecies()->willReturn(array()); - - $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3)); - - $calls = $this->findCalls('setValues', $wildcard); - $calls->shouldHaveCount(1); - - $calls[0]->shouldBeAnInstanceOf('Prophecy\Call\Call'); - $calls[0]->getMethodName()->shouldReturn('setValues'); - $calls[0]->getArguments()->shouldReturn(array(5, 2, 3)); - $calls[0]->getReturnValue()->shouldReturn(null); - } - - function it_returns_null_for_any_call_through_makeCall_if_no_method_prophecies_added( - $objectProphecy - ) - { - $objectProphecy->getMethodProphecies()->willReturn(array()); - - $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3))->shouldReturn(null); - } - - function it_executes_promise_of_method_prophecy_that_matches_signature_passed_to_makeCall( - $objectProphecy, - MethodProphecy $method1, - MethodProphecy $method2, - MethodProphecy $method3, - ArgumentsWildcard $arguments1, - ArgumentsWildcard $arguments2, - ArgumentsWildcard $arguments3, - PromiseInterface $promise - ) { - $method1->hasReturnVoid()->willReturn(false); - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments1); - $arguments1->scoreArguments(array('world', 'everything'))->willReturn(false); - - $method2->hasReturnVoid()->willReturn(false); - $method2->getMethodName()->willReturn('setTitle'); - $method2->getArgumentsWildcard()->willReturn($arguments2); - $arguments2->scoreArguments(array('world', 'everything'))->willReturn(false); - - $method3->hasReturnVoid()->willReturn(false); - $method3->getMethodName()->willReturn('getName'); - $method3->getArgumentsWildcard()->willReturn($arguments3); - $method3->getPromise()->willReturn($promise); - $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200); - - $objectProphecy->getMethodProphecies()->willReturn(array( - 'method1' => array($method1), - 'method2' => array($method2, $method3) - )); - $objectProphecy->getMethodProphecies('getName')->willReturn(array($method1, $method3)); - $objectProphecy->reveal()->willReturn(new \stdClass()); - - $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method3)->willReturn(42); - - $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))->shouldReturn(42); - - $calls = $this->findCalls('getName', $arguments3); - $calls->shouldHaveCount(1); - $calls[0]->getReturnValue()->shouldReturn(42); - } - - function it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall( - $objectProphecy, - MethodProphecy $method1, - MethodProphecy $method2, - MethodProphecy $method3, - ArgumentsWildcard $arguments1, - ArgumentsWildcard $arguments2, - ArgumentsWildcard $arguments3, - PromiseInterface $promise - ) { - $method1->hasReturnVoid()->willReturn(false); - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments1); - $arguments1->scoreArguments(array('world', 'everything'))->willReturn(50); - - $method2->hasReturnVoid()->willReturn(false); - $method2->getMethodName()->willReturn('getName'); - $method2->getArgumentsWildcard()->willReturn($arguments2); - $method2->getPromise()->willReturn($promise); - $arguments2->scoreArguments(array('world', 'everything'))->willReturn(300); - - $method3->hasReturnVoid()->willReturn(false); - $method3->getMethodName()->willReturn('getName'); - $method3->getArgumentsWildcard()->willReturn($arguments3); - $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200); - - $objectProphecy->getMethodProphecies()->willReturn(array( - 'method1' => array($method1), - 'method2' => array($method2, $method3) - )); - $objectProphecy->getMethodProphecies('getName')->willReturn(array( - $method1, $method2, $method3 - )); - $objectProphecy->reveal()->willReturn(new \stdClass()); - - $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method2) - ->willReturn('second'); - - $this->makeCall($objectProphecy, 'getName', array('world', 'everything')) - ->shouldReturn('second'); - } - - function it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies( - $objectProphecy, - MethodProphecy $method, - ArgumentsWildcard $arguments - ) { - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->scoreArguments(array('world', 'everything'))->willReturn(false); - $arguments->__toString()->willReturn('arg1, arg2'); - - $objectProphecy->getMethodProphecies()->willReturn(array('method1' => array($method))); - $objectProphecy->getMethodProphecies('getName')->willReturn(array($method)); - - $this->shouldThrow('Prophecy\Exception\Call\UnexpectedCallException') - ->duringMakeCall($objectProphecy, 'getName', array('world', 'everything')); - } - - function it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise( - $objectProphecy, - MethodProphecy $method, - ArgumentsWildcard $arguments - ) { - $method->hasReturnVoid()->willReturn(false); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $method->getPromise()->willReturn(null); - $arguments->scoreArguments(array('world', 'everything'))->willReturn(100); - - $objectProphecy->getMethodProphecies()->willReturn(array($method)); - $objectProphecy->getMethodProphecies('getName')->willReturn(array($method)); - - $this->makeCall($objectProphecy, 'getName', array('world', 'everything')) - ->shouldReturn(null); - } - - function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard( - $objectProphecy, - ArgumentsWildcard $wildcard - ) { - $objectProphecy->getMethodProphecies()->willReturn(array()); - - $this->makeCall($objectProphecy, 'getName', array('world')); - $this->makeCall($objectProphecy, 'getName', array('everything')); - $this->makeCall($objectProphecy, 'setName', array(42)); - - $wildcard->scoreArguments(array('world'))->willReturn(false); - $wildcard->scoreArguments(array('everything'))->willReturn(10); - - $calls = $this->findCalls('getName', $wildcard); - - $calls->shouldHaveCount(1); - $calls[0]->getMethodName()->shouldReturn('getName'); - $calls[0]->getArguments()->shouldReturn(array('everything')); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php deleted file mode 100644 index a622b49..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php +++ /dev/null @@ -1,51 +0,0 @@ -beConstructedWith('setValues', array(5, 2), 42, $exception, 'some_file.php', 23); - } - - function it_exposes_method_name_through_getter() - { - $this->getMethodName()->shouldReturn('setValues'); - } - - function it_exposes_arguments_through_getter() - { - $this->getArguments()->shouldReturn(array(5, 2)); - } - - function it_exposes_return_value_through_getter() - { - $this->getReturnValue()->shouldReturn(42); - } - - function it_exposes_exception_through_getter($exception) - { - $this->getException()->shouldReturn($exception); - } - - function it_exposes_file_and_line_through_getter() - { - $this->getFile()->shouldReturn('some_file.php'); - $this->getLine()->shouldReturn(23); - } - - function it_returns_shortpath_to_callPlace() - { - $this->getCallPlace()->shouldReturn('some_file.php:23'); - } - - function it_returns_unknown_as_callPlace_if_no_file_or_line_provided() - { - $this->beConstructedWith('setValues', array(), 0, null, null, null); - - $this->getCallPlace()->shouldReturn('unknown'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php deleted file mode 100644 index c174e73..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php +++ /dev/null @@ -1,39 +0,0 @@ -shouldHaveType('SebastianBergmann\Comparator\Comparator'); - } - - function it_accepts_only_closures() - { - $this->accepts(123, 321)->shouldReturn(false); - $this->accepts('string', 'string')->shouldReturn(false); - $this->accepts(false, true)->shouldReturn(false); - $this->accepts(true, false)->shouldReturn(false); - $this->accepts((object)array(), (object)array())->shouldReturn(false); - $this->accepts(function(){}, (object)array())->shouldReturn(false); - $this->accepts(function(){}, (object)array())->shouldReturn(false); - - $this->accepts(function(){}, function(){})->shouldReturn(true); - } - - function it_asserts_that_all_closures_are_different() - { - $this->shouldThrow()->duringAssertEquals(function(){}, function(){}); - } - - function it_asserts_that_all_closures_are_different_even_if_its_the_same_closure() - { - $closure = function(){}; - - $this->shouldThrow()->duringAssertEquals($closure, $closure); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php deleted file mode 100644 index 6b13336..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php +++ /dev/null @@ -1,20 +0,0 @@ -shouldHaveType('SebastianBergmann\Comparator\Factory'); - } - - function it_should_have_ClosureComparator_registered() - { - $comparator = $this->getInstance()->getComparatorFor(function(){}, function(){}); - $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ProphecyComparatorSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ProphecyComparatorSpec.php deleted file mode 100644 index 06bf6f1..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ProphecyComparatorSpec.php +++ /dev/null @@ -1,39 +0,0 @@ -shouldHaveType('SebastianBergmann\Comparator\ObjectComparator'); - } - - function it_accepts_only_prophecy_objects() - { - $this->accepts(123, 321)->shouldReturn(false); - $this->accepts('string', 'string')->shouldReturn(false); - $this->accepts(false, true)->shouldReturn(false); - $this->accepts(true, false)->shouldReturn(false); - $this->accepts((object)array(), (object)array())->shouldReturn(false); - $this->accepts(function(){}, (object)array())->shouldReturn(false); - $this->accepts(function(){}, function(){})->shouldReturn(false); - - $prophet = new Prophet(); - $prophecy = $prophet->prophesize('Prophecy\Prophecy\ObjectProphecy'); - - $this->accepts($prophecy, $prophecy)->shouldReturn(true); - } - - function it_asserts_that_an_object_is_equal_to_its_revealed_prophecy() - { - $prophet = new Prophet(); - $prophecy = $prophet->prophesize('Prophecy\Prophecy\ObjectProphecy'); - - $this->shouldNotThrow()->duringAssertEquals($prophecy->reveal(), $prophecy); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php deleted file mode 100644 index 4fd28d7..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php +++ /dev/null @@ -1,54 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_100() - { - $this->getPriority()->shouldReturn(100); - } - - function it_supports_anything(ClassNode $node) - { - $this->supports($node)->shouldReturn(true); - } - - function it_makes_all_constructor_arguments_optional( - ClassNode $class, - MethodNode $method, - ArgumentNode $arg1, - ArgumentNode $arg2 - ) { - $class->hasMethod('__construct')->willReturn(true); - $class->getMethod('__construct')->willReturn($method); - $method->getArguments()->willReturn(array($arg1, $arg2)); - - $arg1->setDefault(null)->shouldBeCalled(); - $arg2->setDefault(null)->shouldBeCalled(); - - $method->setCode(Argument::type('string'))->shouldBeCalled(); - - $this->apply($class); - } - - function it_creates_new_constructor_if_object_has_none(ClassNode $class) - { - $class->hasMethod('__construct')->willReturn(false); - $class->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode')) - ->shouldBeCalled(); - - $this->apply($class); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php deleted file mode 100644 index 9d04421..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php +++ /dev/null @@ -1,34 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_minus_50() - { - $this->getPriority()->shouldReturn(-50); - } - - function it_uses_parent_code_for_setTraceOptions(ClassNode $node, MethodNode $method, MethodNode $getterMethod) - { - $node->hasMethod('setTraceOptions')->willReturn(true); - $node->getMethod('setTraceOptions')->willReturn($method); - $node->hasMethod('getTraceOptions')->willReturn(true); - $node->getMethod('getTraceOptions')->willReturn($getterMethod); - - $method->useParentCode()->shouldBeCalled(); - $getterMethod->useParentCode()->shouldBeCalled(); - - $this->apply($node); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php deleted file mode 100644 index 1c454e6..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php +++ /dev/null @@ -1,43 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_49() - { - $this->getPriority()->shouldReturn(49); - } - - function it_will_remove_echo_and_eval_methods( - ClassNode $node, - MethodNode $method1, - MethodNode $method2, - MethodNode $method3 - ) { - $node->removeMethod('eval')->shouldBeCalled(); - $node->removeMethod('echo')->shouldBeCalled(); - - $method1->getName()->willReturn('echo'); - $method2->getName()->willReturn('eval'); - $method3->getName()->willReturn('notKeyword'); - - $node->getMethods()->willReturn(array( - 'echo' => $method1, - 'eval' => $method2, - 'notKeyword' => $method3, - )); - - $this->apply($node); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php deleted file mode 100644 index f7a5631..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php +++ /dev/null @@ -1,140 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function it_supports_anything(ClassNode $node) - { - $this->supports($node)->shouldReturn(true); - } - - function it_discovers_api_using_phpdoc(ClassNode $node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApi'); - $node->getInterfaces()->willReturn(array()); - - $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled(); - - $this->apply($node); - } - - function it_ignores_existing_methods(ClassNode $node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiExtended'); - $node->getInterfaces()->willReturn(array()); - - $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled(); - $node->addMethod(new MethodNode('definedMethod'))->shouldNotBeCalled(); - - $this->apply($node); - } - - function it_ignores_empty_methods_from_phpdoc(ClassNode $node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiInvalidMethodDefinition'); - $node->getInterfaces()->willReturn(array()); - - $node->addMethod(new MethodNode(''))->shouldNotBeCalled(); - - $this->apply($node); - } - - function it_discovers_api_using_phpdoc_from_implemented_interfaces(ClassNode $node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiImplemented'); - $node->getInterfaces()->willReturn(array()); - - $node->addMethod(new MethodNode('implementedMethod'))->shouldBeCalled(); - - $this->apply($node); - } - - function it_discovers_api_using_phpdoc_from_own_interfaces(ClassNode $node) - { - $node->getParentClass()->willReturn('stdClass'); - $node->getInterfaces()->willReturn(array('spec\Prophecy\Doubler\ClassPatch\MagicalApiImplemented')); - - $node->addMethod(new MethodNode('implementedMethod'))->shouldBeCalled(); - - $this->apply($node); - } - - function it_discovers_api_using_phpdoc_from_extended_parent_interfaces(ClassNode $node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiImplementedExtended'); - $node->getInterfaces()->willReturn(array()); - - $node->addMethod(new MethodNode('implementedMethod'))->shouldBeCalled(); - - $this->apply($node); - } - - function it_has_50_priority() - { - $this->getPriority()->shouldReturn(50); - } -} - -/** - * @method void undefinedMethod() - */ -class MagicalApi -{ - /** - * @return void - */ - public function definedMethod() - { - - } -} - -/** - * @method void invalidMethodDefinition - * @method void - * @method - */ -class MagicalApiInvalidMethodDefinition -{ -} - -/** - * @method void undefinedMethod() - * @method void definedMethod() - */ -class MagicalApiExtended extends MagicalApi -{ - -} - -/** - */ -class MagicalApiImplemented implements MagicalApiInterface -{ - -} - -/** - */ -class MagicalApiImplementedExtended extends MagicalApiImplemented -{ -} - -/** - * @method void implementedMethod() - */ -interface MagicalApiInterface -{ - -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php deleted file mode 100644 index 96f0e20..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php +++ /dev/null @@ -1,79 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function it_has_priority_of_0() - { - $this->getPriority()->shouldReturn(0); - } - - function it_supports_any_class(ClassNode $node) - { - $this->supports($node)->shouldReturn(true); - } - - function it_forces_class_to_implement_ProphecySubjectInterface(ClassNode $node) - { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->shouldBeCalled(); - - $node->addProperty('objectProphecy', 'private')->willReturn(null); - $node->getMethods()->willReturn(array()); - $node->hasMethod(Argument::any())->willReturn(false); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - - $this->apply($node); - } - - function it_forces_all_class_methods_except_constructor_to_proxy_calls_into_prophecy_makeCall( - ClassNode $node, - MethodNode $constructor, - MethodNode $method1, - MethodNode $method2, - MethodNode $method3 - ) { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->willReturn(null); - $node->addProperty('objectProphecy', 'private')->willReturn(null); - $node->hasMethod(Argument::any())->willReturn(false); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - - $constructor->getName()->willReturn('__construct'); - $method1->getName()->willReturn('method1'); - $method2->getName()->willReturn('method2'); - $method3->getName()->willReturn('method3'); - - $method1->getReturnType()->willReturn('int'); - $method2->getReturnType()->willReturn('int'); - $method3->getReturnType()->willReturn('void'); - - $node->getMethods()->willReturn(array( - 'method1' => $method1, - 'method2' => $method2, - 'method3' => $method3, - )); - - $constructor->setCode(Argument::any())->shouldNotBeCalled(); - - $method1->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') - ->shouldBeCalled(); - $method2->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') - ->shouldBeCalled(); - $method3->setCode('$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') - ->shouldBeCalled(); - - $this->apply($node); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php deleted file mode 100644 index effd61e..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php +++ /dev/null @@ -1,43 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_50() - { - $this->getPriority()->shouldReturn(50); - } - - function it_supports_ReflectionClass_only(ClassNode $reflectionClassNode, ClassNode $anotherClassNode) - { - $reflectionClassNode->getParentClass()->willReturn('ReflectionClass'); - $anotherClassNode->getParentClass()->willReturn('stdClass'); - - $this->supports($reflectionClassNode)->shouldReturn(true); - $this->supports($anotherClassNode)->shouldReturn(false); - } - - function it_makes_all_newInstance_arguments_optional( - ClassNode $class, - MethodNode $method, - ArgumentNode $arg1 - ) { - $class->getMethod('newInstance')->willReturn($method); - $method->getArguments()->willReturn(array($arg1)); - $arg1->setDefault(null)->shouldBeCalled(); - - $this->apply($class); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php deleted file mode 100644 index 5bc3958..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php +++ /dev/null @@ -1,85 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_50() - { - $this->getPriority()->shouldReturn(50); - } - - function it_does_not_support_nodes_without_parent_class(ClassNode $node) - { - $node->getParentClass()->willReturn('stdClass'); - $this->supports($node)->shouldReturn(false); - } - - function it_supports_nodes_with_SplFileInfo_as_parent_class(ClassNode $node) - { - $node->getParentClass()->willReturn('SplFileInfo'); - $this->supports($node)->shouldReturn(true); - } - - function it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_class(ClassNode $node) - { - $node->getParentClass()->willReturn('SplFileInfo'); - $this->supports($node)->shouldReturn(true); - } - - function it_adds_a_method_to_node_if_not_exists(ClassNode $node) - { - $node->hasMethod('__construct')->willReturn(false); - $node->addMethod(Argument::any())->shouldBeCalled(); - $node->getParentClass()->shouldBeCalled(); - - $this->apply($node); - } - - function it_updates_existing_method_if_found(ClassNode $node, MethodNode $method) - { - $node->hasMethod('__construct')->willReturn(true); - $node->getMethod('__construct')->willReturn($method); - $node->getParentClass()->shouldBeCalled(); - - $method->useParentCode()->shouldBeCalled(); - - $this->apply($node); - } - - function it_should_not_supply_a_file_for_a_directory_iterator(ClassNode $node, MethodNode $method) - { - $node->hasMethod('__construct')->willReturn(true); - $node->getMethod('__construct')->willReturn($method); - $node->getParentClass()->willReturn('DirectoryIterator'); - - $method->setCode(Argument::that(function($value) { - return strpos($value, '.php') === false; - }))->shouldBeCalled(); - - $this->apply($node); - } - - function it_should_supply_a_file_for_a_spl_file_object(ClassNode $node, MethodNode $method) - { - $node->hasMethod('__construct')->willReturn(true); - $node->getMethod('__construct')->willReturn($method); - $node->getParentClass()->willReturn('SplFileObject'); - - $method->setCode(Argument::that(function($value) { - return strpos($value, '.php') !== false; - }))->shouldBeCalled(); - - $this->apply($node); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php deleted file mode 100644 index abce2f1..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php +++ /dev/null @@ -1,50 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function it_supports_class_that_implements_only_Traversable(ClassNode $node) - { - $node->getInterfaces()->willReturn(array('Traversable')); - - $this->supports($node)->shouldReturn(true); - } - - function it_does_not_support_class_that_implements_Iterator(ClassNode $node) - { - $node->getInterfaces()->willReturn(array('Traversable', 'Iterator')); - - $this->supports($node)->shouldReturn(false); - } - - function it_does_not_support_class_that_implements_IteratorAggregate(ClassNode $node) - { - $node->getInterfaces()->willReturn(array('Traversable', 'IteratorAggregate')); - - $this->supports($node)->shouldReturn(false); - } - - function it_has_100_priority() - { - $this->getPriority()->shouldReturn(100); - } - - function it_forces_node_to_implement_IteratorAggregate(ClassNode $node) - { - $node->addInterface('Iterator')->shouldBeCalled(); - - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - - $this->apply($node); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php deleted file mode 100644 index b58b1a8..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php +++ /dev/null @@ -1,115 +0,0 @@ -beConstructedWith($mirror, $creator, $namer); - } - - function it_does_not_have_patches_by_default() - { - $this->getClassPatches()->shouldHaveCount(0); - } - - function its_registerClassPatch_adds_a_patch_to_the_doubler(ClassPatchInterface $patch) - { - $this->registerClassPatch($patch); - $this->getClassPatches()->shouldReturn(array($patch)); - } - - function its_getClassPatches_sorts_patches_by_priority( - ClassPatchInterface $alt1, - ClassPatchInterface $alt2, - ClassPatchInterface $alt3, - ClassPatchInterface $alt4 - ) { - $alt1->getPriority()->willReturn(2); - $alt2->getPriority()->willReturn(50); - $alt3->getPriority()->willReturn(10); - $alt4->getPriority()->willReturn(0); - - $this->registerClassPatch($alt1); - $this->registerClassPatch($alt2); - $this->registerClassPatch($alt3); - $this->registerClassPatch($alt4); - - $this->getClassPatches()->shouldReturn(array($alt2, $alt3, $alt1, $alt4)); - } - - function its_double_mirrors_alterates_and_instantiates_provided_class( - $mirror, - $creator, - $namer, - ClassPatchInterface $alt1, - ClassPatchInterface $alt2, - \ReflectionClass $class, - \ReflectionClass $interface1, - \ReflectionClass $interface2, - ClassNode $node - ) { - $mirror->reflect($class, array($interface1, $interface2))->willReturn($node); - $alt1->supports($node)->willReturn(true); - $alt2->supports($node)->willReturn(false); - $alt1->getPriority()->willReturn(1); - $alt2->getPriority()->willReturn(2); - $namer->name($class, array($interface1, $interface2))->willReturn('SplStack'); - $class->getName()->willReturn('stdClass'); - $interface1->getName()->willReturn('ArrayAccess'); - $interface2->getName()->willReturn('Iterator'); - - $alt1->apply($node)->shouldBeCalled(); - $alt2->apply($node)->shouldNotBeCalled(); - $creator->create('SplStack', $node)->shouldBeCalled(); - - $this->registerClassPatch($alt1); - $this->registerClassPatch($alt2); - - $this->double($class, array($interface1, $interface2)) - ->shouldReturnAnInstanceOf('SplStack'); - } - - function it_double_instantiates_a_class_with_constructor_argument( - $mirror, - \ReflectionClass $class, - ClassNode $node, - $namer - ) { - $class->getName()->willReturn('ReflectionClass'); - $mirror->reflect($class, array())->willReturn($node); - $namer->name($class, array())->willReturn('ReflectionClass'); - - $double = $this->double($class, array(), array('stdClass')); - $double->shouldBeAnInstanceOf('ReflectionClass'); - $double->getName()->shouldReturn('stdClass'); - } - - function it_can_instantiate_class_with_final_constructor( - $mirror, - \ReflectionClass $class, - ClassNode $node, - $namer - ) { - $class->getName()->willReturn('spec\Prophecy\Doubler\WithFinalConstructor'); - $mirror->reflect($class, array())->willReturn($node); - $namer->name($class, array())->willReturn('spec\Prophecy\Doubler\WithFinalConstructor'); - - $double = $this->double($class, array()); - - $double->shouldBeAnInstanceOf('spec\Prophecy\Doubler\WithFinalConstructor'); - } -} - -class WithFinalConstructor -{ - final public function __construct() {} -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php deleted file mode 100644 index 2e85b6c..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php +++ /dev/null @@ -1,362 +0,0 @@ -getParentClass()->willReturn('RuntimeException'); - $class->getInterfaces()->willReturn(array( - 'Prophecy\Doubler\Generator\MirroredInterface', 'ArrayAccess', 'ArrayIterator' - )); - $class->getProperties()->willReturn(array('name' => 'public', 'email' => 'private')); - $class->getMethods()->willReturn(array($method1, $method2, $method3, $method4)); - - $method1->getName()->willReturn('getName'); - $method1->getVisibility()->willReturn('public'); - $method1->returnsReference()->willReturn(false); - $method1->isStatic()->willReturn(true); - $method1->getArguments()->willReturn(array($argument11, $argument12)); - $method1->hasReturnType()->willReturn(true); - $method1->getReturnType()->willReturn('string'); - $method1->hasNullableReturnType()->willReturn(true); - $method1->getCode()->willReturn('return $this->name;'); - - $method2->getName()->willReturn('getEmail'); - $method2->getVisibility()->willReturn('protected'); - $method2->returnsReference()->willReturn(false); - $method2->isStatic()->willReturn(false); - $method2->getArguments()->willReturn(array($argument21)); - $method2->hasReturnType()->willReturn(false); - $method2->hasNullableReturnType()->willReturn(true); - $method2->getCode()->willReturn('return $this->email;'); - - $method3->getName()->willReturn('getRefValue'); - $method3->getVisibility()->willReturn('public'); - $method3->returnsReference()->willReturn(true); - $method3->isStatic()->willReturn(false); - $method3->getArguments()->willReturn(array($argument31)); - $method3->hasReturnType()->willReturn(true); - $method3->getReturnType()->willReturn('string'); - $method3->hasNullableReturnType()->willReturn(false); - $method3->getCode()->willReturn('return $this->refValue;'); - - $method4->getName()->willReturn('doSomething'); - $method4->getVisibility()->willReturn('public'); - $method4->returnsReference()->willReturn(false); - $method4->isStatic()->willReturn(false); - $method4->getArguments()->willReturn(array()); - $method4->hasReturnType()->willReturn(true); - $method4->getReturnType()->willReturn('void'); - $method4->hasNullableReturnType()->willReturn(false); - $method4->getCode()->willReturn('return;'); - - $argument11->getName()->willReturn('fullname'); - $argument11->getTypeHint()->willReturn('array'); - $argument11->isOptional()->willReturn(true); - $argument11->getDefault()->willReturn(null); - $argument11->isPassedByReference()->willReturn(false); - $argument11->isVariadic()->willReturn(false); - $argument11->isNullable()->willReturn(false); - - $argument12->getName()->willReturn('class'); - $argument12->getTypeHint()->willReturn('ReflectionClass'); - $argument12->isOptional()->willReturn(false); - $argument12->isPassedByReference()->willReturn(false); - $argument12->isVariadic()->willReturn(false); - $argument12->isNullable()->willReturn(false); - - $argument21->getName()->willReturn('default'); - $argument21->getTypeHint()->willReturn('string'); - $argument21->isOptional()->willReturn(true); - $argument21->getDefault()->willReturn('ever.zet@gmail.com'); - $argument21->isPassedByReference()->willReturn(false); - $argument21->isVariadic()->willReturn(false); - $argument21->isNullable()->willReturn(true); - - $argument31->getName()->willReturn('refValue'); - $argument31->getTypeHint()->willReturn(null); - $argument31->isOptional()->willReturn(false); - $argument31->getDefault()->willReturn(); - $argument31->isPassedByReference()->willReturn(false); - $argument31->isVariadic()->willReturn(false); - $argument31->isNullable()->willReturn(false); - - $code = $this->generate('CustomClass', $class); - - if (version_compare(PHP_VERSION, '7.1', '>=')) { - $expected = <<<'PHP' -namespace { -class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator { -public $name; -private $email; - -public static function getName(array $fullname = NULL, \ReflectionClass $class): ?string { -return $this->name; -} -protected function getEmail(?string $default = 'ever.zet@gmail.com') { -return $this->email; -} -public function &getRefValue( $refValue): string { -return $this->refValue; -} -public function doSomething(): void { -return; -} - -} -} -PHP; - } elseif (version_compare(PHP_VERSION, '7.0', '>=')) { - $expected = <<<'PHP' -namespace { -class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator { -public $name; -private $email; - -public static function getName(array $fullname = NULL, \ReflectionClass $class): string { -return $this->name; -} -protected function getEmail(string $default = 'ever.zet@gmail.com') { -return $this->email; -} -public function &getRefValue( $refValue): string { -return $this->refValue; -} -public function doSomething() { -return; -} - -} -} -PHP; - } else { - $expected = <<<'PHP' -namespace { -class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator { -public $name; -private $email; - -public static function getName(array $fullname = NULL, \ReflectionClass $class) { -return $this->name; -} -protected function getEmail(\string $default = 'ever.zet@gmail.com') { -return $this->email; -} -public function &getRefValue( $refValue) { -return $this->refValue; -} -public function doSomething() { -return; -} - -} -} -PHP; - } - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - function it_generates_proper_php_code_for_variadics( - ClassNode $class, - MethodNode $method1, - MethodNode $method2, - MethodNode $method3, - MethodNode $method4, - ArgumentNode $argument1, - ArgumentNode $argument2, - ArgumentNode $argument3, - ArgumentNode $argument4 - ) { - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array( - $method1, $method2, $method3, $method4 - )); - - $method1->getName()->willReturn('variadic'); - $method1->getVisibility()->willReturn('public'); - $method1->returnsReference()->willReturn(false); - $method1->isStatic()->willReturn(false); - $method1->getArguments()->willReturn(array($argument1)); - $method1->hasReturnType()->willReturn(false); - $method1->getCode()->willReturn(''); - - $method2->getName()->willReturn('variadicByRef'); - $method2->getVisibility()->willReturn('public'); - $method2->returnsReference()->willReturn(false); - $method2->isStatic()->willReturn(false); - $method2->getArguments()->willReturn(array($argument2)); - $method2->hasReturnType()->willReturn(false); - $method2->getCode()->willReturn(''); - - $method3->getName()->willReturn('variadicWithType'); - $method3->getVisibility()->willReturn('public'); - $method3->returnsReference()->willReturn(false); - $method3->isStatic()->willReturn(false); - $method3->getArguments()->willReturn(array($argument3)); - $method3->hasReturnType()->willReturn(false); - $method3->getCode()->willReturn(''); - - $method4->getName()->willReturn('variadicWithTypeByRef'); - $method4->getVisibility()->willReturn('public'); - $method4->returnsReference()->willReturn(false); - $method4->isStatic()->willReturn(false); - $method4->getArguments()->willReturn(array($argument4)); - $method4->hasReturnType()->willReturn(false); - $method4->getCode()->willReturn(''); - - $argument1->getName()->willReturn('args'); - $argument1->getTypeHint()->willReturn(null); - $argument1->isOptional()->willReturn(false); - $argument1->isPassedByReference()->willReturn(false); - $argument1->isVariadic()->willReturn(true); - $argument1->isNullable()->willReturn(false); - - $argument2->getName()->willReturn('args'); - $argument2->getTypeHint()->willReturn(null); - $argument2->isOptional()->willReturn(false); - $argument2->isPassedByReference()->willReturn(true); - $argument2->isVariadic()->willReturn(true); - $argument2->isNullable()->willReturn(false); - - $argument3->getName()->willReturn('args'); - $argument3->getTypeHint()->willReturn('\ReflectionClass'); - $argument3->isOptional()->willReturn(false); - $argument3->isPassedByReference()->willReturn(false); - $argument3->isVariadic()->willReturn(true); - $argument3->isNullable()->willReturn(false); - - $argument4->getName()->willReturn('args'); - $argument4->getTypeHint()->willReturn('\ReflectionClass'); - $argument4->isOptional()->willReturn(false); - $argument4->isPassedByReference()->willReturn(true); - $argument4->isVariadic()->willReturn(true); - $argument4->isNullable()->willReturn(false); - - $code = $this->generate('CustomClass', $class); - $expected = <<<'PHP' -namespace { -class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { - -public function variadic( ...$args) { - -} -public function variadicByRef( &...$args) { - -} -public function variadicWithType(\\ReflectionClass ...$args) { - -} -public function variadicWithTypeByRef(\\ReflectionClass &...$args) { - -} - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - function it_overrides_properly_methods_with_args_passed_by_reference( - ClassNode $class, - MethodNode $method, - ArgumentNode $argument - ) { - $class->getParentClass()->willReturn('RuntimeException'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array($method)); - - $method->getName()->willReturn('getName'); - $method->getVisibility()->willReturn('public'); - $method->isStatic()->willReturn(false); - $method->getArguments()->willReturn(array($argument)); - $method->hasReturnType()->willReturn(false); - $method->returnsReference()->willReturn(false); - $method->getCode()->willReturn('return $this->name;'); - - $argument->getName()->willReturn('fullname'); - $argument->getTypeHint()->willReturn('array'); - $argument->isOptional()->willReturn(true); - $argument->getDefault()->willReturn(null); - $argument->isPassedByReference()->willReturn(true); - $argument->isVariadic()->willReturn(false); - $argument->isNullable()->willReturn(false); - - $code = $this->generate('CustomClass', $class); - $expected =<<<'PHP' -namespace { -class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface { - -public function getName(array &$fullname = NULL) { -return $this->name; -} - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - function it_generates_empty_class_for_empty_ClassNode(ClassNode $class) - { - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array()); - - $code = $this->generate('CustomClass', $class); - $expected =<<<'PHP' -namespace { -class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { - - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - function it_wraps_class_in_namespace_if_it_is_namespaced(ClassNode $class) - { - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array()); - - $code = $this->generate('My\Awesome\CustomClass', $class); - $expected =<<<'PHP' -namespace My\Awesome { -class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { - - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php deleted file mode 100644 index e7cae23..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php +++ /dev/null @@ -1,37 +0,0 @@ -beConstructedWith($generator); - } - - function it_evaluates_code_generated_by_ClassCodeGenerator($generator, ClassNode $class) - { - $generator->generate('stdClass', $class)->shouldBeCalled()->willReturn( - 'return 42;' - ); - - $this->create('stdClass', $class)->shouldReturn(42); - } - - function it_throws_an_exception_if_class_does_not_exist_after_evaluation($generator, ClassNode $class) - { - $generator->generate('CustomClass', $class)->shouldBeCalled()->willReturn( - 'return 42;' - ); - - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Interface1', 'Interface2')); - - $this->shouldThrow('Prophecy\Exception\Doubler\ClassCreatorException') - ->duringCreate('CustomClass', $class); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php deleted file mode 100644 index 2c8d188..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php +++ /dev/null @@ -1,92 +0,0 @@ -beConstructedWith('name'); - } - - function it_is_not_be_passed_by_reference_by_default() - { - $this->shouldNotBePassedByReference(); - } - - function it_is_passed_by_reference_if_marked() - { - $this->setAsPassedByReference(); - $this->shouldBePassedByReference(); - } - - function it_is_not_variadic_by_default() - { - $this->shouldNotBeVariadic(); - } - - function it_is_variadic_if_marked() - { - $this->setAsVariadic(); - $this->shouldBeVariadic(); - } - - function it_does_not_have_default_by_default() - { - $this->shouldNotHaveDefault(); - } - - function it_does_not_have_default_if_variadic() - { - $this->setDefault(null); - $this->setAsVariadic(); - $this->shouldNotHaveDefault(); - } - - function it_does_have_default_if_not_variadic() - { - $this->setDefault(null); - $this->setAsVariadic(false); - $this->hasDefault()->shouldReturn(true); - } - - function it_has_name_with_which_it_was_been_constructed() - { - $this->getName()->shouldReturn('name'); - } - - function it_has_no_typehint_by_default() - { - $this->getTypeHint()->shouldReturn(null); - } - - function its_typeHint_is_mutable() - { - $this->setTypeHint('array'); - $this->getTypeHint()->shouldReturn('array'); - } - - function it_does_not_have_default_value_by_default() - { - $this->getDefault()->shouldReturn(null); - } - - function it_is_not_optional_by_default() - { - $this->isOptional()->shouldReturn(false); - } - - function its_default_is_mutable() - { - $this->setDefault(array()); - $this->getDefault()->shouldReturn(array()); - } - - function it_is_marked_as_optional_when_default_is_set() - { - $this->setDefault(null); - $this->isOptional()->shouldReturn(true); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php deleted file mode 100644 index 16fc498..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php +++ /dev/null @@ -1,185 +0,0 @@ -getParentClass()->shouldReturn('stdClass'); - } - - function its_parentClass_is_mutable() - { - $this->setParentClass('Exception'); - $this->getParentClass()->shouldReturn('Exception'); - } - - function its_parentClass_is_set_to_stdClass_if_user_set_null() - { - $this->setParentClass(null); - $this->getParentClass()->shouldReturn('stdClass'); - } - - function it_does_not_implement_any_interface_by_default() - { - $this->getInterfaces()->shouldHaveCount(0); - } - - function its_addInterface_adds_item_to_the_list_of_implemented_interfaces() - { - $this->addInterface('MyInterface'); - $this->getInterfaces()->shouldHaveCount(1); - } - - function its_hasInterface_returns_true_if_class_implements_interface() - { - $this->addInterface('MyInterface'); - $this->hasInterface('MyInterface')->shouldReturn(true); - } - - function its_hasInterface_returns_false_if_class_does_not_implements_interface() - { - $this->hasInterface('MyInterface')->shouldReturn(false); - } - - function it_supports_implementation_of_multiple_interfaces() - { - $this->addInterface('MyInterface'); - $this->addInterface('MySecondInterface'); - $this->getInterfaces()->shouldHaveCount(2); - } - - function it_ignores_same_interfaces_added_twice() - { - $this->addInterface('MyInterface'); - $this->addInterface('MyInterface'); - - $this->getInterfaces()->shouldHaveCount(1); - $this->getInterfaces()->shouldReturn(array('MyInterface')); - } - - function it_does_not_have_methods_by_default() - { - $this->getMethods()->shouldHaveCount(0); - } - - function it_can_has_methods(MethodNode $method1, MethodNode $method2) - { - $method1->getName()->willReturn('__construct'); - $method2->getName()->willReturn('getName'); - - $this->addMethod($method1); - $this->addMethod($method2); - - $this->getMethods()->shouldReturn(array( - '__construct' => $method1, - 'getName' => $method2 - )); - } - - function its_hasMethod_returns_true_if_method_exists(MethodNode $method) - { - $method->getName()->willReturn('getName'); - - $this->addMethod($method); - - $this->hasMethod('getName')->shouldReturn(true); - } - - function its_getMethod_returns_method_by_name(MethodNode $method) - { - $method->getName()->willReturn('getName'); - - $this->addMethod($method); - - $this->getMethod('getName')->shouldReturn($method); - } - - function its_hasMethod_returns_false_if_method_does_not_exists() - { - $this->hasMethod('getName')->shouldReturn(false); - } - - function its_hasMethod_returns_false_if_method_has_been_removed(MethodNode $method) - { - $method->getName()->willReturn('getName'); - $this->addMethod($method); - $this->removeMethod('getName'); - - $this->hasMethod('getName')->shouldReturn(false); - } - - - function it_does_not_have_properties_by_default() - { - $this->getProperties()->shouldHaveCount(0); - } - - function it_is_able_to_have_properties() - { - $this->addProperty('title'); - $this->addProperty('text', 'private'); - $this->getProperties()->shouldReturn(array( - 'title' => 'public', - 'text' => 'private' - )); - } - - function its_addProperty_does_not_accept_unsupported_visibility() - { - $this->shouldThrow('InvalidArgumentException')->duringAddProperty('title', 'town'); - } - - function its_addProperty_lowercases_visibility_before_setting() - { - $this->addProperty('text', 'PRIVATE'); - $this->getProperties()->shouldReturn(array('text' => 'private')); - } - - function its_has_no_unextendable_methods_by_default() - { - $this->getUnextendableMethods()->shouldHaveCount(0); - } - - function its_addUnextendableMethods_adds_an_unextendable_method() - { - $this->addUnextendableMethod('testMethod'); - $this->getUnextendableMethods()->shouldHaveCount(1); - } - - function its_methods_are_extendable_by_default() - { - $this->isExtendable('testMethod')->shouldReturn(true); - } - - function its_unextendable_methods_are_not_extendable() - { - $this->addUnextendableMethod('testMethod'); - $this->isExtendable('testMethod')->shouldReturn(false); - } - - function its_addUnextendableMethods_doesnt_create_duplicates() - { - $this->addUnextendableMethod('testMethod'); - $this->addUnextendableMethod('testMethod'); - $this->getUnextendableMethods()->shouldHaveCount(1); - } - - function it_throws_an_exception_when_adding_a_method_that_isnt_extendable(MethodNode $method) - { - $this->addUnextendableMethod('testMethod'); - $method->getName()->willReturn('testMethod'); - - $expectedException = new MethodNotExtendableException( - "Method `testMethod` is not extendable, so can not be added.", - "stdClass", - "testMethod" - ); - $this->shouldThrow($expectedException)->duringAddMethod($method); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php deleted file mode 100644 index 14cfe8d..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php +++ /dev/null @@ -1,134 +0,0 @@ -beConstructedWith('getTitle'); - } - - function it_has_a_name() - { - $this->getName()->shouldReturn('getTitle'); - } - - function it_has_public_visibility_by_default() - { - $this->getVisibility()->shouldReturn('public'); - } - - function its_visibility_is_mutable() - { - $this->setVisibility('private'); - $this->getVisibility()->shouldReturn('private'); - } - - function it_is_not_static_by_default() - { - $this->shouldNotBeStatic(); - } - - function it_does_not_return_a_reference_by_default() - { - $this->returnsReference()->shouldReturn(false); - } - - function it_should_be_settable_as_returning_a_reference_through_setter() - { - $this->setReturnsReference(); - $this->returnsReference()->shouldReturn(true); - } - - function it_should_be_settable_as_static_through_setter() - { - $this->setStatic(); - $this->shouldBeStatic(); - } - - function it_accepts_only_supported_visibilities() - { - $this->shouldThrow('InvalidArgumentException')->duringSetVisibility('stealth'); - } - - function it_lowercases_visibility_before_setting_it() - { - $this->setVisibility('Public'); - $this->getVisibility()->shouldReturn('public'); - } - - function its_useParentCode_causes_method_to_call_parent(ArgumentNode $argument1, ArgumentNode $argument2) - { - $argument1->getName()->willReturn('objectName'); - $argument2->getName()->willReturn('default'); - - $argument1->isVariadic()->willReturn(false); - $argument2->isVariadic()->willReturn(true); - - $this->addArgument($argument1); - $this->addArgument($argument2); - - $this->useParentCode(); - - $this->getCode()->shouldReturn( - 'return parent::getTitle($objectName, ...$default);' - ); - } - - function its_code_is_mutable() - { - $this->setCode('echo "code";'); - $this->getCode()->shouldReturn('echo "code";'); - } - - function its_reference_returning_methods_will_generate_exceptions() - { - $this->setCode('echo "code";'); - $this->setReturnsReference(); - $this->getCode()->shouldReturn("throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), 'getTitle');"); - } - - function its_setCode_provided_with_null_cleans_method_body() - { - $this->setCode(null); - $this->getCode()->shouldReturn(''); - } - - function it_is_constructable_with_code() - { - $this->beConstructedWith('getTitle', 'die();'); - $this->getCode()->shouldReturn('die();'); - } - - function it_does_not_have_arguments_by_default() - { - $this->getArguments()->shouldHaveCount(0); - } - - function it_supports_adding_arguments(ArgumentNode $argument1, ArgumentNode $argument2) - { - $this->addArgument($argument1); - $this->addArgument($argument2); - - $this->getArguments()->shouldReturn(array($argument1, $argument2)); - } - - function it_does_not_have_return_type_by_default() - { - $this->hasReturnType()->shouldReturn(false); - } - - function it_setReturnType_sets_return_type() - { - $returnType = 'string'; - - $this->setReturnType($returnType); - - $this->hasReturnType()->shouldReturn(true); - $this->getReturnType()->shouldReturn($returnType); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php deleted file mode 100644 index fdf1e96..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php +++ /dev/null @@ -1,79 +0,0 @@ -beConstructedWith($doubler); - } - - function it_returns_anonymous_double_instance_by_default($doubler, ProphecySubjectInterface $double) - { - $doubler->double(null, array())->willReturn($double); - - $this->getInstance()->shouldReturn($double); - } - - function it_returns_class_double_instance_if_set($doubler, ProphecySubjectInterface $double, \ReflectionClass $class) - { - $doubler->double($class, array())->willReturn($double); - - $this->setParentClass($class); - - $this->getInstance()->shouldReturn($double); - } - - function it_returns_same_double_instance_if_called_2_times( - $doubler, - ProphecySubjectInterface $double1, - ProphecySubjectInterface $double2 - ) { - $doubler->double(null, array())->willReturn($double1); - $doubler->double(null, array())->willReturn($double2); - - $this->getInstance()->shouldReturn($double2); - $this->getInstance()->shouldReturn($double2); - } - - function its_setParentClass_throws_ClassNotFoundException_if_class_not_found() - { - $this->shouldThrow('Prophecy\Exception\Doubler\ClassNotFoundException') - ->duringSetParentClass('SomeUnexistingClass'); - } - - function its_setParentClass_throws_exception_if_prophecy_is_already_created( - $doubler, - ProphecySubjectInterface $double - ) { - $doubler->double(null, array())->willReturn($double); - - $this->getInstance(); - - $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException') - ->duringSetParentClass('stdClass'); - } - - function its_addInterface_throws_InterfaceNotFoundException_if_no_interface_found() - { - $this->shouldThrow('Prophecy\Exception\Doubler\InterfaceNotFoundException') - ->duringAddInterface('SomeUnexistingInterface'); - } - - function its_addInterface_throws_exception_if_prophecy_is_already_created( - $doubler, - ProphecySubjectInterface $double - ) { - $doubler->double(null, array())->willReturn($double); - - $this->getInstance(); - - $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException') - ->duringAddInterface('ArrayAccess'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php deleted file mode 100644 index 1e9b17f..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php +++ /dev/null @@ -1,60 +0,0 @@ -getName()->willReturn('stdClass'); - $this->name($class, array())->shouldStartWith('Double\stdClass\\'); - } - - function its_name_generates_name_based_on_namespaced_class_reflection(\ReflectionClass $class) - { - $class->getName()->willReturn('Some\Custom\Class'); - $this->name($class, array())->shouldStartWith('Double\Some\Custom\Class\P'); - } - - function its_name_generates_name_based_on_interface_shortnames( - \ReflectionClass $interface1, - \ReflectionClass $interface2 - ) { - $interface1->getShortName()->willReturn('HandlerInterface'); - $interface2->getShortName()->willReturn('LoaderInterface'); - - $this->name(null, array($interface1, $interface2))->shouldStartWith( - 'Double\HandlerInterface\LoaderInterface\P' - ); - } - - function it_generates_proper_name_for_no_class_and_interfaces_list() - { - $this->name(null, array())->shouldStartWith('Double\stdClass\P'); - } - - function its_name_generates_name_based_only_on_class_if_its_available( - \ReflectionClass $class, - \ReflectionClass $interface1, - \ReflectionClass $interface2 - ) { - $class->getName()->willReturn('Some\Custom\Class'); - $interface1->getShortName()->willReturn('HandlerInterface'); - $interface2->getShortName()->willReturn('LoaderInterface'); - - $this->name($class, array($interface1, $interface2))->shouldStartWith( - 'Double\Some\Custom\Class\P' - ); - } - - public function getMatchers() - { - return array( - 'startWith' => function ($subject, $string) { - return 0 === strpos($subject, $string); - }, - ); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php deleted file mode 100644 index 5e2c635..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php +++ /dev/null @@ -1,30 +0,0 @@ -beConstructedWith('msg', $objectProphecy, 'getName', array('arg1', 'arg2')); - } - - function it_is_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException'); - } - - function it_exposes_method_name_through_getter() - { - $this->getMethodName()->shouldReturn('getName'); - } - - function it_exposes_arguments_through_getter() - { - $this->getArguments()->shouldReturn(array('arg1', 'arg2')); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php deleted file mode 100644 index da3aa58..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php +++ /dev/null @@ -1,26 +0,0 @@ -beConstructedWith('', $node); - } - - function it_is_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); - } - - function it_contains_a_reflected_node($node) - { - $this->getClassNode()->shouldReturn($node); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php deleted file mode 100644 index c4f547a..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php +++ /dev/null @@ -1,24 +0,0 @@ -beConstructedWith('', $class); - } - - function it_is_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); - } - - function it_contains_a_reflected_class_link($class) - { - $this->getReflectedClass()->shouldReturn($class); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php deleted file mode 100644 index 251512b..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php +++ /dev/null @@ -1,25 +0,0 @@ -beConstructedWith('msg', 'CustomClass'); - } - - function it_is_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoubleException'); - } - - function its_getClassname_returns_classname() - { - $this->getClassname()->shouldReturn('CustomClass'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php deleted file mode 100644 index 6fe5a19..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php +++ /dev/null @@ -1,14 +0,0 @@ -shouldBeAnInstanceOf('RuntimeException'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php deleted file mode 100644 index ad1a439..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php +++ /dev/null @@ -1,24 +0,0 @@ -beConstructedWith('msg', 'CustomInterface'); - } - - function it_extends_ClassNotFoundException() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\ClassNotFoundException'); - } - - function its_getClassname_returns_classname() - { - $this->getClassname()->shouldReturn('CustomInterface'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php deleted file mode 100644 index 5028b02..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php +++ /dev/null @@ -1,29 +0,0 @@ -beConstructedWith('', 'User', 'getName'); - } - - function it_is_DoubleException() - { - $this->shouldHaveType('Prophecy\Exception\Doubler\DoubleException'); - } - - function it_has_MethodName() - { - $this->getMethodName()->shouldReturn('getName'); - } - - function it_has_classname() - { - $this->getClassName()->shouldReturn('User'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php deleted file mode 100644 index a889dd7..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php +++ /dev/null @@ -1,40 +0,0 @@ -beConstructedWith('', 'User', 'getName', array(1, 2, 3)); - } - - function it_is_DoubleException() - { - $this->shouldHaveType('Prophecy\Exception\Doubler\DoubleException'); - } - - function it_has_MethodName() - { - $this->getMethodName()->shouldReturn('getName'); - } - - function it_has_classnamej() - { - $this->getClassname()->shouldReturn('User'); - } - - function it_has_an_arguments_list() - { - $this->getArguments()->shouldReturn(array(1, 2, 3)); - } - - function it_has_a_default_null_argument_list() - { - $this->beConstructedWith('', 'User', 'getName'); - $this->getArguments()->shouldReturn(null); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php deleted file mode 100644 index d78ea73..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php +++ /dev/null @@ -1,50 +0,0 @@ -beConstructedWith(null); - } - - function it_is_prediction_exception() - { - $this->shouldBeAnInstanceOf('RuntimeException'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\PredictionException'); - } - - function it_can_store_objectProphecy_link(ObjectProphecy $object) - { - $this->setObjectProphecy($object); - $this->getObjectProphecy()->shouldReturn($object); - } - - function it_should_not_have_exceptions_at_the_beginning() - { - $this->getExceptions()->shouldHaveCount(0); - } - - function it_should_append_exception_through_append_method(PredictionException $exception) - { - $exception->getMessage()->willReturn('Exception #1'); - - $this->append($exception); - - $this->getExceptions()->shouldReturn(array($exception)); - } - - function it_should_update_message_during_append(PredictionException $exception) - { - $exception->getMessage()->willReturn('Exception #1'); - - $this->append($exception); - - $this->getMessage()->shouldReturn(" Exception #1"); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php deleted file mode 100644 index c2aa31d..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php +++ /dev/null @@ -1,27 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy); - } - - function it_is_PredictionException() - { - $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException'); - } - - function it_extends_MethodProphecyException() - { - $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php deleted file mode 100644 index e18932e..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php +++ /dev/null @@ -1,27 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy, 5, array($call1, $call2)); - } - - function it_extends_UnexpectedCallsException() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\UnexpectedCallsException'); - } - - function it_should_expose_expectedCount_through_getter() - { - $this->getExpectedCount()->shouldReturn(5); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php deleted file mode 100644 index 49d12d5..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php +++ /dev/null @@ -1,33 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy, array($call1, $call2)); - } - - function it_is_PredictionException() - { - $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException'); - } - - function it_extends_MethodProphecyException() - { - $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException'); - } - - function it_should_expose_calls_list_through_getter($call1, $call2) - { - $this->getCalls()->shouldReturn(array($call1, $call2)); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php deleted file mode 100644 index d05c66a..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php +++ /dev/null @@ -1,28 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy); - } - - function it_extends_DoubleException() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException'); - } - - function it_holds_a_stub_reference($methodProphecy) - { - $this->getMethodProphecy()->shouldReturn($methodProphecy); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php deleted file mode 100644 index 91ffd5b..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php +++ /dev/null @@ -1,24 +0,0 @@ -beConstructedWith('message', $objectProphecy); - } - - function it_should_be_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ProphecyException'); - } - - function it_holds_double_reference($objectProphecy) - { - $this->getObjectProphecy()->shouldReturn($objectProphecy); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php deleted file mode 100644 index 4f03db2..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php +++ /dev/null @@ -1,42 +0,0 @@ -shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - function it_does_nothing_if_there_is_more_than_one_call_been_made( - ObjectProphecy $object, - MethodProphecy $method, - Call $call - ) { - $this->check(array($call), $object, $method)->shouldReturn(null); - } - - function it_throws_NoCallsException_if_no_calls_found( - ObjectProphecy $object, - MethodProphecy $method, - ArgumentsWildcard $arguments - ) { - $method->getObjectProphecy()->willReturn($object); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->__toString()->willReturn('123'); - $object->reveal()->willReturn(new \stdClass()); - $object->findProphecyMethodCalls('getName', Argument::any())->willReturn(array()); - - $this->shouldThrow('Prophecy\Exception\Prediction\NoCallsException') - ->duringCheck(array(), $object, $method); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php deleted file mode 100644 index 52ce31c..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php +++ /dev/null @@ -1,50 +0,0 @@ -beConstructedWith(2); - } - - function it_is_prediction() - { - $this->shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - function it_does_nothing_if_there_were_exact_amount_of_calls_being_made( - ObjectProphecy $object, - MethodProphecy $method, - Call $call1, - Call $call2 - ) { - $this->check(array($call1, $call2), $object, $method)->shouldReturn(null); - } - - function it_throws_UnexpectedCallsCountException_if_calls_found( - ObjectProphecy $object, - MethodProphecy $method, - Call $call, - ArgumentsWildcard $arguments - ) { - $method->getObjectProphecy()->willReturn($object); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->__toString()->willReturn('123'); - - $call->getMethodName()->willReturn('getName'); - $call->getArguments()->willReturn(array(5, 4, 'three')); - $call->getCallPlace()->willReturn('unknown'); - - $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsCountException') - ->duringCheck(array($call), $object, $method); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php deleted file mode 100644 index 6da95f0..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php +++ /dev/null @@ -1,34 +0,0 @@ -beConstructedWith('get_class'); - } - - function it_is_prediction() - { - $this->shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - function it_proxies_call_to_callback(ObjectProphecy $object, MethodProphecy $method, Call $call) - { - $returnFirstCallCallback = function ($calls, $object, $method) { - throw new RuntimeException; - }; - - $this->beConstructedWith($returnFirstCallCallback); - - $this->shouldThrow('RuntimeException')->duringCheck(array($call), $object, $method); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php deleted file mode 100644 index b5fa28a..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php +++ /dev/null @@ -1,41 +0,0 @@ -shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - function it_does_nothing_if_there_is_no_calls_made(ObjectProphecy $object, MethodProphecy $method) - { - $this->check(array(), $object, $method)->shouldReturn(null); - } - - function it_throws_UnexpectedCallsException_if_calls_found( - ObjectProphecy $object, - MethodProphecy $method, - Call $call, - ArgumentsWildcard $arguments - ) { - $method->getObjectProphecy()->willReturn($object); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->__toString()->willReturn('123'); - - $call->getMethodName()->willReturn('getName'); - $call->getArguments()->willReturn(array(5, 4, 'three')); - $call->getCallPlace()->willReturn('unknown'); - - $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsException') - ->duringCheck(array($call), $object, $method); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php deleted file mode 100644 index fb1dc62..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php +++ /dev/null @@ -1,96 +0,0 @@ -beConstructedWith('get_class'); - } - - function it_is_promise() - { - $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - function it_should_execute_closure_callback(ObjectProphecy $object, MethodProphecy $method) - { - $firstArgumentCallback = function ($args) { - return $args[0]; - }; - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - function it_should_execute_static_array_callback(ObjectProphecy $object, MethodProphecy $method) - { - $firstArgumentCallback = array('spec\Prophecy\Promise\ClassCallback', 'staticCallbackMethod'); - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - function it_should_execute_instance_array_callback(ObjectProphecy $object, MethodProphecy $method) - { - $class = new ClassCallback(); - $firstArgumentCallback = array($class, 'callbackMethod'); - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - function it_should_execute_string_function_callback(ObjectProphecy $object, MethodProphecy $method) - { - $firstArgumentCallback = 'spec\Prophecy\Promise\functionCallbackFirstArgument'; - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - -} - -/** - * Class used to test callbackpromise - * - * @param array - * @return string - */ -class ClassCallback -{ - /** - * @param array $args - */ - function callbackMethod($args) - { - return $args[0]; - } - - /** - * @param array $args - */ - static function staticCallbackMethod($args) - { - return $args[0]; - } -} - -/** - * Callback function used to test callbackpromise - * - * @param array - * @return string - */ -function functionCallbackFirstArgument($args) -{ - return $args[0]; -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php deleted file mode 100644 index 1cef3aa..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php +++ /dev/null @@ -1,31 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - function it_should_return_first_argument_if_provided(ObjectProphecy $object, MethodProphecy $method) - { - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - function it_should_return_null_if_no_arguments_provided(ObjectProphecy $object, MethodProphecy $method) - { - $this->execute(array(), $object, $method)->shouldReturn(null); - } - - function it_should_return_nth_argument_if_provided(ObjectProphecy $object, MethodProphecy $method) - { - $this->beConstructedWith(1); - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('two'); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php deleted file mode 100644 index bc6a991..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php +++ /dev/null @@ -1,49 +0,0 @@ -beConstructedWith(array(42)); - } - - function it_is_promise() - { - $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - function it_returns_value_it_was_constructed_with(ObjectProphecy $object, MethodProphecy $method) - { - $this->execute(array(), $object, $method)->shouldReturn(42); - } - - function it_always_returns_last_value_left_in_the_return_values(ObjectProphecy $object, MethodProphecy $method) - { - $this->execute(array(), $object, $method)->shouldReturn(42); - $this->execute(array(), $object, $method)->shouldReturn(42); - } - - function it_consequently_returns_multiple_values_it_was_constructed_with( - ObjectProphecy $object, - MethodProphecy $method - ) { - $this->beConstructedWith(array(42, 24, 12)); - - $this->execute(array(), $object, $method)->shouldReturn(42); - $this->execute(array(), $object, $method)->shouldReturn(24); - $this->execute(array(), $object, $method)->shouldReturn(12); - } - - function it_returns_null_if_constructed_with_empty_array(ObjectProphecy $object, MethodProphecy $method) - { - $this->beConstructedWith(array()); - - $this->execute(array(), $object, $method)->shouldReturn(null); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php deleted file mode 100644 index b5a10bc..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php +++ /dev/null @@ -1,92 +0,0 @@ -beConstructedWith('RuntimeException'); - } - - function it_is_promise() - { - $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - function it_instantiates_and_throws_exception_from_provided_classname(ObjectProphecy $object, MethodProphecy $method) - { - $this->beConstructedWith('InvalidArgumentException'); - - $this->shouldThrow('InvalidArgumentException') - ->duringExecute(array(), $object, $method); - } - - function it_instantiates_exceptions_with_required_arguments(ObjectProphecy $object, MethodProphecy $method) - { - $this->beConstructedWith('spec\Prophecy\Promise\RequiredArgumentException'); - - $this->shouldThrow('spec\Prophecy\Promise\RequiredArgumentException') - ->duringExecute(array(), $object, $method); - } - - function it_throws_provided_exception(ObjectProphecy $object, MethodProphecy $method) - { - $this->beConstructedWith($exc = new \RuntimeException('Some exception')); - - $this->shouldThrow($exc)->duringExecute(array(), $object, $method); - } - - function it_throws_error_instances(ObjectProphecy $object, MethodProphecy $method) - { - if (!class_exists('\Error')) { - throw new SkippingException('The class Error, introduced in PHP 7, does not exist'); - } - - $this->beConstructedWith($exc = new \Error('Error exception')); - - $this->shouldThrow($exc)->duringExecute(array(), $object, $method); - } - - function it_throws_errors_by_class_name() - { - if (!class_exists('\Error')) { - throw new SkippingException('The class Error, introduced in PHP 7, does not exist'); - } - - $this->beConstructedWith('\Error'); - - $this->shouldNotThrow('Prophecy\Exception\InvalidArgumentException')->duringInstantiation(); - } - - function it_does_not_throw_something_that_is_not_throwable_by_class_name() - { - $this->beConstructedWith('\stdClass'); - - $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')->duringInstantiation(); - } - - function it_does_not_throw_something_that_is_not_throwable_by_instance() - { - $this->beConstructedWith(new \stdClass()); - - $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')->duringInstantiation(); - } - - function it_throws_an_exception_by_class_name() - { - $this->beConstructedWith('\Exception'); - - $this->shouldNotThrow('Prophecy\Exception\InvalidArgumentException')->duringInstantiation(); - } -} - -class RequiredArgumentException extends \Exception -{ - final public function __construct($message, $code) {} -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php deleted file mode 100644 index 969e644..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php +++ /dev/null @@ -1,342 +0,0 @@ -reveal()->willReturn($reflection); - - $this->beConstructedWith($objectProphecy, 'getName', null); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Prophecy\MethodProphecy'); - } - - function its_constructor_throws_MethodNotFoundException_for_unexisting_method($objectProphecy) - { - $this->shouldThrow('Prophecy\Exception\Doubler\MethodNotFoundException')->during( - '__construct', array($objectProphecy, 'getUnexisting', null) - ); - } - - function its_constructor_throws_MethodProphecyException_for_final_methods($objectProphecy, ClassWithFinalMethod $subject) - { - $objectProphecy->reveal()->willReturn($subject); - - $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->during( - '__construct', array($objectProphecy, 'finalMethod', null) - ); - } - - function its_constructor_transforms_array_passed_as_3rd_argument_to_ArgumentsWildcard( - $objectProphecy - ) - { - $this->beConstructedWith($objectProphecy, 'getName', array(42, 33)); - - $wildcard = $this->getArgumentsWildcard(); - $wildcard->shouldNotBe(null); - $wildcard->__toString()->shouldReturn('exact(42), exact(33)'); - } - - function its_constructor_does_not_touch_third_argument_if_it_is_null($objectProphecy) - { - $this->beConstructedWith($objectProphecy, 'getName', null); - - $wildcard = $this->getArgumentsWildcard(); - $wildcard->shouldBe(null); - } - - function it_records_promise_through_will_method(PromiseInterface $promise, $objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->will($promise); - $this->getPromise()->shouldReturn($promise); - } - - function it_adds_itself_to_ObjectProphecy_during_call_to_will(PromiseInterface $objectProphecy, $promise) - { - $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); - - $this->will($promise); - } - - function it_adds_ReturnPromise_during_willReturn_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willReturn(42); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnPromise'); - } - - function it_adds_ThrowPromise_during_willThrow_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willThrow('RuntimeException'); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ThrowPromise'); - } - - function it_adds_ReturnArgumentPromise_during_willReturnArgument_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willReturnArgument(); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise'); - } - - function it_adds_ReturnArgumentPromise_during_willReturnArgument_call_with_index_argument($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willReturnArgument(1); - $promise = $this->getPromise(); - $promise->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise'); - $promise->execute(array('one', 'two'), $objectProphecy, $this)->shouldReturn('two'); - } - - function it_adds_CallbackPromise_during_will_call_with_callback_argument($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $callback = function () {}; - - $this->will($callback); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\CallbackPromise'); - } - - function it_records_prediction_through_should_method(PredictionInterface $prediction, $objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('should', array($prediction)); - $this->getPrediction()->shouldReturn($prediction); - } - - function it_adds_CallbackPrediction_during_should_call_with_callback_argument($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $callback = function () {}; - - $this->callOnWrappedObject('should', array($callback)); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallbackPrediction'); - } - - function it_adds_itself_to_ObjectProphecy_during_call_to_should($objectProphecy, PredictionInterface $prediction) - { - $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); - - $this->callOnWrappedObject('should', array($prediction)); - } - - function it_adds_CallPrediction_during_shouldBeCalled_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('shouldBeCalled', array()); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallPrediction'); - } - - function it_adds_NoCallsPrediction_during_shouldNotBeCalled_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('shouldNotBeCalled', array()); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\NoCallsPrediction'); - } - - function it_adds_CallTimesPrediction_during_shouldBeCalledTimes_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('shouldBeCalledTimes', array(5)); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallTimesPrediction'); - } - - function it_checks_prediction_via_shouldHave_method_call( - $objectProphecy, - ArgumentsWildcard $arguments, - PredictionInterface $prediction, - Call $call1, - Call $call2 - ) { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction)); - } - - function it_sets_return_promise_during_shouldHave_call_if_none_was_set_before( - $objectProphecy, - ArgumentsWildcard $arguments, - PredictionInterface $prediction, - Call $call1, - Call $call2 - ) { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction)); - - $this->getPromise()->shouldReturnAnInstanceOf('Prophecy\Promise\ReturnPromise'); - } - - function it_does_not_set_return_promise_during_shouldHave_call_if_it_was_set_before( - $objectProphecy, - ArgumentsWildcard $arguments, - PredictionInterface $prediction, - Call $call1, - Call $call2, - PromiseInterface $promise - ) { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->will($promise); - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction)); - - $this->getPromise()->shouldReturn($promise); - } - - function it_records_checked_predictions( - $objectProphecy, - ArgumentsWildcard $arguments, - PredictionInterface $prediction1, - PredictionInterface $prediction2, - Call $call1, - Call $call2, - PromiseInterface $promise - ) { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction1->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn(); - $prediction2->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->will($promise); - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction1)); - $this->callOnWrappedObject('shouldHave', array($prediction2)); - - $this->getCheckedPredictions()->shouldReturn(array($prediction1, $prediction2)); - } - - function it_records_even_failed_checked_predictions( - $objectProphecy, - ArgumentsWildcard $arguments, - PredictionInterface $prediction, - Call $call1, - Call $call2, - PromiseInterface $promise - ) { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willThrow(new \RuntimeException()); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->will($promise); - $this->withArguments($arguments); - - try { - $this->callOnWrappedObject('shouldHave', array($prediction)); - } catch (\Exception $e) {} - - $this->getCheckedPredictions()->shouldReturn(array($prediction)); - } - - function it_checks_prediction_via_shouldHave_method_call_with_callback( - $objectProphecy, - ArgumentsWildcard $arguments, - Call $call1, - Call $call2 - ) { - $callback = function ($calls, $object, $method) { - throw new \RuntimeException; - }; - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->withArguments($arguments); - $this->shouldThrow('RuntimeException')->duringShouldHave($callback); - } - - function it_does_nothing_during_checkPrediction_if_no_prediction_set() - { - $this->checkPrediction()->shouldReturn(null); - } - - function it_checks_set_prediction_during_checkPrediction( - $objectProphecy, - ArgumentsWildcard $arguments, - PredictionInterface $prediction, - Call $call1, - Call $call2 - ) { - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->withArguments($arguments); - $this->callOnWrappedObject('should', array($prediction)); - $this->checkPrediction(); - } - - function it_links_back_to_ObjectProphecy_through_getter($objectProphecy) - { - $this->getObjectProphecy()->shouldReturn($objectProphecy); - } - - function it_has_MethodName() - { - $this->getMethodName()->shouldReturn('getName'); - } - - function it_contains_ArgumentsWildcard_it_was_constructed_with($objectProphecy, ArgumentsWildcard $wildcard) - { - $this->beConstructedWith($objectProphecy, 'getName', $wildcard); - - $this->getArgumentsWildcard()->shouldReturn($wildcard); - } - - function its_ArgumentWildcard_is_mutable_through_setter(ArgumentsWildcard $wildcard) - { - $this->withArguments($wildcard); - - $this->getArgumentsWildcard()->shouldReturn($wildcard); - } - - function its_withArguments_transforms_passed_array_into_ArgumentsWildcard() - { - $this->withArguments(array(42, 33)); - - $wildcard = $this->getArgumentsWildcard(); - $wildcard->shouldNotBe(null); - $wildcard->__toString()->shouldReturn('exact(42), exact(33)'); - } - - function its_withArguments_throws_exception_if_wrong_arguments_provided() - { - $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')->duringWithArguments(42); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php deleted file mode 100644 index c6afb3e..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php +++ /dev/null @@ -1,283 +0,0 @@ -beConstructedWith($lazyDouble); - - $lazyDouble->getInstance()->willReturn($double); - } - - function it_implements_ProphecyInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Prophecy\ProphecyInterface'); - } - - function it_sets_parentClass_during_willExtend_call($lazyDouble) - { - $lazyDouble->setParentClass('123')->shouldBeCalled(); - - $this->willExtend('123'); - } - - function it_adds_interface_during_willImplement_call($lazyDouble) - { - $lazyDouble->addInterface('222')->shouldBeCalled(); - - $this->willImplement('222'); - } - - function it_sets_constructor_arguments_during_willBeConstructedWith_call($lazyDouble) - { - $lazyDouble->setArguments(array(1, 2, 5))->shouldBeCalled(); - - $this->willBeConstructedWith(array(1, 2, 5)); - } - - function it_does_not_have_method_prophecies_by_default() - { - $this->getMethodProphecies()->shouldHaveCount(0); - } - - function it_should_get_method_prophecies_by_method_name( - MethodProphecy $method1, - MethodProphecy $method2, - ArgumentsWildcard $arguments - ) { - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments); - $method2->getMethodName()->willReturn('setName'); - $method2->getArgumentsWildcard()->willReturn($arguments); - - $this->addMethodProphecy($method1); - $this->addMethodProphecy($method2); - - $methods = $this->getMethodProphecies('setName'); - $methods->shouldHaveCount(1); - $methods[0]->getMethodName()->shouldReturn('setName'); - } - - function it_should_return_empty_array_if_no_method_prophecies_found() - { - $methods = $this->getMethodProphecies('setName'); - $methods->shouldHaveCount(0); - } - - function it_should_proxy_makeProphecyMethodCall_to_CallCenter($lazyDouble, CallCenter $callCenter) - { - $this->beConstructedWith($lazyDouble, $callCenter); - - $callCenter->makeCall($this->getWrappedObject(), 'setName', array('everzet'))->willReturn(42); - - $this->makeProphecyMethodCall('setName', array('everzet'))->shouldReturn(42); - } - - function it_should_reveal_arguments_and_return_values_from_callCenter( - $lazyDouble, - CallCenter $callCenter, - RevealerInterface $revealer - ) { - $this->beConstructedWith($lazyDouble, $callCenter, $revealer); - - $revealer->reveal(array('question'))->willReturn(array('life')); - $revealer->reveal('answer')->willReturn(42); - - $callCenter->makeCall($this->getWrappedObject(), 'setName', array('life'))->willReturn('answer'); - - $this->makeProphecyMethodCall('setName', array('question'))->shouldReturn(42); - } - - function it_should_proxy_getProphecyMethodCalls_to_CallCenter( - $lazyDouble, - CallCenter $callCenter, - ArgumentsWildcard $wildcard, - Call $call - ) { - $this->beConstructedWith($lazyDouble, $callCenter); - - $callCenter->findCalls('setName', $wildcard)->willReturn(array($call)); - - $this->findProphecyMethodCalls('setName', $wildcard)->shouldReturn(array($call)); - } - - function its_addMethodProphecy_adds_method_prophecy( - MethodProphecy $methodProphecy, - ArgumentsWildcard $argumentsWildcard - ) { - $methodProphecy->getArgumentsWildcard()->willReturn($argumentsWildcard); - $methodProphecy->getMethodName()->willReturn('getUsername'); - - $this->addMethodProphecy($methodProphecy); - - $this->getMethodProphecies()->shouldReturn(array( - 'getUsername' => array($methodProphecy) - )); - } - - function its_addMethodProphecy_handles_prophecies_with_different_arguments( - MethodProphecy $methodProphecy1, - MethodProphecy $methodProphecy2, - ArgumentsWildcard $argumentsWildcard1, - ArgumentsWildcard $argumentsWildcard2 - ) { - $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); - $methodProphecy1->getMethodName()->willReturn('getUsername'); - - $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); - $methodProphecy2->getMethodName()->willReturn('getUsername'); - - $this->addMethodProphecy($methodProphecy1); - $this->addMethodProphecy($methodProphecy2); - - $this->getMethodProphecies()->shouldReturn(array( - 'getUsername' => array( - $methodProphecy1, - $methodProphecy2, - ) - )); - } - - function its_addMethodProphecy_handles_prophecies_for_different_methods( - MethodProphecy $methodProphecy1, - MethodProphecy $methodProphecy2, - ArgumentsWildcard $argumentsWildcard1, - ArgumentsWildcard $argumentsWildcard2 - ) { - $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); - $methodProphecy1->getMethodName()->willReturn('getUsername'); - - $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); - $methodProphecy2->getMethodName()->willReturn('isUsername'); - - $this->addMethodProphecy($methodProphecy1); - $this->addMethodProphecy($methodProphecy2); - - $this->getMethodProphecies()->shouldReturn(array( - 'getUsername' => array( - $methodProphecy1 - ), - 'isUsername' => array( - $methodProphecy2 - ) - )); - } - - function its_addMethodProphecy_throws_exception_when_method_has_no_ArgumentsWildcard(MethodProphecy $methodProphecy) - { - $methodProphecy->getArgumentsWildcard()->willReturn(null); - $methodProphecy->getObjectProphecy()->willReturn($this); - $methodProphecy->getMethodName()->willReturn('getTitle'); - - $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->duringAddMethodProphecy( - $methodProphecy - ); - } - - function it_returns_null_after_checkPredictions_call_if_there_is_no_method_prophecies() - { - $this->checkProphecyMethodsPredictions()->shouldReturn(null); - } - - function it_throws_AggregateException_during_checkPredictions_if_predictions_fail( - MethodProphecy $methodProphecy1, MethodProphecy $methodProphecy2, - ArgumentsWildcard $argumentsWildcard1, - ArgumentsWildcard $argumentsWildcard2 - ) { - $methodProphecy1->getMethodName()->willReturn('getName'); - $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); - $methodProphecy1->checkPrediction() - ->willThrow('Prophecy\Exception\Prediction\AggregateException'); - - $methodProphecy2->getMethodName()->willReturn('setName'); - $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); - $methodProphecy2->checkPrediction() - ->willThrow('Prophecy\Exception\Prediction\AggregateException'); - - $this->addMethodProphecy($methodProphecy1); - $this->addMethodProphecy($methodProphecy2); - - $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException') - ->duringCheckProphecyMethodsPredictions(); - } - - function it_returns_new_MethodProphecy_instance_for_arbitrary_call( - Doubler $doubler, - ProphecySubjectInterface $reflection - ) { - $doubler->double(Argument::any())->willReturn($reflection); - - $return = $this->getProphecy(); - $return->shouldBeAnInstanceOf('Prophecy\Prophecy\MethodProphecy'); - $return->getMethodName()->shouldReturn('getProphecy'); - } - - function it_returns_same_MethodProphecy_for_same_registered_signature( - Doubler $doubler, - ProphecySubjectInterface $reflection - ) { - $doubler->double(Argument::any())->willReturn($reflection); - - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3)); - $methodProphecy2 = $this->getProphecy(1, 2, 3); - - $methodProphecy2->shouldBe($methodProphecy1); - } - - function it_returns_new_MethodProphecy_for_different_signatures( - Doubler $doubler, - ProphecySubjectInterface $reflection - ) { - $doubler->double(Argument::any())->willReturn($reflection); - - $value = new ObjectProphecySpecFixtureB('ABC'); - $value2 = new ObjectProphecySpecFixtureB('CBA'); - - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3, $value)); - $methodProphecy2 = $this->getProphecy(1, 2, 3, $value2); - - $methodProphecy2->shouldNotBe($methodProphecy1); - } - - function it_returns_new_MethodProphecy_for_all_callback_signatures( - Doubler $doubler, - ProphecySubjectInterface $reflection - ) { - $doubler->double(Argument::any())->willReturn($reflection); - - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(function(){})); - $methodProphecy2 = $this->getProphecy(function(){}); - - $methodProphecy2->shouldNotBe($methodProphecy1); - } -} - -class ObjectProphecySpecFixtureA -{ - public $errors; -} - -class ObjectProphecySpecFixtureB extends ObjectProphecySpecFixtureA -{ - public $errors; - public $value = null; - - public function __construct($value) - { - $this->value = $value; - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php deleted file mode 100644 index fcaa7ca..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php +++ /dev/null @@ -1,44 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Prophecy\RevealerInterface'); - } - - function it_reveals_single_instance_of_ProphecyInterface(ProphecyInterface $prophecy, \stdClass $object) - { - $prophecy->reveal()->willReturn($object); - - $this->reveal($prophecy)->shouldReturn($object); - } - - function it_reveals_instances_of_ProphecyInterface_inside_array( - ProphecyInterface $prophecy1, - ProphecyInterface $prophecy2, - \stdClass $object1, - \stdClass $object2 - ) { - $prophecy1->reveal()->willReturn($object1); - $prophecy2->reveal()->willReturn($object2); - - $this->reveal(array( - array('item' => $prophecy2), - $prophecy1 - ))->shouldReturn(array( - array('item' => $object2), - $object1 - )); - } - - function it_does_not_touch_non_prophecy_interface() - { - $this->reveal(42)->shouldReturn(42); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php deleted file mode 100644 index 67f0275..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php +++ /dev/null @@ -1,81 +0,0 @@ -double(null, array())->willReturn($double); - - $this->beConstructedWith($doubler); - } - - function it_constructs_new_prophecy_on_prophesize_call() - { - $prophecy = $this->prophesize(); - $prophecy->shouldBeAnInstanceOf('Prophecy\Prophecy\ObjectProphecy'); - } - - function it_constructs_new_prophecy_with_parent_class_if_specified($doubler, ProphecySubjectInterface $newDouble) - { - $doubler->double(Argument::any(), array())->willReturn($newDouble); - - $this->prophesize('Prophecy\Prophet')->reveal()->shouldReturn($newDouble); - } - - function it_constructs_new_prophecy_with_interface_if_specified($doubler, ProphecySubjectInterface $newDouble) - { - $doubler->double(null, Argument::any())->willReturn($newDouble); - - $this->prophesize('ArrayAccess')->reveal()->shouldReturn($newDouble); - } - - function it_exposes_all_created_prophecies_through_getter() - { - $prophecy1 = $this->prophesize(); - $prophecy2 = $this->prophesize(); - - $this->getProphecies()->shouldReturn(array($prophecy1, $prophecy2)); - } - - function it_does_nothing_during_checkPredictions_call_if_no_predictions_defined() - { - $this->checkPredictions()->shouldReturn(null); - } - - function it_throws_AggregateException_if_defined_predictions_fail( - MethodProphecy $method1, - MethodProphecy $method2, - ArgumentsWildcard $arguments1, - ArgumentsWildcard $arguments2 - ) { - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments1); - $method1->checkPrediction()->willReturn(null); - - $method2->getMethodName()->willReturn('isSet'); - $method2->getArgumentsWildcard()->willReturn($arguments2); - $method2->checkPrediction()->willThrow( - 'Prophecy\Exception\Prediction\AggregateException' - ); - - $this->prophesize()->addMethodProphecy($method1); - $this->prophesize()->addMethodProphecy($method2); - - $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException') - ->duringCheckPredictions(); - } - - function it_exposes_doubler_through_getter($doubler) - { - $this->getDoubler()->shouldReturn($doubler); - } -} diff --git a/api/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php b/api/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php deleted file mode 100644 index 80573cf..0000000 --- a/api/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php +++ /dev/null @@ -1,91 +0,0 @@ -stringify(42)->shouldReturn('42'); - } - - function it_generates_proper_string_representation_for_string() - { - $this->stringify('some string')->shouldReturn('"some string"'); - } - - function it_generates_single_line_representation_for_multiline_string() - { - $this->stringify("some\nstring")->shouldReturn('"some\\nstring"'); - } - - function it_generates_proper_string_representation_for_double() - { - $this->stringify(42.3)->shouldReturn('42.3'); - } - - function it_generates_proper_string_representation_for_boolean_true() - { - $this->stringify(true)->shouldReturn('true'); - } - - function it_generates_proper_string_representation_for_boolean_false() - { - $this->stringify(false)->shouldReturn('false'); - } - - function it_generates_proper_string_representation_for_null() - { - $this->stringify(null)->shouldReturn('null'); - } - - function it_generates_proper_string_representation_for_empty_array() - { - $this->stringify(array())->shouldReturn('[]'); - } - - function it_generates_proper_string_representation_for_array() - { - $this->stringify(array('zet', 42))->shouldReturn('["zet", 42]'); - } - - function it_generates_proper_string_representation_for_hash_containing_one_value() - { - $this->stringify(array('ever' => 'zet'))->shouldReturn('["ever" => "zet"]'); - } - - function it_generates_proper_string_representation_for_hash() - { - $this->stringify(array('ever' => 'zet', 52 => 'hey', 'num' => 42))->shouldReturn( - '["ever" => "zet", 52 => "hey", "num" => 42]' - ); - } - - function it_generates_proper_string_representation_for_resource() - { - $resource = fopen(__FILE__, 'r'); - $this->stringify($resource)->shouldReturn('stream:'.$resource); - } - - function it_generates_proper_string_representation_for_object(\stdClass $object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ) . " Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n)"; - - $this->stringify($object)->shouldReturn("$objHash"); - } - - function it_generates_proper_string_representation_for_object_without_exporting(\stdClass $object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ); - - $this->stringify($object, false)->shouldReturn("$objHash"); - } -} diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php index aa960f3..045a1b9 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php @@ -59,7 +59,9 @@ class ExactValueToken implements TokenInterface try { $comparator->assertEquals($argument, $this->value); return 10; - } catch (ComparisonFailure $failure) {} + } catch (ComparisonFailure $failure) { + return false; + } } // If either one is an object it should be castable to a string diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php index 24ff8c2..bd8d423 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php @@ -32,7 +32,7 @@ class StringContainsToken implements TokenInterface public function scoreArgument($argument) { - return strpos($argument, $this->value) !== false ? 6 : false; + return is_string($argument) && strpos($argument, $this->value) !== false ? 6 : false; } /** diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/api/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php index 2f3fbad..2652235 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php @@ -12,6 +12,7 @@ namespace Prophecy\Call; use Exception; +use Prophecy\Argument\ArgumentsWildcard; /** * Call object. @@ -26,6 +27,7 @@ class Call private $exception; private $file; private $line; + private $scores; /** * Initializes call. @@ -44,6 +46,7 @@ class Call $this->arguments = $arguments; $this->returnValue = $returnValue; $this->exception = $exception; + $this->scores = new \SplObjectStorage(); if ($file) { $this->file = $file; @@ -124,4 +127,36 @@ class Call return sprintf('%s:%d', $this->file, $this->line); } + + /** + * Adds the wildcard match score for the provided wildcard. + * + * @param ArgumentsWildcard $wildcard + * @param false|int $score + * + * @return $this + */ + public function addScore(ArgumentsWildcard $wildcard, $score) + { + $this->scores[$wildcard] = $score; + + return $this; + } + + /** + * Returns wildcard match score for the provided wildcard. The score is + * calculated if not already done. + * + * @param ArgumentsWildcard $wildcard + * + * @return false|int False OR integer score (higher - better) + */ + public function getScore(ArgumentsWildcard $wildcard) + { + if (isset($this->scores[$wildcard])) { + return $this->scores[$wildcard]; + } + + return $this->scores[$wildcard] = $wildcard->scoreArguments($this->getArguments()); + } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/api/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php index 53b80f0..d4bdba0 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php @@ -12,11 +12,11 @@ namespace Prophecy\Call; use Prophecy\Exception\Prophecy\MethodProphecyException; -use Prophecy\Prophecy\MethodProphecy; use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Argument\ArgumentsWildcard; use Prophecy\Util\StringUtil; use Prophecy\Exception\Call\UnexpectedCallException; +use SplObjectStorage; /** * Calls receiver & manager. @@ -32,6 +32,11 @@ class CallCenter */ private $recordedCalls = array(); + /** + * @var SplObjectStorage + */ + private $unexpectedCalls; + /** * Initializes call center. * @@ -40,6 +45,7 @@ class CallCenter public function __construct(StringUtil $util = null) { $this->util = $util ?: new StringUtil; + $this->unexpectedCalls = new SplObjectStorage(); } /** @@ -74,28 +80,27 @@ class CallCenter } // If no method prophecies defined, then it's a dummy, so we'll just return null - if ('__destruct' === $methodName || 0 == count($prophecy->getMethodProphecies())) { + if ('__destruct' === strtolower($methodName) || 0 == count($prophecy->getMethodProphecies())) { $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); return null; } // There are method prophecies, so it's a fake/stub. Searching prophecy for this call - $matches = array(); - foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) { - if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) { - $matches[] = array($score, $methodProphecy); - } - } + $matches = $this->findMethodProphecies($prophecy, $methodName, $arguments); // If fake/stub doesn't have method prophecy for this call - throw exception if (!count($matches)) { - throw $this->createUnexpectedCallException($prophecy, $methodName, $arguments); + $this->unexpectedCalls->attach(new Call($methodName, $arguments, null, null, $file, $line), $prophecy); + $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); + + return null; } // Sort matches by their score value @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); + $score = $matches[0][0]; // If Highest rated method prophecy has a promise - execute it or return null instead $methodProphecy = $matches[0][1]; $returnValue = null; @@ -115,9 +120,10 @@ class CallCenter ); } - $this->recordedCalls[] = new Call( + $this->recordedCalls[] = $call = new Call( $methodName, $arguments, $returnValue, $exception, $file, $line ); + $call->addScore($methodProphecy->getArgumentsWildcard(), $score); if (null !== $exception) { throw $exception; @@ -136,36 +142,107 @@ class CallCenter */ public function findCalls($methodName, ArgumentsWildcard $wildcard) { + $methodName = strtolower($methodName); + return array_values( array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { - return $methodName === $call->getMethodName() - && 0 < $wildcard->scoreArguments($call->getArguments()) + return $methodName === strtolower($call->getMethodName()) + && 0 < $call->getScore($wildcard) ; }) ); } + /** + * @throws UnexpectedCallException + */ + public function checkUnexpectedCalls() + { + /** @var Call $call */ + foreach ($this->unexpectedCalls as $call) { + $prophecy = $this->unexpectedCalls[$call]; + + // If fake/stub doesn't have method prophecy for this call - throw exception + if (!count($this->findMethodProphecies($prophecy, $call->getMethodName(), $call->getArguments()))) { + throw $this->createUnexpectedCallException($prophecy, $call->getMethodName(), $call->getArguments()); + } + } + } + private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName, array $arguments) { $classname = get_class($prophecy->reveal()); - $argstring = implode(', ', array_map(array($this->util, 'stringify'), $arguments)); - $expected = implode("\n", array_map(function (MethodProphecy $methodProphecy) { - return sprintf(' - %s(%s)', + $indentationLength = 8; // looks good + $argstring = implode( + ",\n", + $this->indentArguments( + array_map(array($this->util, 'stringify'), $arguments), + $indentationLength + ) + ); + + $expected = array(); + + foreach (call_user_func_array('array_merge', $prophecy->getMethodProphecies()) as $methodProphecy) { + $expected[] = sprintf( + " - %s(\n" . + "%s\n" . + " )", $methodProphecy->getMethodName(), - $methodProphecy->getArgumentsWildcard() + implode( + ",\n", + $this->indentArguments( + array_map('strval', $methodProphecy->getArgumentsWildcard()->getTokens()), + $indentationLength + ) + ) ); - }, call_user_func_array('array_merge', $prophecy->getMethodProphecies()))); + } return new UnexpectedCallException( sprintf( - "Method call:\n". - " - %s(%s)\n". - "on %s was not expected, expected calls were:\n%s", + "Unexpected method call on %s:\n". + " - %s(\n". + "%s\n". + " )\n". + "expected calls were:\n". + "%s", - $methodName, $argstring, $classname, $expected + $classname, $methodName, $argstring, implode("\n", $expected) ), $prophecy, $methodName, $arguments + ); } + + private function indentArguments(array $arguments, $indentationLength) + { + return preg_replace_callback( + '/^/m', + function () use ($indentationLength) { + return str_repeat(' ', $indentationLength); + }, + $arguments + ); + } + + /** + * @param ObjectProphecy $prophecy + * @param string $methodName + * @param array $arguments + * + * @return array + */ + private function findMethodProphecies(ObjectProphecy $prophecy, $methodName, array $arguments) + { + $matches = array(); + foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) { + if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) { + $matches[] = array($score, $methodProphecy); + } + } + + return $matches; + } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/api/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php index 874e474..fa4f578 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php @@ -27,16 +27,18 @@ final class ClosureComparator extends Comparator && is_object($actual) && $actual instanceof \Closure; } - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()) { - throw new ComparisonFailure( - $expected, - $actual, - // we don't need a diff - '', - '', - false, - 'all closures are born different' - ); + if ($expected !== $actual) { + throw new ComparisonFailure( + $expected, + $actual, + // we don't need a diff + '', + '', + false, + 'all closures are different if not identical' + ); + } } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php index d6b6b1a..2b87521 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php @@ -21,17 +21,7 @@ use ReflectionClass; */ class CachedDoubler extends Doubler { - private $classes = array(); - - /** - * {@inheritdoc} - */ - public function registerClassPatch(ClassPatch\ClassPatchInterface $patch) - { - $this->classes[] = array(); - - parent::registerClassPatch($patch); - } + private static $classes = array(); /** * {@inheritdoc} @@ -39,11 +29,11 @@ class CachedDoubler extends Doubler protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) { $classId = $this->generateClassId($class, $interfaces); - if (isset($this->classes[$classId])) { - return $this->classes[$classId]; + if (isset(self::$classes[$classId])) { + return self::$classes[$classId]; } - return $this->classes[$classId] = parent::createDoubleClass($class, $interfaces); + return self::$classes[$classId] = parent::createDoubleClass($class, $interfaces); } /** @@ -61,8 +51,16 @@ class CachedDoubler extends Doubler foreach ($interfaces as $interface) { $parts[] = $interface->getName(); } + foreach ($this->getClassPatches() as $patch) { + $parts[] = get_class($patch); + } sort($parts); return md5(implode('', $parts)); } + + public function resetCache() + { + self::$classes = array(); + } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php index 61998fc..9d84309 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php @@ -41,6 +41,10 @@ class DisableConstructorPatch implements ClassPatchInterface */ public function apply(ClassNode $node) { + if (!$node->isExtendable('__construct')) { + return; + } + if (!$node->hasMethod('__construct')) { $node->addMethod(new MethodNode('__construct', '')); diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php index b0d9793..41ea2fc 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php @@ -51,7 +51,8 @@ class KeywordPatch implements ClassPatchInterface * * @return int Priority number (higher - earlier) */ - public function getPriority() { + public function getPriority() + { return 49; } @@ -60,7 +61,11 @@ class KeywordPatch implements ClassPatchInterface * * @return array */ - private function getKeywords() { + private function getKeywords() + { + if (\PHP_VERSION_ID >= 70000) { + return array('__halt_compiler'); + } return array( '__halt_compiler', diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php index 5f2c607..9ff49cd 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php @@ -58,20 +58,25 @@ class MagicCallPatch implements ClassPatchInterface foreach ($types as $type) { $reflectionClass = new \ReflectionClass($type); - $tagList = $this->tagRetriever->getTagList($reflectionClass); - foreach($tagList as $tag) { - $methodName = $tag->getMethodName(); + while ($reflectionClass) { + $tagList = $this->tagRetriever->getTagList($reflectionClass); - if (empty($methodName)) { - continue; + foreach ($tagList as $tag) { + $methodName = $tag->getMethodName(); + + if (empty($methodName)) { + continue; + } + + if (!$reflectionClass->hasMethod($methodName)) { + $methodNode = new MethodNode($methodName); + $methodNode->setStatic($tag->isStatic()); + $node->addMethod($methodNode); + } } - if (!$reflectionClass->hasMethod($methodName)) { - $methodNode = new MethodNode($methodName); - $methodNode->setStatic($tag->isStatic()); - $node->addMethod($methodNode); - } + $reflectionClass = $reflectionClass->getParentClass(); } } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php index fc2cc4d..ef40366 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php @@ -43,7 +43,7 @@ class ProphecySubjectPatch implements ClassPatchInterface public function apply(ClassNode $node) { $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface'); - $node->addProperty('objectProphecy', 'private'); + $node->addProperty('objectProphecyClosure', 'private'); foreach ($node->getMethods() as $name => $method) { if ('__construct' === strtolower($name)) { @@ -65,10 +65,10 @@ class ProphecySubjectPatch implements ClassPatchInterface $prophecyArgument = new ArgumentNode('prophecy'); $prophecyArgument->setTypeHint('Prophecy\Prophecy\ProphecyInterface'); $prophecySetter->addArgument($prophecyArgument); - $prophecySetter->setCode('$this->objectProphecy = $prophecy;'); + $prophecySetter->setCode('$this->objectProphecyClosure = function () use ($prophecy) { return $prophecy; };'); $prophecyGetter = new MethodNode('getProphecy'); - $prophecyGetter->setCode('return $this->objectProphecy;'); + $prophecyGetter->setCode('return call_user_func($this->objectProphecyClosure);'); if ($node->hasMethod('__call')) { $__call = $node->getMethod('__call'); @@ -77,7 +77,7 @@ class ProphecySubjectPatch implements ClassPatchInterface $__call->addArgument(new ArgumentNode('name')); $__call->addArgument(new ArgumentNode('arguments')); - $node->addMethod($__call); + $node->addMethod($__call, true); } $__call->setCode(<<addMethod($prophecySetter); - $node->addMethod($prophecyGetter); + $node->addMethod($prophecySetter, true); + $node->addMethod($prophecyGetter, true); } /** diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php index eba8298..ceee94a 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php @@ -34,7 +34,6 @@ class SplFileInfoPatch implements ClassPatchInterface if (null === $node->getParentClass()) { return false; } - return 'SplFileInfo' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'SplFileInfo') ; @@ -61,7 +60,15 @@ class SplFileInfoPatch implements ClassPatchInterface } if ($this->nodeIsSplFileObject($node)) { - $constructor->setCode('return parent::__construct("' . __FILE__ .'");'); + $filePath = str_replace('\\','\\\\',__FILE__); + $constructor->setCode('return parent::__construct("' . $filePath .'");'); + + return; + } + + if ($this->nodeIsSymfonySplFileInfo($node)) { + $filePath = str_replace('\\','\\\\',__FILE__); + $constructor->setCode('return parent::__construct("' . $filePath .'", "", "");'); return; } @@ -102,4 +109,15 @@ class SplFileInfoPatch implements ClassPatchInterface return 'SplFileObject' === $parent || is_subclass_of($parent, 'SplFileObject'); } + + /** + * @param ClassNode $node + * @return boolean + */ + private function nodeIsSymfonySplFileInfo(ClassNode $node) + { + $parent = $node->getParentClass(); + + return 'Symfony\\Component\\Finder\\SplFileInfo' === $parent; + } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php new file mode 100644 index 0000000..b98e943 --- /dev/null +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php @@ -0,0 +1,95 @@ +implementsAThrowableInterface($node) && $this->doesNotExtendAThrowableClass($node); + } + + /** + * @param ClassNode $node + * @return bool + */ + private function implementsAThrowableInterface(ClassNode $node) + { + foreach ($node->getInterfaces() as $type) { + if (is_a($type, 'Throwable', true)) { + return true; + } + } + + return false; + } + + /** + * @param ClassNode $node + * @return bool + */ + private function doesNotExtendAThrowableClass(ClassNode $node) + { + return !is_a($node->getParentClass(), 'Throwable', true); + } + + /** + * Applies patch to the specific class node. + * + * @param ClassNode $node + * + * @return void + */ + public function apply(ClassNode $node) + { + $this->checkItCanBeDoubled($node); + $this->setParentClassToException($node); + } + + private function checkItCanBeDoubled(ClassNode $node) + { + $className = $node->getParentClass(); + if ($className !== 'stdClass') { + throw new ClassCreatorException( + sprintf( + 'Cannot double concrete class %s as well as implement Traversable', + $className + ), + $node + ); + } + } + + private function setParentClassToException(ClassNode $node) + { + $node->setParentClass('Exception'); + + $node->removeMethod('getMessage'); + $node->removeMethod('getCode'); + $node->removeMethod('getFile'); + $node->removeMethod('getLine'); + $node->removeMethod('getTrace'); + $node->removeMethod('getPrevious'); + $node->removeMethod('getNext'); + $node->removeMethod('getTraceAsString'); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 100; + } +} diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php index fc1079c..891faa8 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php @@ -19,6 +19,16 @@ namespace Prophecy\Doubler\Generator; */ class ClassCodeGenerator { + /** + * @var TypeHintReference + */ + private $typeHintReference; + + public function __construct(TypeHintReference $typeHintReference = null) + { + $this->typeHintReference = $typeHintReference ?: new TypeHintReference(); + } + /** * Generates PHP code for class node. * @@ -91,7 +101,8 @@ class ClassCodeGenerator private function generateArguments(array $arguments) { - return array_map(function (Node\ArgumentNode $argument) { + $typeHintReference = $this->typeHintReference; + return array_map(function (Node\ArgumentNode $argument) use ($typeHintReference) { $php = ''; if (version_compare(PHP_VERSION, '7.1', '>=')) { @@ -99,34 +110,7 @@ class ClassCodeGenerator } if ($hint = $argument->getTypeHint()) { - switch ($hint) { - case 'array': - case 'callable': - $php .= $hint; - break; - - case 'iterable': - if (version_compare(PHP_VERSION, '7.1', '>=')) { - $php .= $hint; - break; - } - - $php .= '\\'.$hint; - break; - - case 'string': - case 'int': - case 'float': - case 'bool': - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $php .= $hint; - break; - } - // Fall-through to default case for PHP 5.x - - default: - $php .= '\\'.$hint; - } + $php .= $typeHintReference->isBuiltInParamTypeHint($hint) ? $hint : '\\'.$hint; } $php .= ' '.($argument->isPassedByReference() ? '&' : ''); diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php index 9f99239..6dab2d9 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php @@ -144,7 +144,7 @@ class ClassMirror } if (version_compare(PHP_VERSION, '7.0', '>=') && $method->hasReturnType()) { - $returnType = (string) $method->getReturnType(); + $returnType = PHP_VERSION_ID >= 70100 ? $method->getReturnType()->getName() : (string) $method->getReturnType(); $returnTypeLower = strtolower($returnType); if ('self' === $returnTypeLower) { @@ -189,6 +189,8 @@ class ClassMirror $node->setAsPassedByReference(); } + $node->setAsNullable($this->isNullable($parameter)); + $methodNode->addArgument($node); } @@ -229,7 +231,7 @@ class ClassMirror } if (version_compare(PHP_VERSION, '7.0', '>=') && true === $parameter->hasType()) { - return (string) $parameter->getType(); + return PHP_VERSION_ID >= 70100 ? $parameter->getType()->getName() : (string) $parameter->getType(); } return null; diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php index 1499a1d..f7bd285 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php @@ -100,7 +100,7 @@ class ClassNode return $this->methods; } - public function addMethod(MethodNode $method) + public function addMethod(MethodNode $method, $force = false) { if (!$this->isExtendable($method->getName())){ $message = sprintf( @@ -108,7 +108,10 @@ class ClassNode ); throw new MethodNotExtendableException($message, $this->getParentClass(), $method->getName()); } - $this->methods[$method->getName()] = $method; + + if ($force || !isset($this->methods[$method->getName()])) { + $this->methods[$method->getName()] = $method; + } } public function removeMethod($name) diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php index 71aabfa..c74b483 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php @@ -11,6 +11,7 @@ namespace Prophecy\Doubler\Generator\Node; +use Prophecy\Doubler\Generator\TypeHintReference; use Prophecy\Exception\InvalidArgumentException; /** @@ -33,14 +34,20 @@ class MethodNode */ private $arguments = array(); + /** + * @var TypeHintReference + */ + private $typeHintReference; + /** * @param string $name * @param string $code */ - public function __construct($name, $code = null) + public function __construct($name, $code = null, TypeHintReference $typeHintReference = null) { $this->name = $name; $this->code = $code; + $this->typeHintReference = $typeHintReference ?: new TypeHintReference(); } public function getVisibility() @@ -112,38 +119,22 @@ class MethodNode */ public function setReturnType($type = null) { - switch ($type) { - case '': - $this->returnType = null; - break; - - case 'string'; - case 'float': - case 'int': - case 'bool': - case 'array': - case 'callable': - case 'iterable': - case 'void': - $this->returnType = $type; - break; - - case 'double': - case 'real': - $this->returnType = 'float'; - break; - - case 'boolean': - $this->returnType = 'bool'; - break; - - case 'integer': - $this->returnType = 'int'; - break; - - default: - $this->returnType = '\\' . ltrim($type, '\\'); + if ($type === '' || $type === null) { + $this->returnType = null; + return; } + $typeMap = array( + 'double' => 'float', + 'real' => 'float', + 'boolean' => 'bool', + 'integer' => 'int', + ); + if (isset($typeMap[$type])) { + $type = $typeMap[$type]; + } + $this->returnType = $this->typeHintReference->isBuiltInReturnTypeHint($type) ? + $type : + '\\' . ltrim($type, '\\'); } public function getReturnType() diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php new file mode 100644 index 0000000..ce95202 --- /dev/null +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php @@ -0,0 +1,46 @@ += 50400; + + case 'bool': + case 'float': + case 'int': + case 'string': + return PHP_VERSION_ID >= 70000; + + case 'iterable': + return PHP_VERSION_ID >= 70100; + + case 'object': + return PHP_VERSION_ID >= 70200; + + default: + return false; + } + } + + public function isBuiltInReturnTypeHint($type) + { + if ($type === 'void') { + return PHP_VERSION_ID >= 70100; + } + + return $this->isBuiltInParamTypeHint($type); + } +} diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php index b113941..a538349 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php @@ -14,7 +14,7 @@ namespace Prophecy\Exception\Doubler; class MethodNotFoundException extends DoubleException { /** - * @var string + * @var string|object */ private $classname; @@ -30,7 +30,7 @@ class MethodNotFoundException extends DoubleException /** * @param string $message - * @param string $classname + * @param string|object $classname * @param string $methodName * @param null|Argument\ArgumentsWildcard|array $arguments */ diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php index 44b598a..a00dfb0 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php @@ -21,7 +21,8 @@ class AggregateException extends \RuntimeException implements PredictionExceptio public function append(PredictionException $exception) { $message = $exception->getMessage(); - $message = ' '.strtr($message, array("\n" => "\n "))."\n"; + $message = strtr($message, array("\n" => "\n "))."\n"; + $message = empty($this->exceptions) ? $message : "\n" . $message; $this->message = rtrim($this->message.$message); $this->exceptions[] = $exception; diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php b/api/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php index 1d2da8f..9817a44 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php @@ -44,7 +44,15 @@ final class ClassTagRetriever implements MethodTagRetrieverInterface $this->contextFactory->createFromReflector($reflectionClass) ); - return $phpdoc->getTagsByName('method'); + $methods = array(); + + foreach ($phpdoc->getTagsByName('method') as $tag) { + if ($tag instanceof Method) { + $methods[] = $tag; + } + } + + return $methods; } catch (\InvalidArgumentException $e) { return array(); } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/api/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php index 7250fa3..26ec19e 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php @@ -41,7 +41,7 @@ class ThrowPromise implements PromiseInterface public function __construct($exception) { if (is_string($exception)) { - if (!class_exists($exception) || !$this->isAValidThrowable($exception)) { + if ((!class_exists($exception) && !interface_exists($exception)) || !$this->isAValidThrowable($exception)) { throw new InvalidArgumentException(sprintf( 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', $exception @@ -94,6 +94,7 @@ class ThrowPromise implements PromiseInterface */ private function isAValidThrowable($exception) { - return is_a($exception, 'Exception', true) || is_subclass_of($exception, 'Throwable', true); + return is_a($exception, 'Exception', true) + || is_a($exception, 'Throwable', true); } } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php index 5c0ede9..f33364c 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php @@ -71,15 +71,15 @@ class MethodProphecy } if (version_compare(PHP_VERSION, '7.0', '>=') && true === $reflectedMethod->hasReturnType()) { - $type = (string) $reflectedMethod->getReturnType(); + $type = PHP_VERSION_ID >= 70100 ? $reflectedMethod->getReturnType()->getName() : (string) $reflectedMethod->getReturnType(); if ('void' === $type) { $this->voidReturnType = true; - return; } $this->will(function () use ($type) { switch ($type) { + case 'void': return; case 'string': return ''; case 'float': return 0.0; case 'int': return 0; @@ -164,7 +164,7 @@ class MethodProphecy /** * Sets return promise to the prophecy. * - * @see Prophecy\Promise\ReturnPromise + * @see \Prophecy\Promise\ReturnPromise * * @return $this */ @@ -180,12 +180,46 @@ class MethodProphecy return $this->will(new Promise\ReturnPromise(func_get_args())); } + /** + * @param array $items + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function willYield($items) + { + if ($this->voidReturnType) { + throw new MethodProphecyException( + "The method \"$this->methodName\" has a void return type, and so cannot yield anything", + $this + ); + } + + if (!is_array($items)) { + throw new InvalidArgumentException(sprintf( + 'Expected array, but got %s.', + gettype($items) + )); + } + + // Remove eval() when minimum version >=5.5 + /** @var callable $generator */ + $generator = eval('return function() use ($items) { + foreach ($items as $key => $value) { + yield $key => $value; + } + };'); + + return $this->will($generator); + } + /** * Sets return argument promise to the prophecy. * * @param int $index The zero-indexed number of the argument to return * - * @see Prophecy\Promise\ReturnArgumentPromise + * @see \Prophecy\Promise\ReturnArgumentPromise * * @return $this */ @@ -201,7 +235,7 @@ class MethodProphecy /** * Sets throw promise to the prophecy. * - * @see Prophecy\Promise\ThrowPromise + * @see \Prophecy\Promise\ThrowPromise * * @param string|\Exception $exception Exception class or instance * @@ -243,7 +277,7 @@ class MethodProphecy /** * Sets call prediction to the prophecy. * - * @see Prophecy\Prediction\CallPrediction + * @see \Prophecy\Prediction\CallPrediction * * @return $this */ @@ -255,7 +289,7 @@ class MethodProphecy /** * Sets no calls prediction to the prophecy. * - * @see Prophecy\Prediction\NoCallsPrediction + * @see \Prophecy\Prediction\NoCallsPrediction * * @return $this */ @@ -267,7 +301,7 @@ class MethodProphecy /** * Sets call times prediction to the prophecy. * - * @see Prophecy\Prediction\CallTimesPrediction + * @see \Prophecy\Prediction\CallTimesPrediction * * @param $count * @@ -278,6 +312,18 @@ class MethodProphecy return $this->should(new Prediction\CallTimesPrediction($count)); } + /** + * Sets call times prediction to the prophecy. + * + * @see \Prophecy\Prediction\CallTimesPrediction + * + * @return $this + */ + public function shouldBeCalledOnce() + { + return $this->shouldBeCalledTimes(1); + } + /** * Checks provided prediction immediately. * @@ -324,7 +370,7 @@ class MethodProphecy /** * Checks call prediction. * - * @see Prophecy\Prediction\CallPrediction + * @see \Prophecy\Prediction\CallPrediction * * @return $this */ @@ -336,7 +382,7 @@ class MethodProphecy /** * Checks no calls prediction. * - * @see Prophecy\Prediction\NoCallsPrediction + * @see \Prophecy\Prediction\NoCallsPrediction * * @return $this */ @@ -348,7 +394,7 @@ class MethodProphecy /** * Checks no calls prediction. * - * @see Prophecy\Prediction\NoCallsPrediction + * @see \Prophecy\Prediction\NoCallsPrediction * @deprecated * * @return $this @@ -361,7 +407,7 @@ class MethodProphecy /** * Checks call times prediction. * - * @see Prophecy\Prediction\CallTimesPrediction + * @see \Prophecy\Prediction\CallTimesPrediction * * @param int $count * @@ -372,6 +418,18 @@ class MethodProphecy return $this->shouldHave(new Prediction\CallTimesPrediction($count)); } + /** + * Checks call times prediction. + * + * @see \Prophecy\Prediction\CallTimesPrediction + * + * @return $this + */ + public function shouldHaveBeenCalledOnce() + { + return $this->shouldHaveBeenCalledTimes(1); + } + /** * Checks currently registered [with should(...)] prediction. */ diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php index 8d8f8a1..11b87cf 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php @@ -146,7 +146,7 @@ class ObjectProphecy implements ProphecyInterface ), $methodProphecy); } - $methodName = $methodProphecy->getMethodName(); + $methodName = strtolower($methodProphecy->getMethodName()); if (!isset($this->methodProphecies[$methodName])) { $this->methodProphecies[$methodName] = array(); @@ -168,6 +168,8 @@ class ObjectProphecy implements ProphecyInterface return $this->methodProphecies; } + $methodName = strtolower($methodName); + if (!isset($this->methodProphecies[$methodName])) { return array(); } @@ -208,12 +210,15 @@ class ObjectProphecy implements ProphecyInterface * Checks that registered method predictions do not fail. * * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail + * @throws \Prophecy\Exception\Call\UnexpectedCallException */ public function checkProphecyMethodsPredictions() { $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal()))); $exception->setObjectProphecy($this); + $this->callCenter->checkUnexpectedCalls(); + foreach ($this->methodProphecies as $prophecies) { foreach ($prophecies as $prophecy) { try { diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/api/vendor/phpspec/prophecy/src/Prophecy/Prophet.php index ac64923..d37c92a 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Prophet.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Prophet.php @@ -11,6 +11,7 @@ namespace Prophecy; +use Prophecy\Doubler\CachedDoubler; use Prophecy\Doubler\Doubler; use Prophecy\Doubler\LazyDouble; use Prophecy\Doubler\ClassPatch; @@ -45,13 +46,16 @@ class Prophet * @param null|RevealerInterface $revealer * @param null|StringUtil $util */ - public function __construct(Doubler $doubler = null, RevealerInterface $revealer = null, - StringUtil $util = null) - { + public function __construct( + Doubler $doubler = null, + RevealerInterface $revealer = null, + StringUtil $util = null + ) { if (null === $doubler) { - $doubler = new Doubler; + $doubler = new CachedDoubler(); $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch); $doubler->registerClassPatch(new ClassPatch\TraversablePatch); + $doubler->registerClassPatch(new ClassPatch\ThrowablePatch); $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch); $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch); $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch); diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/api/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php index 50dd3f3..1090a80 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php @@ -181,9 +181,7 @@ class ExportUtil if (is_object($value)) { $class = get_class($value); - if ($value instanceof ProphecyInterface) { - return sprintf('%s Object (*Prophecy*)', $class); - } elseif ($hash = $processed->contains($value)) { + if ($hash = $processed->contains($value)) { return sprintf('%s:%s Object', $class, $hash); } diff --git a/api/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/api/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php index bb90156..ba4faff 100644 --- a/api/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php +++ b/api/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php @@ -20,6 +20,16 @@ use Prophecy\Call\Call; */ class StringUtil { + private $verbose; + + /** + * @param bool $verbose + */ + public function __construct($verbose = true) + { + $this->verbose = $verbose; + } + /** * Stringifies any provided value. * @@ -54,7 +64,7 @@ class StringUtil if (is_string($value)) { $str = sprintf('"%s"', str_replace("\n", '\\n', $value)); - if (50 <= strlen($str)) { + if (!$this->verbose && 50 <= strlen($str)) { return substr($str, 0, 50).'"...'; } diff --git a/api/vendor/phpspec/prophecy/tests/Doubler/Generator/ClassMirrorTest.php b/api/vendor/phpspec/prophecy/tests/Doubler/Generator/ClassMirrorTest.php deleted file mode 100644 index 77f3ad8..0000000 --- a/api/vendor/phpspec/prophecy/tests/Doubler/Generator/ClassMirrorTest.php +++ /dev/null @@ -1,469 +0,0 @@ -reflect($class, array()); - - $this->assertCount(7, $node->getMethods()); - } - - /** - * @test - */ - public function it_reflects_protected_abstract_methods() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithProtectedAbstractMethod'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertEquals('Fixtures\Prophecy\WithProtectedAbstractMethod', $classNode->getParentClass()); - - $methodNodes = $classNode->getMethods(); - $this->assertCount(1, $methodNodes); - - $this->assertEquals('protected', $methodNodes['innerDetail']->getVisibility()); - } - - /** - * @test - */ - public function it_reflects_public_static_methods() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithStaticMethod'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertEquals('Fixtures\Prophecy\WithStaticMethod', $classNode->getParentClass()); - - $methodNodes = $classNode->getMethods(); - $this->assertCount(1, $methodNodes); - - $this->assertTrue($methodNodes['innerDetail']->isStatic()); - } - - /** - * @test - */ - public function it_marks_required_args_without_types_as_not_optional() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithArguments'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - $methodNode = $classNode->getMethod('methodWithoutTypeHints'); - $argNodes = $methodNode->getArguments(); - - $this->assertCount(1, $argNodes); - - $this->assertEquals('arg', $argNodes[0]->getName()); - $this->assertNull($argNodes[0]->getTypeHint()); - $this->assertFalse($argNodes[0]->isOptional()); - $this->assertNull($argNodes[0]->getDefault()); - $this->assertFalse($argNodes[0]->isPassedByReference()); - $this->assertFalse($argNodes[0]->isVariadic()); - } - - /** - * @test - */ - public function it_properly_reads_methods_arguments_with_types() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithArguments'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - $methodNode = $classNode->getMethod('methodWithArgs'); - $argNodes = $methodNode->getArguments(); - - $this->assertCount(3, $argNodes); - - $this->assertEquals('arg_1', $argNodes[0]->getName()); - $this->assertEquals('array', $argNodes[0]->getTypeHint()); - $this->assertTrue($argNodes[0]->isOptional()); - $this->assertEquals(array(), $argNodes[0]->getDefault()); - $this->assertFalse($argNodes[0]->isPassedByReference()); - $this->assertFalse($argNodes[0]->isVariadic()); - - $this->assertEquals('arg_2', $argNodes[1]->getName()); - $this->assertEquals('ArrayAccess', $argNodes[1]->getTypeHint()); - $this->assertFalse($argNodes[1]->isOptional()); - - $this->assertEquals('arg_3', $argNodes[2]->getName()); - $this->assertEquals('ArrayAccess', $argNodes[2]->getTypeHint()); - $this->assertTrue($argNodes[2]->isOptional()); - $this->assertNull($argNodes[2]->getDefault()); - $this->assertFalse($argNodes[2]->isPassedByReference()); - $this->assertFalse($argNodes[2]->isVariadic()); - } - - /** - * @test - * @requires PHP 5.4 - */ - public function it_properly_reads_methods_arguments_with_callable_types() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithCallableArgument'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - $methodNode = $classNode->getMethod('methodWithArgs'); - $argNodes = $methodNode->getArguments(); - - $this->assertCount(2, $argNodes); - - $this->assertEquals('arg_1', $argNodes[0]->getName()); - $this->assertEquals('callable', $argNodes[0]->getTypeHint()); - $this->assertFalse($argNodes[0]->isOptional()); - $this->assertFalse($argNodes[0]->isPassedByReference()); - $this->assertFalse($argNodes[0]->isVariadic()); - - $this->assertEquals('arg_2', $argNodes[1]->getName()); - $this->assertEquals('callable', $argNodes[1]->getTypeHint()); - $this->assertTrue($argNodes[1]->isOptional()); - $this->assertNull($argNodes[1]->getDefault()); - $this->assertFalse($argNodes[1]->isPassedByReference()); - $this->assertFalse($argNodes[1]->isVariadic()); - } - - /** - * @test - * @requires PHP 5.6 - */ - public function it_properly_reads_methods_variadic_arguments() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithVariadicArgument'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - $methodNode = $classNode->getMethod('methodWithArgs'); - $argNodes = $methodNode->getArguments(); - - $this->assertCount(1, $argNodes); - - $this->assertEquals('args', $argNodes[0]->getName()); - $this->assertNull($argNodes[0]->getTypeHint()); - $this->assertFalse($argNodes[0]->isOptional()); - $this->assertFalse($argNodes[0]->isPassedByReference()); - $this->assertTrue($argNodes[0]->isVariadic()); - } - - /** - * @test - * @requires PHP 5.6 - */ - public function it_properly_reads_methods_typehinted_variadic_arguments() - { - if (defined('HHVM_VERSION_ID')) { - $this->markTestSkipped('HHVM does not support typehints on variadic arguments.'); - } - - $class = new \ReflectionClass('Fixtures\Prophecy\WithTypehintedVariadicArgument'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - $methodNode = $classNode->getMethod('methodWithTypeHintedArgs'); - $argNodes = $methodNode->getArguments(); - - $this->assertCount(1, $argNodes); - - $this->assertEquals('args', $argNodes[0]->getName()); - $this->assertEquals('array', $argNodes[0]->getTypeHint()); - $this->assertFalse($argNodes[0]->isOptional()); - $this->assertFalse($argNodes[0]->isPassedByReference()); - $this->assertTrue($argNodes[0]->isVariadic()); - } - - /** - * @test - */ - public function it_marks_passed_by_reference_args_as_passed_by_reference() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithReferences'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertTrue($classNode->hasMethod('methodWithReferenceArgument')); - - $argNodes = $classNode->getMethod('methodWithReferenceArgument')->getArguments(); - - $this->assertCount(2, $argNodes); - - $this->assertTrue($argNodes[0]->isPassedByReference()); - $this->assertTrue($argNodes[1]->isPassedByReference()); - } - - /** - * @test - */ - public function it_throws_an_exception_if_class_is_final() - { - $class = new \ReflectionClass('Fixtures\Prophecy\FinalClass'); - - $mirror = new ClassMirror(); - - $this->setExpectedException('Prophecy\Exception\Doubler\ClassMirrorException'); - - $mirror->reflect($class, array()); - } - - /** - * @test - */ - public function it_ignores_final_methods() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithFinalMethod'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertCount(0, $classNode->getMethods()); - } - - /** - * @test - */ - public function it_marks_final_methods_as_unextendable() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithFinalMethod'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertCount(1, $classNode->getUnextendableMethods()); - $this->assertFalse($classNode->isExtendable('finalImplementation')); - } - - /** - * @test - */ - public function it_throws_an_exception_if_interface_provided_instead_of_class() - { - $class = new \ReflectionClass('Fixtures\Prophecy\EmptyInterface'); - - $mirror = new ClassMirror(); - - $this->setExpectedException('Prophecy\Exception\InvalidArgumentException'); - - $mirror->reflect($class, array()); - } - - /** - * @test - */ - public function it_reflects_all_interfaces_methods() - { - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect(null, array( - new \ReflectionClass('Fixtures\Prophecy\Named'), - new \ReflectionClass('Fixtures\Prophecy\ModifierInterface'), - )); - - $this->assertEquals('stdClass', $classNode->getParentClass()); - $this->assertEquals(array( - 'Prophecy\Doubler\Generator\ReflectionInterface', - 'Fixtures\Prophecy\ModifierInterface', - 'Fixtures\Prophecy\Named', - ), $classNode->getInterfaces()); - - $this->assertCount(3, $classNode->getMethods()); - $this->assertTrue($classNode->hasMethod('getName')); - $this->assertTrue($classNode->hasMethod('isAbstract')); - $this->assertTrue($classNode->hasMethod('getVisibility')); - } - - /** - * @test - */ - public function it_ignores_virtually_private_methods() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithVirtuallyPrivateMethod'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertCount(2, $classNode->getMethods()); - $this->assertTrue($classNode->hasMethod('isAbstract')); - $this->assertTrue($classNode->hasMethod('__toString')); - $this->assertFalse($classNode->hasMethod('_getName')); - } - - /** - * @test - */ - public function it_does_not_throw_exception_for_virtually_private_finals() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithFinalVirtuallyPrivateMethod'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertCount(0, $classNode->getMethods()); - } - - /** - * @test - * @requires PHP 7 - */ - public function it_reflects_return_typehints() - { - $class = new \ReflectionClass('Fixtures\Prophecy\WithReturnTypehints'); - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class, array()); - - $this->assertCount(3, $classNode->getMethods()); - $this->assertTrue($classNode->hasMethod('getName')); - $this->assertTrue($classNode->hasMethod('getSelf')); - $this->assertTrue($classNode->hasMethod('getParent')); - - $this->assertEquals('string', $classNode->getMethod('getName')->getReturnType()); - $this->assertEquals('\Fixtures\Prophecy\WithReturnTypehints', $classNode->getMethod('getSelf')->getReturnType()); - $this->assertEquals('\Fixtures\Prophecy\EmptyClass', $classNode->getMethod('getParent')->getReturnType()); - } - - /** - * @test - */ - public function it_throws_an_exception_if_class_provided_in_interfaces_list() - { - $class = new \ReflectionClass('Fixtures\Prophecy\EmptyClass'); - - $mirror = new ClassMirror(); - - $this->setExpectedException('InvalidArgumentException'); - - $mirror->reflect(null, array($class)); - } - - /** - * @test - */ - public function it_throws_an_exception_if_not_reflection_provided_as_interface() - { - $mirror = new ClassMirror(); - - $this->setExpectedException('InvalidArgumentException'); - - $mirror->reflect(null, array(null)); - } - - /** - * @test - */ - public function it_doesnt_use_scalar_typehints() - { - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect(new \ReflectionClass('ReflectionMethod'), array()); - $method = $classNode->getMethod('export'); - $arguments = $method->getArguments(); - - $this->assertNull($arguments[0]->getTypeHint()); - $this->assertNull($arguments[1]->getTypeHint()); - $this->assertNull($arguments[2]->getTypeHint()); - } - - /** - * @test - */ - public function it_doesnt_fail_to_typehint_nonexistent_FQCN() - { - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect(new \ReflectionClass('Fixtures\Prophecy\OptionalDepsClass'), array()); - $method = $classNode->getMethod('iHaveAStrangeTypeHintedArg'); - $arguments = $method->getArguments(); - $this->assertEquals('I\Simply\Am\Nonexistent', $arguments[0]->getTypeHint()); - } - - /** - * @test - */ - public function it_doesnt_fail_to_typehint_nonexistent_RQCN() - { - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect(new \ReflectionClass('Fixtures\Prophecy\OptionalDepsClass'), array()); - $method = $classNode->getMethod('iHaveAnEvenStrangerTypeHintedArg'); - $arguments = $method->getArguments(); - $this->assertEquals('I\Simply\Am\Not', $arguments[0]->getTypeHint()); - } - - /** - * @test - */ - function it_changes_argument_names_if_they_are_varying() - { - // Use test doubles in this test, as arguments named ... in the Reflection API can only happen for internal classes - $class = $this->prophesize('ReflectionClass'); - $method = $this->prophesize('ReflectionMethod'); - $parameter = $this->prophesize('ReflectionParameter'); - - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(\ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - $class->getMethods(\ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - - $method->getParameters()->willReturn(array($parameter)); - $method->getName()->willReturn('methodName'); - $method->isFinal()->willReturn(false); - $method->isProtected()->willReturn(false); - $method->isStatic()->willReturn(false); - $method->returnsReference()->willReturn(false); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $parameter->getName()->willReturn('...'); - $parameter->isDefaultValueAvailable()->willReturn(true); - $parameter->getDefaultValue()->willReturn(null); - $parameter->isPassedByReference()->willReturn(false); - $parameter->getClass()->willReturn($class); - if (version_compare(PHP_VERSION, '5.6', '>=')) { - $parameter->isVariadic()->willReturn(false); - } - - $mirror = new ClassMirror(); - - $classNode = $mirror->reflect($class->reveal(), array()); - - $methodNodes = $classNode->getMethods(); - - $argumentNodes = $methodNodes['methodName']->getArguments(); - $argumentNode = $argumentNodes[0]; - - $this->assertEquals('__dot_dot_dot__', $argumentNode->getName()); - } -} diff --git a/api/vendor/phpunit/php-file-iterator/ChangeLog.md b/api/vendor/phpunit/php-file-iterator/ChangeLog.md index fa77ced..5c842c6 100644 --- a/api/vendor/phpunit/php-file-iterator/ChangeLog.md +++ b/api/vendor/phpunit/php-file-iterator/ChangeLog.md @@ -2,9 +2,40 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [1.4.0] - 2015-04-02 +## [1.4.5] - 2017-11-27 + +### Fixed + +* Fixed [#37](https://github.com/sebastianbergmann/php-file-iterator/issues/37): Regression caused by fix for [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30) + +## [1.4.4] - 2017-11-27 + +### Fixed + +* Fixed [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30): Exclude is not considered if it is a parent of the base path + +## [1.4.3] - 2017-11-25 + +### Fixed + +* Fixed [#34](https://github.com/sebastianbergmann/php-file-iterator/issues/34): Factory should use canonical directory names + +## [1.4.2] - 2016-11-26 + +No changes + +## [1.4.1] - 2015-07-26 + +No changes + +## 1.4.0 - 2015-04-02 ### Added * [Added support for wildcards (glob) in exclude](https://github.com/sebastianbergmann/php-file-iterator/pull/23) +[1.4.5]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.4...1.4.5 +[1.4.4]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.3...1.4.4 +[1.4.3]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.2...1.4.3 +[1.4.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.1...1.4.2 +[1.4.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.0...1.4.1 diff --git a/api/vendor/phpunit/php-file-iterator/src/Factory.php b/api/vendor/phpunit/php-file-iterator/src/Factory.php index 19c93ad..9cc3fb7 100644 --- a/api/vendor/phpunit/php-file-iterator/src/Factory.php +++ b/api/vendor/phpunit/php-file-iterator/src/Factory.php @@ -80,9 +80,9 @@ class File_Iterator_Factory foreach ($paths as $path) { if ($locals = glob($path, GLOB_ONLYDIR)) { - $_paths = array_merge($_paths, $locals); + $_paths = array_merge($_paths, array_map('realpath', $locals)); } else { - $_paths[] = $path; + $_paths[] = realpath($path); } } diff --git a/api/vendor/phpunit/php-file-iterator/src/Iterator.php b/api/vendor/phpunit/php-file-iterator/src/Iterator.php index 1607c06..c8f20a7 100644 --- a/api/vendor/phpunit/php-file-iterator/src/Iterator.php +++ b/api/vendor/phpunit/php-file-iterator/src/Iterator.php @@ -131,7 +131,7 @@ class File_Iterator extends FilterIterator /** * @param string $filename - * @param array $subString + * @param array $subStrings * @param int $type * @return bool * @since Method available since Release 1.1.0 diff --git a/api/vendor/phpunit/php-token-stream/.gitignore b/api/vendor/phpunit/php-token-stream/.gitignore index 103eecf..77aae3d 100644 --- a/api/vendor/phpunit/php-token-stream/.gitignore +++ b/api/vendor/phpunit/php-token-stream/.gitignore @@ -1,4 +1,3 @@ /.idea /composer.lock -/composer.phar /vendor diff --git a/api/vendor/phpunit/php-token-stream/.travis.yml b/api/vendor/phpunit/php-token-stream/.travis.yml index 3f31d02..e8f407d 100644 --- a/api/vendor/phpunit/php-token-stream/.travis.yml +++ b/api/vendor/phpunit/php-token-stream/.travis.yml @@ -1,14 +1,9 @@ language: php php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - 7.0 - - 7.0snapshot - 7.1 - - 7.1snapshot + - 7.2 - master sudo: false @@ -18,10 +13,13 @@ before_install: - composer clear-cache install: - - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable + - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest script: - - ./vendor/bin/phpunit --configuration ./build/phpunit.xml + - ./vendor/bin/phpunit --coverage-clover=coverage.xml + +after_success: + - bash <(curl -s https://codecov.io/bash) notifications: email: false diff --git a/api/vendor/phpunit/php-token-stream/ChangeLog.md b/api/vendor/phpunit/php-token-stream/ChangeLog.md new file mode 100644 index 0000000..efeec72 --- /dev/null +++ b/api/vendor/phpunit/php-token-stream/ChangeLog.md @@ -0,0 +1,19 @@ +# Change Log + +All notable changes to `sebastianbergmann/php-token-stream` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [2.0.2] - 2017-11-27 + +* Fixed [#69](https://github.com/sebastianbergmann/php-token-stream/issues/69): `PHP_Token_USE_FUNCTION` does not serialize correctly + +## [2.0.1] - 2017-08-20 + +### Fixed + +* Fixed [#68](https://github.com/sebastianbergmann/php-token-stream/issues/68): Method with name `empty` wrongly recognized as anonymous function + +## [2.0.0] - 2017-08-03 + +[2.0.2]: https://github.com/sebastianbergmann/php-token-stream/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/sebastianbergmann/php-token-stream/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/sebastianbergmann/php-token-stream/compare/1.4.11...2.0.0 diff --git a/api/vendor/phpunit/php-token-stream/LICENSE b/api/vendor/phpunit/php-token-stream/LICENSE index 6a176fa..cdd1374 100644 --- a/api/vendor/phpunit/php-token-stream/LICENSE +++ b/api/vendor/phpunit/php-token-stream/LICENSE @@ -1,6 +1,6 @@ PHP_TokenStream -Copyright (c) 2009-2015, Sebastian Bergmann . +Copyright (c) 2009-2017, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/api/vendor/phpunit/php-token-stream/README.md b/api/vendor/phpunit/php-token-stream/README.md index 1cee048..149b7e2 100644 --- a/api/vendor/phpunit/php-token-stream/README.md +++ b/api/vendor/phpunit/php-token-stream/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/sebastianbergmann/php-token-stream.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-token-stream) -# PHP_TokenStream +# php-token-stream ## Installation diff --git a/api/vendor/phpunit/php-token-stream/build.xml b/api/vendor/phpunit/php-token-stream/build.xml index f02f4b5..0da8056 100644 --- a/api/vendor/phpunit/php-token-stream/build.xml +++ b/api/vendor/phpunit/php-token-stream/build.xml @@ -1,33 +1,21 @@ - - - - - + + - - - - - - - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/api/vendor/phpunit/php-token-stream/build/phpunit.xml b/api/vendor/phpunit/php-token-stream/build/phpunit.xml deleted file mode 100644 index 139586d..0000000 --- a/api/vendor/phpunit/php-token-stream/build/phpunit.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - ../tests - - - - - - ../src - - - diff --git a/api/vendor/phpunit/php-token-stream/composer.json b/api/vendor/phpunit/php-token-stream/composer.json index dfde729..4bf07e7 100644 --- a/api/vendor/phpunit/php-token-stream/composer.json +++ b/api/vendor/phpunit/php-token-stream/composer.json @@ -15,11 +15,15 @@ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues" }, "require": { - "php": ">=5.3.3", + "php": "^7.0", "ext-tokenizer": "*" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" + }, + "config": { + "optimize-autoloader": true, + "sort-packages": true }, "autoload": { "classmap": [ @@ -28,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } } } diff --git a/api/vendor/phpunit/php-token-stream/phpunit.xml b/api/vendor/phpunit/php-token-stream/phpunit.xml new file mode 100644 index 0000000..1f789ba --- /dev/null +++ b/api/vendor/phpunit/php-token-stream/phpunit.xml @@ -0,0 +1,17 @@ + + + + tests + + + + + src + + + diff --git a/api/vendor/phpunit/php-token-stream/src/Token.php b/api/vendor/phpunit/php-token-stream/src/Token.php index 2452e1c..f4db9a7 100644 --- a/api/vendor/phpunit/php-token-stream/src/Token.php +++ b/api/vendor/phpunit/php-token-stream/src/Token.php @@ -1,6 +1,6 @@ * @@ -10,12 +10,6 @@ /** * A PHP token. - * - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-token-stream/tree - * @since Class available since Release 1.0.0 */ abstract class PHP_Token { @@ -25,7 +19,7 @@ abstract class PHP_Token protected $text; /** - * @var integer + * @var int */ protected $line; @@ -35,17 +29,15 @@ abstract class PHP_Token protected $tokenStream; /** - * @var integer + * @var int */ protected $id; /** - * Constructor. - * * @param string $text - * @param integer $line + * @param int $line * @param PHP_Token_Stream $tokenStream - * @param integer $id + * @param int $id */ public function __construct($text, $line, PHP_Token_Stream $tokenStream, $id) { @@ -64,18 +56,26 @@ abstract class PHP_Token } /** - * @return integer + * @return int */ public function getLine() { return $this->line; } + + /** + * @return int + */ + public function getId() + { + return $this->id; + } } abstract class PHP_TokenWithScope extends PHP_Token { /** - * @var integer + * @var int */ protected $endTokenId; @@ -120,12 +120,12 @@ abstract class PHP_TokenWithScope extends PHP_Token break; } - return (string)$tokens[$i]; + return (string) $tokens[$i]; } } /** - * @return integer + * @return int */ public function getEndTokenId() { @@ -162,7 +162,7 @@ abstract class PHP_TokenWithScope extends PHP_Token } /** - * @return integer + * @return int */ public function getEndLine() { @@ -203,7 +203,7 @@ abstract class PHP_TokenWithScopeAndVisibility extends PHP_TokenWithScope */ public function getKeywords() { - $keywords = array(); + $keywords = []; $tokens = $this->tokenStream->tokens(); for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) { @@ -268,8 +268,8 @@ abstract class PHP_Token_Includes extends PHP_Token { $tokens = $this->tokenStream->tokens(); - if ($tokens[$this->id+2] instanceof PHP_Token_CONSTANT_ENCAPSED_STRING) { - $this->name = trim($tokens[$this->id+2], "'\""); + if ($tokens[$this->id + 2] instanceof PHP_Token_CONSTANT_ENCAPSED_STRING) { + $this->name = trim($tokens[$this->id + 2], "'\""); $this->type = strtolower( str_replace('PHP_Token_', '', get_class($tokens[$this->id])) ); @@ -277,7 +277,6 @@ abstract class PHP_Token_Includes extends PHP_Token } } - class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility { /** @@ -286,7 +285,7 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility protected $arguments; /** - * @var integer + * @var int */ protected $ccn; @@ -300,6 +299,11 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility */ protected $signature; + /** + * @var bool + */ + private $anonymous = false; + /** * @return array */ @@ -309,23 +313,23 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility return $this->arguments; } - $this->arguments = array(); + $this->arguments = []; $tokens = $this->tokenStream->tokens(); $typeDeclaration = null; // Search for first token inside brackets $i = $this->id + 2; - while (!$tokens[$i-1] instanceof PHP_Token_OPEN_BRACKET) { + while (!$tokens[$i - 1] instanceof PHP_Token_OPEN_BRACKET) { $i++; } while (!$tokens[$i] instanceof PHP_Token_CLOSE_BRACKET) { if ($tokens[$i] instanceof PHP_Token_STRING) { - $typeDeclaration = (string)$tokens[$i]; + $typeDeclaration = (string) $tokens[$i]; } elseif ($tokens[$i] instanceof PHP_Token_VARIABLE) { - $this->arguments[(string)$tokens[$i]] = $typeDeclaration; - $typeDeclaration = null; + $this->arguments[(string) $tokens[$i]] = $typeDeclaration; + $typeDeclaration = null; } $i++; @@ -345,24 +349,35 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility $tokens = $this->tokenStream->tokens(); - for ($i = $this->id + 1; $i < count($tokens); $i++) { - if ($tokens[$i] instanceof PHP_Token_STRING) { - $this->name = (string)$tokens[$i]; - break; - } elseif ($tokens[$i] instanceof PHP_Token_AMPERSAND && - $tokens[$i+1] instanceof PHP_Token_STRING) { - $this->name = (string)$tokens[$i+1]; - break; - } elseif ($tokens[$i] instanceof PHP_Token_OPEN_BRACKET) { - $this->name = 'anonymous function'; - break; - } + $i = $this->id + 1; + + if ($tokens[$i] instanceof PHP_Token_WHITESPACE) { + $i++; } - if ($this->name != 'anonymous function') { + if ($tokens[$i] instanceof PHP_Token_AMPERSAND) { + $i++; + } + + if ($tokens[$i + 1] instanceof PHP_Token_OPEN_BRACKET) { + $this->name = (string) $tokens[$i]; + } elseif ($tokens[$i + 1] instanceof PHP_Token_WHITESPACE && $tokens[$i + 2] instanceof PHP_Token_OPEN_BRACKET) { + $this->name = (string) $tokens[$i]; + } else { + $this->anonymous = true; + + $this->name = sprintf( + 'anonymousFunction:%s#%s', + $this->getLine(), + $this->getId() + ); + } + + if (!$this->isAnonymous()) { for ($i = $this->id; $i; --$i) { if ($tokens[$i] instanceof PHP_Token_NAMESPACE) { $this->name = $tokens[$i]->getName() . '\\' . $this->name; + break; } @@ -376,7 +391,7 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility } /** - * @return integer + * @return int */ public function getCCN() { @@ -419,8 +434,8 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility return $this->signature; } - if ($this->getName() == 'anonymous function') { - $this->signature = 'anonymous function'; + if ($this->isAnonymous()) { + $this->signature = 'anonymousFunction'; $i = $this->id + 1; } else { $this->signature = ''; @@ -439,6 +454,14 @@ class PHP_Token_FUNCTION extends PHP_TokenWithScopeAndVisibility return $this->signature; } + + /** + * @return bool + */ + public function isAnonymous() + { + return $this->anonymous; + } } class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility @@ -453,11 +476,11 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility */ public function getName() { - return (string)$this->tokenStream[$this->id + 2]; + return (string) $this->tokenStream[$this->id + 2]; } /** - * @return boolean + * @return bool */ public function hasParent() { @@ -472,13 +495,13 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility $className = $this->getName(); $docComment = $this->getDocblock(); - $result = array( + $result = [ 'namespace' => '', 'fullPackage' => '', 'category' => '', 'package' => '', 'subpackage' => '' - ); + ]; for ($i = $this->id; $i; --$i) { if ($this->tokenStream[$i] instanceof PHP_Token_NAMESPACE) { @@ -512,8 +535,9 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility } /** - * @param array $parts - * @param string $join + * @param array $parts + * @param string $join + * * @return string */ protected function arrayToName(array $parts, $join = '\\') @@ -523,14 +547,14 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility if (count($parts) > 1) { array_pop($parts); - $result = join($join, $parts); + $result = implode($join, $parts); } return $result; } /** - * @return boolean|string + * @return bool|string */ public function getParent() { @@ -540,18 +564,18 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility $i = $this->id + 6; $tokens = $this->tokenStream->tokens(); - $className = (string)$tokens[$i]; + $className = (string) $tokens[$i]; - while (isset($tokens[$i+1]) && - !$tokens[$i+1] instanceof PHP_Token_WHITESPACE) { - $className .= (string)$tokens[++$i]; + while (isset($tokens[$i + 1]) && + !$tokens[$i + 1] instanceof PHP_Token_WHITESPACE) { + $className .= (string) $tokens[++$i]; } return $className; } /** - * @return boolean + * @return bool */ public function hasInterfaces() { @@ -562,7 +586,7 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility } /** - * @return array|boolean + * @return array|bool */ public function getInterfaces() { @@ -582,11 +606,11 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility $tokens = $this->tokenStream->tokens(); - while (!$tokens[$i+1] instanceof PHP_Token_OPEN_CURLY) { + while (!$tokens[$i + 1] instanceof PHP_Token_OPEN_CURLY) { $i++; if ($tokens[$i] instanceof PHP_Token_STRING) { - $this->interfaces[] = (string)$tokens[$i]; + $this->interfaces[] = (string) $tokens[$i]; } } @@ -594,31 +618,95 @@ class PHP_Token_INTERFACE extends PHP_TokenWithScopeAndVisibility } } -class PHP_Token_ABSTRACT extends PHP_Token {} -class PHP_Token_AMPERSAND extends PHP_Token {} -class PHP_Token_AND_EQUAL extends PHP_Token {} -class PHP_Token_ARRAY extends PHP_Token {} -class PHP_Token_ARRAY_CAST extends PHP_Token {} -class PHP_Token_AS extends PHP_Token {} -class PHP_Token_AT extends PHP_Token {} -class PHP_Token_BACKTICK extends PHP_Token {} -class PHP_Token_BAD_CHARACTER extends PHP_Token {} -class PHP_Token_BOOLEAN_AND extends PHP_Token {} -class PHP_Token_BOOLEAN_OR extends PHP_Token {} -class PHP_Token_BOOL_CAST extends PHP_Token {} -class PHP_Token_BREAK extends PHP_Token {} -class PHP_Token_CARET extends PHP_Token {} -class PHP_Token_CASE extends PHP_Token {} -class PHP_Token_CATCH extends PHP_Token {} -class PHP_Token_CHARACTER extends PHP_Token {} +class PHP_Token_ABSTRACT extends PHP_Token +{ +} + +class PHP_Token_AMPERSAND extends PHP_Token +{ +} + +class PHP_Token_AND_EQUAL extends PHP_Token +{ +} + +class PHP_Token_ARRAY extends PHP_Token +{ +} + +class PHP_Token_ARRAY_CAST extends PHP_Token +{ +} + +class PHP_Token_AS extends PHP_Token +{ +} + +class PHP_Token_AT extends PHP_Token +{ +} + +class PHP_Token_BACKTICK extends PHP_Token +{ +} + +class PHP_Token_BAD_CHARACTER extends PHP_Token +{ +} + +class PHP_Token_BOOLEAN_AND extends PHP_Token +{ +} + +class PHP_Token_BOOLEAN_OR extends PHP_Token +{ +} + +class PHP_Token_BOOL_CAST extends PHP_Token +{ +} + +class PHP_Token_BREAK extends PHP_Token +{ +} + +class PHP_Token_CARET extends PHP_Token +{ +} + +class PHP_Token_CASE extends PHP_Token +{ +} + +class PHP_Token_CATCH extends PHP_Token +{ +} + +class PHP_Token_CHARACTER extends PHP_Token +{ +} class PHP_Token_CLASS extends PHP_Token_INTERFACE { + /** + * @var bool + */ + private $anonymous = false; + + /** + * @var string + */ + private $name; + /** * @return string */ public function getName() { + if ($this->name !== null) { + return $this->name; + } + $next = $this->tokenStream[$this->id + 1]; if ($next instanceof PHP_Token_WHITESPACE) { @@ -626,152 +714,558 @@ class PHP_Token_CLASS extends PHP_Token_INTERFACE } if ($next instanceof PHP_Token_STRING) { - return (string) $next; + $this->name =(string) $next; + + return $this->name; } if ($next instanceof PHP_Token_OPEN_CURLY || $next instanceof PHP_Token_EXTENDS || $next instanceof PHP_Token_IMPLEMENTS) { - return 'anonymous class'; + + $this->name = sprintf( + 'AnonymousClass:%s#%s', + $this->getLine(), + $this->getId() + ); + + $this->anonymous = true; + + return $this->name; } } + + public function isAnonymous() + { + return $this->anonymous; + } } -class PHP_Token_CLASS_C extends PHP_Token {} -class PHP_Token_CLASS_NAME_CONSTANT extends PHP_Token {} -class PHP_Token_CLONE extends PHP_Token {} -class PHP_Token_CLOSE_BRACKET extends PHP_Token {} -class PHP_Token_CLOSE_CURLY extends PHP_Token {} -class PHP_Token_CLOSE_SQUARE extends PHP_Token {} -class PHP_Token_CLOSE_TAG extends PHP_Token {} -class PHP_Token_COLON extends PHP_Token {} -class PHP_Token_COMMA extends PHP_Token {} -class PHP_Token_COMMENT extends PHP_Token {} -class PHP_Token_CONCAT_EQUAL extends PHP_Token {} -class PHP_Token_CONST extends PHP_Token {} -class PHP_Token_CONSTANT_ENCAPSED_STRING extends PHP_Token {} -class PHP_Token_CONTINUE extends PHP_Token {} -class PHP_Token_CURLY_OPEN extends PHP_Token {} -class PHP_Token_DEC extends PHP_Token {} -class PHP_Token_DECLARE extends PHP_Token {} -class PHP_Token_DEFAULT extends PHP_Token {} -class PHP_Token_DIV extends PHP_Token {} -class PHP_Token_DIV_EQUAL extends PHP_Token {} -class PHP_Token_DNUMBER extends PHP_Token {} -class PHP_Token_DO extends PHP_Token {} -class PHP_Token_DOC_COMMENT extends PHP_Token {} -class PHP_Token_DOLLAR extends PHP_Token {} -class PHP_Token_DOLLAR_OPEN_CURLY_BRACES extends PHP_Token {} -class PHP_Token_DOT extends PHP_Token {} -class PHP_Token_DOUBLE_ARROW extends PHP_Token {} -class PHP_Token_DOUBLE_CAST extends PHP_Token {} -class PHP_Token_DOUBLE_COLON extends PHP_Token {} -class PHP_Token_DOUBLE_QUOTES extends PHP_Token {} -class PHP_Token_ECHO extends PHP_Token {} -class PHP_Token_ELSE extends PHP_Token {} -class PHP_Token_ELSEIF extends PHP_Token {} -class PHP_Token_EMPTY extends PHP_Token {} -class PHP_Token_ENCAPSED_AND_WHITESPACE extends PHP_Token {} -class PHP_Token_ENDDECLARE extends PHP_Token {} -class PHP_Token_ENDFOR extends PHP_Token {} -class PHP_Token_ENDFOREACH extends PHP_Token {} -class PHP_Token_ENDIF extends PHP_Token {} -class PHP_Token_ENDSWITCH extends PHP_Token {} -class PHP_Token_ENDWHILE extends PHP_Token {} -class PHP_Token_END_HEREDOC extends PHP_Token {} -class PHP_Token_EQUAL extends PHP_Token {} -class PHP_Token_EVAL extends PHP_Token {} -class PHP_Token_EXCLAMATION_MARK extends PHP_Token {} -class PHP_Token_EXIT extends PHP_Token {} -class PHP_Token_EXTENDS extends PHP_Token {} -class PHP_Token_FILE extends PHP_Token {} -class PHP_Token_FINAL extends PHP_Token {} -class PHP_Token_FOR extends PHP_Token {} -class PHP_Token_FOREACH extends PHP_Token {} -class PHP_Token_FUNC_C extends PHP_Token {} -class PHP_Token_GLOBAL extends PHP_Token {} -class PHP_Token_GT extends PHP_Token {} -class PHP_Token_IF extends PHP_Token {} -class PHP_Token_IMPLEMENTS extends PHP_Token {} -class PHP_Token_INC extends PHP_Token {} -class PHP_Token_INCLUDE extends PHP_Token_Includes {} -class PHP_Token_INCLUDE_ONCE extends PHP_Token_Includes {} -class PHP_Token_INLINE_HTML extends PHP_Token {} -class PHP_Token_INSTANCEOF extends PHP_Token {} -class PHP_Token_INT_CAST extends PHP_Token {} -class PHP_Token_ISSET extends PHP_Token {} -class PHP_Token_IS_EQUAL extends PHP_Token {} -class PHP_Token_IS_GREATER_OR_EQUAL extends PHP_Token {} -class PHP_Token_IS_IDENTICAL extends PHP_Token {} -class PHP_Token_IS_NOT_EQUAL extends PHP_Token {} -class PHP_Token_IS_NOT_IDENTICAL extends PHP_Token {} -class PHP_Token_IS_SMALLER_OR_EQUAL extends PHP_Token {} -class PHP_Token_LINE extends PHP_Token {} -class PHP_Token_LIST extends PHP_Token {} -class PHP_Token_LNUMBER extends PHP_Token {} -class PHP_Token_LOGICAL_AND extends PHP_Token {} -class PHP_Token_LOGICAL_OR extends PHP_Token {} -class PHP_Token_LOGICAL_XOR extends PHP_Token {} -class PHP_Token_LT extends PHP_Token {} -class PHP_Token_METHOD_C extends PHP_Token {} -class PHP_Token_MINUS extends PHP_Token {} -class PHP_Token_MINUS_EQUAL extends PHP_Token {} -class PHP_Token_MOD_EQUAL extends PHP_Token {} -class PHP_Token_MULT extends PHP_Token {} -class PHP_Token_MUL_EQUAL extends PHP_Token {} -class PHP_Token_NEW extends PHP_Token {} -class PHP_Token_NUM_STRING extends PHP_Token {} -class PHP_Token_OBJECT_CAST extends PHP_Token {} -class PHP_Token_OBJECT_OPERATOR extends PHP_Token {} -class PHP_Token_OPEN_BRACKET extends PHP_Token {} -class PHP_Token_OPEN_CURLY extends PHP_Token {} -class PHP_Token_OPEN_SQUARE extends PHP_Token {} -class PHP_Token_OPEN_TAG extends PHP_Token {} -class PHP_Token_OPEN_TAG_WITH_ECHO extends PHP_Token {} -class PHP_Token_OR_EQUAL extends PHP_Token {} -class PHP_Token_PAAMAYIM_NEKUDOTAYIM extends PHP_Token {} -class PHP_Token_PERCENT extends PHP_Token {} -class PHP_Token_PIPE extends PHP_Token {} -class PHP_Token_PLUS extends PHP_Token {} -class PHP_Token_PLUS_EQUAL extends PHP_Token {} -class PHP_Token_PRINT extends PHP_Token {} -class PHP_Token_PRIVATE extends PHP_Token {} -class PHP_Token_PROTECTED extends PHP_Token {} -class PHP_Token_PUBLIC extends PHP_Token {} -class PHP_Token_QUESTION_MARK extends PHP_Token {} -class PHP_Token_REQUIRE extends PHP_Token_Includes {} -class PHP_Token_REQUIRE_ONCE extends PHP_Token_Includes {} -class PHP_Token_RETURN extends PHP_Token {} -class PHP_Token_SEMICOLON extends PHP_Token {} -class PHP_Token_SL extends PHP_Token {} -class PHP_Token_SL_EQUAL extends PHP_Token {} -class PHP_Token_SR extends PHP_Token {} -class PHP_Token_SR_EQUAL extends PHP_Token {} -class PHP_Token_START_HEREDOC extends PHP_Token {} -class PHP_Token_STATIC extends PHP_Token {} -class PHP_Token_STRING extends PHP_Token {} -class PHP_Token_STRING_CAST extends PHP_Token {} -class PHP_Token_STRING_VARNAME extends PHP_Token {} -class PHP_Token_SWITCH extends PHP_Token {} -class PHP_Token_THROW extends PHP_Token {} -class PHP_Token_TILDE extends PHP_Token {} -class PHP_Token_TRY extends PHP_Token {} -class PHP_Token_UNSET extends PHP_Token {} -class PHP_Token_UNSET_CAST extends PHP_Token {} -class PHP_Token_USE extends PHP_Token {} -class PHP_Token_USE_FUNCTION extends PHP_Token {} -class PHP_Token_VAR extends PHP_Token {} -class PHP_Token_VARIABLE extends PHP_Token {} -class PHP_Token_WHILE extends PHP_Token {} -class PHP_Token_WHITESPACE extends PHP_Token {} -class PHP_Token_XOR_EQUAL extends PHP_Token {} +class PHP_Token_CLASS_C extends PHP_Token +{ +} + +class PHP_Token_CLASS_NAME_CONSTANT extends PHP_Token +{ +} + +class PHP_Token_CLONE extends PHP_Token +{ +} + +class PHP_Token_CLOSE_BRACKET extends PHP_Token +{ +} + +class PHP_Token_CLOSE_CURLY extends PHP_Token +{ +} + +class PHP_Token_CLOSE_SQUARE extends PHP_Token +{ +} + +class PHP_Token_CLOSE_TAG extends PHP_Token +{ +} + +class PHP_Token_COLON extends PHP_Token +{ +} + +class PHP_Token_COMMA extends PHP_Token +{ +} + +class PHP_Token_COMMENT extends PHP_Token +{ +} + +class PHP_Token_CONCAT_EQUAL extends PHP_Token +{ +} + +class PHP_Token_CONST extends PHP_Token +{ +} + +class PHP_Token_CONSTANT_ENCAPSED_STRING extends PHP_Token +{ +} + +class PHP_Token_CONTINUE extends PHP_Token +{ +} + +class PHP_Token_CURLY_OPEN extends PHP_Token +{ +} + +class PHP_Token_DEC extends PHP_Token +{ +} + +class PHP_Token_DECLARE extends PHP_Token +{ +} + +class PHP_Token_DEFAULT extends PHP_Token +{ +} + +class PHP_Token_DIV extends PHP_Token +{ +} + +class PHP_Token_DIV_EQUAL extends PHP_Token +{ +} + +class PHP_Token_DNUMBER extends PHP_Token +{ +} + +class PHP_Token_DO extends PHP_Token +{ +} + +class PHP_Token_DOC_COMMENT extends PHP_Token +{ +} + +class PHP_Token_DOLLAR extends PHP_Token +{ +} + +class PHP_Token_DOLLAR_OPEN_CURLY_BRACES extends PHP_Token +{ +} + +class PHP_Token_DOT extends PHP_Token +{ +} + +class PHP_Token_DOUBLE_ARROW extends PHP_Token +{ +} + +class PHP_Token_DOUBLE_CAST extends PHP_Token +{ +} + +class PHP_Token_DOUBLE_COLON extends PHP_Token +{ +} + +class PHP_Token_DOUBLE_QUOTES extends PHP_Token +{ +} + +class PHP_Token_ECHO extends PHP_Token +{ +} + +class PHP_Token_ELSE extends PHP_Token +{ +} + +class PHP_Token_ELSEIF extends PHP_Token +{ +} + +class PHP_Token_EMPTY extends PHP_Token +{ +} + +class PHP_Token_ENCAPSED_AND_WHITESPACE extends PHP_Token +{ +} + +class PHP_Token_ENDDECLARE extends PHP_Token +{ +} + +class PHP_Token_ENDFOR extends PHP_Token +{ +} + +class PHP_Token_ENDFOREACH extends PHP_Token +{ +} + +class PHP_Token_ENDIF extends PHP_Token +{ +} + +class PHP_Token_ENDSWITCH extends PHP_Token +{ +} + +class PHP_Token_ENDWHILE extends PHP_Token +{ +} + +class PHP_Token_END_HEREDOC extends PHP_Token +{ +} + +class PHP_Token_EQUAL extends PHP_Token +{ +} + +class PHP_Token_EVAL extends PHP_Token +{ +} + +class PHP_Token_EXCLAMATION_MARK extends PHP_Token +{ +} + +class PHP_Token_EXIT extends PHP_Token +{ +} + +class PHP_Token_EXTENDS extends PHP_Token +{ +} + +class PHP_Token_FILE extends PHP_Token +{ +} + +class PHP_Token_FINAL extends PHP_Token +{ +} + +class PHP_Token_FOR extends PHP_Token +{ +} + +class PHP_Token_FOREACH extends PHP_Token +{ +} + +class PHP_Token_FUNC_C extends PHP_Token +{ +} + +class PHP_Token_GLOBAL extends PHP_Token +{ +} + +class PHP_Token_GT extends PHP_Token +{ +} + +class PHP_Token_IF extends PHP_Token +{ +} + +class PHP_Token_IMPLEMENTS extends PHP_Token +{ +} + +class PHP_Token_INC extends PHP_Token +{ +} + +class PHP_Token_INCLUDE extends PHP_Token_Includes +{ +} + +class PHP_Token_INCLUDE_ONCE extends PHP_Token_Includes +{ +} + +class PHP_Token_INLINE_HTML extends PHP_Token +{ +} + +class PHP_Token_INSTANCEOF extends PHP_Token +{ +} + +class PHP_Token_INT_CAST extends PHP_Token +{ +} + +class PHP_Token_ISSET extends PHP_Token +{ +} + +class PHP_Token_IS_EQUAL extends PHP_Token +{ +} + +class PHP_Token_IS_GREATER_OR_EQUAL extends PHP_Token +{ +} + +class PHP_Token_IS_IDENTICAL extends PHP_Token +{ +} + +class PHP_Token_IS_NOT_EQUAL extends PHP_Token +{ +} + +class PHP_Token_IS_NOT_IDENTICAL extends PHP_Token +{ +} + +class PHP_Token_IS_SMALLER_OR_EQUAL extends PHP_Token +{ +} + +class PHP_Token_LINE extends PHP_Token +{ +} + +class PHP_Token_LIST extends PHP_Token +{ +} + +class PHP_Token_LNUMBER extends PHP_Token +{ +} + +class PHP_Token_LOGICAL_AND extends PHP_Token +{ +} + +class PHP_Token_LOGICAL_OR extends PHP_Token +{ +} + +class PHP_Token_LOGICAL_XOR extends PHP_Token +{ +} + +class PHP_Token_LT extends PHP_Token +{ +} + +class PHP_Token_METHOD_C extends PHP_Token +{ +} + +class PHP_Token_MINUS extends PHP_Token +{ +} + +class PHP_Token_MINUS_EQUAL extends PHP_Token +{ +} + +class PHP_Token_MOD_EQUAL extends PHP_Token +{ +} + +class PHP_Token_MULT extends PHP_Token +{ +} + +class PHP_Token_MUL_EQUAL extends PHP_Token +{ +} + +class PHP_Token_NEW extends PHP_Token +{ +} + +class PHP_Token_NUM_STRING extends PHP_Token +{ +} + +class PHP_Token_OBJECT_CAST extends PHP_Token +{ +} + +class PHP_Token_OBJECT_OPERATOR extends PHP_Token +{ +} + +class PHP_Token_OPEN_BRACKET extends PHP_Token +{ +} + +class PHP_Token_OPEN_CURLY extends PHP_Token +{ +} + +class PHP_Token_OPEN_SQUARE extends PHP_Token +{ +} + +class PHP_Token_OPEN_TAG extends PHP_Token +{ +} + +class PHP_Token_OPEN_TAG_WITH_ECHO extends PHP_Token +{ +} + +class PHP_Token_OR_EQUAL extends PHP_Token +{ +} + +class PHP_Token_PAAMAYIM_NEKUDOTAYIM extends PHP_Token +{ +} + +class PHP_Token_PERCENT extends PHP_Token +{ +} + +class PHP_Token_PIPE extends PHP_Token +{ +} + +class PHP_Token_PLUS extends PHP_Token +{ +} + +class PHP_Token_PLUS_EQUAL extends PHP_Token +{ +} + +class PHP_Token_PRINT extends PHP_Token +{ +} + +class PHP_Token_PRIVATE extends PHP_Token +{ +} + +class PHP_Token_PROTECTED extends PHP_Token +{ +} + +class PHP_Token_PUBLIC extends PHP_Token +{ +} + +class PHP_Token_QUESTION_MARK extends PHP_Token +{ +} + +class PHP_Token_REQUIRE extends PHP_Token_Includes +{ +} + +class PHP_Token_REQUIRE_ONCE extends PHP_Token_Includes +{ +} + +class PHP_Token_RETURN extends PHP_Token +{ +} + +class PHP_Token_SEMICOLON extends PHP_Token +{ +} + +class PHP_Token_SL extends PHP_Token +{ +} + +class PHP_Token_SL_EQUAL extends PHP_Token +{ +} + +class PHP_Token_SR extends PHP_Token +{ +} + +class PHP_Token_SR_EQUAL extends PHP_Token +{ +} + +class PHP_Token_START_HEREDOC extends PHP_Token +{ +} + +class PHP_Token_STATIC extends PHP_Token +{ +} + +class PHP_Token_STRING extends PHP_Token +{ +} + +class PHP_Token_STRING_CAST extends PHP_Token +{ +} + +class PHP_Token_STRING_VARNAME extends PHP_Token +{ +} + +class PHP_Token_SWITCH extends PHP_Token +{ +} + +class PHP_Token_THROW extends PHP_Token +{ +} + +class PHP_Token_TILDE extends PHP_Token +{ +} + +class PHP_Token_TRY extends PHP_Token +{ +} + +class PHP_Token_UNSET extends PHP_Token +{ +} + +class PHP_Token_UNSET_CAST extends PHP_Token +{ +} + +class PHP_Token_USE extends PHP_Token +{ +} + +class PHP_Token_USE_FUNCTION extends PHP_Token +{ +} + +class PHP_Token_VAR extends PHP_Token +{ +} + +class PHP_Token_VARIABLE extends PHP_Token +{ +} + +class PHP_Token_WHILE extends PHP_Token +{ +} + +class PHP_Token_WHITESPACE extends PHP_Token +{ +} + +class PHP_Token_XOR_EQUAL extends PHP_Token +{ +} // Tokens introduced in PHP 5.1 -class PHP_Token_HALT_COMPILER extends PHP_Token {} +class PHP_Token_HALT_COMPILER extends PHP_Token +{ +} // Tokens introduced in PHP 5.3 -class PHP_Token_DIR extends PHP_Token {} -class PHP_Token_GOTO extends PHP_Token {} +class PHP_Token_DIR extends PHP_Token +{ +} + +class PHP_Token_GOTO extends PHP_Token +{ +} class PHP_Token_NAMESPACE extends PHP_TokenWithScope { @@ -781,12 +1275,12 @@ class PHP_Token_NAMESPACE extends PHP_TokenWithScope public function getName() { $tokens = $this->tokenStream->tokens(); - $namespace = (string)$tokens[$this->id+2]; + $namespace = (string) $tokens[$this->id + 2]; for ($i = $this->id + 3;; $i += 2) { if (isset($tokens[$i]) && $tokens[$i] instanceof PHP_Token_NS_SEPARATOR) { - $namespace .= '\\' . $tokens[$i+1]; + $namespace .= '\\' . $tokens[$i + 1]; } else { break; } @@ -796,54 +1290,171 @@ class PHP_Token_NAMESPACE extends PHP_TokenWithScope } } -class PHP_Token_NS_C extends PHP_Token {} -class PHP_Token_NS_SEPARATOR extends PHP_Token {} +class PHP_Token_NS_C extends PHP_Token +{ +} + +class PHP_Token_NS_SEPARATOR extends PHP_Token +{ +} // Tokens introduced in PHP 5.4 -class PHP_Token_CALLABLE extends PHP_Token {} -class PHP_Token_INSTEADOF extends PHP_Token {} -class PHP_Token_TRAIT extends PHP_Token_INTERFACE {} -class PHP_Token_TRAIT_C extends PHP_Token {} +class PHP_Token_CALLABLE extends PHP_Token +{ +} + +class PHP_Token_INSTEADOF extends PHP_Token +{ +} + +class PHP_Token_TRAIT extends PHP_Token_INTERFACE +{ +} + +class PHP_Token_TRAIT_C extends PHP_Token +{ +} // Tokens introduced in PHP 5.5 -class PHP_Token_FINALLY extends PHP_Token {} -class PHP_Token_YIELD extends PHP_Token {} +class PHP_Token_FINALLY extends PHP_Token +{ +} + +class PHP_Token_YIELD extends PHP_Token +{ +} // Tokens introduced in PHP 5.6 -class PHP_Token_ELLIPSIS extends PHP_Token {} -class PHP_Token_POW extends PHP_Token {} -class PHP_Token_POW_EQUAL extends PHP_Token {} +class PHP_Token_ELLIPSIS extends PHP_Token +{ +} + +class PHP_Token_POW extends PHP_Token +{ +} + +class PHP_Token_POW_EQUAL extends PHP_Token +{ +} // Tokens introduced in PHP 7.0 -class PHP_Token_COALESCE extends PHP_Token {} -class PHP_Token_SPACESHIP extends PHP_Token {} -class PHP_Token_YIELD_FROM extends PHP_Token {} +class PHP_Token_COALESCE extends PHP_Token +{ +} + +class PHP_Token_SPACESHIP extends PHP_Token +{ +} + +class PHP_Token_YIELD_FROM extends PHP_Token +{ +} // Tokens introduced in HackLang / HHVM -class PHP_Token_ASYNC extends PHP_Token {} -class PHP_Token_AWAIT extends PHP_Token {} -class PHP_Token_COMPILER_HALT_OFFSET extends PHP_Token {} -class PHP_Token_ENUM extends PHP_Token {} -class PHP_Token_EQUALS extends PHP_Token {} -class PHP_Token_IN extends PHP_Token {} -class PHP_Token_JOIN extends PHP_Token {} -class PHP_Token_LAMBDA_ARROW extends PHP_Token {} -class PHP_Token_LAMBDA_CP extends PHP_Token {} -class PHP_Token_LAMBDA_OP extends PHP_Token {} -class PHP_Token_ONUMBER extends PHP_Token {} -class PHP_Token_NULLSAFE_OBJECT_OPERATOR extends PHP_Token {} -class PHP_Token_SHAPE extends PHP_Token {} -class PHP_Token_SUPER extends PHP_Token {} -class PHP_Token_TYPE extends PHP_Token {} -class PHP_Token_TYPELIST_GT extends PHP_Token {} -class PHP_Token_TYPELIST_LT extends PHP_Token {} -class PHP_Token_WHERE extends PHP_Token {} -class PHP_Token_XHP_ATTRIBUTE extends PHP_Token {} -class PHP_Token_XHP_CATEGORY extends PHP_Token {} -class PHP_Token_XHP_CATEGORY_LABEL extends PHP_Token {} -class PHP_Token_XHP_CHILDREN extends PHP_Token {} -class PHP_Token_XHP_LABEL extends PHP_Token {} -class PHP_Token_XHP_REQUIRED extends PHP_Token {} -class PHP_Token_XHP_TAG_GT extends PHP_Token {} -class PHP_Token_XHP_TAG_LT extends PHP_Token {} -class PHP_Token_XHP_TEXT extends PHP_Token {} +class PHP_Token_ASYNC extends PHP_Token +{ +} + +class PHP_Token_AWAIT extends PHP_Token +{ +} + +class PHP_Token_COMPILER_HALT_OFFSET extends PHP_Token +{ +} + +class PHP_Token_ENUM extends PHP_Token +{ +} + +class PHP_Token_EQUALS extends PHP_Token +{ +} + +class PHP_Token_IN extends PHP_Token +{ +} + +class PHP_Token_JOIN extends PHP_Token +{ +} + +class PHP_Token_LAMBDA_ARROW extends PHP_Token +{ +} + +class PHP_Token_LAMBDA_CP extends PHP_Token +{ +} + +class PHP_Token_LAMBDA_OP extends PHP_Token +{ +} + +class PHP_Token_ONUMBER extends PHP_Token +{ +} + +class PHP_Token_NULLSAFE_OBJECT_OPERATOR extends PHP_Token +{ +} + +class PHP_Token_SHAPE extends PHP_Token +{ +} + +class PHP_Token_SUPER extends PHP_Token +{ +} + +class PHP_Token_TYPE extends PHP_Token +{ +} + +class PHP_Token_TYPELIST_GT extends PHP_Token +{ +} + +class PHP_Token_TYPELIST_LT extends PHP_Token +{ +} + +class PHP_Token_WHERE extends PHP_Token +{ +} + +class PHP_Token_XHP_ATTRIBUTE extends PHP_Token +{ +} + +class PHP_Token_XHP_CATEGORY extends PHP_Token +{ +} + +class PHP_Token_XHP_CATEGORY_LABEL extends PHP_Token +{ +} + +class PHP_Token_XHP_CHILDREN extends PHP_Token +{ +} + +class PHP_Token_XHP_LABEL extends PHP_Token +{ +} + +class PHP_Token_XHP_REQUIRED extends PHP_Token +{ +} + +class PHP_Token_XHP_TAG_GT extends PHP_Token +{ +} + +class PHP_Token_XHP_TAG_LT extends PHP_Token +{ +} + +class PHP_Token_XHP_TEXT extends PHP_Token +{ +} diff --git a/api/vendor/phpunit/php-token-stream/src/Token/Stream.php b/api/vendor/phpunit/php-token-stream/src/Token/Stream.php index aff7e3d..fc3e3c3 100644 --- a/api/vendor/phpunit/php-token-stream/src/Token/Stream.php +++ b/api/vendor/phpunit/php-token-stream/src/Token/Stream.php @@ -1,6 +1,6 @@ * @@ -10,19 +10,13 @@ /** * A stream of PHP tokens. - * - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-token-stream/tree - * @since Class available since Release 1.0.0 */ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator { /** * @var array */ - protected static $customTokens = array( + protected static $customTokens = [ '(' => 'PHP_Token_OPEN_BRACKET', ')' => 'PHP_Token_CLOSE_BRACKET', '[' => 'PHP_Token_OPEN_SQUARE', @@ -51,7 +45,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator '^' => 'PHP_Token_CARET', '~' => 'PHP_Token_TILDE', '`' => 'PHP_Token_BACKTICK' - ); + ]; /** * @var string @@ -61,17 +55,17 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator /** * @var array */ - protected $tokens = array(); + protected $tokens = []; /** - * @var integer + * @var int */ protected $position = 0; /** * @var array */ - protected $linesOfCode = array('loc' => 0, 'cloc' => 0, 'ncloc' => 0); + protected $linesOfCode = ['loc' => 0, 'cloc' => 0, 'ncloc' => 0]; /** * @var array @@ -101,7 +95,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator /** * @var array */ - protected $lineToFunctionMap = array(); + protected $lineToFunctionMap = []; /** * Constructor. @@ -123,7 +117,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator */ public function __destruct() { - $this->tokens = array(); + $this->tokens = []; } /** @@ -142,7 +136,6 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator /** * @return string - * @since Method available since Release 1.1.0 */ public function getFilename() { @@ -174,8 +167,9 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator if ($lastNonWhitespaceTokenWasDoubleColon && $name == 'CLASS') { $name = 'CLASS_NAME_CONSTANT'; - } elseif ($name == 'USE' && isset($tokens[$i+2][0]) && $tokens[$i+2][0] == T_FUNCTION) { + } elseif ($name == 'USE' && isset($tokens[$i + 2][0]) && $tokens[$i + 2][0] == T_FUNCTION) { $name = 'USE_FUNCTION'; + $text .= $tokens[$i + 1][1] . $tokens[$i + 2][1]; $skip = 2; } @@ -187,7 +181,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator $this->tokens[] = new $tokenClass($text, $line, $this, $id++); $lines = substr_count($text, "\n"); - $line += $lines; + $line += $lines; if ($tokenClass == 'PHP_Token_HALT_COMPILER') { break; @@ -211,7 +205,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @return integer + * @return int */ public function count() { @@ -270,7 +264,6 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator /** * @return array - * @since Method available since Release 1.1.0 */ public function getTraits() { @@ -295,19 +288,19 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator * * @param bool $categorize OPTIONAL * @param string $category OPTIONAL Either 'require_once', 'require', - * 'include_once', 'include'. + * 'include_once', 'include'. + * * @return array - * @since Method available since Release 1.1.0 */ public function getIncludes($categorize = false, $category = null) { if ($this->includes === null) { - $this->includes = array( - 'require_once' => array(), - 'require' => array(), - 'include_once' => array(), - 'include' => array() - ); + $this->includes = [ + 'require_once' => [], + 'require' => [], + 'include_once' => [], + 'include' => [] + ]; foreach ($this->tokens as $token) { switch (get_class($token)) { @@ -341,7 +334,6 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator * Returns the name of the function or method a line belongs to. * * @return string or null if the line is not in a function or method - * @since Method available since Release 1.2.0 */ public function getFunctionForLine($line) { @@ -354,12 +346,12 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator protected function parse() { - $this->interfaces = array(); - $this->classes = array(); - $this->traits = array(); - $this->functions = array(); - $class = array(); - $classEndLine = array(); + $this->interfaces = []; + $this->classes = []; + $this->traits = []; + $this->functions = []; + $class = []; + $classEndLine = []; $trait = false; $traitEndLine = false; $interface = false; @@ -374,8 +366,8 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator $interface = $token->getName(); $interfaceEndLine = $token->getEndLine(); - $this->interfaces[$interface] = array( - 'methods' => array(), + $this->interfaces[$interface] = [ + 'methods' => [], 'parent' => $token->getParent(), 'keywords' => $token->getKeywords(), 'docblock' => $token->getDocblock(), @@ -383,13 +375,13 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator 'endLine' => $interfaceEndLine, 'package' => $token->getPackage(), 'file' => $this->filename - ); + ]; break; case 'PHP_Token_CLASS': case 'PHP_Token_TRAIT': - $tmp = array( - 'methods' => array(), + $tmp = [ + 'methods' => [], 'parent' => $token->getParent(), 'interfaces'=> $token->getInterfaces(), 'keywords' => $token->getKeywords(), @@ -398,15 +390,13 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator 'endLine' => $token->getEndLine(), 'package' => $token->getPackage(), 'file' => $this->filename - ); + ]; if ($token instanceof PHP_Token_CLASS) { $class[] = $token->getName(); $classEndLine[] = $token->getEndLine(); - if ($class[count($class)-1] != 'anonymous class') { - $this->classes[$class[count($class)-1]] = $tmp; - } + $this->classes[$class[count($class) - 1]] = $tmp; } else { $trait = $token->getName(); $traitEndLine = $token->getEndLine(); @@ -416,7 +406,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator case 'PHP_Token_FUNCTION': $name = $token->getName(); - $tmp = array( + $tmp = [ 'docblock' => $token->getDocblock(), 'keywords' => $token->getKeywords(), 'visibility'=> $token->getVisibility(), @@ -425,7 +415,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator 'endLine' => $token->getEndLine(), 'ccn' => $token->getCCN(), 'file' => $this->filename - ); + ]; if (empty($class) && $trait === false && @@ -437,11 +427,11 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator $tmp['startLine'], $tmp['endLine'] ); - } elseif (!empty($class) && $class[count($class)-1] != 'anonymous class') { - $this->classes[$class[count($class)-1]]['methods'][$name] = $tmp; + } elseif (!empty($class)) { + $this->classes[$class[count($class) - 1]]['methods'][$name] = $tmp; $this->addFunctionToMap( - $class[count($class)-1] . '::' . $name, + $class[count($class) - 1] . '::' . $name, $tmp['startLine'], $tmp['endLine'] ); @@ -460,7 +450,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator case 'PHP_Token_CLOSE_CURLY': if (!empty($classEndLine) && - $classEndLine[count($classEndLine)-1] == $token->getLine()) { + $classEndLine[count($classEndLine) - 1] == $token->getLine()) { array_pop($classEndLine); array_pop($class); } elseif ($traitEndLine !== false && @@ -493,7 +483,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @return boolean + * @return bool */ public function valid() { @@ -501,7 +491,7 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @return integer + * @return int */ public function key() { @@ -524,8 +514,9 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @param integer $offset - * @return boolean + * @param int $offset + * + * @return bool */ public function offsetExists($offset) { @@ -533,8 +524,10 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @param integer $offset + * @param int $offset + * * @return mixed + * * @throws OutOfBoundsException */ public function offsetGet($offset) @@ -552,8 +545,8 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @param integer $offset - * @param mixed $value + * @param int $offset + * @param mixed $value */ public function offsetSet($offset, $value) { @@ -561,7 +554,8 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @param integer $offset + * @param int $offset + * * @throws OutOfBoundsException */ public function offsetUnset($offset) @@ -581,7 +575,8 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator /** * Seek to an absolute position. * - * @param integer $position + * @param int $position + * * @throws OutOfBoundsException */ public function seek($position) @@ -599,9 +594,9 @@ class PHP_Token_Stream implements ArrayAccess, Countable, SeekableIterator } /** - * @param string $name - * @param integer $startLine - * @param integer $endLine + * @param string $name + * @param int $startLine + * @param int $endLine */ private function addFunctionToMap($name, $startLine, $endLine) { diff --git a/api/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php b/api/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php index b41b25f..9d69393 100644 --- a/api/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php +++ b/api/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php @@ -1,6 +1,6 @@ * @@ -10,22 +10,17 @@ /** * A caching factory for token stream objects. - * - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-token-stream/tree - * @since Class available since Release 1.0.0 */ class PHP_Token_Stream_CachingFactory { /** * @var array */ - protected static $cache = array(); + protected static $cache = []; /** - * @param string $filename + * @param string $filename + * * @return PHP_Token_Stream */ public static function get($filename) @@ -45,7 +40,7 @@ class PHP_Token_Stream_CachingFactory if (is_string($filename)) { unset(self::$cache[$filename]); } else { - self::$cache = array(); + self::$cache = []; } } } diff --git a/api/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php b/api/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php index d1b25d8..265a656 100644 --- a/api/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php @@ -1,6 +1,6 @@ * @@ -8,22 +8,19 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token_CLASS class. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Laurent Laville - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.2 - */ -class PHP_Token_ClassTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_Token_ClassTest extends TestCase { - protected $class; - protected $function; + /** + * @var PHP_Token_CLASS + */ + private $class; + + /** + * @var PHP_Token_FUNCTION + */ + private $function; protected function setUp() { @@ -82,21 +79,27 @@ class PHP_Token_ClassTest extends PHPUnit_Framework_TestCase $this->assertCount(1, $ts->getClasses()); } - /** - * @requires PHP 7 - */ public function testAnonymousClassesAreHandledCorrectly() { $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_that_declares_anonymous_class.php'); $classes = $ts->getClasses(); - $this->assertEquals(array('class_with_method_that_declares_anonymous_class'), array_keys($classes)); + $this->assertEquals( + [ + 'class_with_method_that_declares_anonymous_class', + 'AnonymousClass:9#31', + 'AnonymousClass:10#55', + 'AnonymousClass:11#75', + 'AnonymousClass:12#91', + 'AnonymousClass:13#107' + ], + array_keys($classes) + ); } /** - * @requires PHP 7 - * @ticket https://github.com/sebastianbergmann/php-token-stream/issues/52 + * @ticket https://github.com/sebastianbergmann/php-token-stream/issues/52 */ public function testAnonymousClassesAreHandledCorrectly2() { @@ -104,15 +107,12 @@ class PHP_Token_ClassTest extends PHPUnit_Framework_TestCase $classes = $ts->getClasses(); - $this->assertEquals(array('Test'), array_keys($classes)); - $this->assertEquals(array('methodOne', 'methodTwo'), array_keys($classes['Test']['methods'])); + $this->assertEquals(['Test', 'AnonymousClass:4#23'], array_keys($classes)); + $this->assertEquals(['methodOne', 'methodTwo'], array_keys($classes['Test']['methods'])); $this->assertEmpty($ts->getFunctions()); } - /** - * @requires PHP 5.6 - */ public function testImportedFunctionsAreHandledCorrectly() { $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'classUsesNamespacedFunction.php'); @@ -120,4 +120,50 @@ class PHP_Token_ClassTest extends PHPUnit_Framework_TestCase $this->assertEmpty($ts->getFunctions()); $this->assertCount(1, $ts->getClasses()); } + + /** + * @ticket https://github.com/sebastianbergmann/php-code-coverage/issues/543 + */ + public function testClassWithMultipleAnonymousClassesAndFunctionsIsHandledCorrectly() + { + $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_multiple_anonymous_classes_and_functions.php'); + + $classes = $ts->getClasses(); + + $this->assertArrayHasKey('class_with_multiple_anonymous_classes_and_functions', $classes); + $this->assertArrayHasKey('AnonymousClass:6#23', $classes); + $this->assertArrayHasKey('AnonymousClass:12#53', $classes); + $this->assertArrayHasKey('m', $classes['class_with_multiple_anonymous_classes_and_functions']['methods']); + $this->assertArrayHasKey('anonymousFunction:18#81', $classes['class_with_multiple_anonymous_classes_and_functions']['methods']); + $this->assertArrayHasKey('anonymousFunction:22#108', $classes['class_with_multiple_anonymous_classes_and_functions']['methods']); + } + + /** + * @ticket https://github.com/sebastianbergmann/php-token-stream/issues/68 + */ + public function testClassWithMethodNamedEmptyIsHandledCorrectly() + { + $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_named_empty.php'); + + $classes = $ts->getClasses(); + + $this->assertArrayHasKey('class_with_method_named_empty', $classes); + $this->assertArrayHasKey('empty', $classes['class_with_method_named_empty']['methods']); + } + + /** + * @ticket https://github.com/sebastianbergmann/php-code-coverage/issues/424 + */ + public function testSomething() + { + $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'php-code-coverage-issue-424.php'); + + $classes = $ts->getClasses(); + + $this->assertSame(5, $classes['Example']['methods']['even']['startLine']); + $this->assertSame(12, $classes['Example']['methods']['even']['endLine']); + + $this->assertSame(7, $classes['Example']['methods']['anonymousFunction:7#28']['startLine']); + $this->assertSame(9, $classes['Example']['methods']['anonymousFunction:7#28']['endLine']); + } } diff --git a/api/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php b/api/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php index f1e508c..b4a6735 100644 --- a/api/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php @@ -1,6 +1,6 @@ * @@ -8,21 +8,14 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token_FUNCTION class. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.0 - */ -class PHP_Token_ClosureTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_Token_ClosureTest extends TestCase { - protected $functions; + /** + * @var PHP_Token_FUNCTION[] + */ + private $functions; protected function setUp() { @@ -40,12 +33,12 @@ class PHP_Token_ClosureTest extends PHPUnit_Framework_TestCase */ public function testGetArguments() { - $this->assertEquals(array('$foo' => null, '$bar' => null), $this->functions[0]->getArguments()); - $this->assertEquals(array('$foo' => 'Foo', '$bar' => null), $this->functions[1]->getArguments()); - $this->assertEquals(array('$foo' => null, '$bar' => null, '$baz' => null), $this->functions[2]->getArguments()); - $this->assertEquals(array('$foo' => 'Foo', '$bar' => null, '$baz' => null), $this->functions[3]->getArguments()); - $this->assertEquals(array(), $this->functions[4]->getArguments()); - $this->assertEquals(array(), $this->functions[5]->getArguments()); + $this->assertEquals(['$foo' => null, '$bar' => null], $this->functions[0]->getArguments()); + $this->assertEquals(['$foo' => 'Foo', '$bar' => null], $this->functions[1]->getArguments()); + $this->assertEquals(['$foo' => null, '$bar' => null, '$baz' => null], $this->functions[2]->getArguments()); + $this->assertEquals(['$foo' => 'Foo', '$bar' => null, '$baz' => null], $this->functions[3]->getArguments()); + $this->assertEquals([], $this->functions[4]->getArguments()); + $this->assertEquals([], $this->functions[5]->getArguments()); } /** @@ -53,12 +46,12 @@ class PHP_Token_ClosureTest extends PHPUnit_Framework_TestCase */ public function testGetName() { - $this->assertEquals('anonymous function', $this->functions[0]->getName()); - $this->assertEquals('anonymous function', $this->functions[1]->getName()); - $this->assertEquals('anonymous function', $this->functions[2]->getName()); - $this->assertEquals('anonymous function', $this->functions[3]->getName()); - $this->assertEquals('anonymous function', $this->functions[4]->getName()); - $this->assertEquals('anonymous function', $this->functions[5]->getName()); + $this->assertEquals('anonymousFunction:2#5', $this->functions[0]->getName()); + $this->assertEquals('anonymousFunction:3#27', $this->functions[1]->getName()); + $this->assertEquals('anonymousFunction:4#51', $this->functions[2]->getName()); + $this->assertEquals('anonymousFunction:5#71', $this->functions[3]->getName()); + $this->assertEquals('anonymousFunction:6#93', $this->functions[4]->getName()); + $this->assertEquals('anonymousFunction:7#106', $this->functions[5]->getName()); } /** diff --git a/api/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php b/api/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php index 4f23c39..539f827 100644 --- a/api/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php @@ -1,6 +1,6 @@ * @@ -8,21 +8,14 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token_FUNCTION class. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.0 - */ -class PHP_Token_FunctionTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_Token_FunctionTest extends TestCase { - protected $functions; + /** + * @var PHP_Token_FUNCTION[] + */ + private $functions; protected function setUp() { @@ -40,23 +33,23 @@ class PHP_Token_FunctionTest extends PHPUnit_Framework_TestCase */ public function testGetArguments() { - $this->assertEquals(array(), $this->functions[0]->getArguments()); + $this->assertEquals([], $this->functions[0]->getArguments()); $this->assertEquals( - array('$baz' => 'Baz'), $this->functions[1]->getArguments() + ['$baz' => 'Baz'], $this->functions[1]->getArguments() ); $this->assertEquals( - array('$foobar' => 'Foobar'), $this->functions[2]->getArguments() + ['$foobar' => 'Foobar'], $this->functions[2]->getArguments() ); $this->assertEquals( - array('$barfoo' => 'Barfoo'), $this->functions[3]->getArguments() + ['$barfoo' => 'Barfoo'], $this->functions[3]->getArguments() ); - $this->assertEquals(array(), $this->functions[4]->getArguments()); + $this->assertEquals([], $this->functions[4]->getArguments()); - $this->assertEquals(array('$x' => null, '$y' => null), $this->functions[5]->getArguments()); + $this->assertEquals(['$x' => null, '$y' => null], $this->functions[5]->getArguments()); } /** diff --git a/api/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php b/api/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php index 1e43351..2056d12 100644 --- a/api/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php @@ -1,6 +1,6 @@ * @@ -8,22 +8,14 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token_REQUIRE_ONCE, PHP_Token_REQUIRE - * PHP_Token_INCLUDE_ONCE and PHP_Token_INCLUDE_ONCE classes. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Laurent Laville - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.2 - */ -class PHP_Token_IncludeTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_Token_IncludeTest extends TestCase { - protected $ts; + /** + * @var PHP_Token_Stream + */ + private $ts; protected function setUp() { @@ -37,7 +29,7 @@ class PHP_Token_IncludeTest extends PHPUnit_Framework_TestCase public function testGetIncludes() { $this->assertSame( - array('test4.php', 'test3.php', 'test2.php', 'test1.php'), + ['test4.php', 'test3.php', 'test2.php', 'test1.php'], $this->ts->getIncludes() ); } @@ -49,13 +41,13 @@ class PHP_Token_IncludeTest extends PHPUnit_Framework_TestCase public function testGetIncludesCategorized() { $this->assertSame( - array( - 'require_once' => array('test4.php'), - 'require' => array('test3.php'), - 'include_once' => array('test2.php'), - 'include' => array('test1.php') - ), - $this->ts->getIncludes(TRUE) + [ + 'require_once' => ['test4.php'], + 'require' => ['test3.php'], + 'include_once' => ['test2.php'], + 'include' => ['test1.php'] + ], + $this->ts->getIncludes(true) ); } @@ -66,8 +58,8 @@ class PHP_Token_IncludeTest extends PHPUnit_Framework_TestCase public function testGetIncludesCategory() { $this->assertSame( - array('test4.php'), - $this->ts->getIncludes(TRUE, 'require_once') + ['test4.php'], + $this->ts->getIncludes(true, 'require_once') ); } } diff --git a/api/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php b/api/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php index 56caede..9e8cb24 100644 --- a/api/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php @@ -1,6 +1,6 @@ * @@ -8,33 +8,29 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token_INTERFACE class. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @author Laurent Laville - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.0 - */ -class PHP_Token_InterfaceTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_Token_InterfaceTest extends TestCase { - protected $class; - protected $interfaces; + /** + * @var PHP_Token_CLASS + */ + private $class; + + /** + * @var PHP_Token_INTERFACE[] + */ + private $interfaces; protected function setUp() { $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source4.php'); $i = 0; + foreach ($ts as $token) { if ($token instanceof PHP_Token_CLASS) { $this->class = $token; - } - elseif ($token instanceof PHP_Token_INTERFACE) { + } elseif ($token instanceof PHP_Token_INTERFACE) { $this->interfaces[$i] = $token; $i++; } @@ -97,7 +93,7 @@ class PHP_Token_InterfaceTest extends PHPUnit_Framework_TestCase public function testGetInterfacesExists() { $this->assertEquals( - array('b'), + ['b'], $this->class->getInterfaces() ); } @@ -111,13 +107,15 @@ class PHP_Token_InterfaceTest extends PHPUnit_Framework_TestCase $this->class->hasInterfaces() ); } + /** * @covers PHP_Token_INTERFACE::getPackage */ - public function testGetPackageNamespace() { + public function testGetPackageNamespace() + { $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php'); - foreach($tokenStream as $token) { - if($token instanceOf PHP_Token_INTERFACE) { + foreach ($tokenStream as $token) { + if ($token instanceof PHP_Token_INTERFACE) { $package = $token->getPackage(); $this->assertSame('Foo\\Bar', $package['namespace']); } @@ -125,22 +123,24 @@ class PHP_Token_InterfaceTest extends PHPUnit_Framework_TestCase } - public function provideFilesWithClassesWithinMultipleNamespaces() { - return array( - array(TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingBraces.php'), - array(TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingNonBraceSyntax.php'), - ); + public function provideFilesWithClassesWithinMultipleNamespaces() + { + return [ + [TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingBraces.php'], + [TEST_FILES_PATH . 'multipleNamespacesWithOneClassUsingNonBraceSyntax.php'], + ]; } /** * @dataProvider provideFilesWithClassesWithinMultipleNamespaces * @covers PHP_Token_INTERFACE::getPackage */ - public function testGetPackageNamespaceForFileWithMultipleNamespaces($filepath) { - $tokenStream = new PHP_Token_Stream($filepath); + public function testGetPackageNamespaceForFileWithMultipleNamespaces($filepath) + { + $tokenStream = new PHP_Token_Stream($filepath); $firstClassFound = false; - foreach($tokenStream as $token) { - if($firstClassFound === false && $token instanceOf PHP_Token_INTERFACE) { + foreach ($tokenStream as $token) { + if ($firstClassFound === false && $token instanceof PHP_Token_INTERFACE) { $package = $token->getPackage(); $this->assertSame('TestClassInBar', $token->getName()); $this->assertSame('Foo\\Bar', $package['namespace']); @@ -148,44 +148,48 @@ class PHP_Token_InterfaceTest extends PHPUnit_Framework_TestCase continue; } // Secound class - if($token instanceOf PHP_Token_INTERFACE) { + if ($token instanceof PHP_Token_INTERFACE) { $package = $token->getPackage(); $this->assertSame('TestClassInBaz', $token->getName()); $this->assertSame('Foo\\Baz', $package['namespace']); + return; } } - $this->fail("Seachring for 2 classes failed"); + $this->fail('Seachring for 2 classes failed'); } - public function testGetPackageNamespaceIsEmptyForInterfacesThatAreNotWithinNamespaces() { - foreach($this->interfaces as $token) { + public function testGetPackageNamespaceIsEmptyForInterfacesThatAreNotWithinNamespaces() + { + foreach ($this->interfaces as $token) { $package = $token->getPackage(); - $this->assertSame("", $package['namespace']); + $this->assertSame('', $package['namespace']); } } /** * @covers PHP_Token_INTERFACE::getPackage */ - public function testGetPackageNamespaceWhenExtentingFromNamespaceClass() { - $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classExtendsNamespacedClass.php'); + public function testGetPackageNamespaceWhenExtentingFromNamespaceClass() + { + $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classExtendsNamespacedClass.php'); $firstClassFound = false; - foreach($tokenStream as $token) { - if($firstClassFound === false && $token instanceOf PHP_Token_INTERFACE) { + foreach ($tokenStream as $token) { + if ($firstClassFound === false && $token instanceof PHP_Token_INTERFACE) { $package = $token->getPackage(); $this->assertSame('Baz', $token->getName()); $this->assertSame('Foo\\Bar', $package['namespace']); $firstClassFound = true; continue; } - if($token instanceOf PHP_Token_INTERFACE) { + if ($token instanceof PHP_Token_INTERFACE) { $package = $token->getPackage(); $this->assertSame('Extender', $token->getName()); $this->assertSame('Other\\Space', $package['namespace']); + return; } } - $this->fail("Searching for 2 classes failed"); + $this->fail('Searching for 2 classes failed'); } } diff --git a/api/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php b/api/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php index 469f787..98360cf 100644 --- a/api/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php @@ -1,6 +1,6 @@ * @@ -8,19 +8,9 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token_NAMESPACE class. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.0 - */ -class PHP_Token_NamespaceTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_Token_NamespaceTest extends TestCase { /** * @covers PHP_Token_NAMESPACE::getName @@ -41,8 +31,8 @@ class PHP_Token_NamespaceTest extends PHPUnit_Framework_TestCase public function testGetStartLineWithUnscopedNamespace() { $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php'); - foreach($tokenStream as $token) { - if($token instanceOf PHP_Token_NAMESPACE) { + foreach ($tokenStream as $token) { + if ($token instanceof PHP_Token_NAMESPACE) { $this->assertSame(2, $token->getLine()); } } @@ -51,8 +41,8 @@ class PHP_Token_NamespaceTest extends PHPUnit_Framework_TestCase public function testGetEndLineWithUnscopedNamespace() { $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInNamespace.php'); - foreach($tokenStream as $token) { - if($token instanceOf PHP_Token_NAMESPACE) { + foreach ($tokenStream as $token) { + if ($token instanceof PHP_Token_NAMESPACE) { $this->assertSame(2, $token->getEndLine()); } } @@ -60,8 +50,8 @@ class PHP_Token_NamespaceTest extends PHPUnit_Framework_TestCase public function testGetStartLineWithScopedNamespace() { $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInScopedNamespace.php'); - foreach($tokenStream as $token) { - if($token instanceOf PHP_Token_NAMESPACE) { + foreach ($tokenStream as $token) { + if ($token instanceof PHP_Token_NAMESPACE) { $this->assertSame(2, $token->getLine()); } } @@ -70,11 +60,10 @@ class PHP_Token_NamespaceTest extends PHPUnit_Framework_TestCase public function testGetEndLineWithScopedNamespace() { $tokenStream = new PHP_Token_Stream(TEST_FILES_PATH . 'classInScopedNamespace.php'); - foreach($tokenStream as $token) { - if($token instanceOf PHP_Token_NAMESPACE) { + foreach ($tokenStream as $token) { + if ($token instanceof PHP_Token_NAMESPACE) { $this->assertSame(8, $token->getEndLine()); } } } - } diff --git a/api/vendor/phpunit/php-token-stream/tests/TokenTest.php b/api/vendor/phpunit/php-token-stream/tests/TokenTest.php index 67bf79a..e4bbb80 100644 --- a/api/vendor/phpunit/php-token-stream/tests/TokenTest.php +++ b/api/vendor/phpunit/php-token-stream/tests/TokenTest.php @@ -1,6 +1,6 @@ * @@ -8,19 +8,9 @@ * file that was distributed with this source code. */ -/** - * Tests for the PHP_Token class. - * - * @package PHP_TokenStream - * @subpackage Tests - * @author Sebastian Bergmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/php-token-stream/ - * @since Class available since Release 1.0.0 - */ -class PHP_TokenTest extends PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class PHP_TokenTest extends TestCase { /** * @covers PHP_Token::__construct diff --git a/api/vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_named_empty.php b/api/vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_named_empty.php new file mode 100644 index 0000000..1dafc18 --- /dev/null +++ b/api/vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_named_empty.php @@ -0,0 +1,7 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ require __DIR__ . '/../vendor/autoload.php'; define( diff --git a/api/vendor/phpunit/phpunit-mock-objects/.travis.yml b/api/vendor/phpunit/phpunit-mock-objects/.travis.yml index 95ffa23..1e11d43 100644 --- a/api/vendor/phpunit/phpunit-mock-objects/.travis.yml +++ b/api/vendor/phpunit/phpunit-mock-objects/.travis.yml @@ -1,22 +1,28 @@ language: php -before_script: - - composer self-update - - composer install --no-interaction --prefer-source --dev - -script: ./vendor/bin/phpunit --configuration ./build/travis-ci.xml - php: - 5.6 - 7.0 - - hhvm + - 7.0snapshot + - 7.1 + - 7.1snapshot + - master + +sudo: false + +before_install: + - composer self-update + - composer clear-cache + +install: + - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable + +script: + - ./vendor/bin/phpunit --coverage-clover=coverage.xml + +after_success: + - bash <(curl -s https://codecov.io/bash) notifications: email: false - webhooks: - urls: - - https://webhooks.gitter.im/e/6668f52f3dd4e3f81960 - on_success: always - on_failure: always - on_start: false diff --git a/api/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml b/api/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml deleted file mode 100644 index b8498fb..0000000 --- a/api/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - ../tests - ../tests - - - diff --git a/api/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php b/api/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php index 40e35b3..bfb899d 100644 --- a/api/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php +++ b/api/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php @@ -920,7 +920,7 @@ class PHPUnit_Framework_MockObject_Generator if ($className == '') { do { $className = $prefix . $type . '_' . - substr(md5(microtime()), 0, 8); + substr(md5(mt_rand()), 0, 8); } while (class_exists($className, false)); } diff --git a/api/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php b/api/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php index cd63b27..72f32c2 100644 --- a/api/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php +++ b/api/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php @@ -1,10 +1,23 @@ generator->getMock(stdClass::class, [0]); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock - */ public function testGetMockCanCreateNonExistingFunctions() { $mock = $this->generator->getMock(stdClass::class, ['testFunction']); @@ -31,7 +40,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase } /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock * @expectedException PHPUnit_Framework_MockObject_RuntimeException * @expectedExceptionMessage duplicates: "foo, bar, foo" (duplicate: "foo") */ @@ -41,8 +49,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase } /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock - * @covers PHPUnit_Framework_MockObject_Generator::isMethodNameBlacklisted * @requires PHP 7 */ public function testGetMockBlacklistedMethodNamesPhp7() @@ -53,9 +59,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertInstanceOf(InterfaceWithSemiReservedMethodName::class, $mock); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass - */ public function testGetMockForAbstractClassDoesNotFailWhenFakingInterfaces() { $mock = $this->generator->getMockForAbstractClass(Countable::class); @@ -63,9 +66,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertTrue(method_exists($mock, 'count')); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass - */ public function testGetMockForAbstractClassStubbingAbstractClass() { $mock = $this->generator->getMockForAbstractClass(AbstractMockTestClass::class); @@ -73,9 +73,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertTrue(method_exists($mock, 'doSomething')); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass - */ public function testGetMockForAbstractClassWithNonExistentMethods() { $mock = $this->generator->getMockForAbstractClass( @@ -92,9 +89,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertTrue(method_exists($mock, 'doSomething')); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass - */ public function testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed() { $mock = $this->generator->getMockForAbstractClass(AbstractMockTestClass::class); @@ -109,7 +103,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase /** * @dataProvider getMockForAbstractClassExpectsInvalidArgumentExceptionDataprovider - * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass * @expectedException PHPUnit_Framework_Exception */ public function testGetMockForAbstractClassExpectingInvalidArgumentException($className, $mockClassName) @@ -118,7 +111,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase } /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass * @expectedException PHPUnit_Framework_MockObject_RuntimeException */ public function testGetMockForAbstractClassAbstractClassDoesNotExist() @@ -134,9 +126,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase ]; } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait - */ public function testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods() { $mock = $this->generator->getMockForTrait( @@ -155,9 +144,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertTrue($mock->anotherMockableMethod()); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait - */ public function testGetMockForTraitStubbingAbstractMethod() { $mock = $this->generator->getMockForTrait(AbstractTrait::class); @@ -173,7 +159,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase } /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock * @expectedException PHPUnit_Framework_MockObject_RuntimeException */ public function testExceptionIsRaisedForMutuallyExclusiveOptions() @@ -182,8 +167,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase } /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock - * * @requires PHP 7 */ public function testCanImplementInterfacesThatHaveMethodsWithReturnTypes() @@ -195,11 +178,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertInstanceOf(PHPUnit_Framework_MockObject_MockObject::class, $stub); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock - * - * @ticket https://github.com/sebastianbergmann/phpunit-mock-objects/issues/322 - */ public function testCanConfigureMethodsForDoubleOfNonExistentClass() { $className = 'X' . md5(microtime()); @@ -209,9 +187,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase $this->assertInstanceOf($className, $mock); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock - */ public function testCanInvokeMethodsOfNonExistentClass() { $className = 'X' . md5(microtime()); diff --git a/api/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php b/api/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php index d95ee1c..302dae7 100644 --- a/api/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php +++ b/api/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php @@ -429,9 +429,6 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $this->assertNotEquals(get_class($mock4), get_class($mock5)); } - /** - * @covers PHPUnit_Framework_MockObject_Generator::getMock - */ public function testGetMockWithFixedClassNameCanProduceTheSameMockTwice() { $mock = $this->getMockBuilder(stdClass::class)->setMockClassName('FixedName')->getMock(); diff --git a/api/vendor/phpunit/phpunit/.github/CONTRIBUTING.md b/api/vendor/phpunit/phpunit/.github/CONTRIBUTING.md index 6dcb604..9010bc4 100644 --- a/api/vendor/phpunit/phpunit/.github/CONTRIBUTING.md +++ b/api/vendor/phpunit/phpunit/.github/CONTRIBUTING.md @@ -24,7 +24,7 @@ Due to time constraints, we are not always able to respond as quickly as we woul This project comes with a configuration file for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines: ```bash -$ wget http://get.sensiolabs.org/php-cs-fixer.phar +$ wget http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O php-cs-fixer.phar $ php php-cs-fixer.phar fix ``` @@ -51,6 +51,14 @@ The `phpunit` script can be used to invoke the PHPUnit test runner: $ ./phpunit --version ``` +## Running PHPUnit's own test suite + +After following the steps shown above, PHPUnit's own test suite is run like this: + +```bash +$ ./phpunit +``` + ## Reporting issues Please use the most specific issue tracker to search for existing tickets and to open new tickets: diff --git a/api/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE.md b/api/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE.md index 3b299d8..ad1dc39 100644 --- a/api/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE.md +++ b/api/vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE.md @@ -7,8 +7,9 @@ diff --git a/api/vendor/phpunit/phpunit/.gitignore b/api/vendor/phpunit/phpunit/.gitignore index 3a4e975..bf33323 100644 --- a/api/vendor/phpunit/phpunit/.gitignore +++ b/api/vendor/phpunit/phpunit/.gitignore @@ -1,5 +1,7 @@ /.ant_targets /.idea +/.php_cs +/.php_cs.cache /build/documentation /build/logfiles /build/phar @@ -7,12 +9,12 @@ /build/*.phar /build/*.phar.asc /build/binary-phar-autoload.php +/cache.properties +/composer.lock /tests/TextUI/*.diff /tests/TextUI/*.exp /tests/TextUI/*.log /tests/TextUI/*.out /tests/TextUI/*.php -/cache.properties -/composer.lock /vendor -/.php_cs.cache + diff --git a/api/vendor/phpunit/phpunit/.php_cs b/api/vendor/phpunit/phpunit/.php_cs.dist similarity index 100% rename from api/vendor/phpunit/phpunit/.php_cs rename to api/vendor/phpunit/phpunit/.php_cs.dist diff --git a/api/vendor/phpunit/phpunit/.travis.yml b/api/vendor/phpunit/phpunit/.travis.yml index f2ed4a5..29957e7 100644 --- a/api/vendor/phpunit/phpunit/.travis.yml +++ b/api/vendor/phpunit/phpunit/.travis.yml @@ -1,25 +1,39 @@ language: php +sudo: false + +addons: + apt: + packages: + - libxml2-utils + php: - 5.6 - 7.0 - 7.1 - - nightly + - 7.2 + - master + +matrix: + allow_failures: + - php: 7.2 + - php: master + fast_finish: true env: matrix: - DEPENDENCIES="high" - DEPENDENCIES="low" - -sudo: false + global: + - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest" before_install: - composer self-update - composer clear-cache install: - - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable; fi - - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable --prefer-lowest; fi + - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS; fi + - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi before_script: - echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.0.md b/api/vendor/phpunit/phpunit/ChangeLog-4.0.md deleted file mode 100644 index dc71b01..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.0.md +++ /dev/null @@ -1,176 +0,0 @@ -# Changes in PHPUnit 4.0 - -All notable changes of the PHPUnit 4.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.0.20] - 2014-05-02 - -### Fixed - -* Fixed [#1242](https://github.com/sebastianbergmann/phpunit/issues/1242): `--self-update` uses OpenSSL API that is deprecated in PHP 5.6 - -## [4.0.19] - 2014-04-30 - -### Fixed - -* Fixed [#1193](https://github.com/sebastianbergmann/phpunit/issues/1193): Process isolation does not work correctly when PHPUnit is used from PHAR -* Fixed a BC break related to comparing `DOMNode` objects that was introduced in PHPUnit 4.0.18 - -## [4.0.18] - 2014-04-29 - -### Fixed - -* Fixed [#1218](https://github.com/sebastianbergmann/phpunit/issues/1218): `--self-update` destroys symlink - -## [4.0.17] - 2014-04-21 - -### Changed - -* [Display a message that the PEAR installation method is no longer supported when PHPUnit was installed using the PEAR Installer](https://github.com/sebastianbergmann/phpunit/commit/70b02c6be0176ab8ad3d3c9ec97480556c5dd63b) - -## [4.0.16] - 2014-04-20 - -### Fixed - -* [Fixed handling of the `--report-useless-tests`, `--strict-coverage`, `--disallow-test-output`, and `--enforce-time-limit` options](https://github.com/sebastianbergmann/phpunit/commit/38baa9670711adedfe44ef24a33b568f61f3f045) - -## [4.0.15] - 2014-04-16 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies - -## [4.0.14] - 2014-03-28 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies - -## [4.0.13] - 2014-03-26 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies - -## [4.0.12] - 2014-03-20 - -### Changed - -* [Use blacklist from PHP_CodeCoverage](https://github.com/sebastianbergmann/phpunit/commit/16152ba4b8d0104ce34f60cb71b2b982ba84c898) - -## [4.0.11] - 2014-03-18 - -### Fixed - -* [Fixed unintended autoloader invokation triggered by the `@beforeClass` and `@afterClass` annotations](https://github.com/sebastianbergmann/phpunit/commit/f12e10fddc3ccbddb652a04d9036aeb5a6d54bff) - -## [4.0.10] - 2014-03-18 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies (most notably a [fix](https://github.com/sebastianbergmann/phpunit-mock-objects/commit/c5e6274b8f2bf983cf883bb375cf44f99aff200e) in the mock object generator that caused a [performance regression](https://github.com/sebastianbergmann/phpunit/issues/1187)) - -## [4.0.9] - 2014-03-17 - -### Changed - -* Optimized the search for the `@before`, `@after`, `@beforeClass` and `@afterClass` annotations -* Optimized the usage of `SebastianBergmann\Environment\Runtime::canCollectCodeCoverage()` - -### Fixed - -* The "No code coverage will be generated." message was displayed even when code coverage reporting was not requested - -## [4.0.8] - 2014-03-17 - -### Fixed - -* Fixed [#1186](https://github.com/sebastianbergmann/phpunit/issues/1186): `@before` and `@after` methods are not called in `@dataProvider` methods - -## [4.0.7] - 2014-03-12 - -### Fixed - -* Removed dependency on `phpunit/dbunit` in `composer.json` that was unintentionally added in PHPUnit 4.0.6 - -## [4.0.6] - 2014-03-11 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies - -## [4.0.5] - 2014-03-10 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies - -## [4.0.4] - 2014-03-08 - -### Fixed - -* Fixed stacktrace filtering when PHPUnit is used from a PHAR - -## [4.0.3] - 2014-03-07 - -New release of PHPUnit as PHAR and PEAR package with updated dependencies - -## [4.0.2] - 2014-03-07 - -### Fixed - -* Fixed an issue related to displaying PHPUnit's version number - -## [4.0.1] - 2014-03-07 - -### Fixed - -* Fixed collection of code coverage data for tests that use a data provider - -## [4.0.0] - 2014-03-07 - -### Added - -* Implemented #382: Added the `$options` parameter to `PHPUnit_Framework_TestCase::getMockFromWsdl()` for configuring the `SoapClient` -* Implemented #628: Added `PHPUnit_Framework_Assert::countOf(), a shortcut to get a `PHPUnit_Framework_Constraint_Count` instance -* Implemented #711: `coverage-text` now has an XML `showOnlySummary` option -* Implemented #719: The `--stderr` switch now respects `--colors` and `--debug` -* Implemented #746: Allow identity checking for non-object types in all asserts that depend on `TraversableContains` -* Implemented #758: Show a proper stack trace when @expectedException fails due to a unexpected exception being thrown -* Implemented #773: Recursive and repeated arrays are more gracefully when comparison differences are exported -* Implemented #813: Added `@before`, `@after`, `@beforeClass` and `@afterClass` annotations -* Implemented #834: Added the `@requires OS` annotation -* Implemented #835: Printers that extend `PHPUnit_TextUI_ResultPrinter` should have similar construction -* Implemented #838: Added a base test listener -* Implemented #859: Added PHP label validation to attribute assertions -* Implemented #869: Added support for the adjacent sibling selector (+) to `PHPUnit_Util_XML::findNodes()` -* Implemented #871: Add Comparator for DateTime objects -* Implemented #877: Added new HTML5 tags to `PHPUnit_Util_XML::findNodes()` -* Added `--coverage-crap4j` switch to generate code coverage report in Crap4J XML format -* `assertCount()`, `assertNotCount()`, `assertSameSize()`, and `assertNotSameSize()` now support all objects that implement the `Traversable` interface - -### Changed - -* A test will now fail in strict mode when it uses the `@covers` annotation and code that is not expected to be covered is executed -* All relative paths in a configuration file are now resolved relative to that configuration file - -### Fixed - -* Fixed #240: XML strings are escaped by removing invalid characters -* Fixed #261: `setUp()` and `setUpBeforeClass()` are run before filters are applied -* Fixed #541: Excluded groups are counted towards total number of tests being executed -* Fixed #789: PHP INI settings would not be passed to child processes -* Fixed #806: Array references are now properly displayed in error output -* Fixed #808: Resources are now reported as `resource(13) of type (stream)` instead of `NULL` -* Fixed #873: PHPUnit suppresses exceptions thrown outside of test case function -* Fixed: `phpt` test cases now use the correct php binary when executed through wrapper scripts - -[4.0.20]: https://github.com/sebastianbergmann/phpunit/compare/4.0.19...4.0.20 -[4.0.19]: https://github.com/sebastianbergmann/phpunit/compare/4.0.18...4.0.19 -[4.0.18]: https://github.com/sebastianbergmann/phpunit/compare/4.0.17...4.0.18 -[4.0.17]: https://github.com/sebastianbergmann/phpunit/compare/4.0.16...4.0.17 -[4.0.16]: https://github.com/sebastianbergmann/phpunit/compare/4.0.15...4.0.16 -[4.0.15]: https://github.com/sebastianbergmann/phpunit/compare/4.0.14...4.0.15 -[4.0.14]: https://github.com/sebastianbergmann/phpunit/compare/4.0.13...4.0.14 -[4.0.13]: https://github.com/sebastianbergmann/phpunit/compare/4.0.12...4.0.13 -[4.0.12]: https://github.com/sebastianbergmann/phpunit/compare/4.0.11...4.0.12 -[4.0.11]: https://github.com/sebastianbergmann/phpunit/compare/4.0.10...4.0.11 -[4.0.10]: https://github.com/sebastianbergmann/phpunit/compare/4.0.9...4.0.10 -[4.0.9]: https://github.com/sebastianbergmann/phpunit/compare/4.0.8...4.0.9 -[4.0.8]: https://github.com/sebastianbergmann/phpunit/compare/4.0.7...4.0.8 -[4.0.7]: https://github.com/sebastianbergmann/phpunit/compare/4.0.6...4.0.7 -[4.0.6]: https://github.com/sebastianbergmann/phpunit/compare/4.0.5...4.0.6 -[4.0.5]: https://github.com/sebastianbergmann/phpunit/compare/4.0.4...4.0.5 -[4.0.4]: https://github.com/sebastianbergmann/phpunit/compare/4.0.3...4.0.4 -[4.0.3]: https://github.com/sebastianbergmann/phpunit/compare/4.0.2...4.0.3 -[4.0.2]: https://github.com/sebastianbergmann/phpunit/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/phpunit/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/phpunit/compare/3.7...4.0.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.1.md b/api/vendor/phpunit/phpunit/ChangeLog-4.1.md deleted file mode 100644 index d7f10a7..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.1.md +++ /dev/null @@ -1,73 +0,0 @@ -# Changes in PHPUnit 4.1 - -All notable changes of the PHPUnit 4.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.1.6] - 2014-08-17 - -### Fixed - -* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr` -* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution - -## [4.1.5] - 2014-08-07 - -### Changed - -* Implemented [#1330](https://github.com/sebastianbergmann/phpunit/issues/1330): Allow non-ambiguous shortened long options - -### Fixed - -* Fixed [#529](https://github.com/sebastianbergmann/phpunit/issues/529): Tests missed in execution when another test extends from it -* Fixed [#1149](https://github.com/sebastianbergmann/phpunit/issues/1149): Test swallows output buffer when run in a separate process -* Fixed [#1336](https://github.com/sebastianbergmann/phpunit/issues/1336): Problem in process isolation with global variables that contain an object which contains a string which contains multiple backslashes -* Fixed [#1337](https://github.com/sebastianbergmann/phpunit/issues/1337): Data Provider with `\` at the end of the name breaks with process isolation -* Fixed [#1345](https://github.com/sebastianbergmann/phpunit/issues/1345): Process isolation blocks infinitely upon fatal error in child process -* Fixed [#1354](https://github.com/sebastianbergmann/phpunit/issues/1354): PHPUnit test suite fails on Windows -* Fixed [#1369](https://github.com/sebastianbergmann/phpunit/issues/1369): Performance of `TestSuite::addTestFile()` and missing documentation -* Fixed [#1374](https://github.com/sebastianbergmann/phpunit/issues/1374): `tearDown()` is called despite unmet requirements - -## [4.1.4] - 2014-07-18 - -### Fixed - -* Fixed [#1265](https://github.com/sebastianbergmann/phpunit/issues/1265): `PHPUnit_Runner_StandardTestSuiteLoader` could not be configured as loader -* Fixed [#1311](https://github.com/sebastianbergmann/phpunit/issues/1311): Incomplete XML Schema for PHPUnit XML configuration file -* Fixed [#1314](https://github.com/sebastianbergmann/phpunit/issues/1314): Bug in configuration parser - -## [4.1.3] - 2014-06-11 - -New release of PHPUnit as PHP Archive (PHAR) with updated dependencies - -## [4.1.2] - 2014-06-07 - -New release of PHPUnit as PHP Archive (PHAR) with updated dependencies - -## [4.1.1] - 2014-05-24 - -### Added - -* Added `--selfupdate` alias for `--self-update` - -### Changed - -* Improved the fix for [#1133](https://github.com/sebastianbergmann/phpunit/issues/1133) - -### Fixed - -* Fixed the constructor argument for `SebastianBergmann\Version` - -## [4.1.0] - 2014-05-02 - -### Changed - -* The code to compare PHP values for equality (in `assertEquals()`, for instance) has been factored out into a [separate component](https://github.com/sebastianbergmann/comparator) -* [The mock object generator is now created lazily](https://github.com/sebastianbergmann/phpunit/pull/1165) - -[4.1.6]: https://github.com/sebastianbergmann/phpunit/compare/4.1.5...4.1.6 -[4.1.5]: https://github.com/sebastianbergmann/phpunit/compare/4.1.4...4.1.5 -[4.1.4]: https://github.com/sebastianbergmann/phpunit/compare/4.1.3...4.1.4 -[4.1.3]: https://github.com/sebastianbergmann/phpunit/compare/4.1.2...4.1.3 -[4.1.2]: https://github.com/sebastianbergmann/phpunit/compare/4.1.1...4.1.2 -[4.1.1]: https://github.com/sebastianbergmann/phpunit/compare/4.1.0...4.1.1 -[4.1.0]: https://github.com/sebastianbergmann/phpunit/compare/4.0...4.1.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.2.md b/api/vendor/phpunit/phpunit/ChangeLog-4.2.md deleted file mode 100644 index 0d902b7..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.2.md +++ /dev/null @@ -1,56 +0,0 @@ -# Changes in PHPUnit 4.2 - -All notable changes of the PHPUnit 4.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.2.5] - 2014-09-06 - -New release of PHPUnit as PHP Archive (PHAR) with updated dependencies - -## [4.2.4] - 2014-08-31 - -### Fixed - -* Fixed [#1413](https://github.com/sebastianbergmann/phpunit/issues/1413): `assertCount()` hangs in infinite loop on HHVM - -## [4.2.3] - 2014-08-28 - -### Fixed - -* Fixed [#1403](https://github.com/sebastianbergmann/phpunit/issues/1403): `phpunit --self-update` does not work - -## [4.2.2] - 2014-08-18 - -### Fixed - -* Fixed [#1399](https://github.com/sebastianbergmann/phpunit/issues/1399): `enforceTimeLimit` configuration option is not handled - -## [4.2.1] - 2014-08-17 - -### Fixed - -* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr` -* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution - -## [4.2.0] - 2014-08-08 - -### Added - -* Tests annotated with `@todo` will now be reported as risky when the `--disallow-todo-tests` option is used or `beStrictAboutTodoAnnotatedTests=true` is set in the configuration file -* The `atLeast()` and `atMost()` invocation count matchers were added - -### Changed - -* `trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);` is used now to indicate that a PHPUnit API method is deprecated; the old "system" for deprecating methods has been removed -* The PHP Archive (PHAR) distribution of PHPUnit can now be used as a library; `include()`ing or `require()`ing it will not execute the CLI test runner - -### Deprecated - -* The `assertTag()` and `assertSelect*()` assertion methods have been deprecated in favor of the [phpunit-dom-assertions](https://github.com/phpunit/phpunit-dom-assertions) extension; these methods will be removed in PHPUnit 5.0 - -[4.2.5]: https://github.com/sebastianbergmann/phpunit/compare/4.2.4...4.2.5 -[4.2.4]: https://github.com/sebastianbergmann/phpunit/compare/4.2.3...4.2.4 -[4.2.3]: https://github.com/sebastianbergmann/phpunit/compare/4.2.2...4.2.3 -[4.2.2]: https://github.com/sebastianbergmann/phpunit/compare/4.2.1...4.2.2 -[4.2.1]: https://github.com/sebastianbergmann/phpunit/compare/4.2.0...4.2.1 -[4.2.0]: https://github.com/sebastianbergmann/phpunit/compare/4.1...4.2.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.3.md b/api/vendor/phpunit/phpunit/ChangeLog-4.3.md deleted file mode 100644 index 99c2826..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.3.md +++ /dev/null @@ -1,54 +0,0 @@ -# Changes in PHPUnit 4.3 - -All notable changes of the PHPUnit 4.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.3.5] - 2014-11-11 - -### Changed - -* Merged [#1484](https://github.com/sebastianbergmann/phpunit/issues/1484): Removed `lazymap` from blacklist as it is not longer used -* Merged [#1489](https://github.com/sebastianbergmann/phpunit/issues/1489): Do not send output from tests in process isolation when testing output - -## [4.3.4] - 2014-10-22 - -### Fixed - -* Fixed [#1428](https://github.com/sebastianbergmann/phpunit/issues/1428): Issue with Composer dependencies -* Fixed [#1447](https://github.com/sebastianbergmann/phpunit/issues/1447): PHPT tests treat line endings inconsistently - -## [4.3.3] - 2014-10-16 - -### Fixed - -* Fixed [#1471](https://github.com/sebastianbergmann/phpunit/issues/1471): Output made while test is running is printed although `expectOutputString()` is used when an assertion fails - -## [4.3.2] - 2014-10-16 - -### Fixed - -* Fixed [#1468](https://github.com/sebastianbergmann/phpunit/issues/1468): Incomplete and `@todo` annotated tests are counted twice - -## [4.3.1] - 2014-10-06 - -New release of PHPUnit as PHP Archive (PHAR) with updated dependencies - -## [4.3.0] - 2014-10-03 - -### Added - -* Merged [#1358](https://github.com/sebastianbergmann/phpunit/issues/1358): Implement `@expectedExceptionMessageRegExp` annotation -* Merged [#1360](https://github.com/sebastianbergmann/phpunit/issues/1360): Allow a test to identify whether it runs in isolation - -### Fixed - -* Fixed [#1216](https://github.com/sebastianbergmann/phpunit/issues/1216): Bootstrap does not have global variables set when `--bootstrap` is specified on commandline -* Fixed [#1351](https://github.com/sebastianbergmann/phpunit/issues/1351): `TestResult` object contains serialized test class upon test failure/exception in process isolation -* Fixed [#1437](https://github.com/sebastianbergmann/phpunit/issues/1437): Risky test messages mask failures - -[4.3.5]: https://github.com/sebastianbergmann/phpunit/compare/4.3.4...4.3.5 -[4.3.4]: https://github.com/sebastianbergmann/phpunit/compare/4.3.3...4.3.4 -[4.3.3]: https://github.com/sebastianbergmann/phpunit/compare/4.3.2...4.3.3 -[4.3.2]: https://github.com/sebastianbergmann/phpunit/compare/4.3.1...4.3.2 -[4.3.1]: https://github.com/sebastianbergmann/phpunit/compare/4.3.0...4.3.1 -[4.3.0]: https://github.com/sebastianbergmann/phpunit/compare/4.2...4.3.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.4.md b/api/vendor/phpunit/phpunit/ChangeLog-4.4.md deleted file mode 100644 index 312af5a..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.4.md +++ /dev/null @@ -1,57 +0,0 @@ -# Changes in PHPUnit 4.4 - -All notable changes of the PHPUnit 4.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.4.5] - 2015-01-27 - -### Fixed - -* Fixed [#1592](https://github.com/sebastianbergmann/phpunit/issues/1592): Incorrect dependency information - -## [4.4.4] - 2015-01-24 - -### Fixed - -* Fixed [#1587](https://github.com/sebastianbergmann/phpunit/issues/1587): Class `SebastianBergmann\Exporter\Context` not found - -## [4.4.3] - 2015-01-24 - -New PHAR release due to updated dependencies - -## [4.4.2] - 2015-01-17 - -### Changed - -* Merged [#1573](https://github.com/sebastianbergmann/phpunit/issues/1573): Updates for the XSD for PHPUnit XML configuration - -### Fixed - -* Merged [#1567](https://github.com/sebastianbergmann/phpunit/issues/1567): `coverage-crap4j` missing in XSD for PHPUnit XML configuration -* Fixed [#1570](https://github.com/sebastianbergmann/phpunit/issues/1570): Test that prints output is marked as failure and not as risky when `--disallow-test-output` is used -* Fixed `--stderr` with `--tap` or `--testdox` options - -## [4.4.1] - 2014-12-28 - -### Changed - -* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Add `expectedCount()` to `toString()` return value - -## [4.4.0] - 2014-12-05 - -### Added - -* Merged [#1371](https://github.com/sebastianbergmann/phpunit/issues/1371): Implement `assertArraySubset()` assertion -* Merged [#1439](https://github.com/sebastianbergmann/phpunit/issues/1439): Add support for `double` to `assertInternalType()` - -### Changed - -* Merged [#1427](https://github.com/sebastianbergmann/phpunit/issues/1427): Improve failure output for tests when provided data is binary -* Merged [#1458](https://github.com/sebastianbergmann/phpunit/issues/1458): Only enable colors when PHPUnit is run on a console (and output is not sent to a file) - -[4.4.5]: https://github.com/sebastianbergmann/phpunit/compare/4.4.4...4.4.5 -[4.4.4]: https://github.com/sebastianbergmann/phpunit/compare/4.4.3...4.4.4 -[4.4.3]: https://github.com/sebastianbergmann/phpunit/compare/4.4.2...4.4.3 -[4.4.2]: https://github.com/sebastianbergmann/phpunit/compare/4.4.1...4.4.2 -[4.4.1]: https://github.com/sebastianbergmann/phpunit/compare/4.4.0...4.4.1 -[4.4.0]: https://github.com/sebastianbergmann/phpunit/compare/4.3...4.4.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.5.md b/api/vendor/phpunit/phpunit/ChangeLog-4.5.md deleted file mode 100644 index 2313de1..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.5.md +++ /dev/null @@ -1,28 +0,0 @@ -# Changes in PHPUnit 4.5 - -All notable changes of the PHPUnit 4.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.5.1] - 2015-03-29 - -## [4.5.0] - 2015-02-05 - -### Added - -* Added out-of-the-box support for [Prophecy](https://github.com/phpspec/prophecy) -* Implemented [#137](https://github.com/sebastianbergmann/phpunit/issues/137): Add support for variable number of tests shown per line in default result printer - -### Changed - -* Merged [#1478](https://github.com/sebastianbergmann/phpunit/issues/1478): Improve the performance of `PHPUnit_Framework_Constraint_IsEqual` (which is used by `assertEquals()`, for instance) for the most common case - -### Deprecated - -* [Deprecated](https://github.com/sebastianbergmann/phpunit/commit/7abe7796f77b13fdf3cfc506fb987d6c2ab477f5) the `--strict` commandline option and the XML configuration's `strict` attribute - -### Fixed - -* Fixed [#1474](https://github.com/sebastianbergmann/phpunit/issues/1474): Allow the registration of custom comparators for `assertEquals()` et al. (again) - -[4.5.1]: https://github.com/sebastianbergmann/phpunit/compare/4.5.0...4.5.1 -[4.5.0]: https://github.com/sebastianbergmann/phpunit/compare/4.4...4.5.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.6.md b/api/vendor/phpunit/phpunit/ChangeLog-4.6.md deleted file mode 100644 index 3571634..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.6.md +++ /dev/null @@ -1,95 +0,0 @@ -# Changes in PHPUnit 4.6 - -All notable changes of the PHPUnit 4.6 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.6.10] - 2015-06-03 - -### Changed - -* Merged [#1693](https://github.com/sebastianbergmann/phpunit/pull/1693): Improved API documentation -* Merged [#1706](https://github.com/sebastianbergmann/phpunit/pull/1706): Avoid hard-coded URI to `phpunit.xsd` -* Merged [#1725](https://github.com/sebastianbergmann/phpunit/pull/1725): Update phpDox XSD URI -* Merged [#1735](https://github.com/sebastianbergmann/phpunit/pull/1735): Mute `chdir()` failures in XInclude handling of XML configuration file -* Merged [#1736](https://github.com/sebastianbergmann/phpunit/pull/1736): Verify that phar file can be overwritten before attempting self update - -### Fixed - -* Fixed [#1737](https://github.com/sebastianbergmann/phpunit/issues/1737): Confusing output from `--testdox` for empty test class - -## [4.6.9] - 2015-05-29 - -### Fixed - -* Fixed [#1731](https://github.com/sebastianbergmann/phpunit/issues/1731): `.` after failure count has no background color when `--colors` is used - -## [4.6.8] - 2015-05-28 - -New PHAR release due to updated dependencies - -## [4.6.7] - 2015-05-25 - -New PHAR release due to updated dependencies - -## [4.6.6] - 2015-04-29 - -### Fixed - -* Fixed [#1684](https://github.com/sebastianbergmann/phpunit/issues/1684): PHAR does not work on HHVM - -## [4.6.5] - 2015-04-29 - -* Fixed [#1677](https://github.com/sebastianbergmann/phpunit/issues/1677): Number of risky tests not printed when there are failing tests -* Fixed [#1688](https://github.com/sebastianbergmann/phpunit/issues/1688): Self-Update operation does not work due to outdated SSL certificate - -## [4.6.4] - 2015-04-11 - -### Changed - -* The default list of blacklisted classes is now always passed to PHP_CodeCoverage - -## [4.6.3] - 2015-04-11 - -### Changed - -* Updated the default list of blacklisted classes - -## [4.6.2] - 2015-04-07 - -### Fixed - -* Fixed [#1667](https://github.com/sebastianbergmann/phpunit/issues/1667): Loading `src/Framework/Assert/Functions.php` by default causes collisions - -## [4.6.1] - 2015-04-03 - -### Fixed - -* Fixed [#1665](https://github.com/sebastianbergmann/phpunit/issues/1665): PHPUnit 4.6.0 PHAR does not work when renamed to `phpunit` - -## [4.6.0] - 2015-04-03 - -### Added - -* Added the `--strict-global-state` command-line option and the `beStrictAboutChangesToGlobalState` configuration setting for enabling a check that global variabes, super-global variables, and static attributes in user-defined classes are not modified during a test -* Merged [#1527](https://github.com/sebastianbergmann/phpunit/issues/1527) and [#1529](https://github.com/sebastianbergmann/phpunit/issues/1529): Allow to define options for displaying colors - -### Changed - -* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Improve message when `PHPUnit_Framework_Constraint_Count` is used with logical operators - -### Fixed - -* Merged [#1537](https://github.com/sebastianbergmann/phpunit/issues/1537): Fix problem of `--stderr` with `--tap` and `--testdox` -* Fixed [#1599](https://github.com/sebastianbergmann/phpunit/issues/1599): The PHAR build of PHPUnit no longer uses an autoloader to load PHPUnit's own classes and instead statically loads all classes on startup - -[4.6.10]: https://github.com/sebastianbergmann/phpunit/compare/4.6.9...4.6.10 -[4.6.9]: https://github.com/sebastianbergmann/phpunit/compare/4.6.8...4.6.9 -[4.6.8]: https://github.com/sebastianbergmann/phpunit/compare/4.6.7...4.6.8 -[4.6.7]: https://github.com/sebastianbergmann/phpunit/compare/4.6.6...4.6.7 -[4.6.6]: https://github.com/sebastianbergmann/phpunit/compare/4.6.5...4.6.6 -[4.6.5]: https://github.com/sebastianbergmann/phpunit/compare/4.6.4...4.6.5 -[4.6.4]: https://github.com/sebastianbergmann/phpunit/compare/4.6.3...4.6.4 -[4.6.3]: https://github.com/sebastianbergmann/phpunit/compare/4.6.2...4.6.3 -[4.6.2]: https://github.com/sebastianbergmann/phpunit/compare/4.6.1...4.6.2 -[4.6.1]: https://github.com/sebastianbergmann/phpunit/compare/4.6.0...4.6.1 -[4.6.0]: https://github.com/sebastianbergmann/phpunit/compare/4.5...4.6.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.7.md b/api/vendor/phpunit/phpunit/ChangeLog-4.7.md deleted file mode 100644 index 948c127..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.7.md +++ /dev/null @@ -1,71 +0,0 @@ -# Changes in PHPUnit 4.7 - -All notable changes of the PHPUnit 4.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.7.7] - 2015-07-13 - -New PHAR release due to updated dependencies - -## [4.7.6] - 2015-06-30 - -### Fixed - -* Fixed [#1681](https://github.com/sebastianbergmann/phpunit/issues/1681): Code Coverage filter configuration is not passed to child processes -* Fixed [#1692](https://github.com/sebastianbergmann/phpunit/issues/1692): Clean up `PHPUnit_Extensions_RepeatedTest` after refactoring -* Fixed [#1763](https://github.com/sebastianbergmann/phpunit/issues/1763): `@before` and `@after` annotations do not work when inherited - -## [4.7.5] - 2015-06-21 - -### Fixed - -* Fixed [#490](https://github.com/sebastianbergmann/phpunit/issues/490): Ensure that a test can only be one of `@small`, `@medium`, or `@large`. -* Fixed [#1704](https://github.com/sebastianbergmann/phpunit/issues/1704): Output printed during test missing when using TAP - -## [4.7.4] - 2015-06-18 - -### Changed - -* The `PHPUnit_Framework_Constraint_IsType` constraint now knows about the `real` type (which is an alias for `float`) -* Various work on compatibility with PHP 7 - -### Fixed - -* Fixed [#1749](https://github.com/sebastianbergmann/phpunit/issues/1749): `stopOnError` configuration setting does not work - -## [4.7.3] - 2015-06-11 - -### Fixed - -* Fixed [#1317](https://github.com/sebastianbergmann/phpunit/issues/1317): JUnit XML logfiles does not contain warnings -* Fixed an [issue](https://github.com/sebastianbergmann/php-code-coverage/issues/347) where the warning that no whitelist is used is displayed when it should not - -## [4.7.2] - 2015-06-06 - -New PHAR release due to updated dependencies - -## [4.7.1] - 2015-06-05 - -New PHAR release due to updated dependencies - -## [4.7.0] - 2015-06-05 - -### Added - -* Merged [#1718](https://github.com/sebastianbergmann/phpunit/issues/1718): Support for `--INI--` section in PHPT tests - -### Changed - -* Tests not annotated with `@small`, `@medium`, or `@large` are no longer treated as being annotated with `@small` -* In verbose mode, the test runner now prints information about the PHP runtime -* To be consistent with the printing of PHP runtime information, the configuration file used is only printed in verbose mode -* A warning is now printed when code coverage data is collected but no whitelist is configured - -[4.7.7]: https://github.com/sebastianbergmann/phpunit/compare/4.7.6...4.7.7 -[4.7.6]: https://github.com/sebastianbergmann/phpunit/compare/4.7.5...4.7.6 -[4.7.5]: https://github.com/sebastianbergmann/phpunit/compare/4.7.4...4.7.5 -[4.7.4]: https://github.com/sebastianbergmann/phpunit/compare/4.7.3...4.7.4 -[4.7.3]: https://github.com/sebastianbergmann/phpunit/compare/4.7.2...4.7.3 -[4.7.2]: https://github.com/sebastianbergmann/phpunit/compare/4.7.1...4.7.2 -[4.7.1]: https://github.com/sebastianbergmann/phpunit/compare/4.7.0...4.7.1 -[4.7.0]: https://github.com/sebastianbergmann/phpunit/compare/4.6...4.7.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-4.8.md b/api/vendor/phpunit/phpunit/ChangeLog-4.8.md deleted file mode 100644 index b291343..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-4.8.md +++ /dev/null @@ -1,286 +0,0 @@ -# Changes in PHPUnit 4.8 - -All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [4.8.35] - 2017-02-06 - -### Added - -* Backported the forward compatibility layer for PHPUnit 6 from PHPUnit 5 so that `PHPUnit\Framework\TestCase` can be used instead of `PHPUnit_Framework_TestCase` - -## [4.8.34] - 2017-01-26 - -* Fixed [#2447](https://github.com/sebastianbergmann/phpunit/issues/2447): Reverted backwards incompatible change to handling of boolean environment variable values specified in XML - -## [4.8.33] - 2017-01-25 - -### Fixed - -* Fixed [#1983](https://github.com/sebastianbergmann/phpunit/pull/1983): Tests with `@expectedException` annotation cannot be skipped -* Fixed [#2275](https://github.com/sebastianbergmann/phpunit/pull/2275): Invalid UTF-8 characters can lead to missing output -* Fixed [#2331](https://github.com/sebastianbergmann/phpunit/issues/2331): Boolean environment variable values specified in XML get mangled -* Fixed [#2392](https://github.com/sebastianbergmann/phpunit/issues/2392): Empty (but valid) data provider should skip the test -* Fixed [#2431](https://github.com/sebastianbergmann/phpunit/issues/2431): `assertArraySubset()` does not support `ArrayAccess` - -## [4.8.32] - 2017-01-22 - -### Fixed - -* Fixed [#2428](https://github.com/sebastianbergmann/phpunit/pull/2428): Nested arrays specificied in XML configuration file are not handled correctly - -## [4.8.31] - 2016-12-09 - -### Fixed - -* Fixed [#2384](https://github.com/sebastianbergmann/phpunit/pull/2384): Handle `PHPUnit_Framework_Exception` correctly when expecting exceptions - -## [4.8.30] - 2016-12-02 - -### Fixed - -* Fixed [#2367](https://github.com/sebastianbergmann/phpunit/pull/2367): Bug in `PHPUnit_Util_Test::parseAnnotationContent()` -* Fixed [#2375](https://github.com/sebastianbergmann/phpunit/issues/2375): Invalid regular expression for `--filter` causes PHP warning - -## [4.8.29] - 2016-11-20 - -### Changed - -* Bumped the required version of `sebastian/comparator` - -## [4.8.28] - 2016-11-14 - -### Fixed - -* Improved the fix for [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr` - -## [4.8.27] - 2016-07-21 - -### Fixed - -* Fixed [#1968](https://github.com/sebastianbergmann/phpunit/issues/1968): Invalid data sets are not handled correctly for `@testWith` annotation - -## [4.8.26] - 2016-05-17 - -### Fixed - -* Fixed [phpunit-mock-objects/#301](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/301): `PHPUnit_Framework_MockObject_MockBuilder::getMock()` calls `PHPUnit_Framework_TestCase::getMock()` with more arguments than accepted - -## [4.8.25] - 2016-05-10 - -### Fixed - -* Fixed [#2112](https://github.com/sebastianbergmann/phpunit/issues/2112): Output is html entity encoded when ran through `phpdbg` -* Fixed [#2158](https://github.com/sebastianbergmann/phpunit/issues/2158): Failure to run tests in separate processes if a file included into main process contains constant definition - -## [4.8.24] - 2016-03-14 - -### Fixed - -* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly -* Fixed [#2039](https://github.com/sebastianbergmann/phpunit/issues/2039): TestDox does not handle snake_case test methods properly -* Fixed [#2109](https://github.com/sebastianbergmann/phpunit/issues/2109): Process isolation leaks global variable - -## [4.8.23] - 2016-02-11 - -### Fixed - -* Fixed [#2072](https://github.com/sebastianbergmann/phpunit/issues/2072): Paths in XML configuration file were not handled correctly when they have whitespace around them - -## [4.8.22] - 2016-02-02 - -### Fixed - -* Fixed [#2050](https://github.com/sebastianbergmann/phpunit/issues/2050): `PHPUnit_Util_XML::load()` raises exception with empty message when XML string is empty -* Fixed a bug in `PHPUnit_Runner_Version::series()` - -## [4.8.21] - 2015-12-12 - -### Changed - -* Reverted the changes introduced in PHPUnit 4.8.20 as the only thing the new version constraint in `composer.json` achieved was locking PHP 7 users to PHPUnit 4.8.19 - -## [4.8.20] - 2015-12-10 - -### Changed - -* Changed PHP version constraint in `composer.json` to prevent installing PHPUnit 4.8 on PHP 7 -* `phpunit.phar` will now refuse to work on PHP 7 - -## [4.8.19] - 2015-11-30 - -### Fixed - -* Fixed [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr` - -## [4.8.18] - 2015-11-11 - -### Changed - -* DbUnit 1.4 is bundled again in the PHAR distribution - -## [4.8.17] - 2015-11-10 - -### Fixed - -* Fixed [#1935](https://github.com/sebastianbergmann/phpunit/issues/1935): `PHP_CodeCoverage_Exception` not handled properly -* Fixed [#1948](https://github.com/sebastianbergmann/phpunit/issues/1948): Unable to use PHAR due to unsupported signature error - -### Changed - -* DbUnit >= 2.0.2 is now bundled in the PHAR distribution - -## [4.8.16] - 2015-10-23 - -### Added - -* Implemented [#1925](https://github.com/sebastianbergmann/phpunit/issues/1925): Provide a library-only PHAR - -## [4.8.15] - 2015-10-22 - -### Fixed - -* The backup of global state is now properly restored when changes to global state are disallowed -* The `__PHPUNIT_PHAR__` constant is now properly set when the PHPUnit PHAR is used as a library - -## [4.8.14] - 2015-10-17 - -### Fixed - -* Fixed [#1892](https://github.com/sebastianbergmann/phpunit/issues/1892): `--coverage-text` does not honor color settings - -## [4.8.13] - 2015-10-14 - -### Added - -* Added the `--self-upgrade` commandline switch for upgrading a PHPUnit PHAR to the latest version - -### Changed - -* The `--self-update` commandline switch now updates a PHPUnit PHAR to the latest version within the same release series - -## [4.8.12] - 2015-10-12 - -### Changed - -* Merged [#1893](https://github.com/sebastianbergmann/phpunit/issues/1893): Removed workaround for phpab bug - -## [4.8.11] - 2015-10-07 - -### Fixed - -* Merged [#1885](https://github.com/sebastianbergmann/phpunit/issues/1885): Fixed handling of PHP configuration settings for process isolation -* Fixed [#1857](https://github.com/sebastianbergmann/phpunit/issues/1857): `@covers` and `@uses` should only take a single word -* Fixed [#1879](https://github.com/sebastianbergmann/phpunit/issues/1879): `assertEqualXMLStructure()` cannot compare nodes with an ID -* Fixed [#1898](https://github.com/sebastianbergmann/phpunit/issues/1898): `@covers` and `@uses` cannot be used for namespaced functions -* Fixed [#1901](https://github.com/sebastianbergmann/phpunit/issues/1901): `--self-update` updates to PHPUnit 5, even on PHP < 5.6 - -## [4.8.10] - 2015-10-01 - -### Fixed - -* Merged [#1884](https://github.com/sebastianbergmann/phpunit/issues/1884): Avoid passing `Error` to `onNotSuccessfulTest()` on PHP 7 - -## [4.8.9] - 2015-09-20 - -### Fixed - -* Fixed regression introduced in PHPUnit 4.8.8 - -## [4.8.8] - 2015-09-19 - -### Fixed - -* Fixed [#1860](https://github.com/sebastianbergmann/phpunit/issues/1860): Not well-formed XML strings are always considered equal by `PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString()` - -## [4.8.7] - 2015-09-14 - -New PHAR release due to updated dependencies - -## [4.8.6] - 2015-08-24 - -### Fixed - -* Fixed [#1835](https://github.com/sebastianbergmann/phpunit/issues/1835): Skipped test reported as errored since PHPUnit 4.7.4 - -## [4.8.5] - 2015-08-19 - -### Fixed - -* Fixed [#1831](https://github.com/sebastianbergmann/phpunit/issues/1831): PHAR manifest is missing - -## [4.8.4] - 2015-08-15 - -### Fixed - -* Fixed [#1823](https://github.com/sebastianbergmann/phpunit/issues/1823): Columns attribute in XML configuration file is ignored - -## [4.8.3] - 2015-08-10 - -### Changed - -* PHPUnit now exits early during bootstrap when an unsupported version of PHP is used - -## [4.8.2] - 2015-08-07 - -### Fixed - -* Fixed [#1816](https://github.com/sebastianbergmann/phpunit/issues/1816): PHPUnit 4.8.1 shows "4.8.0" as version number - -## [4.8.1] - 2015-08-07 - -### Fixed - -* Fixed [#1815](https://github.com/sebastianbergmann/phpunit/issues/1815): `phpunit --self-update` does not work in PHPUnit 4.8.0 - -## [4.8.0] - 2015-08-07 - -### Added - -* Added `--check-version` commandline switch to check whether the current version of PHPUnit is used (PHAR only) -* Added `--no-coverage` commandline switch to ignore code coverage configuration from the configuration file -* Implemented [#1663](https://github.com/sebastianbergmann/phpunit/issues/1663): The Crap4J report's threshold is now configurable -* Merged [#1728](https://github.com/sebastianbergmann/phpunit/issues/1728): Implemented the `@testWith` annotation as "syntactic sugar" for data providers -* Merged [#1739](https://github.com/sebastianbergmann/phpunit/issues/1739): Added support to the commandline test runner for using options after arguments - -### Changed - -* Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808) -* Changed the name of the default group from `__nogroup__` to `default` - -[4.8.35]: https://github.com/sebastianbergmann/phpunit/compare/4.8.34...4.8.35 -[4.8.34]: https://github.com/sebastianbergmann/phpunit/compare/4.8.33...4.8.34 -[4.8.33]: https://github.com/sebastianbergmann/phpunit/compare/4.8.32...4.8.33 -[4.8.32]: https://github.com/sebastianbergmann/phpunit/compare/4.8.31...4.8.32 -[4.8.31]: https://github.com/sebastianbergmann/phpunit/compare/4.8.30...4.8.31 -[4.8.30]: https://github.com/sebastianbergmann/phpunit/compare/4.8.29...4.8.30 -[4.8.29]: https://github.com/sebastianbergmann/phpunit/compare/4.8.28...4.8.29 -[4.8.28]: https://github.com/sebastianbergmann/phpunit/compare/4.8.27...4.8.28 -[4.8.27]: https://github.com/sebastianbergmann/phpunit/compare/4.8.26...4.8.27 -[4.8.26]: https://github.com/sebastianbergmann/phpunit/compare/4.8.25...4.8.26 -[4.8.25]: https://github.com/sebastianbergmann/phpunit/compare/4.8.24...4.8.25 -[4.8.24]: https://github.com/sebastianbergmann/phpunit/compare/4.8.23...4.8.24 -[4.8.23]: https://github.com/sebastianbergmann/phpunit/compare/4.8.22...4.8.23 -[4.8.22]: https://github.com/sebastianbergmann/phpunit/compare/4.8.21...4.8.22 -[4.8.21]: https://github.com/sebastianbergmann/phpunit/compare/4.8.20...4.8.21 -[4.8.20]: https://github.com/sebastianbergmann/phpunit/compare/4.8.19...4.8.20 -[4.8.19]: https://github.com/sebastianbergmann/phpunit/compare/4.8.18...4.8.19 -[4.8.18]: https://github.com/sebastianbergmann/phpunit/compare/4.8.17...4.8.18 -[4.8.17]: https://github.com/sebastianbergmann/phpunit/compare/4.8.16...4.8.17 -[4.8.16]: https://github.com/sebastianbergmann/phpunit/compare/4.8.15...4.8.16 -[4.8.15]: https://github.com/sebastianbergmann/phpunit/compare/4.8.14...4.8.15 -[4.8.14]: https://github.com/sebastianbergmann/phpunit/compare/4.8.13...4.8.14 -[4.8.13]: https://github.com/sebastianbergmann/phpunit/compare/4.8.12...4.8.13 -[4.8.12]: https://github.com/sebastianbergmann/phpunit/compare/4.8.11...4.8.12 -[4.8.11]: https://github.com/sebastianbergmann/phpunit/compare/4.8.10...4.8.11 -[4.8.10]: https://github.com/sebastianbergmann/phpunit/compare/4.8.9...4.8.10 -[4.8.9]: https://github.com/sebastianbergmann/phpunit/compare/4.8.8...4.8.9 -[4.8.8]: https://github.com/sebastianbergmann/phpunit/compare/4.8.7...4.8.8 -[4.8.7]: https://github.com/sebastianbergmann/phpunit/compare/4.8.6...4.8.7 -[4.8.6]: https://github.com/sebastianbergmann/phpunit/compare/4.8.5...4.8.6 -[4.8.5]: https://github.com/sebastianbergmann/phpunit/compare/4.8.4...4.8.5 -[4.8.4]: https://github.com/sebastianbergmann/phpunit/compare/4.8.3...4.8.4 -[4.8.3]: https://github.com/sebastianbergmann/phpunit/compare/4.8.2...4.8.3 -[4.8.2]: https://github.com/sebastianbergmann/phpunit/compare/4.8.1...4.8.2 -[4.8.1]: https://github.com/sebastianbergmann/phpunit/compare/4.8.0...4.8.1 -[4.8.0]: https://github.com/sebastianbergmann/phpunit/compare/4.7...4.8.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.0.md b/api/vendor/phpunit/phpunit/ChangeLog-5.0.md deleted file mode 100644 index 129b4c6..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.0.md +++ /dev/null @@ -1,128 +0,0 @@ -# Changes in PHPUnit 5.0 - -All notable changes of the PHPUnit 5.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.0.10] - 2015-11-30 - -### Fixed - -* Fixed [#1953](https://github.com/sebastianbergmann/phpunit/issues/1953): `Error`s raised outside the scope of a test method are not handled properly -* Fixed [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr` - -## [5.0.9] - 2015-11-10 - -### Added - -* Merged [#1909](https://github.com/sebastianbergmann/phpunit/issues/1909): Added `flowId` parameter to each TeamCity message (for parallel tests) - -### Fixed - -* Fixed [#1935](https://github.com/sebastianbergmann/phpunit/issues/1935): `PHP_CodeCoverage_Exception` not handled properly -* Fixed [#1944](https://github.com/sebastianbergmann/phpunit/issues/1944): Exceptions are not handled correctly on PHP 7 when an exception is expected -* Fixed [#1948](https://github.com/sebastianbergmann/phpunit/issues/1948): Unable to use PHAR due to unsupported signature error - -### Removed - -* Removed leftover references to PHPUnit_Selenium - -## [5.0.8] - 2015-10-23 - -### Added - -* Implemented [#1925](https://github.com/sebastianbergmann/phpunit/issues/1925): Provide a library-only PHAR - -## [5.0.7] - 2015-10-22 - -### Fixed - -* The backup of global state is now properly restored when changes to global state are disallowed -* The `__PHPUNIT_PHAR__` constant is now properly set when the PHPUnit PHAR is used as a library - -## [5.0.6] - 2015-10-14 - -### Added - -* Added the `--self-upgrade` commandline switch for upgrading a PHPUnit PHAR to the latest version - -### Changed - -* The `--self-update` commandline switch now updates a PHPUnit PHAR to the latest version within the same release series - -### Fixed - -* Fixed [#1892](https://github.com/sebastianbergmann/phpunit/issues/1892): `--coverage-text` does not honor color settings - -## [5.0.5] - 2015-10-12 - -### Changed - -* Merged [#1893](https://github.com/sebastianbergmann/phpunit/issues/1893): Removed workaround for phpab bug - -## [5.0.4] - 2015-10-07 - -### Fixed - -* Fixed [#1857](https://github.com/sebastianbergmann/phpunit/issues/1857): `@covers` and `@uses` should only take a single word -* Fixed [#1898](https://github.com/sebastianbergmann/phpunit/issues/1898): `@covers` and `@uses` cannot be used for namespaced functions - -## [5.0.3] - 2015-10-02 - -* Fixed check for PHP version in PHAR distribution of PHPUnit - -## [5.0.2] - 2015-10-02 - -### Fixed - -* Fixed [#1879](https://github.com/sebastianbergmann/phpunit/issues/1879): `assertEqualXMLStructure()` cannot compare nodes with an ID -* Fixed [#1887](https://github.com/sebastianbergmann/phpunit/issues/1887): PHAR distribution of PHPUnit 5.0.1 does not work - -## [5.0.1] - 2015-10-02 - -### Fixed - -* Merged [#1885](https://github.com/sebastianbergmann/phpunit/issues/1885): Fixed handling of PHP configuration settings for process isolation -* An outdated version of DbUnit was bundled in the PHAR distribution of PHPUnit - -## [5.0.0] - 2015-10-02 - -### Added - -* Implemented [#1604](https://github.com/sebastianbergmann/phpunit/issues/1604): A `@small` test should be marked as risky when it executes code that performs I/O operations -* Implemented [#1656](https://github.com/sebastianbergmann/phpunit/issues/1656): Allow sorting test failures in reverse -* Merged [#1753](https://github.com/sebastianbergmann/phpunit/issues/1753): Added the `assertFinite()`, `assertInfinite()` and `assertNan()` assertions -* Merged [#1876](https://github.com/sebastianbergmann/phpunit/issues/1876): Added the `--atleast-version` commandline option -* Implemented [#1780](https://github.com/sebastianbergmann/phpunit/issues/1780): Support for deep-cloning of results passed between tests using `@depends` -* Implemented [#1821](https://github.com/sebastianbergmann/phpunit/issues/1821): Expectations on mock objects passed via `@depends` are now also evaluated for the depending test -* Added `--whitelist` commandline option to configure a whitelist for code coverage analysis -* Added convenience wrapper `getMockWithoutInvokingTheOriginalConstructor()` to create a test double without invoking the original class' constructor -* Added TeamCity test result logger for more seamless integration of PHPUnit with PhpStorm - -### Changed - -* Merged [#1781](https://github.com/sebastianbergmann/phpunit/issues/1781): Empty string is not treated as a valid JSON string anymore -* Merged [#1822](https://github.com/sebastianbergmann/phpunit/issues/1822): Always output progress totals on last line -* It is now mandatory to configure a whitelist for code coverage analysis -* Renamed the `beStrictAboutTestSize` configuration option to `enforceTimeLimit` -* Printer-related CLI options now override printer-related configuration settings - -### Removed - -* The `assertSelectCount()`, `assertSelectRegExp()`, `assertSelectEquals()`, `assertTag()`, `assertNotTag()` assertions have been removed -* The `--strict` commandline option and the XML configuration's `strict` attribute have been removed -* The code coverage blacklist functionality has been removed -* The PHPUnit_Selenium component is no longer bundled in the PHAR distribution -* The PHPUnit_Selenium component can no longer be configured using the `` element of PHPUnit's configuration file -* PHPUnit is no longer supported on PHP 5.3, PHP 5.4, and PHP 5.5 - -[5.0.10]: https://github.com/sebastianbergmann/phpunit/compare/5.0.9...5.0.10 -[5.0.9]: https://github.com/sebastianbergmann/phpunit/compare/5.0.8...5.0.9 -[5.0.8]: https://github.com/sebastianbergmann/phpunit/compare/5.0.7...5.0.8 -[5.0.7]: https://github.com/sebastianbergmann/phpunit/compare/5.0.6...5.0.7 -[5.0.6]: https://github.com/sebastianbergmann/phpunit/compare/5.0.5...5.0.6 -[5.0.5]: https://github.com/sebastianbergmann/phpunit/compare/5.0.4...5.0.5 -[5.0.4]: https://github.com/sebastianbergmann/phpunit/compare/5.0.3...5.0.4 -[5.0.3]: https://github.com/sebastianbergmann/phpunit/compare/5.0.2...5.0.3 -[5.0.2]: https://github.com/sebastianbergmann/phpunit/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/phpunit/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/phpunit/compare/4.8...5.0.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.1.md b/api/vendor/phpunit/phpunit/ChangeLog-5.1.md deleted file mode 100644 index 9a6a6f9..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.1.md +++ /dev/null @@ -1,68 +0,0 @@ -# Changes in PHPUnit 5.1 - -All notable changes of the PHPUnit 5.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.1.7] - 2016-02-02 - -### Fixed - -* Fixed [#2050](https://github.com/sebastianbergmann/phpunit/issues/2050): `PHPUnit_Util_XML::load()` raises exception with empty message when XML string is empty - -## [5.1.6] - 2016-01-29 - -### Fixed - -* Fixed [#2052](https://github.com/sebastianbergmann/phpunit/issues/2052): PHPUnit 5.1.5 breaks coverage whitelist include directory globbing - -## [5.1.5] - 2016-01-29 - -### Fixed - -* An exception is now raised when non-existant directories or files are to be added to the code coverage whitelist -* Fixed a bug in `PHPUnit_Runner_Version::series()` - -## [5.1.4] - 2016-01-11 - -### Fixed - -* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly - -### Fixed - -## [5.1.3] - 2015-12-10 - -### Added - -* Added support for `Throwable` to `PHPUnit_Framework_TestCase::throwsException()` - -## [5.1.2] - 2015-12-07 - -### Fixed - -* Fixed a backwards compatibility break related to the execution order of `@before` and `setUp()` introduced in PHPUnit 5.1.0 - -## [5.1.1] - 2015-12-07 - -### Fixed - -* Fixed a backwards compatibility break in the `PHPUnit_Framework_TestListener` interface introduced in PHPUnit 5.1.0 - -## [5.1.0] - 2015-12-04 - -### Added - -* Implemented [#1802](https://github.com/sebastianbergmann/phpunit/issues/1802): Refactor how PHPUnit emits warnings (such as `No tests found in class "Test"`) -* Merged [#1824](https://github.com/sebastianbergmann/phpunit/issues/1824): Added support for the `--CLEAN--` and `--EXPECTREGEX--` sections for PHPT test cases -* Merged [#1825](https://github.com/sebastianbergmann/phpunit/issues/1825): Redirect STDERR to STDOUT when running PHPT test cases -* Merged [#1871](https://github.com/sebastianbergmann/phpunit/issues/1871): Added support for `@testdox` annotations on classes -* Merged [#1917](https://github.com/sebastianbergmann/phpunit/issues/1917): Allow `@coversDefaultClass` annotation to work on traits - -[5.1.7]: https://github.com/sebastianbergmann/phpunit/compare/5.1.6...5.1.7 -[5.1.6]: https://github.com/sebastianbergmann/phpunit/compare/5.1.5...5.1.6 -[5.1.5]: https://github.com/sebastianbergmann/phpunit/compare/5.1.4...5.1.5 -[5.1.4]: https://github.com/sebastianbergmann/phpunit/compare/5.1.3...5.1.4 -[5.1.3]: https://github.com/sebastianbergmann/phpunit/compare/5.1.2...5.1.3 -[5.1.2]: https://github.com/sebastianbergmann/phpunit/compare/5.1.1...5.1.2 -[5.1.1]: https://github.com/sebastianbergmann/phpunit/compare/5.1.0...5.1.1 -[5.1.0]: https://github.com/sebastianbergmann/phpunit/compare/5.0...5.1.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.2.md b/api/vendor/phpunit/phpunit/ChangeLog-5.2.md deleted file mode 100644 index 01f0d24..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.2.md +++ /dev/null @@ -1,117 +0,0 @@ -# Changes in PHPUnit 5.2 - -All notable changes of the PHPUnit 5.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.2.12] - 2016-03-15 - -### Fixed - -* Fixed [#2112](https://github.com/sebastianbergmann/phpunit/issues/2112): Output is html entity encoded when ran through `phpdbg` -* Fixed [#2118](https://github.com/sebastianbergmann/phpunit/issues/2118): Prophecy integration does not work on PHP 7 - -## [5.2.11] - 2016-03-14 - -### Fixed - -* Fixed [#2094](https://github.com/sebastianbergmann/phpunit/issues/2094): Missing argument for `PHPUnit_TextUI_TestRunner::run()` -* Fixed [#2109](https://github.com/sebastianbergmann/phpunit/issues/2109): Process isolation leaks global variable - -## [5.2.10] - 2016-03-03 - -### Fixed - -* Fixed [#2039](https://github.com/sebastianbergmann/phpunit/issues/2039): TestDox does not handle snake_case test methods properly -* Fixed a bug that caused no code coverage to be generated for tests that execute custom comparators - -## [5.2.9] - 2016-02-19 - -### Changed - -* Improved the TestDox HTML report - -### Fixed - -* Fixed [#2083](https://github.com/sebastianbergmann/phpunit/issues/2083): Restored backwards compatibility in deprecated `setExpectedException()` method - -## [5.2.8] - 2016-02-18 - -### Changed - -* Updated dependency information in `composer.json` - -## [5.2.7] - 2016-02-18 - -### Changed - -* Improved the typography of the TestDox HTML report - -## [5.2.6] - 2016-02-16 - -### Fixed - -* `PHPUnit_Framework_InvalidCoversTargetException` is now properly handled and results in a warning - -## [5.2.5] - 2016-02-13 - -### Fixed - -* Fixed [#2076](https://github.com/sebastianbergmann/phpunit/issues/2076): Code of custom comparators should not result in a test being marked as risky when PHPUnit is strict about @covers annotation usage - -## [5.2.4] - 2016-02-11 - -### Fixed - -* Fixed [#2072](https://github.com/sebastianbergmann/phpunit/issues/2072): Paths in XML configuration file were not handled correctly when they have whitespace around them - -## [5.2.3] - 2016-02-08 - -### Removed - -* Removed the implementation of [#1899](https://github.com/sebastianbergmann/phpunit/issues/1899) due to a [bug](https://github.com/sebastianbergmann/php-code-coverage/issues/420) in PHP_CodeCoverage - -## [5.2.2] - 2016-02-07 - -### Removed - -* Removed the implementation of [#1902](https://github.com/sebastianbergmann/phpunit/issues/1902) due to [#2042](https://github.com/sebastianbergmann/phpunit/issues/2042) - -## [5.2.1] - 2016-02-05 - -### Fixed - -* Fixed [#2060](https://github.com/sebastianbergmann/phpunit/issues/2060): Allow usage of `sebastian/version` in version 1 - -## [5.2.0] - 2016-02-05 - -### Added - -* Implemented [#1899](https://github.com/sebastianbergmann/phpunit/issues/1899): Mark a test as risky that does not execute the code it wants to test -* Implemented [#1902](https://github.com/sebastianbergmann/phpunit/issues/1902): Mark a test as risky when it performs an assertion on a test double -* Implemented [#1905](https://github.com/sebastianbergmann/phpunit/issues/1905): Add `--fail-on-risky` and `--fail-on-warning` commandline options as well as `failOnRisky` and `failOnWarning` configuration options -* Implemented [#1912](https://github.com/sebastianbergmann/phpunit/issues/1912): Add support for specifying the extension version with the `@requires` annotation -* Implemented [#1977](https://github.com/sebastianbergmann/phpunit/issues/1977): Add support for disabling annotations that control the ignoring of code coverage -* Added `PHPUnit_Framework_TestCase::expectException()`, `PHPUnit_Framework_TestCase::expectExceptionCode()`, `PHPUnit_Framework_TestCase::expectExceptionMessage()`, and `PHPUnit_Framework_TestCase::expectExceptionMessageRegExp()` for programmatically setting expectations for exceptions - -### Changed - -* Deprecated `PHPUnit_Framework_TestCase::setExpectedException()` -* Deprecated the `checkForUnintentionallyCoveredCode` configuration setting (use `beStrictAboutCoversAnnotation` instead) - -### Removed - -* The `mapTestClassNameToCoveredClassName` configuration setting has been removed - -[5.2.12]: https://github.com/sebastianbergmann/phpunit/compare/5.2.11...5.2.12 -[5.2.11]: https://github.com/sebastianbergmann/phpunit/compare/5.2.10...5.2.11 -[5.2.10]: https://github.com/sebastianbergmann/phpunit/compare/5.2.9...5.2.10 -[5.2.9]: https://github.com/sebastianbergmann/phpunit/compare/5.2.8...5.2.9 -[5.2.8]: https://github.com/sebastianbergmann/phpunit/compare/5.2.7...5.2.8 -[5.2.7]: https://github.com/sebastianbergmann/phpunit/compare/5.2.6...5.2.7 -[5.2.6]: https://github.com/sebastianbergmann/phpunit/compare/5.2.5...5.2.6 -[5.2.5]: https://github.com/sebastianbergmann/phpunit/compare/5.2.4...5.2.5 -[5.2.4]: https://github.com/sebastianbergmann/phpunit/compare/5.2.3...5.2.4 -[5.2.3]: https://github.com/sebastianbergmann/phpunit/compare/5.2.2...5.2.3 -[5.2.2]: https://github.com/sebastianbergmann/phpunit/compare/5.2.1...5.2.2 -[5.2.1]: https://github.com/sebastianbergmann/phpunit/compare/5.2.0...5.2.1 -[5.2.0]: https://github.com/sebastianbergmann/phpunit/compare/5.1...5.2.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.3.md b/api/vendor/phpunit/phpunit/ChangeLog-5.3.md deleted file mode 100644 index 87c657b..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.3.md +++ /dev/null @@ -1,55 +0,0 @@ -# Changes in PHPUnit 5.3 - -All notable changes of the PHPUnit 5.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.3.5] - 2016-06-03 - -### Fixed - -* Fixed [phpunit-mock-objects/#308](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/308): Make sure that PHPUnit 5.3 does not pull in PHPUnit 5.4 dependencies - -## [5.3.4] - 2016-05-11 - -### Changed - -* The checks that can be enabled by `--strict-coverage` and `beStrictAboutCoversAnnotation` are no longer performed for tests annotated with `@medium` or `@large` - -## [5.3.3] - 2016-05-10 - -### Fixed - -* Fixed [#2158](https://github.com/sebastianbergmann/phpunit/issues/2158): Failure to run tests in separate processes if a file included into main process contains constant definition - -## [5.3.2] - 2016-04-12 - -### Fixed - -* Fixed [#2134](https://github.com/sebastianbergmann/phpunit/issues/2134): Failures are not shown when there are warnings -* Fixed [phpunit-mock-objects/#301](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/301): `PHPUnit_Framework_MockObject_MockBuilder::getMock()` calls `PHPUnit_Framework_TestCase::getMock()` with more arguments than accepted - -## [5.3.1] - 2016-04-07 - -### Fixed - -* Fixed [#2128](https://github.com/sebastianbergmann/phpunit/issues/2128): PHPUnit 5.3 50% slower than PHPUnit 5.2 (when using large data sets with `@dataProvider`) - -## [5.3.0] - 2016-04-01 - -### Added - -* Implemented [#1984](https://github.com/sebastianbergmann/phpunit/issues/1984): Support for comparison operators to `@requires` annotation -* Added `--generate-configuration` option to generate an XML configuration file with suggested settings - -### Changed - -* In strict coverage mode, a test will now be marked as risky when it does not have a `@covers` annotation but is supposed to have one -* The passing of test doubles from one test to another has been improved -* Implemented [phpunit-mock-objects/#296](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/296): Trigger an error when final or private method is configured on a test double - -[5.3.5]: https://github.com/sebastianbergmann/phpunit/compare/5.3.4...5.3.5 -[5.3.4]: https://github.com/sebastianbergmann/phpunit/compare/5.3.3...5.3.4 -[5.3.3]: https://github.com/sebastianbergmann/phpunit/compare/5.3.2...5.3.3 -[5.3.2]: https://github.com/sebastianbergmann/phpunit/compare/5.3.1...5.3.2 -[5.3.1]: https://github.com/sebastianbergmann/phpunit/compare/5.3.0...5.3.1 -[5.3.0]: https://github.com/sebastianbergmann/phpunit/compare/5.2...5.3.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.4.md b/api/vendor/phpunit/phpunit/ChangeLog-5.4.md deleted file mode 100644 index dfbc9e2..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.4.md +++ /dev/null @@ -1,84 +0,0 @@ -# Changes in PHPUnit 5.4 - -All notable changes of the PHPUnit 5.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.4.8] - 2016-07-26 - -### Changed - -* Bumped required version of `phpunit/php-code-coverage` to `4.0.1` - -## [5.4.7] - 2016-07-21 - -### Fixed - -* Fixed [#1968](https://github.com/sebastianbergmann/phpunit/issues/1968): Invalid data sets are not handled correctly for `@testWith` annotation -* Fixed [#2200](https://github.com/sebastianbergmann/phpunit/issues/2200): No warnings when test runs in separate process -* Fixed [#2221](https://github.com/sebastianbergmann/phpunit/issues/2221): `expectException()` accepts non-string argument - -## [5.4.6] - 2016-06-16 - -### Fixed - -* Fixed [#2219](https://github.com/sebastianbergmann/phpunit/issues/2219): PHAR does not contain all dependencies - -## [5.4.5] - 2016-06-15 - -### Fixed - -* Fixed [#2181](https://github.com/sebastianbergmann/phpunit/issues/2181): Use `setlocale()` with `0` as second argument to not affect current setting -* Fixed [#2211](https://github.com/sebastianbergmann/phpunit/issues/2211): Correctly handle paths to PHP binary that contain spaces (`C:\Program Files`) on Microsoft Windows - -## [5.4.4] - 2016-06-09 - -### Fixed - -* Blacklisted phpdocumentor/reflection-docblock 3.0.2 due to https://github.com/phpDocumentor/ReflectionDocBlock/pull/77 - -## [5.4.3] - 2016-06-09 - -### Changed - -* Renamed `phpunit\framework\TestCase` to `PHPUnit\Framework\TestCase` - -## [5.4.2] - 2016-06-03 - -### Fixed - -* Reverted the JUnit XML logfile format change to restore backward compatibility - -## [5.4.1] - 2016-06-03 - -### Fixed - -* Fixed [#2186](https://github.com/sebastianbergmann/phpunit/issues/2186): `PHPUnit_Framework_TestCase::getMockBuilder()` should be `public`, not `protected` - -## [5.4.0] - 2016-06-03 - -### Added - -* Implemented [#2037](https://github.com/sebastianbergmann/phpunit/issues/2037): Log more information about failures in JSON output -* Implemented [#2152](https://github.com/sebastianbergmann/phpunit/issues/2152): Filter for which tests TestDox output is generated -* Added the `PHPUnit\Framework\TestCase::createMock()` method for creating test doubles using best practice defaults -* Added `registerMockObjectsFromTestArgumentsRecursively` configuration directive for optionally registering mock objects from test arguments recursively -* Added support for the `ENV`, `STDIN`, `ARGS`, `FILEEOF`, `FILE_EXTERNAL`, `EXPECT_EXTERNAL`, `EXPECTF_EXTERNAL`, `EXPECTREGEX_EXTERNAL`, and `XFAIL` sections to PHPT test runner -* Added TestDox XML logger -* Added `phpunit\framework\TestCase` as an alias for `PHPUnit_Framework_TestCase` for forward compatibility - -### Changed - -* The `PHPUnit_Framework_TestCase::getMock()` method has been deprecated. Please use `PHPUnit_Framework_TestCase::createMock()` or `PHPUnit_Framework_TestCase::getMockBuilder()` instead. -* The `PHPUnit_Framework_TestCase::getMockWithoutInvokingTheOriginalConstructor()` method has been deprecated. Please use `PHPUnit_Framework_TestCase::createMock()` instead. -* The logfile format generated using the `--log-junit` option and the `` configuration directive has been updated to match the [current format used by JUnit](http://llg.cubic.org/docs/junit/). Due to this change you may need to update how your continuous integration server processes test result logfiles generated by PHPUnit. -* The methods `PHPUnit_Framework_TestCase::getMockBuilder()`, `PHPUnit_Framework_TestCase::createTestDouble()`, `PHPUnit_Framework_TestCase::getMock()`, `PHPUnit_Framework_TestCase::getMockWithoutInvokingTheOriginalConstructor()`, `PHPUnit_Framework_TestCase::getMockForAbstractClass()` and `PHPUnit_Framework_TestCase::getMockForTrait()` are now protected (they were public before). - -[5.4.8]: https://github.com/sebastianbergmann/phpunit/compare/5.4.7...5.4.8 -[5.4.7]: https://github.com/sebastianbergmann/phpunit/compare/5.4.6...5.4.7 -[5.4.6]: https://github.com/sebastianbergmann/phpunit/compare/5.4.5...5.4.6 -[5.4.5]: https://github.com/sebastianbergmann/phpunit/compare/5.4.4...5.4.5 -[5.4.4]: https://github.com/sebastianbergmann/phpunit/compare/5.4.3...5.4.4 -[5.4.3]: https://github.com/sebastianbergmann/phpunit/compare/5.4.2...5.4.3 -[5.4.2]: https://github.com/sebastianbergmann/phpunit/compare/5.4.1...5.4.2 -[5.4.1]: https://github.com/sebastianbergmann/phpunit/compare/5.4.0...5.4.1 -[5.4.0]: https://github.com/sebastianbergmann/phpunit/compare/5.3...5.4.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.5.md b/api/vendor/phpunit/phpunit/ChangeLog-5.5.md deleted file mode 100644 index 841bdb6..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.5.md +++ /dev/null @@ -1,74 +0,0 @@ -# Changes in PHPUnit 5.5 - -All notable changes of the PHPUnit 5.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.5.7] - 2016-10-03 - -### Changed - -* Reverted [#2300](https://github.com/sebastianbergmann/phpunit/issues/2300): Exclude tests from package distribution - -## [5.5.6] - 2016-10-03 - -### Changed - -* Implemented [#2300](https://github.com/sebastianbergmann/phpunit/issues/2300): Exclude tests from package distribution - -### Fixed - -* Fixed [#2261](https://github.com/sebastianbergmann/phpunit/issues/2261): Invalid test listener configuration leads to confusing behavior -* Fixed [#2309](https://github.com/sebastianbergmann/phpunit/pull/2309): `PHPUnit\Framework\TestCase` is not declared `abstract` - -## [5.5.5] - 2016-09-21 - -### Fixed - -* Fixed [#2101](https://github.com/sebastianbergmann/phpunit/issues/2101): Output Buffer Level consumption prevents custom output buffers from working - -## [5.5.4] - 2016-08-26 - -New release of PHPUnit as PHAR with updated dependencies - -## [5.5.3] - 2016-08-25 - -### Fixed - -* Fixed [#2270](https://github.com/sebastianbergmann/phpunit/pull/2270): Allow `createPartialMock()` to not mock any methods - -## [5.5.2] - 2016-08-18 - -### Changed - -* The JUnit logger no longer uses `` elements when the `logIncompleteSkipped` configuration option is set to `false` (default) - -### Fixed - -* Restored the `logIncompleteSkipped` configuration option for the JUnit logger that got lost in PHPUnit 5.4.2 - -## [5.5.1] - 2016-08-17 - -### Fixed - -* Fixed [#1961](https://github.com/sebastianbergmann/phpunit/issues/1961): XSD schema in 5.x does not validate -* Incorrect warning about missing `@covers` annotation is no longer shown when `@coversNothing` is used together with `forceCoversAnnotation=true` - -## [5.5.0] - 2016-08-05 - -### Added - -* Added the `PHPUnit\Framework\TestCase::createPartialMock()` method for creating partial test doubles using best practice defaults -* Merged [#2203](https://github.com/sebastianbergmann/phpunit/pull/2203): Ability to `--list-suites` for a given configuration - -### Changed - -* An `AssertionError` raised by an `assert()` in the tested code now causes the test to be interpreted as a failure instead of an error - -[5.5.7]: https://github.com/sebastianbergmann/phpunit/compare/5.5.6...5.5.7 -[5.5.6]: https://github.com/sebastianbergmann/phpunit/compare/5.5.5...5.5.6 -[5.5.5]: https://github.com/sebastianbergmann/phpunit/compare/5.5.4...5.5.5 -[5.5.4]: https://github.com/sebastianbergmann/phpunit/compare/5.5.3...5.5.4 -[5.5.3]: https://github.com/sebastianbergmann/phpunit/compare/5.5.2...5.5.3 -[5.5.2]: https://github.com/sebastianbergmann/phpunit/compare/5.5.1...5.5.2 -[5.5.1]: https://github.com/sebastianbergmann/phpunit/compare/5.5.0...5.5.1 -[5.5.0]: https://github.com/sebastianbergmann/phpunit/compare/5.4...5.5.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.6.md b/api/vendor/phpunit/phpunit/ChangeLog-5.6.md deleted file mode 100644 index 213ee51..0000000 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.6.md +++ /dev/null @@ -1,79 +0,0 @@ -# Changes in PHPUnit 5.6 - -All notable changes of the PHPUnit 5.6 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.6.8] - 2016-12-02 - -### Fixed - -* Fixed [#1976](https://github.com/sebastianbergmann/phpunit/issues/1976): `str_repeat()` error when using lowest dependencies - -## [5.6.7] - 2016-11-28 - -### Changed - -* The logic for not performing the check for unintentionally covered code on `@medium` and `@large` tests has been moved to `php-code-coverage` - -## [5.6.6] - 2016-11-28 - -### Fixed - -* Fixed [#2367](https://github.com/sebastianbergmann/phpunit/pull/2367): Bug in `PHPUnit_Util_Test::parseAnnotationContent()` -* Fixed [#2375](https://github.com/sebastianbergmann/phpunit/issues/2375): Invalid regular expression for `--filter` causes PHP warning - -## [5.6.5] - 2016-11-21 - -### Fixed - -* Fixed [#2366](https://github.com/sebastianbergmann/phpunit/issues/2366): Using a test double from a data provider only works once - -### Changed - -Bumped the required versions of `sebastian/comparator`, `sebastian/exporter`, and `sebastian/enumerator` - -## [5.6.4] - 2016-11-18 - -### Fixed - -* Fixed [#2361](https://github.com/sebastianbergmann/phpunit/issues/2361): Conflict with newer versions of `sebastian/recursion-context` - -## [5.6.3] - 2016-11-14 - -### Fixed - -* Improved the fix for [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr` - -## [5.6.2] - 2016-10-25 - -New PHAR release due to updated dependencies - -## [5.6.1] - 2016-10-07 - -### Fixed - -* Fixed [#2320](https://github.com/sebastianbergmann/phpunit/issues/2320): Conflict between `PHPUnit_Framework_TestCase::getDataSet()` and `PHPUnit_Extensions_Database_TestCase::getDataSet()` - -## [5.6.0] - 2016-10-07 - -### Added - -* Merged [#2240](https://github.com/sebastianbergmann/phpunit/pull/2240): Provide access to a test case's data set (for use in `setUp()`, for instance) -* Merged [#2262](https://github.com/sebastianbergmann/phpunit/pull/2262): Add the `PHPUnit_Framework_Constraint_DirectoryExists`, `PHPUnit_Framework_Constraint_IsReadable`, and `PHPUnit_Framework_Constraint_IsWritable` constraints as well as the `assertIsReadable()`, `assertNotIsReadable()`, `assertIsWritable()`, `assertNotIsWritable()`, `assertDirectoryExists()`, `assertDirectoryNotExists()`, `assertDirectoryIsReadable()`, `assertDirectoryNotIsReadable()`, `assertDirectoryIsWritable()`, `assertDirectoryNotIsWritable()`, `assertFileIsReadable()`, `assertFileNotIsReadable()`, `assertFileIsWritable()`, and `assertFileNotIsWritable()` assertions -* Added `PHPUnit\Framework\TestCase::createConfiguredMock()` based on [idea](https://twitter.com/kriswallsmith/status/763550169090625536) by Kris Wallsmith -* Added the `@doesNotPerformAssertions` annotation for excluding a test from the "useless test" risky test check - -### Changed - -* Deprecated `PHPUnit\Framework\TestCase::setExpectedExceptionRegExp()` -* `PHPUnit_Util_Printer` no longer optionally cleans up HTML output using `ext/tidy` - -[5.6.8]: https://github.com/sebastianbergmann/phpunit/compare/5.6.7...5.6.8 -[5.6.7]: https://github.com/sebastianbergmann/phpunit/compare/5.6.6...5.6.7 -[5.6.6]: https://github.com/sebastianbergmann/phpunit/compare/5.6.5...5.6.6 -[5.6.5]: https://github.com/sebastianbergmann/phpunit/compare/5.6.4...5.6.5 -[5.6.4]: https://github.com/sebastianbergmann/phpunit/compare/5.6.3...5.6.4 -[5.6.3]: https://github.com/sebastianbergmann/phpunit/compare/5.6.2...5.6.3 -[5.6.2]: https://github.com/sebastianbergmann/phpunit/compare/5.6.1...5.6.2 -[5.6.1]: https://github.com/sebastianbergmann/phpunit/compare/5.6.0...5.6.1 -[5.6.0]: https://github.com/sebastianbergmann/phpunit/compare/5.5...5.6.0 - diff --git a/api/vendor/phpunit/phpunit/ChangeLog-5.7.md b/api/vendor/phpunit/phpunit/ChangeLog-5.7.md index ef798a9..c8c7787 100644 --- a/api/vendor/phpunit/phpunit/ChangeLog-5.7.md +++ b/api/vendor/phpunit/phpunit/ChangeLog-5.7.md @@ -2,6 +2,56 @@ All notable changes of the PHPUnit 5.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [5.7.27] - 2018-02-01 + +### Fixed + +* Fixed [#2236](https://github.com/sebastianbergmann/phpunit/issues/2236): Exceptions in `tearDown()` do not affect `getStatus()` +* Fixed [#2950](https://github.com/sebastianbergmann/phpunit/issues/2950): Class extending `PHPUnit\Framework\TestSuite` does not extend `PHPUnit\FrameworkTestCase` +* Fixed [#2972](https://github.com/sebastianbergmann/phpunit/issues/2972): PHPUnit crashes when test suite contains both `.phpt` files and unconventionally named tests + +## [5.7.26] - 2017-12-17 + +### Fixed + +* Fixed [#2472](https://github.com/sebastianbergmann/phpunit/issues/2472): `PHPUnit\Util\Getopt` uses deprecated `each()` function +* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered +* Fixed [#2922](https://github.com/sebastianbergmann/phpunit/issues/2922): Test class is not discovered when there is a test class with `@group` and provider throwing exception in it, tests are run with `--exclude-group` for that group, there is another class called later (after the class from above), and the name of that another class does not match its filename + +## [5.7.25] - 2017-11-14 + +### Fixed + +* Fixed [#2859](https://github.com/sebastianbergmann/phpunit/issues/2859): Regression caused by fix for [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833) + +## [5.7.24] - 2017-11-14 + +### Fixed + +* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered + +## [5.7.23] - 2017-10-15 + +### Fixed + +* Fixed [#2731](https://github.com/sebastianbergmann/phpunit/issues/2731): Empty exception message cannot be expected + +## [5.7.22] - 2017-09-24 + +### Fixed + +* Fixed [#2769](https://github.com/sebastianbergmann/phpunit/issues/2769): Usage of `setUseErrorHandler()` produces `Undefined variable` error + +## [5.7.21] - 2017-06-21 + +### Added + +* Added `PHPUnit\Framework\AssertionFailedError`, `PHPUnit\Framework\Test`, and `PHPUnit\Framework\TestSuite` to the forward compatibility layer for PHPUnit 6 + +### Fixed + +* Fixed [#2705](https://github.com/sebastianbergmann/phpunit/issues/2705): `stderr` parameter in `phpunit.xml` always considered `true` + ## [5.7.20] - 2017-05-22 ### Fixed @@ -161,6 +211,13 @@ All notable changes of the PHPUnit 5.7 release series are documented in this fil * The `--tap` and `--log-tap` commandline options have been deprecated * The `--self-update` and `--self-upgrade` commandline options have been deprecated (PHAR binary only) +[5.7.27]: https://github.com/sebastianbergmann/phpunit/compare/5.7.26...5.7.27 +[5.7.26]: https://github.com/sebastianbergmann/phpunit/compare/5.7.25...5.7.26 +[5.7.25]: https://github.com/sebastianbergmann/phpunit/compare/5.7.24...5.7.25 +[5.7.24]: https://github.com/sebastianbergmann/phpunit/compare/5.7.23...5.7.24 +[5.7.23]: https://github.com/sebastianbergmann/phpunit/compare/5.7.22...5.7.23 +[5.7.22]: https://github.com/sebastianbergmann/phpunit/compare/5.7.21...5.7.22 +[5.7.21]: https://github.com/sebastianbergmann/phpunit/compare/5.7.20...5.7.21 [5.7.20]: https://github.com/sebastianbergmann/phpunit/compare/5.7.19...5.7.20 [5.7.19]: https://github.com/sebastianbergmann/phpunit/compare/5.7.18...5.7.19 [5.7.18]: https://github.com/sebastianbergmann/phpunit/compare/5.7.17...5.7.18 diff --git a/api/vendor/phpunit/phpunit/LICENSE b/api/vendor/phpunit/phpunit/LICENSE index c9d881f..faba266 100644 --- a/api/vendor/phpunit/phpunit/LICENSE +++ b/api/vendor/phpunit/phpunit/LICENSE @@ -1,6 +1,6 @@ PHPUnit -Copyright (c) 2001-2017, Sebastian Bergmann . +Copyright (c) 2001-2018, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/api/vendor/phpunit/phpunit/build.xml b/api/vendor/phpunit/phpunit/build.xml index a60e0d6..224904b 100644 --- a/api/vendor/phpunit/phpunit/build.xml +++ b/api/vendor/phpunit/phpunit/build.xml @@ -48,8 +48,6 @@ - - diff --git a/api/vendor/phpunit/phpunit/composer.json b/api/vendor/phpunit/phpunit/composer.json index 9e9bb2a..53bd8bb 100644 --- a/api/vendor/phpunit/phpunit/composer.json +++ b/api/vendor/phpunit/phpunit/composer.json @@ -19,6 +19,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues" }, + "prefer-stable": true, "require": { "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "~1.4", @@ -27,7 +28,7 @@ "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "phpspec/prophecy": "^1.6.2", - "symfony/yaml": "~2.1|~3.0", + "symfony/yaml": "~2.1|~3.0|~4.0", "sebastian/comparator": "^1.2.4", "sebastian/diff": "^1.4.3", "sebastian/environment": "^1.3.4 || ^2.0", @@ -35,7 +36,7 @@ "sebastian/global-state": "^1.1", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", + "sebastian/version": "^1.0.6|^2.0.1", "myclabs/deep-copy": "~1.3", "ext-dom": "*", "ext-json": "*", @@ -52,7 +53,9 @@ "config": { "platform": { "php": "5.6.0" - } + }, + "optimize-autoloader": true, + "sort-packages": true }, "suggest": { "phpunit/php-invoker": "~1.1", diff --git a/api/vendor/phpunit/phpunit/phpunit b/api/vendor/phpunit/phpunit/phpunit old mode 100644 new mode 100755 diff --git a/api/vendor/phpunit/phpunit/phpunit.xsd b/api/vendor/phpunit/phpunit/phpunit.xsd index f9db449..4660b0d 100644 --- a/api/vendor/phpunit/phpunit/phpunit.xsd +++ b/api/vendor/phpunit/phpunit/phpunit.xsd @@ -4,7 +4,7 @@ This Schema file defines the rules by which the XML configuration file of PHPUnit 5.7 may be structured. - + diff --git a/api/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php b/api/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php new file mode 100644 index 0000000..d0cbe72 --- /dev/null +++ b/api/vendor/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace PHPUnit\Framework; + +use PHPUnit_Framework_AssertionFailedError; + +class AssertionFailedError extends PHPUnit_Framework_AssertionFailedError +{ +} diff --git a/api/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php b/api/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php new file mode 100644 index 0000000..ce98526 --- /dev/null +++ b/api/vendor/phpunit/phpunit/src/ForwardCompatibility/Test.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace PHPUnit\Framework; + +use PHPUnit_Framework_Test; + +interface Test extends PHPUnit_Framework_Test +{ +} diff --git a/api/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php b/api/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php new file mode 100644 index 0000000..535bbbe --- /dev/null +++ b/api/vendor/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php @@ -0,0 +1,17 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace PHPUnit\Framework; + +use PHPUnit_Framework_TestSuite; + +class TestSuite extends PHPUnit_Framework_TestSuite +{ +} diff --git a/api/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php b/api/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php index d11cebe..d2047e9 100644 --- a/api/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php +++ b/api/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php @@ -34,6 +34,10 @@ class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Co */ protected function matches($other) { + if ($this->expectedMessage === '') { + return $other->getMessage() === ''; + } + return strpos($other->getMessage(), $this->expectedMessage) !== false; } @@ -49,6 +53,13 @@ class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Co */ protected function failureDescription($other) { + if ($this->expectedMessage === '') { + return sprintf( + "exception message is empty but is '%s'", + $other->getMessage() + ); + } + return sprintf( "exception message '%s' contains '%s'", $other->getMessage(), @@ -61,6 +72,10 @@ class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Co */ public function toString() { + if ($this->expectedMessage === '') { + return 'exception message is empty'; + } + return 'exception message contains '; } } diff --git a/api/vendor/phpunit/phpunit/src/Framework/TestCase.php b/api/vendor/phpunit/phpunit/src/Framework/TestCase.php index bfbaa38..bb3e870 100644 --- a/api/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/api/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -141,21 +141,21 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @var string */ - private $expectedExceptionMessage = ''; + private $expectedExceptionMessage = null; /** * The regex pattern to validate the expected Exception message. * * @var string */ - private $expectedExceptionMessageRegExp = ''; + private $expectedExceptionMessageRegExp = null; /** * The code of the expected Exception. * * @var int|string */ - private $expectedExceptionCode; + private $expectedExceptionCode = null; /** * The name of the test case. @@ -190,7 +190,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple private $mockObjects = []; /** - * @var array + * @var MockGenerator */ private $mockObjectGenerator = null; @@ -510,8 +510,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * @param mixed $exception - * @param string $message - * @param int|string $code + * @param string $message Null means we do not check message at all, string (even empty) means we do. Default: null. + * @param int|string $code Null means we do not check code at all, non-null means we do. * * @throws PHPUnit_Framework_Exception * @@ -519,9 +519,17 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple */ public function setExpectedException($exception, $message = '', $code = null) { + if (null !== $message && !is_string($message)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string'); + } + + if (func_num_args() < 2) { + $message = null; + } + $this->expectedException = $exception; - if ($message !== null && $message !== '') { + if ($message !== null) { $this->expectExceptionMessage($message); } @@ -860,7 +868,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $result->run($this); } - if ($this->useErrorHandler !== null) { + if (isset($oldErrorHandlerSetting)) { $result->convertErrorsToExceptions($oldErrorHandlerSetting); } @@ -937,11 +945,6 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $e = $_e; } - if (isset($_e)) { - $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_ERROR; - $this->statusMessage = $_e->getMessage(); - } - // Clean up the mock objects. $this->mockObjects = []; $this->prophet = null; @@ -978,6 +981,11 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } } + if (isset($_e)) { + $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_ERROR; + $this->statusMessage = $_e->getMessage(); + } + clearstatcache(); if ($currentWorkingDirectory != getcwd()) { @@ -1085,8 +1093,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple ) ); - if (is_string($this->expectedExceptionMessage) && - !empty($this->expectedExceptionMessage)) { + if ($this->expectedExceptionMessage !== null) { $this->assertThat( $e, new PHPUnit_Framework_Constraint_ExceptionMessage( @@ -1095,8 +1102,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple ); } - if (is_string($this->expectedExceptionMessageRegExp) && - !empty($this->expectedExceptionMessageRegExp)) { + if ($this->expectedExceptionMessageRegExp !== null) { $this->assertThat( $e, new PHPUnit_Framework_Constraint_ExceptionMessageRegExp( @@ -1432,7 +1438,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * Returns a builder object to create mock objects using a fluent interface. * - * @param string $className + * @param string|string[] $className * * @return PHPUnit_Framework_MockObject_MockBuilder */ @@ -2124,7 +2130,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * Performs assertions shared by all tests of a test case. * - * This method is called before the execution of a test ends + * This method is called after the execution of a test ends * and before tearDown() is called. */ protected function assertPostConditions() diff --git a/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php index 6d5a3df..0ed6be4 100644 --- a/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ b/api/vendor/phpunit/phpunit/src/Framework/TestSuite.php @@ -87,6 +87,11 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra */ private $iteratorFilter = null; + /** + * @var string[] + */ + private $declaredClasses; + /** * Constructs a new TestSuite: * @@ -111,6 +116,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra */ public function __construct($theClass = '', $name = '') { + $this->declaredClasses = get_declared_classes(); + $argumentsValid = false; if (is_object($theClass) && @@ -270,7 +277,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra } } - if (!$suiteMethod && !$testClass->isAbstract()) { + if (!$suiteMethod && !$testClass->isAbstract() && $testClass->isSubclassOf(PHPUnit_Framework_TestCase::class)) { $this->addTest(new self($testClass)); } } else { @@ -306,9 +313,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra // The given file may contain further stub classes in addition to the // test class itself. Figure out the actual test class. - $classes = get_declared_classes(); $filename = PHPUnit_Util_Fileloader::checkAndLoad($filename); - $newClasses = array_diff(get_declared_classes(), $classes); + $newClasses = array_diff(get_declared_classes(), $this->declaredClasses); // The diff is empty in case a parent class (with test methods) is added // AFTER a child class that inherited from it. To account for that case, @@ -319,6 +325,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra // process discovered classes in approximate LIFO order, so as to // avoid unnecessary reflection. $this->foundClasses = array_merge($newClasses, $this->foundClasses); + $this->declaredClasses = get_declared_classes(); } // The test class's name must match the filename, either in full, or as @@ -341,6 +348,10 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra } foreach ($newClasses as $className) { + if (strpos($className, 'PHPUnit_Framework') === 0) { + continue; + } + $class = new ReflectionClass($className); if (!$class->isAbstract()) { @@ -713,7 +724,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra if ($test instanceof PHPUnit_Framework_TestCase || $test instanceof self) { - $test->setbeStrictAboutChangesToGlobalState($this->beStrictAboutChangesToGlobalState); + $test->setBeStrictAboutChangesToGlobalState($this->beStrictAboutChangesToGlobalState); $test->setBackupGlobals($this->backupGlobals); $test->setBackupStaticAttributes($this->backupStaticAttributes); $test->setRunTestInSeparateProcess($this->runTestInSeparateProcess); @@ -917,7 +928,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra /** * @param bool $beStrictAboutChangesToGlobalState */ - public function setbeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState) + public function setBeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState) { if (is_null($this->beStrictAboutChangesToGlobalState) && is_bool($beStrictAboutChangesToGlobalState)) { $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; diff --git a/api/vendor/phpunit/phpunit/src/Framework/Warning.php b/api/vendor/phpunit/phpunit/src/Framework/Warning.php index 96df300..70ccf9a 100644 --- a/api/vendor/phpunit/phpunit/src/Framework/Warning.php +++ b/api/vendor/phpunit/phpunit/src/Framework/Warning.php @@ -9,7 +9,7 @@ */ /** - * Thrown when an there is a warning. + * Thrown when there is a warning. */ class PHPUnit_Framework_Warning extends PHPUnit_Framework_Exception implements PHPUnit_Framework_SelfDescribing { diff --git a/api/vendor/phpunit/phpunit/src/Runner/Version.php b/api/vendor/phpunit/phpunit/src/Runner/Version.php index 1a85c1d..9fe325e 100644 --- a/api/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/api/vendor/phpunit/phpunit/src/Runner/Version.php @@ -30,7 +30,7 @@ class PHPUnit_Runner_Version } if (self::$version === null) { - $version = new Version('5.7.20', dirname(dirname(__DIR__))); + $version = new Version('5.7.27', dirname(dirname(__DIR__))); self::$version = $version->getVersion(); } diff --git a/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php index 04c7b03..5e17a25 100644 --- a/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ b/api/vendor/phpunit/phpunit/src/TextUI/TestRunner.php @@ -177,7 +177,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner } if ($arguments['beStrictAboutChangesToGlobalState'] === true) { - $suite->setbeStrictAboutChangesToGlobalState(true); + $suite->setBeStrictAboutChangesToGlobalState(true); } if (is_int($arguments['repeat'])) { @@ -251,7 +251,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner } $this->printer = new $printerClass( - isset($arguments['stderr']) ? 'php://stderr' : null, + (isset($arguments['stderr']) && $arguments['stderr'] === true) ? 'php://stderr' : null, $arguments['verbose'], $arguments['colors'], $arguments['debug'], diff --git a/api/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php b/api/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php index ad7d430..e1d9572 100644 --- a/api/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php +++ b/api/vendor/phpunit/phpunit/src/Util/ConfigurationGenerator.php @@ -24,7 +24,7 @@ class PHPUnit_Util_ConfigurationGenerator beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutTodoAnnotatedTests="true" verbose="true"> - + {tests_directory} diff --git a/api/vendor/phpunit/phpunit/src/Util/Getopt.php b/api/vendor/phpunit/phpunit/src/Util/Getopt.php index dc3af7c..894778d 100644 --- a/api/vendor/phpunit/phpunit/src/Util/Getopt.php +++ b/api/vendor/phpunit/phpunit/src/Util/Getopt.php @@ -32,18 +32,24 @@ class PHPUnit_Util_Getopt reset($args); - while (list($i, $arg) = @each($args)) { + $args = array_map('trim', $args); + + while (false !== $arg = current($args)) { + $i = key($args); + next($args); if ($arg == '') { continue; } if ($arg == '--') { $non_opts = array_merge($non_opts, array_slice($args, $i + 1)); + break; } if ($arg[0] != '-' || (strlen($arg) > 1 && $arg[1] == '-' && !$long_options)) { $non_opts[] = $args[$i]; + continue; } elseif (strlen($arg) > 1 && $arg[1] == '-') { self::parseLongOption( @@ -80,21 +86,18 @@ class PHPUnit_Util_Getopt } if (strlen($spec) > 1 && $spec[1] == ':') { - if (strlen($spec) > 2 && $spec[2] == ':') { - if ($i + 1 < $argLen) { - $opts[] = [$opt, substr($arg, $i + 1)]; - break; - } - } else { - if ($i + 1 < $argLen) { - $opts[] = [$opt, substr($arg, $i + 1)]; - break; - } elseif (list(, $opt_arg) = @each($args)) { - } else { + if ($i + 1 < $argLen) { + $opts[] = [$opt, substr($arg, $i + 1)]; + + break; + } + if (!(strlen($spec) > 2 && $spec[2] == ':')) { + if (false === $opt_arg = current($args)) { throw new PHPUnit_Framework_Exception( "option requires an argument -- $opt" ); } + next($args); } } @@ -134,10 +137,13 @@ class PHPUnit_Util_Getopt if (substr($long_opt, -1) == '=') { if (substr($long_opt, -2) != '==') { - if (!strlen($opt_arg) && !(list(, $opt_arg) = @each($args))) { - throw new PHPUnit_Framework_Exception( - "option --$opt requires an argument" - ); + if (!strlen($opt_arg)) { + if (false === $opt_arg = current($args)) { + throw new PHPUnit_Framework_Exception( + "option --$opt requires an argument" + ); + } + next($args); } } } elseif ($opt_arg) { @@ -155,3 +161,4 @@ class PHPUnit_Util_Getopt throw new PHPUnit_Framework_Exception("unrecognized option --$opt"); } } + diff --git a/api/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php b/api/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php index d42f408..399efb9 100644 --- a/api/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php +++ b/api/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php @@ -322,9 +322,9 @@ class PHPUnit_Util_Log_TeamCity extends PHPUnit_TextUI_ResultPrinter { $message = ''; - if (!$e instanceof PHPUnit_Framework_Exception) { - if (strlen(get_class($e)) != 0) { - $message = $message . get_class($e); + if ($e instanceof PHPUnit_Framework_ExceptionWrapper) { + if (strlen($e->getClassName()) != 0) { + $message = $message . $e->getClassName(); } if (strlen($message) != 0 && strlen($e->getMessage()) != 0) { diff --git a/api/vendor/phpunit/phpunit/src/Util/Test.php b/api/vendor/phpunit/phpunit/src/Util/Test.php index 9df9b30..6bf1786 100644 --- a/api/vendor/phpunit/phpunit/src/Util/Test.php +++ b/api/vendor/phpunit/phpunit/src/Util/Test.php @@ -1044,14 +1044,16 @@ class PHPUnit_Util_Test $result[$filename] = []; } - $result[$filename] = array_unique( - array_merge( - $result[$filename], - range($reflector->getStartLine(), $reflector->getEndLine()) - ) + $result[$filename] = array_merge( + $result[$filename], + range($reflector->getStartLine(), $reflector->getEndLine()) ); } + foreach ($result as $filename => $lineNumbers) { + $result[$filename] = array_keys(array_flip($lineNumbers)); + } + return $result; } diff --git a/api/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php b/api/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php index b3a20b8..ae2870c 100644 --- a/api/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php +++ b/api/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php @@ -159,6 +159,7 @@ class Framework_TestCaseTest extends PHPUnit_Framework_TestCase $this->assertTrue($test->testSomething); $this->assertTrue($test->assertPostConditions); $this->assertTrue($test->tearDown); + $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_ERROR, $test->getStatus()); } public function testNoArgTestCasePasses() diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2731.phpt b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2731.phpt new file mode 100644 index 0000000..7e2d324 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2731.phpt @@ -0,0 +1,26 @@ +--TEST-- +GH-2731: Empty exception message cannot be expected +--FILE-- + +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +F 1 / 1 (100%) + +Time: %s, Memory: %s + +There was 1 failure: + +1) Issue2731Test::testOne +Failed asserting that exception message is empty but is 'message'. + +FAILURES! +Tests: 1, Assertions: 2, Failures: 1. diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2731/Issue2731Test.php b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2731/Issue2731Test.php new file mode 100644 index 0000000..0d1e6d3 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2731/Issue2731Test.php @@ -0,0 +1,11 @@ +expectException(Exception::class); + $this->expectExceptionMessage(''); + + throw new Exception('message'); + } +} diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758.phpt b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758.phpt new file mode 100644 index 0000000..8828dff --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-2758: TestCase::addToAssertionCount() no longer has effect when called from TestListener::endTest() +--FILE-- + +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +. 1 / 1 (100%) + +Time: %s, Memory: %s + +OK (1 test, 1 assertion) diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758/Issue2758Test.php b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758/Issue2758Test.php new file mode 100644 index 0000000..d2e0428 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758/Issue2758Test.php @@ -0,0 +1,7 @@ +addToAssertionCount(1); + } +} diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758/phpunit.xml b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758/phpunit.xml new file mode 100644 index 0000000..c12f3e2 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2758/phpunit.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2811.phpt b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2811.phpt new file mode 100644 index 0000000..c179b12 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2811.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-2811: expectExceptionMessage() does not work without expectException() +--FILE-- + +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +. 1 / 1 (100%) + +Time: %s, Memory: %s + +OK (1 test, 2 assertions) diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2811/Issue2811Test.php b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2811/Issue2811Test.php new file mode 100644 index 0000000..20bb570 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2811/Issue2811Test.php @@ -0,0 +1,10 @@ +expectExceptionMessage('hello'); + + throw new \Exception('hello'); + } +} diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972.phpt b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972.phpt new file mode 100644 index 0000000..a46ced1 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-2972: Test suite shouldn't fail when it contains both *.phpt files and unconventionally named tests +--FILE-- + +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +.. 2 / 2 (100%) + +Time: %s, Memory: %s + +OK (2 tests, 2 assertions) diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972/issue-2972-test.phpt b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972/issue-2972-test.phpt new file mode 100644 index 0000000..4d09cf5 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972/issue-2972-test.phpt @@ -0,0 +1,10 @@ +--TEST-- +Just a sample test for issue 2972, does not actually test anything +--FILE-- + +===DONE=== +--EXPECT-- +Hello world +===DONE=== diff --git a/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972/unconventiallyNamedIssue2972Test.php b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972/unconventiallyNamedIssue2972Test.php new file mode 100644 index 0000000..3fd57f0 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/Regression/GitHub/2972/unconventiallyNamedIssue2972Test.php @@ -0,0 +1,13 @@ +assertNotEmpty('Hello world!'); + } +} diff --git a/api/vendor/phpunit/phpunit/tests/TextUI/dataprovider-issue-2833.phpt b/api/vendor/phpunit/phpunit/tests/TextUI/dataprovider-issue-2833.phpt new file mode 100644 index 0000000..6381898 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/TextUI/dataprovider-issue-2833.phpt @@ -0,0 +1,17 @@ +--TEST-- +phpunit ../_files/DataProviderIssue2833 +--FILE-- + 1|n+ 0 => 2|n )|n' details=' %s/tests/_files/ExceptionStackTest.php:10|n |n Caused by|n message|n Failed asserting that two arrays are equal.|n --- Expected|n +++ Actual|n @@ @@|n Array (|n - 0 => 1|n + 0 => 2|n )|n |n %s/tests/_files/ExceptionStackTest.php:7|n ' flowId='%d'] + +##teamcity[testFinished name='testPrintingChildException' duration='%d' flowId='%d'] + +##teamcity[testStarted name='testNestedExceptions' locationHint='php_qn://%s/tests/_files/ExceptionStackTest.php::\ExceptionStackTest::testNestedExceptions' flowId='%d'] + +##teamcity[testFailed name='testNestedExceptions' message='Exception : One' details=' %s/tests/_files/ExceptionStackTest.php:18|n ' flowId='%d'] + +##teamcity[testFinished name='testNestedExceptions' duration='%d' flowId='%d'] + +##teamcity[testSuiteFinished name='ExceptionStackTest' flowId='%d'] + + +Time: %s, Memory: %s + + +ERRORS! +Tests: 2, Assertions: 1, Errors: 2. \ No newline at end of file diff --git a/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/FirstTest.php b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/FirstTest.php new file mode 100644 index 0000000..741aabf --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/FirstTest.php @@ -0,0 +1,23 @@ +assertTrue(true); + } + + public function provide() + { + SecondTest::DUMMY; + + return [[true]]; + } +} diff --git a/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/SecondTest.php b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/SecondTest.php new file mode 100644 index 0000000..86adb28 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2833/SecondTest.php @@ -0,0 +1,15 @@ +assertTrue(true); + } +} diff --git a/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/phpunit.xml b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/phpunit.xml new file mode 100644 index 0000000..1e47e51 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/phpunit.xml @@ -0,0 +1,10 @@ + + + + + + ./tests/ + ./tests/*/ + + + diff --git a/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/tests/another/TestWithDataProviderTest.php b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/tests/another/TestWithDataProviderTest.php new file mode 100644 index 0000000..4bffb49 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2859/tests/another/TestWithDataProviderTest.php @@ -0,0 +1,21 @@ +assertTrue(true); + } + + public function provide() + { + return [[true]]; + } +} diff --git a/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/FirstTest.php b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/FirstTest.php new file mode 100644 index 0000000..8b3302c --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/FirstTest.php @@ -0,0 +1,24 @@ +assertTrue(true); + } + + public function provide() + { + throw new \Exception(); + } +} diff --git a/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/SecondTest.php b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/SecondTest.php new file mode 100644 index 0000000..570ae56 --- /dev/null +++ b/api/vendor/phpunit/phpunit/tests/_files/DataProviderIssue2922/SecondTest.php @@ -0,0 +1,14 @@ +assertTrue(true); + } +} diff --git a/api/vendor/psr/log/.gitignore b/api/vendor/psr/log/.gitignore deleted file mode 100644 index 22d0d82..0000000 --- a/api/vendor/psr/log/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/api/vendor/psr/log/Psr/Log/AbstractLogger.php b/api/vendor/psr/log/Psr/Log/AbstractLogger.php index 90e721a..e02f9da 100644 --- a/api/vendor/psr/log/Psr/Log/AbstractLogger.php +++ b/api/vendor/psr/log/Psr/Log/AbstractLogger.php @@ -14,8 +14,8 @@ abstract class AbstractLogger implements LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -30,8 +30,8 @@ abstract class AbstractLogger implements LoggerInterface * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -45,8 +45,8 @@ abstract class AbstractLogger implements LoggerInterface * * Example: Application component unavailable, unexpected exception. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -59,8 +59,8 @@ abstract class AbstractLogger implements LoggerInterface * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -75,8 +75,8 @@ abstract class AbstractLogger implements LoggerInterface * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -88,8 +88,8 @@ abstract class AbstractLogger implements LoggerInterface /** * Normal but significant events. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -103,8 +103,8 @@ abstract class AbstractLogger implements LoggerInterface * * Example: User logs in, SQL logs. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -116,8 +116,8 @@ abstract class AbstractLogger implements LoggerInterface /** * Detailed debug information. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ diff --git a/api/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/api/vendor/psr/log/Psr/Log/LoggerAwareTrait.php index 639f79b..82bf45c 100644 --- a/api/vendor/psr/log/Psr/Log/LoggerAwareTrait.php +++ b/api/vendor/psr/log/Psr/Log/LoggerAwareTrait.php @@ -10,7 +10,7 @@ trait LoggerAwareTrait /** * The logger instance. * - * @var LoggerInterface + * @var LoggerInterface|null */ protected $logger; diff --git a/api/vendor/psr/log/Psr/Log/LoggerInterface.php b/api/vendor/psr/log/Psr/Log/LoggerInterface.php index 5ea7243..2206cfd 100644 --- a/api/vendor/psr/log/Psr/Log/LoggerInterface.php +++ b/api/vendor/psr/log/Psr/Log/LoggerInterface.php @@ -22,8 +22,8 @@ interface LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -35,8 +35,8 @@ interface LoggerInterface * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -47,8 +47,8 @@ interface LoggerInterface * * Example: Application component unavailable, unexpected exception. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -58,8 +58,8 @@ interface LoggerInterface * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -71,8 +71,8 @@ interface LoggerInterface * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -81,8 +81,8 @@ interface LoggerInterface /** * Normal but significant events. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -93,8 +93,8 @@ interface LoggerInterface * * Example: User logs in, SQL logs. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -103,8 +103,8 @@ interface LoggerInterface /** * Detailed debug information. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -113,11 +113,13 @@ interface LoggerInterface /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string $message - * @param array $context + * @param mixed $level + * @param string $message + * @param mixed[] $context * * @return void + * + * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()); } diff --git a/api/vendor/psr/log/Psr/Log/LoggerTrait.php b/api/vendor/psr/log/Psr/Log/LoggerTrait.php index 867225d..e392fef 100644 --- a/api/vendor/psr/log/Psr/Log/LoggerTrait.php +++ b/api/vendor/psr/log/Psr/Log/LoggerTrait.php @@ -135,6 +135,8 @@ trait LoggerTrait * @param array $context * * @return void + * + * @throws \Psr\Log\InvalidArgumentException */ abstract public function log($level, $message, array $context = array()); } diff --git a/api/vendor/psr/log/Psr/Log/NullLogger.php b/api/vendor/psr/log/Psr/Log/NullLogger.php index d8cd682..c8f7293 100644 --- a/api/vendor/psr/log/Psr/Log/NullLogger.php +++ b/api/vendor/psr/log/Psr/Log/NullLogger.php @@ -20,6 +20,8 @@ class NullLogger extends AbstractLogger * @param array $context * * @return void + * + * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()) { diff --git a/api/vendor/psr/log/Psr/Log/Test/DummyTest.php b/api/vendor/psr/log/Psr/Log/Test/DummyTest.php new file mode 100644 index 0000000..9638c11 --- /dev/null +++ b/api/vendor/psr/log/Psr/Log/Test/DummyTest.php @@ -0,0 +1,18 @@ + true, 'null' => null, @@ -110,6 +114,7 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase 'nested' => array('with object' => new DummyTest), 'object' => new \DateTime, 'resource' => fopen('php://memory', 'r'), + 'closed' => $closed, ); $this->getLogger()->warning('Crazy context data', $context); @@ -131,10 +136,3 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expected, $this->getLogs()); } } - -class DummyTest -{ - public function __toString() - { - } -} diff --git a/api/vendor/psr/log/Psr/Log/Test/TestLogger.php b/api/vendor/psr/log/Psr/Log/Test/TestLogger.php new file mode 100644 index 0000000..1be3230 --- /dev/null +++ b/api/vendor/psr/log/Psr/Log/Test/TestLogger.php @@ -0,0 +1,147 @@ + $level, + 'message' => $message, + 'context' => $context, + ]; + + $this->recordsByLevel[$record['level']][] = $record; + $this->records[] = $record; + } + + public function hasRecords($level) + { + return isset($this->recordsByLevel[$level]); + } + + public function hasRecord($record, $level) + { + if (is_string($record)) { + $record = ['message' => $record]; + } + return $this->hasRecordThatPasses(function ($rec) use ($record) { + if ($rec['message'] !== $record['message']) { + return false; + } + if (isset($record['context']) && $rec['context'] !== $record['context']) { + return false; + } + return true; + }, $level); + } + + public function hasRecordThatContains($message, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($message) { + return strpos($rec['message'], $message) !== false; + }, $level); + } + + public function hasRecordThatMatches($regex, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($regex) { + return preg_match($regex, $rec['message']) > 0; + }, $level); + } + + public function hasRecordThatPasses(callable $predicate, $level) + { + if (!isset($this->recordsByLevel[$level])) { + return false; + } + foreach ($this->recordsByLevel[$level] as $i => $rec) { + if (call_user_func($predicate, $rec, $i)) { + return true; + } + } + return false; + } + + public function __call($method, $args) + { + if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { + $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; + $level = strtolower($matches[2]); + if (method_exists($this, $genericMethod)) { + $args[] = $level; + return call_user_func_array([$this, $genericMethod], $args); + } + } + throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); + } + + public function reset() + { + $this->records = []; + $this->recordsByLevel = []; + } +} diff --git a/api/vendor/psr/log/README.md b/api/vendor/psr/log/README.md index 574bc1c..a9f20c4 100644 --- a/api/vendor/psr/log/README.md +++ b/api/vendor/psr/log/README.md @@ -7,6 +7,13 @@ This repository holds all interfaces/classes/traits related to Note that this is not a logger of its own. It is merely an interface that describes a logger. See the specification for more details. +Installation +------------ + +```bash +composer require psr/log +``` + Usage ----- @@ -31,6 +38,12 @@ class Foo if ($this->logger) { $this->logger->info('Doing work'); } + + try { + $this->doSomethingElse(); + } catch (Exception $exception) { + $this->logger->error('Oh no!', array('exception' => $exception)); + } // do something useful } diff --git a/api/vendor/psr/log/composer.json b/api/vendor/psr/log/composer.json index 87934d7..ca05695 100644 --- a/api/vendor/psr/log/composer.json +++ b/api/vendor/psr/log/composer.json @@ -7,7 +7,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "require": { @@ -20,7 +20,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } } } diff --git a/api/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md b/api/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md index 6da1003..d136bf5 100644 --- a/api/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md +++ b/api/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md @@ -2,9 +2,14 @@ All notable changes to `sebastianbergmann/code-unit-reverse-lookup` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## 1.0.0 - 2016-02-13 +## [1.0.2] - 2020-11-30 -### Added +### Changed + +* Changed PHP version constraint in `composer.json` from `^5.6 || ^7.0` to `>=5.6` + +## 1.0.0 - 2016-02-13 * Initial release +[1.0.2]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/1.0.1...1.0.2 diff --git a/api/vendor/sebastian/code-unit-reverse-lookup/composer.json b/api/vendor/sebastian/code-unit-reverse-lookup/composer.json index b9a2419..ba32ed6 100644 --- a/api/vendor/sebastian/code-unit-reverse-lookup/composer.json +++ b/api/vendor/sebastian/code-unit-reverse-lookup/composer.json @@ -10,10 +10,10 @@ } ], "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "autoload": { "classmap": [ diff --git a/api/vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php b/api/vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php index 84d0ac3..711ad28 100644 --- a/api/vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php +++ b/api/vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php @@ -22,7 +22,7 @@ class WizardTest extends TestCase */ private $wizard; - protected function setUp() + protected function setUp(): void { $this->wizard = new Wizard; } diff --git a/api/vendor/symfony/console/Application.php b/api/vendor/symfony/console/Application.php index fd15fb4..e9e3def 100644 --- a/api/vendor/symfony/console/Application.php +++ b/api/vendor/symfony/console/Application.php @@ -11,34 +11,36 @@ namespace Symfony\Component\Console; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\ProcessHelper; -use Symfony\Component\Console\Helper\QuestionHelper; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\StreamableInputInterface; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\HelpCommand; use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleErrorEvent; use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; use Symfony\Component\Console\Exception\CommandNotFoundException; +use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\DebugFormatterHelper; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\ProcessHelper; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputAwareInterface; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\StreamableInputInterface; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -59,11 +61,12 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class Application { - private $commands = array(); + private $commands = []; private $wantHelps = false; private $runningCommand; private $name; private $version; + private $commandLoader; private $catchExceptions = true; private $autoExit = true; private $definition; @@ -71,7 +74,8 @@ class Application private $dispatcher; private $terminal; private $defaultCommand; - private $singleCommand; + private $singleCommand = false; + private $initialized; /** * @param string $name The name of the application @@ -83,12 +87,6 @@ class Application $this->version = $version; $this->terminal = new Terminal(); $this->defaultCommand = 'list'; - $this->helperSet = $this->getDefaultHelperSet(); - $this->definition = $this->getDefaultInputDefinition(); - - foreach ($this->getDefaultCommands() as $command) { - $this->add($command); - } } public function setDispatcher(EventDispatcherInterface $dispatcher) @@ -96,12 +94,14 @@ class Application $this->dispatcher = $dispatcher; } + public function setCommandLoader(CommandLoaderInterface $commandLoader) + { + $this->commandLoader = $commandLoader; + } + /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code * * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. @@ -119,31 +119,39 @@ class Application $output = new ConsoleOutput(); } - if (null !== $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) { - @trigger_error(sprintf('The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.'), E_USER_DEPRECATED); - } - - $this->configureIO($input, $output); - - try { - $e = null; - $exitCode = $this->doRun($input, $output); - } catch (\Exception $x) { - $e = $x; - } catch (\Throwable $x) { - $e = new FatalThrowableError($x); - } - - if (null !== $e) { - if (!$this->catchExceptions || !$x instanceof \Exception) { - throw $x; + $renderException = function ($e) use ($output) { + if (!$e instanceof \Exception) { + $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); } - if ($output instanceof ConsoleOutputInterface) { $this->renderException($e, $output->getErrorOutput()); } else { $this->renderException($e, $output); } + }; + if ($phpHandler = set_exception_handler($renderException)) { + restore_exception_handler(); + if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) { + $debugHandler = true; + } elseif ($debugHandler = $phpHandler[0]->setExceptionHandler($renderException)) { + $phpHandler[0]->setExceptionHandler($debugHandler); + } + } + + if (null !== $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) { + @trigger_error(sprintf('The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.'), \E_USER_DEPRECATED); + } + + $this->configureIO($input, $output); + + try { + $exitCode = $this->doRun($input, $output); + } catch (\Exception $e) { + if (!$this->catchExceptions) { + throw $e; + } + + $renderException($e); $exitCode = $e->getCode(); if (is_numeric($exitCode)) { @@ -154,6 +162,20 @@ class Application } else { $exitCode = 1; } + } finally { + // if the exception handler changed, keep it + // otherwise, unregister $renderException + if (!$phpHandler) { + if (set_exception_handler($renderException) === $renderException) { + restore_exception_handler(); + } + restore_exception_handler(); + } elseif (!$debugHandler) { + $finalHandler = $phpHandler[0]->setExceptionHandler(null); + if ($finalHandler !== $renderException) { + $phpHandler[0]->setExceptionHandler($finalHandler); + } + } } if ($this->autoExit) { @@ -170,24 +192,28 @@ class Application /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ public function doRun(InputInterface $input, OutputInterface $output) { - if (true === $input->hasParameterOption(array('--version', '-V'), true)) { + if (true === $input->hasParameterOption(['--version', '-V'], true)) { $output->writeln($this->getLongVersion()); return 0; } + try { + // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. + $input->bind($this->getDefinition()); + } catch (ExceptionInterface $e) { + // Errors must be ignored, full binding/validation happens later when the command is known. + } + $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(array('--help', '-h'), true)) { + if (true === $input->hasParameterOption(['--help', '-h'], true)) { if (!$name) { $name = 'help'; - $input = new ArrayInput(array('command_name' => $this->defaultCommand)); + $input = new ArrayInput(['command_name' => $this->defaultCommand]); } else { $this->wantHelps = true; } @@ -195,7 +221,13 @@ class Application if (!$name) { $name = $this->defaultCommand; - $input = new ArrayInput(array('command' => $this->defaultCommand)); + $definition = $this->getDefinition(); + $definition->setArguments(array_merge( + $definition->getArguments(), + [ + 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), + ] + )); } try { @@ -226,11 +258,6 @@ class Application return $exitCode; } - /** - * Set a helper set to be used with the command. - * - * @param HelperSet $helperSet The helper set - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -243,14 +270,13 @@ class Application */ public function getHelperSet() { + if (!$this->helperSet) { + $this->helperSet = $this->getDefaultHelperSet(); + } + return $this->helperSet; } - /** - * Set an input definition to be used with this application. - * - * @param InputDefinition $definition The input definition - */ public function setDefinition(InputDefinition $definition) { $this->definition = $definition; @@ -263,6 +289,10 @@ class Application */ public function getDefinition() { + if (!$this->definition) { + $this->definition = $this->getDefaultInputDefinition(); + } + if ($this->singleCommand) { $inputDefinition = $this->definition; $inputDefinition->setArguments(); @@ -413,22 +443,25 @@ class Application * If a command with the same name already exists, it will be overridden. * If the command is not enabled it will not be added. * - * @param Command $command A Command object - * * @return Command|null The registered command if enabled or null */ public function add(Command $command) { + $this->init(); + $command->setApplication($this); if (!$command->isEnabled()) { $command->setApplication(null); - return; + return null; } - if (null === $command->getDefinition()) { - throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command))); + // Will throw if the command is not correctly initialized. + $command->getDefinition(); + + if (!$command->getName()) { + throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command))); } $this->commands[$command->getName()] = $command; @@ -451,10 +484,17 @@ class Application */ public function get($name) { - if (!isset($this->commands[$name])) { + $this->init(); + + if (!$this->has($name)) { throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); } + // When the command has a different name than the one used at the command loader level + if (!isset($this->commands[$name])) { + throw new CommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name)); + } + $command = $this->commands[$name]; if ($this->wantHelps) { @@ -478,7 +518,9 @@ class Application */ public function has($name) { - return isset($this->commands[$name]); + $this->init(); + + return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name))); } /** @@ -490,8 +532,12 @@ class Application */ public function getNamespaces() { - $namespaces = array(); + $namespaces = []; foreach ($this->all() as $command) { + if ($command->isHidden()) { + continue; + } + $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); foreach ($command->getAliases() as $alias) { @@ -521,7 +567,7 @@ class Application $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { - if (1 == count($alternatives)) { + if (1 == \count($alternatives)) { $message .= "\n\nDid you mean this?\n "; } else { $message .= "\n\nDid you mean one of these?\n "; @@ -533,9 +579,9 @@ class Application throw new CommandNotFoundException($message, $alternatives); } - $exact = in_array($namespace, $namespaces, true); - if (count($namespaces) > 1 && !$exact) { - throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); + $exact = \in_array($namespace, $namespaces, true); + if (\count($namespaces) > 1 && !$exact) { + throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); } return $exact ? $namespace : reset($namespaces); @@ -555,11 +601,32 @@ class Application */ public function find($name) { - $allCommands = array_keys($this->commands); + $this->init(); + + $aliases = []; + + foreach ($this->commands as $command) { + foreach ($command->getAliases() as $alias) { + if (!$this->has($alias)) { + $this->commands[$alias] = $command; + } + } + } + + if ($this->has($name)) { + return $this->get($name); + } + + $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); $commands = preg_grep('{^'.$expr.'}', $allCommands); - if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) { + if (empty($commands)) { + $commands = preg_grep('{^'.$expr.'}i', $allCommands); + } + + // if no commands matched or we just matched namespaces + if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { if (false !== $pos = strrpos($name, ':')) { // check if a namespace exists and contains commands $this->findNamespace(substr($name, 0, $pos)); @@ -568,7 +635,12 @@ class Application $message = sprintf('Command "%s" is not defined.', $name); if ($alternatives = $this->findAlternatives($name, $allCommands)) { - if (1 == count($alternatives)) { + // remove hidden commands + $alternatives = array_filter($alternatives, function ($name) { + return !$this->get($name)->isHidden(); + }); + + if (1 == \count($alternatives)) { $message .= "\n\nDid you mean this?\n "; } else { $message .= "\n\nDid you mean one of these?\n "; @@ -576,21 +648,27 @@ class Application $message .= implode("\n ", $alternatives); } - throw new CommandNotFoundException($message, $alternatives); + throw new CommandNotFoundException($message, array_values($alternatives)); } // filter out aliases for commands which are already on the list - if (count($commands) > 1) { - $commandList = $this->commands; - $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) { + if (\count($commands) > 1) { + $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands; + $commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) { + if (!$commandList[$nameOrAlias] instanceof Command) { + $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias); + } + $commandName = $commandList[$nameOrAlias]->getName(); - return $commandName === $nameOrAlias || !in_array($commandName, $commands); - }); + $aliases[$nameOrAlias] = $commandName; + + return $commandName === $nameOrAlias || !\in_array($commandName, $commands); + })); } - $exact = in_array($name, $commands, true); - if (count($commands) > 1 && !$exact) { + $exact = \in_array($name, $commands, true) || isset($aliases[$name]); + if (\count($commands) > 1 && !$exact) { $usableWidth = $this->terminal->getWidth() - 10; $abbrevs = array_values($commands); $maxLen = 0; @@ -598,13 +676,17 @@ class Application $maxLen = max(Helper::strlen($abbrev), $maxLen); } $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen) { + if ($commandList[$cmd]->isHidden()) { + return false; + } + $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription(); return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev; }, array_values($commands)); - $suggestions = $this->getAbbreviationSuggestions($abbrevs); + $suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs)); - throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $name, $suggestions), array_values($commands)); + throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands)); } return $this->get($exact ? $name : reset($commands)); @@ -621,17 +703,38 @@ class Application */ public function all($namespace = null) { + $this->init(); + if (null === $namespace) { - return $this->commands; + if (!$this->commandLoader) { + return $this->commands; + } + + $commands = $this->commands; + foreach ($this->commandLoader->getNames() as $name) { + if (!isset($commands[$name]) && $this->has($name)) { + $commands[$name] = $this->get($name); + } + } + + return $commands; } - $commands = array(); + $commands = []; foreach ($this->commands as $name => $command) { if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { $commands[$name] = $command; } } + if ($this->commandLoader) { + foreach ($this->commandLoader->getNames() as $name) { + if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) { + $commands[$name] = $this->get($name); + } + } + } + return $commands; } @@ -644,9 +747,9 @@ class Application */ public static function getAbbreviations($names) { - $abbrevs = array(); + $abbrevs = []; foreach ($names as $name) { - for ($len = strlen($name); $len > 0; --$len) { + for ($len = \strlen($name); $len > 0; --$len) { $abbrev = substr($name, 0, $len); $abbrevs[$abbrev][] = $name; } @@ -657,42 +760,54 @@ class Application /** * Renders a caught exception. - * - * @param \Exception $e An exception instance - * @param OutputInterface $output An OutputInterface instance */ public function renderException(\Exception $e, OutputInterface $output) { $output->writeln('', OutputInterface::VERBOSITY_QUIET); + $this->doRenderException($e, $output); + + if (null !== $this->runningCommand) { + $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET); + $output->writeln('', OutputInterface::VERBOSITY_QUIET); + } + } + + protected function doRenderException(\Exception $e, OutputInterface $output) + { do { - $title = sprintf( - ' [%s%s] ', - get_class($e), - $output->isVerbose() && 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : '' - ); + $message = trim($e->getMessage()); + if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $title = sprintf(' [%s%s] ', \get_class($e), 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); + $len = Helper::strlen($title); + } else { + $len = 0; + } - $len = Helper::strlen($title); - - $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX; + $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX; // HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327 - if (defined('HHVM_VERSION') && $width > 1 << 31) { + if (\defined('HHVM_VERSION') && $width > 1 << 31) { $width = 1 << 31; } - $lines = array(); - foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { + $lines = []; + foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) { foreach ($this->splitStringByWidth($line, $width - 4) as $line) { // pre-format lines to get the right string length $lineLength = Helper::strlen($line) + 4; - $lines[] = array($line, $lineLength); + $lines[] = [$line, $lineLength]; $len = max($lineLength, $len); } } - $messages = array(); + $messages = []; + if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); + } $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len)); - $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::strlen($title)))); + if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::strlen($title)))); + } foreach ($lines as $line) { $messages[] = sprintf(' %s %s', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1])); } @@ -706,31 +821,27 @@ class Application // exception related properties $trace = $e->getTrace(); - array_unshift($trace, array( - 'function' => '', - 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a', - 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a', - 'args' => array(), - )); - for ($i = 0, $count = count($trace); $i < $count; ++$i) { + array_unshift($trace, [ + 'function' => '', + 'file' => $e->getFile() ?: 'n/a', + 'line' => $e->getLine() ?: 'n/a', + 'args' => [], + ]); + + for ($i = 0, $count = \count($trace); $i < $count; ++$i) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; - $function = $trace[$i]['function']; + $function = isset($trace[$i]['function']) ? $trace[$i]['function'] : ''; $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; - $output->writeln(sprintf(' %s%s%s() at %s:%s', $class, $type, $function, $file, $line), OutputInterface::VERBOSITY_QUIET); + $output->writeln(sprintf(' %s%s at %s:%s', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET); } $output->writeln('', OutputInterface::VERBOSITY_QUIET); } } while ($e = $e->getPrevious()); - - if (null !== $this->runningCommand) { - $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET); - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } } /** @@ -742,7 +853,7 @@ class Application */ protected function getTerminalWidth() { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), \E_USER_DEPRECATED); return $this->terminal->getWidth(); } @@ -756,7 +867,7 @@ class Application */ protected function getTerminalHeight() { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), \E_USER_DEPRECATED); return $this->terminal->getHeight(); } @@ -770,9 +881,9 @@ class Application */ public function getTerminalDimensions() { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), \E_USER_DEPRECATED); - return array($this->terminal->getWidth(), $this->terminal->getHeight()); + return [$this->terminal->getWidth(), $this->terminal->getHeight()]; } /** @@ -789,7 +900,7 @@ class Application */ public function setTerminalDimensions($width, $height) { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), \E_USER_DEPRECATED); putenv('COLUMNS='.$width); putenv('LINES='.$height); @@ -799,21 +910,18 @@ class Application /** * Configures the input and output instances based on the user arguments and options. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function configureIO(InputInterface $input, OutputInterface $output) { - if (true === $input->hasParameterOption(array('--ansi'), true)) { + if (true === $input->hasParameterOption(['--ansi'], true)) { $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(array('--no-ansi'), true)) { + } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) { $output->setDecorated(false); } - if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) { + if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) { $input->setInteractive(false); - } elseif (function_exists('posix_isatty')) { + } elseif (\function_exists('posix_isatty')) { $inputStream = null; if ($input instanceof StreamableInputInterface) { @@ -831,18 +939,37 @@ class Application } } - if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) { + switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) { + case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break; + case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break; + case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break; + case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break; + default: $shellVerbosity = 0; break; + } + + if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); - $input->setInteractive(false); + $shellVerbosity = -1; } else { - if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || $input->getParameterOption('--verbose', false, true) === 3) { + if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) { $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); - } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || $input->getParameterOption('--verbose', false, true) === 2) { + $shellVerbosity = 3; + } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) { $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); + $shellVerbosity = 2; } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) { $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); + $shellVerbosity = 1; } } + + if (-1 === $shellVerbosity) { + $input->setInteractive(false); + } + + putenv('SHELL_VERBOSITY='.$shellVerbosity); + $_ENV['SHELL_VERBOSITY'] = $shellVerbosity; + $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity; } /** @@ -851,10 +978,6 @@ class Application * If an event dispatcher has been attached to the application, * events are also dispatched during the life-cycle of the command. * - * @param Command $command A Command instance - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) @@ -923,9 +1046,7 @@ class Application /** * Gets the name of the command based on input. * - * @param InputInterface $input The input interface - * - * @return string The command name + * @return string|null */ protected function getCommandName(InputInterface $input) { @@ -939,7 +1060,7 @@ class Application */ protected function getDefaultInputDefinition() { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), @@ -949,7 +1070,7 @@ class Application new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - )); + ]); } /** @@ -959,7 +1080,7 @@ class Application */ protected function getDefaultCommands() { - return array(new HelpCommand(), new ListCommand()); + return [new HelpCommand(), new ListCommand()]; } /** @@ -969,12 +1090,12 @@ class Application */ protected function getDefaultHelperSet() { - return new HelperSet(array( + return new HelperSet([ new FormatterHelper(), new DebugFormatterHelper(), new ProcessHelper(), new QuestionHelper(), - )); + ]); } /** @@ -1001,27 +1122,26 @@ class Application */ public function extractNamespace($name, $limit = null) { - $parts = explode(':', $name); - array_pop($parts); + $parts = explode(':', $name, -1); - return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit)); + return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit)); } /** * Finds alternative of $name among $collection, * if nothing is found in $collection, try in $abbrevs. * - * @param string $name The string - * @param array|\Traversable $collection The collection + * @param string $name The string + * @param iterable $collection The collection * * @return string[] A sorted array of similar string */ private function findAlternatives($name, $collection) { $threshold = 1e3; - $alternatives = array(); + $alternatives = []; - $collectionParts = array(); + $collectionParts = []; foreach ($collection as $item) { $collectionParts[$item] = explode(':', $item); } @@ -1037,7 +1157,7 @@ class Application } $lev = levenshtein($subname, $parts[$i]); - if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { + if ($lev <= \strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; } elseif ($exists) { $alternatives[$collectionName] += $threshold; @@ -1047,13 +1167,13 @@ class Application foreach ($collection as $item) { $lev = levenshtein($name, $item); - if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { + if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; } } $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, SORT_NATURAL | SORT_FLAG_CASE); + ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); return array_keys($alternatives); } @@ -1080,6 +1200,14 @@ class Application return $this; } + /** + * @internal + */ + public function isSingleCommand() + { + return $this->singleCommand; + } + private function splitStringByWidth($string, $width) { // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. @@ -1090,7 +1218,7 @@ class Application } $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = array(); + $lines = []; $line = ''; foreach (preg_split('//u', $utf8String) as $char) { // test if $char could be appended to current line @@ -1102,9 +1230,8 @@ class Application $lines[] = str_pad($line, $width); $line = $char; } - if ('' !== $line) { - $lines[] = count($lines) ? str_pad($line, $width) : $line; - } + + $lines[] = \count($lines) ? str_pad($line, $width) : $line; mb_convert_variables($encoding, 'utf8', $lines); @@ -1122,10 +1249,10 @@ class Application { // -1 as third argument is needed to skip the command short name when exploding $parts = explode(':', $name, -1); - $namespaces = array(); + $namespaces = []; foreach ($parts as $part) { - if (count($namespaces)) { + if (\count($namespaces)) { $namespaces[] = end($namespaces).':'.$part; } else { $namespaces[] = $part; @@ -1134,4 +1261,16 @@ class Application return $namespaces; } + + private function init() + { + if ($this->initialized) { + return; + } + $this->initialized = true; + + foreach ($this->getDefaultCommands() as $command) { + $this->add($command); + } + } } diff --git a/api/vendor/symfony/console/CHANGELOG.md b/api/vendor/symfony/console/CHANGELOG.md index f853949..6dba1a4 100644 --- a/api/vendor/symfony/console/CHANGELOG.md +++ b/api/vendor/symfony/console/CHANGELOG.md @@ -1,6 +1,18 @@ CHANGELOG ========= +3.4.0 +----- + + * added `SHELL_VERBOSITY` env var to control verbosity + * added `CommandLoaderInterface`, `FactoryCommandLoader` and PSR-11 + `ContainerCommandLoader` for commands lazy-loading + * added a case-insensitive command name matching fallback + * added static `Command::$defaultName/getDefaultName()`, allowing for + commands to be registered at compile time in the application command loader. + Setting the `$defaultName` property avoids the need for filling the `command` + attribute on the `console.command` tag when using `AddConsoleCommandPass`. + 3.3.0 ----- @@ -10,8 +22,9 @@ CHANGELOG with value optional explicitly passed empty * added console.error event to catch exceptions thrown by other listeners * deprecated console.exception event in favor of console.error -* added ability to handle `CommandNotFoundException` through the +* added ability to handle `CommandNotFoundException` through the `console.error` event +* deprecated default validation in `SymfonyQuestionHelper::ask` 3.2.0 ------ @@ -25,7 +38,7 @@ CHANGELOG ----- * added truncate method to FormatterHelper - * added setColumnWidth(s) method to Table + * added setColumnWidth(s) method to Table 2.8.3 ----- diff --git a/api/vendor/symfony/console/Command/Command.php b/api/vendor/symfony/console/Command/Command.php index 2359677..d896f67 100644 --- a/api/vendor/symfony/console/Command/Command.php +++ b/api/vendor/symfony/console/Command/Command.php @@ -11,16 +11,16 @@ namespace Symfony\Component\Console\Command; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Application; -use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * Base class for all commands. @@ -29,25 +29,39 @@ use Symfony\Component\Console\Exception\LogicException; */ class Command { + /** + * @var string|null The default command name + */ + protected static $defaultName; + private $application; private $name; private $processTitle; - private $aliases = array(); + private $aliases = []; private $definition; private $hidden = false; - private $help; - private $description; + private $help = ''; + private $description = ''; private $ignoreValidationErrors = false; private $applicationDefinitionMerged = false; private $applicationDefinitionMergedWithArgs = false; private $code; - private $synopsis = array(); - private $usages = array(); + private $synopsis = []; + private $usages = []; private $helperSet; /** - * Constructor. - * + * @return string|null The default command name or null when no default name is set + */ + public static function getDefaultName() + { + $class = static::class; + $r = new \ReflectionProperty($class, 'defaultName'); + + return $class === $r->class ? static::$defaultName : null; + } + + /** * @param string|null $name The name of the command; passing null means it must be set in configure() * * @throws LogicException When the command name is empty @@ -56,15 +70,11 @@ class Command { $this->definition = new InputDefinition(); - if (null !== $name) { + if (null !== $name || null !== $name = static::getDefaultName()) { $this->setName($name); } $this->configure(); - - if (!$this->name) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); - } } /** @@ -77,11 +87,6 @@ class Command $this->ignoreValidationErrors = true; } - /** - * Sets the application instance for this command. - * - * @param Application $application An Application instance - */ public function setApplication(Application $application = null) { $this->application = $application; @@ -92,11 +97,6 @@ class Command } } - /** - * Sets the helper set. - * - * @param HelperSet $helperSet A HelperSet instance - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -105,7 +105,7 @@ class Command /** * Gets the helper set. * - * @return HelperSet A HelperSet instance + * @return HelperSet|null A HelperSet instance */ public function getHelperSet() { @@ -115,7 +115,7 @@ class Command /** * Gets the application instance for this command. * - * @return Application An Application instance + * @return Application|null An Application instance */ public function getApplication() { @@ -150,10 +150,7 @@ class Command * execute() method, you set the code to execute by passing * a Closure to the setCode() method. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * - * @return null|int null or 0 if everything went fine, or an error code + * @return int|null null or 0 if everything went fine, or an error code * * @throws LogicException When this abstract method is not implemented * @@ -170,22 +167,20 @@ class Command * This method is executed before the InputDefinition is validated. * This means that this is the only place where the command can * interactively ask for values of missing required arguments. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function interact(InputInterface $input, OutputInterface $output) { } /** - * Initializes the command just after the input has been validated. + * Initializes the command after the input has been bound and before the input + * is validated. * * This is mainly useful when a lot of commands extends one main command * where some things need to be initialized based on the input arguments and options. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance + * @see InputInterface::bind() + * @see InputInterface::validate() */ protected function initialize(InputInterface $input, OutputInterface $output) { @@ -198,9 +193,6 @@ class Command * setCode() method or by overriding the execute() method * in a sub-class. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * * @return int The command exit code * * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. @@ -229,16 +221,15 @@ class Command $this->initialize($input, $output); if (null !== $this->processTitle) { - if (function_exists('cli_set_process_title')) { - if (false === @cli_set_process_title($this->processTitle)) { - if ('Darwin' === PHP_OS) { - $output->writeln('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); + if (\function_exists('cli_set_process_title')) { + if (!@cli_set_process_title($this->processTitle)) { + if ('Darwin' === \PHP_OS) { + $output->writeln('Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.', OutputInterface::VERBOSITY_VERY_VERBOSE); } else { - $error = error_get_last(); - trigger_error($error['message'], E_USER_WARNING); + cli_set_process_title($this->processTitle); } } - } elseif (function_exists('setproctitle')) { + } elseif (\function_exists('setproctitle')) { setproctitle($this->processTitle); } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { $output->writeln('Install the proctitle PECL to be able to change the process title.'); @@ -259,7 +250,7 @@ class Command $input->validate(); if ($this->code) { - $statusCode = call_user_func($this->code, $input, $output); + $statusCode = \call_user_func($this->code, $input, $output); } else { $statusCode = $this->execute($input, $output); } @@ -286,8 +277,8 @@ class Command if ($code instanceof \Closure) { $r = new \ReflectionFunction($code); if (null === $r->getClosureThis()) { - if (PHP_VERSION_ID < 70000) { - // Bug in PHP5: https://bugs.php.net/bug.php?id=64761 + if (\PHP_VERSION_ID < 70000) { + // Bug in PHP5: https://bugs.php.net/64761 // This means that we cannot bind static closures and therefore we must // ignore any errors here. There is no way to test if the closure is // bindable. @@ -318,14 +309,13 @@ class Command $this->definition->addOptions($this->application->getDefinition()->getOptions()); + $this->applicationDefinitionMerged = true; + if ($mergeArgs) { $currentArguments = $this->definition->getArguments(); $this->definition->setArguments($this->application->getDefinition()->getArguments()); $this->definition->addArguments($currentArguments); - } - $this->applicationDefinitionMerged = true; - if ($mergeArgs) { $this->applicationDefinitionMergedWithArgs = true; } } @@ -357,6 +347,10 @@ class Command */ public function getDefinition() { + if (null === $this->definition) { + throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class)); + } + return $this->definition; } @@ -378,10 +372,12 @@ class Command /** * Adds an argument. * - * @param string $name The argument name - * @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL - * @param string $description A description text - * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) + * @param string $name The argument name + * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL + * @param string $description A description text + * @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only) + * + * @throws InvalidArgumentException When argument mode is not valid * * @return $this */ @@ -395,11 +391,13 @@ class Command /** * Adds an option. * - * @param string $name The option name - * @param string $shortcut The shortcut (can be null) - * @param int $mode The option mode: One of the InputOption::VALUE_* constants - * @param string $description A description text - * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) + * @param string $name The option name + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants + * @param string $description A description text + * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) + * + * @throws InvalidArgumentException If option mode is invalid or incompatible * * @return $this */ @@ -439,8 +437,6 @@ class Command * This feature should be used only when creating a long process command, * like a daemon. * - * PHP 5.5+ or the proctitle PECL library is required - * * @param string $title The process title * * @return $this @@ -455,7 +451,7 @@ class Command /** * Returns the command name. * - * @return string The command name + * @return string|null */ public function getName() { @@ -475,7 +471,7 @@ class Command } /** - * @return bool Whether the command should be publicly shown or not. + * @return bool whether the command should be publicly shown or not */ public function isHidden() { @@ -539,15 +535,16 @@ class Command public function getProcessedHelp() { $name = $this->name; + $isSingleCommand = $this->application && $this->application->isSingleCommand(); - $placeholders = array( + $placeholders = [ '%command.name%', '%command.full_name%', - ); - $replacements = array( + ]; + $replacements = [ $name, - $_SERVER['PHP_SELF'].' '.$name, - ); + $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, + ]; return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); } @@ -563,8 +560,8 @@ class Command */ public function setAliases($aliases) { - if (!is_array($aliases) && !$aliases instanceof \Traversable) { - throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable'); + if (!\is_array($aliases) && !$aliases instanceof \Traversable) { + throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable.'); } foreach ($aliases as $alias) { diff --git a/api/vendor/symfony/console/Command/HelpCommand.php b/api/vendor/symfony/console/Command/HelpCommand.php index b8fd911..2384776 100644 --- a/api/vendor/symfony/console/Command/HelpCommand.php +++ b/api/vendor/symfony/console/Command/HelpCommand.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** @@ -35,11 +35,11 @@ class HelpCommand extends Command $this ->setName('help') - ->setDefinition(array( + ->setDefinition([ new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), - )) + ]) ->setDescription('Displays help for a command') ->setHelp(<<<'EOF' The %command.name% command displays help for a given command: @@ -56,11 +56,6 @@ EOF ; } - /** - * Sets the command. - * - * @param Command $command The command to set - */ public function setCommand(Command $command) { $this->command = $command; @@ -76,10 +71,10 @@ EOF } $helper = new DescriptorHelper(); - $helper->describe($output, $this->command, array( + $helper->describe($output, $this->command, [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), - )); + ]); $this->command = null; } diff --git a/api/vendor/symfony/console/Command/ListCommand.php b/api/vendor/symfony/console/Command/ListCommand.php index 179ddea..7259b12 100644 --- a/api/vendor/symfony/console/Command/ListCommand.php +++ b/api/vendor/symfony/console/Command/ListCommand.php @@ -13,10 +13,10 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * ListCommand displays the list of all available commands for the application. @@ -69,11 +69,11 @@ EOF protected function execute(InputInterface $input, OutputInterface $output) { $helper = new DescriptorHelper(); - $helper->describe($output, $this->getApplication(), array( + $helper->describe($output, $this->getApplication(), [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace'), - )); + ]); } /** @@ -81,10 +81,10 @@ EOF */ private function createDefinition() { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - )); + ]); } } diff --git a/api/vendor/symfony/console/Command/LockableTrait.php b/api/vendor/symfony/console/Command/LockableTrait.php index 9559770..308ebf2 100644 --- a/api/vendor/symfony/console/Command/LockableTrait.php +++ b/api/vendor/symfony/console/Command/LockableTrait.php @@ -13,7 +13,10 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Filesystem\LockHandler; +use Symfony\Component\Lock\Factory; +use Symfony\Component\Lock\Lock; +use Symfony\Component\Lock\Store\FlockStore; +use Symfony\Component\Lock\Store\SemaphoreStore; /** * Basic lock feature for commands. @@ -22,7 +25,8 @@ use Symfony\Component\Filesystem\LockHandler; */ trait LockableTrait { - private $lockHandler; + /** @var Lock */ + private $lock; /** * Locks a command. @@ -31,18 +35,23 @@ trait LockableTrait */ private function lock($name = null, $blocking = false) { - if (!class_exists(LockHandler::class)) { - throw new RuntimeException('To enable the locking feature you must install the symfony/filesystem component.'); + if (!class_exists(SemaphoreStore::class)) { + throw new RuntimeException('To enable the locking feature you must install the symfony/lock component.'); } - if (null !== $this->lockHandler) { + if (null !== $this->lock) { throw new LogicException('A lock is already in place.'); } - $this->lockHandler = new LockHandler($name ?: $this->getName()); + if (SemaphoreStore::isSupported($blocking)) { + $store = new SemaphoreStore(); + } else { + $store = new FlockStore(); + } - if (!$this->lockHandler->lock($blocking)) { - $this->lockHandler = null; + $this->lock = (new Factory($store))->createLock($name ?: $this->getName()); + if (!$this->lock->acquire($blocking)) { + $this->lock = null; return false; } @@ -55,9 +64,9 @@ trait LockableTrait */ private function release() { - if ($this->lockHandler) { - $this->lockHandler->release(); - $this->lockHandler = null; + if ($this->lock) { + $this->lock->release(); + $this->lock = null; } } } diff --git a/api/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/api/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php new file mode 100644 index 0000000..ca1029c --- /dev/null +++ b/api/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\CommandLoader; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\CommandNotFoundException; + +/** + * @author Robin Chalas + */ +interface CommandLoaderInterface +{ + /** + * Loads a command. + * + * @param string $name + * + * @return Command + * + * @throws CommandNotFoundException + */ + public function get($name); + + /** + * Checks if a command exists. + * + * @param string $name + * + * @return bool + */ + public function has($name); + + /** + * @return string[] All registered command names + */ + public function getNames(); +} diff --git a/api/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/api/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php new file mode 100644 index 0000000..8000c7d --- /dev/null +++ b/api/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\CommandLoader; + +use Psr\Container\ContainerInterface; +use Symfony\Component\Console\Exception\CommandNotFoundException; + +/** + * Loads commands from a PSR-11 container. + * + * @author Robin Chalas + */ +class ContainerCommandLoader implements CommandLoaderInterface +{ + private $container; + private $commandMap; + + /** + * @param ContainerInterface $container A container from which to load command services + * @param array $commandMap An array with command names as keys and service ids as values + */ + public function __construct(ContainerInterface $container, array $commandMap) + { + $this->container = $container; + $this->commandMap = $commandMap; + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (!$this->has($name)) { + throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); + } + + return $this->container->get($this->commandMap[$name]); + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); + } + + /** + * {@inheritdoc} + */ + public function getNames() + { + return array_keys($this->commandMap); + } +} diff --git a/api/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/api/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php new file mode 100644 index 0000000..d9c2055 --- /dev/null +++ b/api/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\CommandLoader; + +use Symfony\Component\Console\Exception\CommandNotFoundException; + +/** + * A simple command loader using factories to instantiate commands lazily. + * + * @author Maxime Steinhausser + */ +class FactoryCommandLoader implements CommandLoaderInterface +{ + private $factories; + + /** + * @param callable[] $factories Indexed by command names + */ + public function __construct(array $factories) + { + $this->factories = $factories; + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return isset($this->factories[$name]); + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (!isset($this->factories[$name])) { + throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); + } + + $factory = $this->factories[$name]; + + return $factory(); + } + + /** + * {@inheritdoc} + */ + public function getNames() + { + return array_keys($this->factories); + } +} diff --git a/api/vendor/symfony/console/ConsoleEvents.php b/api/vendor/symfony/console/ConsoleEvents.php index 7f7d4a3..bf6cab9 100644 --- a/api/vendor/symfony/console/ConsoleEvents.php +++ b/api/vendor/symfony/console/ConsoleEvents.php @@ -24,8 +24,6 @@ final class ConsoleEvents * before they are handled to the command. * * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") - * - * @var string */ const COMMAND = 'console.command'; @@ -34,8 +32,6 @@ final class ConsoleEvents * executed by the console. * * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") - * - * @var string */ const TERMINATE = 'console.terminate'; @@ -48,8 +44,6 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent") * - * @var string - * * @deprecated The console.exception event is deprecated since version 3.3 and will be removed in 4.0. Use the console.error event instead. */ const EXCEPTION = 'console.exception'; @@ -61,8 +55,6 @@ final class ConsoleEvents * to modify the thrown exception. * * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") - * - * @var string */ const ERROR = 'console.error'; } diff --git a/api/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/api/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php index d0626be..f656d6a 100644 --- a/api/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ b/api/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php @@ -12,9 +12,12 @@ namespace Symfony\Component\Console\DependencyInjection; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\TypedReference; /** * Registers console commands. @@ -23,34 +26,81 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; */ class AddConsoleCommandPass implements CompilerPassInterface { + private $commandLoaderServiceId; + private $commandTag; + + public function __construct($commandLoaderServiceId = 'console.command_loader', $commandTag = 'console.command') + { + $this->commandLoaderServiceId = $commandLoaderServiceId; + $this->commandTag = $commandTag; + } + public function process(ContainerBuilder $container) { - $commandServices = $container->findTaggedServiceIds('console.command', true); - $serviceIds = array(); + $commandServices = $container->findTaggedServiceIds($this->commandTag, true); + $lazyCommandMap = []; + $lazyCommandRefs = []; + $serviceIds = []; + $lazyServiceIds = []; foreach ($commandServices as $id => $tags) { $definition = $container->getDefinition($id); $class = $container->getParameterBag()->resolveValue($definition->getClass()); - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(Command::class)) { - throw new InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "%s".', $id, Command::class)); + $commandId = 'console.command.'.strtolower(str_replace('\\', '_', $class)); + + if (isset($tags[0]['command'])) { + $commandName = $tags[0]['command']; + } else { + if (!$r = $container->getReflectionClass($class)) { + throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + if (!$r->isSubclassOf(Command::class)) { + throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); + } + $commandName = $class::getDefaultName(); } - $commandId = 'console.command.'.strtolower(str_replace('\\', '_', $class)); - if ($container->hasAlias($commandId) || isset($serviceIds[$commandId])) { - $commandId = $commandId.'_'.$id; - } - if (!$definition->isPublic()) { - $container->setAlias($commandId, $id); - $id = $commandId; + if (null === $commandName) { + if (isset($serviceIds[$commandId]) || $container->hasAlias($commandId)) { + $commandId = $commandId.'_'.$id; + } + if (!$definition->isPublic() || $definition->isPrivate()) { + $container->setAlias($commandId, $id)->setPublic(true); + $id = $commandId; + } + $serviceIds[$commandId] = $id; + + continue; } $serviceIds[$commandId] = $id; + $lazyServiceIds[$id] = true; + unset($tags[0]); + $lazyCommandMap[$commandName] = $id; + $lazyCommandRefs[$id] = new TypedReference($id, $class); + $aliases = []; + + foreach ($tags as $tag) { + if (isset($tag['command'])) { + $aliases[] = $tag['command']; + $lazyCommandMap[$tag['command']] = $id; + } + } + + $definition->addMethodCall('setName', [$commandName]); + + if ($aliases) { + $definition->addMethodCall('setAliases', [$aliases]); + } } + $container + ->register($this->commandLoaderServiceId, ContainerCommandLoader::class) + ->setPublic(true) + ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]); + $container->setParameter('console.command.ids', $serviceIds); + $container->setParameter('console.lazy_command.ids', $lazyServiceIds); } } diff --git a/api/vendor/symfony/console/Descriptor/ApplicationDescription.php b/api/vendor/symfony/console/Descriptor/ApplicationDescription.php index a9740fe..65b5308 100644 --- a/api/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ b/api/vendor/symfony/console/Descriptor/ApplicationDescription.php @@ -24,15 +24,9 @@ class ApplicationDescription { const GLOBAL_NAMESPACE = '_global'; - /** - * @var Application - */ private $application; - - /** - * @var null|string - */ private $namespace; + private $showHidden; /** * @var array @@ -50,14 +44,6 @@ class ApplicationDescription private $aliases; /** - * @var bool - */ - private $showHidden; - - /** - * Constructor. - * - * @param Application $application * @param string|null $namespace * @param bool $showHidden */ @@ -102,7 +88,7 @@ class ApplicationDescription public function getCommand($name) { if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { - throw new CommandNotFoundException(sprintf('Command %s does not exist.', $name)); + throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); } return isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name]; @@ -110,12 +96,12 @@ class ApplicationDescription private function inspectApplication() { - $this->commands = array(); - $this->namespaces = array(); + $this->commands = []; + $this->namespaces = []; $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null); foreach ($this->sortCommands($all) as $namespace => $commands) { - $names = array(); + $names = []; /** @var Command $command */ foreach ($commands as $name => $command) { @@ -132,36 +118,40 @@ class ApplicationDescription $names[] = $name; } - $this->namespaces[$namespace] = array('id' => $namespace, 'commands' => $names); + $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; } } /** - * @param array $commands - * * @return array */ private function sortCommands(array $commands) { - $namespacedCommands = array(); - $globalCommands = array(); + $namespacedCommands = []; + $globalCommands = []; + $sortedCommands = []; foreach ($commands as $name => $command) { $key = $this->application->extractNamespace($name, 1); - if (!$key) { - $globalCommands['_global'][$name] = $command; + if (\in_array($key, ['', self::GLOBAL_NAMESPACE], true)) { + $globalCommands[$name] = $command; } else { $namespacedCommands[$key][$name] = $command; } } - ksort($namespacedCommands); - $namespacedCommands = array_merge($globalCommands, $namespacedCommands); - foreach ($namespacedCommands as &$commandsSet) { - ksort($commandsSet); + if ($globalCommands) { + ksort($globalCommands); + $sortedCommands[self::GLOBAL_NAMESPACE] = $globalCommands; } - // unset reference to keep scope clear - unset($commandsSet); - return $namespacedCommands; + if ($namespacedCommands) { + ksort($namespacedCommands); + foreach ($namespacedCommands as $key => $commandsSet) { + ksort($commandsSet); + $sortedCommands[$key] = $commandsSet; + } + } + + return $sortedCommands; } } diff --git a/api/vendor/symfony/console/Descriptor/Descriptor.php b/api/vendor/symfony/console/Descriptor/Descriptor.php index 50dd86c..d25a708 100644 --- a/api/vendor/symfony/console/Descriptor/Descriptor.php +++ b/api/vendor/symfony/console/Descriptor/Descriptor.php @@ -13,11 +13,11 @@ namespace Symfony\Component\Console\Descriptor; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Exception\InvalidArgumentException; /** * @author Jean-François Simon @@ -34,7 +34,7 @@ abstract class Descriptor implements DescriptorInterface /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { $this->output = $output; @@ -55,7 +55,7 @@ abstract class Descriptor implements DescriptorInterface $this->describeApplication($object, $options); break; default: - throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object))); + throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', \get_class($object))); } } @@ -73,50 +73,35 @@ abstract class Descriptor implements DescriptorInterface /** * Describes an InputArgument instance. * - * @param InputArgument $argument - * @param array $options - * * @return string|mixed */ - abstract protected function describeInputArgument(InputArgument $argument, array $options = array()); + abstract protected function describeInputArgument(InputArgument $argument, array $options = []); /** * Describes an InputOption instance. * - * @param InputOption $option - * @param array $options - * * @return string|mixed */ - abstract protected function describeInputOption(InputOption $option, array $options = array()); + abstract protected function describeInputOption(InputOption $option, array $options = []); /** * Describes an InputDefinition instance. * - * @param InputDefinition $definition - * @param array $options - * * @return string|mixed */ - abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array()); + abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []); /** * Describes a Command instance. * - * @param Command $command - * @param array $options - * * @return string|mixed */ - abstract protected function describeCommand(Command $command, array $options = array()); + abstract protected function describeCommand(Command $command, array $options = []); /** * Describes an Application instance. * - * @param Application $application - * @param array $options - * * @return string|mixed */ - abstract protected function describeApplication(Application $application, array $options = array()); + abstract protected function describeApplication(Application $application, array $options = []); } diff --git a/api/vendor/symfony/console/Descriptor/DescriptorInterface.php b/api/vendor/symfony/console/Descriptor/DescriptorInterface.php index 3929b6d..e3184a6 100644 --- a/api/vendor/symfony/console/Descriptor/DescriptorInterface.php +++ b/api/vendor/symfony/console/Descriptor/DescriptorInterface.php @@ -21,11 +21,9 @@ use Symfony\Component\Console\Output\OutputInterface; interface DescriptorInterface { /** - * Describes an InputArgument instance. + * Describes an object if supported. * - * @param OutputInterface $output - * @param object $object - * @param array $options + * @param object $object */ - public function describe(OutputInterface $output, $object, array $options = array()); + public function describe(OutputInterface $output, $object, array $options = []); } diff --git a/api/vendor/symfony/console/Descriptor/JsonDescriptor.php b/api/vendor/symfony/console/Descriptor/JsonDescriptor.php index a5114c6..e51c31d 100644 --- a/api/vendor/symfony/console/Descriptor/JsonDescriptor.php +++ b/api/vendor/symfony/console/Descriptor/JsonDescriptor.php @@ -29,7 +29,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeData($this->getInputArgumentData($argument), $options); } @@ -37,7 +37,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); } @@ -45,7 +45,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeData($this->getInputDefinitionData($definition), $options); } @@ -53,7 +53,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $this->writeData($this->getCommandData($command), $options); } @@ -61,17 +61,17 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace, true); - $commands = array(); + $commands = []; foreach ($description->getCommands() as $command) { $commands[] = $this->getCommandData($command); } - $data = array(); + $data = []; if ('UNKNOWN' !== $application->getName()) { $data['application']['name'] = $application->getName(); if ('UNKNOWN' !== $application->getVersion()) { @@ -92,74 +92,63 @@ class JsonDescriptor extends Descriptor /** * Writes data as json. - * - * @param array $data - * @param array $options - * - * @return array|string */ private function writeData(array $data, array $options) { - $this->write(json_encode($data, isset($options['json_encoding']) ? $options['json_encoding'] : 0)); + $flags = isset($options['json_encoding']) ? $options['json_encoding'] : 0; + + $this->write(json_encode($data, $flags)); } /** - * @param InputArgument $argument - * * @return array */ private function getInputArgumentData(InputArgument $argument) { - return array( + return [ 'name' => $argument->getName(), 'is_required' => $argument->isRequired(), 'is_array' => $argument->isArray(), 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()), - 'default' => $argument->getDefault(), - ); + 'default' => \INF === $argument->getDefault() ? 'INF' : $argument->getDefault(), + ]; } /** - * @param InputOption $option - * * @return array */ private function getInputOptionData(InputOption $option) { - return array( + return [ 'name' => '--'.$option->getName(), - 'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '', + 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '', 'accept_value' => $option->acceptValue(), 'is_value_required' => $option->isValueRequired(), 'is_multiple' => $option->isArray(), 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()), - 'default' => $option->getDefault(), - ); + 'default' => \INF === $option->getDefault() ? 'INF' : $option->getDefault(), + ]; } /** - * @param InputDefinition $definition - * * @return array */ private function getInputDefinitionData(InputDefinition $definition) { - $inputArguments = array(); + $inputArguments = []; foreach ($definition->getArguments() as $name => $argument) { $inputArguments[$name] = $this->getInputArgumentData($argument); } - $inputOptions = array(); + $inputOptions = []; foreach ($definition->getOptions() as $name => $option) { $inputOptions[$name] = $this->getInputOptionData($option); } - return array('arguments' => $inputArguments, 'options' => $inputOptions); + return ['arguments' => $inputArguments, 'options' => $inputOptions]; } /** - * @param Command $command - * * @return array */ private function getCommandData(Command $command) @@ -167,13 +156,13 @@ class JsonDescriptor extends Descriptor $command->getSynopsis(); $command->mergeApplicationDefinition(false); - return array( + return [ 'name' => $command->getName(), - 'usage' => array_merge(array($command->getSynopsis()), $command->getUsages(), $command->getAliases()), + 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()), 'description' => $command->getDescription(), 'help' => $command->getProcessedHelp(), 'definition' => $this->getInputDefinitionData($command->getNativeDefinition()), 'hidden' => $command->isHidden(), - ); + ]; } } diff --git a/api/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/api/vendor/symfony/console/Descriptor/MarkdownDescriptor.php index 106bff5..e624577 100644 --- a/api/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ b/api/vendor/symfony/console/Descriptor/MarkdownDescriptor.php @@ -31,7 +31,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { $decorated = $output->isDecorated(); $output->setDecorated(false); @@ -52,7 +52,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( '#### `'.($argument->getName() ?: '')."`\n\n" @@ -66,11 +66,11 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $name = '--'.$option->getName(); if ($option->getShortcut()) { - $name .= '|-'.implode('|-', explode('|', $option->getShortcut())).''; + $name .= '|-'.str_replace('|', '|-', $option->getShortcut()).''; } $this->write( @@ -86,9 +86,9 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { - if ($showArguments = count($definition->getArguments()) > 0) { + if ($showArguments = \count($definition->getArguments()) > 0) { $this->write('### Arguments'); foreach ($definition->getArguments() as $argument) { $this->write("\n\n"); @@ -96,7 +96,7 @@ class MarkdownDescriptor extends Descriptor } } - if (count($definition->getOptions()) > 0) { + if (\count($definition->getOptions()) > 0) { if ($showArguments) { $this->write("\n\n"); } @@ -112,7 +112,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $command->getSynopsis(); $command->mergeApplicationDefinition(false); @@ -122,7 +122,7 @@ class MarkdownDescriptor extends Descriptor .str_repeat('-', Helper::strlen($command->getName()) + 2)."\n\n" .($command->getDescription() ? $command->getDescription()."\n\n" : '') .'### Usage'."\n\n" - .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { + .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) { return $carry.'* `'.$usage.'`'."\n"; }) ); @@ -141,7 +141,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); diff --git a/api/vendor/symfony/console/Descriptor/TextDescriptor.php b/api/vendor/symfony/console/Descriptor/TextDescriptor.php index 1829405..9ca56ce 100644 --- a/api/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/api/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -31,16 +31,16 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { - if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) { + if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); } else { $default = ''; } $totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName()); - $spacingWidth = $totalWidth - strlen($argument->getName()); + $spacingWidth = $totalWidth - \strlen($argument->getName()); $this->writeText(sprintf(' %s %s%s%s', $argument->getName(), @@ -54,9 +54,9 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { - if ($option->acceptValue() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) { + if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); } else { $default = ''; @@ -71,7 +71,7 @@ class TextDescriptor extends Descriptor } } - $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions(array($option)); + $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions([$option]); $synopsis = sprintf('%s%s', $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', sprintf('--%s%s', $option->getName(), $value) @@ -92,7 +92,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); foreach ($definition->getArguments() as $argument) { @@ -103,7 +103,7 @@ class TextDescriptor extends Descriptor $this->writeText('Arguments:', $options); $this->writeText("\n"); foreach ($definition->getArguments() as $argument) { - $this->describeInputArgument($argument, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); $this->writeText("\n"); } } @@ -113,20 +113,20 @@ class TextDescriptor extends Descriptor } if ($definition->getOptions()) { - $laterOptions = array(); + $laterOptions = []; $this->writeText('Options:', $options); foreach ($definition->getOptions() as $option) { - if (strlen($option->getShortcut()) > 1) { + if (\strlen($option->getShortcut()) > 1) { $laterOptions[] = $option; continue; } $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); } foreach ($laterOptions as $option) { $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); } } } @@ -134,16 +134,16 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $command->getSynopsis(true); $command->getSynopsis(false); $command->mergeApplicationDefinition(false); $this->writeText('Usage:', $options); - foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) { + foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { $this->writeText("\n"); - $this->writeText(' '.$usage, $options); + $this->writeText(' '.OutputFormatter::escape($usage), $options); } $this->writeText("\n"); @@ -166,7 +166,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); @@ -202,9 +202,9 @@ class TextDescriptor extends Descriptor } // calculate max. width based on available commands per namespace - $width = $this->getColumnWidth(call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) { + $width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) { return array_intersect($namespace['commands'], array_keys($commands)); - }, $namespaces))); + }, array_values($namespaces)))); if ($describedNamespace) { $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); @@ -242,7 +242,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - private function writeText($content, array $options = array()) + private function writeText($content, array $options = []) { $this->write( isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, @@ -253,11 +253,9 @@ class TextDescriptor extends Descriptor /** * Formats command aliases to show them in the command description. * - * @param Command $command - * * @return string */ - private function getCommandAliasesText($command) + private function getCommandAliasesText(Command $command) { $text = ''; $aliases = $command->getAliases(); @@ -278,17 +276,21 @@ class TextDescriptor extends Descriptor */ private function formatDefaultValue($default) { - if (is_string($default)) { + if (\INF === $default) { + return 'INF'; + } + + if (\is_string($default)) { $default = OutputFormatter::escape($default); - } elseif (is_array($default)) { + } elseif (\is_array($default)) { foreach ($default as $key => $value) { - if (is_string($value)) { + if (\is_string($value)) { $default[$key] = OutputFormatter::escape($value); } } } - return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); + return str_replace('\\\\', '\\', json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); } /** @@ -298,7 +300,7 @@ class TextDescriptor extends Descriptor */ private function getColumnWidth(array $commands) { - $widths = array(); + $widths = []; foreach ($commands as $command) { if ($command instanceof Command) { @@ -319,7 +321,7 @@ class TextDescriptor extends Descriptor * * @return int */ - private function calculateTotalWidthForOptions($options) + private function calculateTotalWidthForOptions(array $options) { $totalWidth = 0; foreach ($options as $option) { diff --git a/api/vendor/symfony/console/Descriptor/XmlDescriptor.php b/api/vendor/symfony/console/Descriptor/XmlDescriptor.php index 03a26cc..2d25458 100644 --- a/api/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/api/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -27,8 +27,6 @@ use Symfony\Component\Console\Input\InputOption; class XmlDescriptor extends Descriptor { /** - * @param InputDefinition $definition - * * @return \DOMDocument */ public function getInputDefinitionDocument(InputDefinition $definition) @@ -50,8 +48,6 @@ class XmlDescriptor extends Descriptor } /** - * @param Command $command - * * @return \DOMDocument */ public function getCommandDocument(Command $command) @@ -68,7 +64,7 @@ class XmlDescriptor extends Descriptor $commandXML->appendChild($usagesXML = $dom->createElement('usages')); - foreach (array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()) as $usage) { + foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) { $usagesXML->appendChild($dom->createElement('usage', $usage)); } @@ -85,7 +81,6 @@ class XmlDescriptor extends Descriptor } /** - * @param Application $application * @param string|null $namespace * * @return \DOMDocument @@ -95,9 +90,9 @@ class XmlDescriptor extends Descriptor $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->appendChild($rootXml = $dom->createElement('symfony')); - if ($application->getName() !== 'UNKNOWN') { + if ('UNKNOWN' !== $application->getName()) { $rootXml->setAttribute('name', $application->getName()); - if ($application->getVersion() !== 'UNKNOWN') { + if ('UNKNOWN' !== $application->getVersion()) { $rootXml->setAttribute('version', $application->getVersion()); } } @@ -134,7 +129,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeDocument($this->getInputArgumentDocument($argument)); } @@ -142,7 +137,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeDocument($this->getInputOptionDocument($option)); } @@ -150,7 +145,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeDocument($this->getInputDefinitionDocument($definition)); } @@ -158,7 +153,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $this->writeDocument($this->getCommandDocument($command)); } @@ -166,16 +161,13 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $this->writeDocument($this->getApplicationDocument($application, isset($options['namespace']) ? $options['namespace'] : null)); } /** * Appends document children to parent node. - * - * @param \DOMNode $parentNode - * @param \DOMNode $importedParent */ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) { @@ -186,10 +178,6 @@ class XmlDescriptor extends Descriptor /** * Writes DOM document. - * - * @param \DOMDocument $dom - * - * @return \DOMDocument|string */ private function writeDocument(\DOMDocument $dom) { @@ -198,8 +186,6 @@ class XmlDescriptor extends Descriptor } /** - * @param InputArgument $argument - * * @return \DOMDocument */ private function getInputArgumentDocument(InputArgument $argument) @@ -214,7 +200,7 @@ class XmlDescriptor extends Descriptor $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - $defaults = is_array($argument->getDefault()) ? $argument->getDefault() : (is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array())); + $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : [])); foreach ($defaults as $default) { $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); $defaultXML->appendChild($dom->createTextNode($default)); @@ -224,8 +210,6 @@ class XmlDescriptor extends Descriptor } /** - * @param InputOption $option - * * @return \DOMDocument */ private function getInputOptionDocument(InputOption $option) @@ -237,7 +221,7 @@ class XmlDescriptor extends Descriptor $pos = strpos($option->getShortcut(), '|'); if (false !== $pos) { $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos)); - $objectXML->setAttribute('shortcuts', '-'.implode('|-', explode('|', $option->getShortcut()))); + $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut())); } else { $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); } @@ -248,7 +232,7 @@ class XmlDescriptor extends Descriptor $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); if ($option->acceptValue()) { - $defaults = is_array($option->getDefault()) ? $option->getDefault() : (is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array())); + $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : [])); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); if (!empty($defaults)) { diff --git a/api/vendor/symfony/console/Event/ConsoleCommandEvent.php b/api/vendor/symfony/console/Event/ConsoleCommandEvent.php index 92adf1e..2f517c1 100644 --- a/api/vendor/symfony/console/Event/ConsoleCommandEvent.php +++ b/api/vendor/symfony/console/Event/ConsoleCommandEvent.php @@ -25,8 +25,6 @@ class ConsoleCommandEvent extends ConsoleEvent /** * Indicates if the command should be run or skipped. - * - * @var bool */ private $commandShouldRun = true; diff --git a/api/vendor/symfony/console/Event/ConsoleErrorEvent.php b/api/vendor/symfony/console/Event/ConsoleErrorEvent.php index 49edb72..51a5f56 100644 --- a/api/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ b/api/vendor/symfony/console/Event/ConsoleErrorEvent.php @@ -51,7 +51,7 @@ final class ConsoleErrorEvent extends ConsoleEvent public function setError($error) { if (!$error instanceof \Throwable && !$error instanceof \Exception) { - throw new InvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', is_object($error) ? get_class($error) : gettype($error))); + throw new InvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', \is_object($error) ? \get_class($error) : \gettype($error))); } $this->error = $error; @@ -78,6 +78,6 @@ final class ConsoleErrorEvent extends ConsoleEvent */ public function getExitCode() { - return null !== $this->exitCode ? $this->exitCode : ($this->error->getCode() ?: 1); + return null !== $this->exitCode ? $this->exitCode : (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); } } diff --git a/api/vendor/symfony/console/Event/ConsoleExceptionEvent.php b/api/vendor/symfony/console/Event/ConsoleExceptionEvent.php index a31797f..845119e 100644 --- a/api/vendor/symfony/console/Event/ConsoleExceptionEvent.php +++ b/api/vendor/symfony/console/Event/ConsoleExceptionEvent.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Console\Event; -@trigger_error(sprintf('The "%s" class is deprecated since version 3.3 and will be removed in 4.0. Use the ConsoleErrorEvent instead.', ConsoleExceptionEvent::class), E_USER_DEPRECATED); +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ConsoleErrorEvent instead.', ConsoleExceptionEvent::class), \E_USER_DEPRECATED); use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; diff --git a/api/vendor/symfony/console/EventListener/ErrorListener.php b/api/vendor/symfony/console/EventListener/ErrorListener.php index 8e35d97..783c107 100644 --- a/api/vendor/symfony/console/EventListener/ErrorListener.php +++ b/api/vendor/symfony/console/EventListener/ErrorListener.php @@ -40,10 +40,12 @@ class ErrorListener implements EventSubscriberInterface $error = $event->getError(); if (!$inputString = $this->getInputString($event)) { - return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('error' => $error, 'message' => $error->getMessage())); + $this->logger->error('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]); + + return; } - $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('error' => $error, 'command' => $inputString, 'message' => $error->getMessage())); + $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]); } public function onConsoleTerminate(ConsoleTerminateEvent $event) @@ -59,18 +61,20 @@ class ErrorListener implements EventSubscriberInterface } if (!$inputString = $this->getInputString($event)) { - return $this->logger->error('The console exited with code "{code}"', array('code' => $exitCode)); + $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]); + + return; } - $this->logger->error('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode)); + $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]); } public static function getSubscribedEvents() { - return array( - ConsoleEvents::ERROR => array('onConsoleError', -128), - ConsoleEvents::TERMINATE => array('onConsoleTerminate', -128), - ); + return [ + ConsoleEvents::ERROR => ['onConsoleError', -128], + ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128], + ]; } private static function getInputString(ConsoleEvent $event) @@ -80,7 +84,7 @@ class ErrorListener implements EventSubscriberInterface if (method_exists($input, '__toString')) { if ($commandName) { - return str_replace(array("'$commandName'", "\"$commandName\""), $commandName, (string) $input); + return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input); } return (string) $input; diff --git a/api/vendor/symfony/console/Exception/CommandNotFoundException.php b/api/vendor/symfony/console/Exception/CommandNotFoundException.php index 54f1a5b..d28fceb 100644 --- a/api/vendor/symfony/console/Exception/CommandNotFoundException.php +++ b/api/vendor/symfony/console/Exception/CommandNotFoundException.php @@ -21,12 +21,12 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce private $alternatives; /** - * @param string $message Exception message to throw - * @param array $alternatives List of similar defined names - * @param int $code Exception code - * @param Exception $previous previous exception used for the exception chaining + * @param string $message Exception message to throw + * @param array $alternatives List of similar defined names + * @param int $code Exception code + * @param \Exception $previous Previous exception used for the exception chaining */ - public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null) + public function __construct($message, array $alternatives = [], $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); diff --git a/api/vendor/symfony/console/Formatter/OutputFormatter.php b/api/vendor/symfony/console/Formatter/OutputFormatter.php index d32f091..abc8539 100644 --- a/api/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/api/vendor/symfony/console/Formatter/OutputFormatter.php @@ -21,7 +21,7 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; class OutputFormatter implements OutputFormatterInterface { private $decorated; - private $styles = array(); + private $styles = []; private $styleStack; /** @@ -50,9 +50,10 @@ class OutputFormatter implements OutputFormatterInterface public static function escapeTrailingBackslash($text) { if ('\\' === substr($text, -1)) { - $len = strlen($text); + $len = \strlen($text); $text = rtrim($text, '\\'); - $text .= str_repeat('<<', $len - strlen($text)); + $text = str_replace("\0", '', $text); + $text .= str_repeat("\0", $len - \strlen($text)); } return $text; @@ -64,7 +65,7 @@ class OutputFormatter implements OutputFormatterInterface * @param bool $decorated Whether this formatter should actually decorate strings * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances */ - public function __construct($decorated = false, array $styles = array()) + public function __construct($decorated = false, array $styles = []) { $this->decorated = (bool) $decorated; @@ -118,7 +119,7 @@ class OutputFormatter implements OutputFormatterInterface public function getStyle($name) { if (!$this->hasStyle($name)) { - throw new InvalidArgumentException(sprintf('Undefined style: %s', $name)); + throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name)); } return $this->styles[strtolower($name)]; @@ -133,7 +134,7 @@ class OutputFormatter implements OutputFormatterInterface $offset = 0; $output = ''; $tagRegex = '[a-z][a-z0-9,_=;-]*+'; - preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#ix", $message, $matches, PREG_OFFSET_CAPTURE); + preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#ix", $message, $matches, \PREG_OFFSET_CAPTURE); foreach ($matches[0] as $i => $match) { $pos = $match[1]; $text = $match[0]; @@ -144,7 +145,7 @@ class OutputFormatter implements OutputFormatterInterface // add the text up to the next tag $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset)); - $offset = $pos + strlen($text); + $offset = $pos + \strlen($text); // opening tag? if ($open = '/' != $text[1]) { @@ -156,7 +157,7 @@ class OutputFormatter implements OutputFormatterInterface if (!$open && !$tag) { // $this->styleStack->pop(); - } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { + } elseif (false === $style = $this->createStyleFromString($tag)) { $output .= $this->applyCurrentStyle($text); } elseif ($open) { $this->styleStack->push($style); @@ -167,8 +168,8 @@ class OutputFormatter implements OutputFormatterInterface $output .= $this->applyCurrentStyle(substr($message, $offset)); - if (false !== strpos($output, '<<')) { - return strtr($output, array('\\<' => '<', '<<' => '\\')); + if (false !== strpos($output, "\0")) { + return strtr($output, ["\0" => '\\', '\\<' => '<']); } return str_replace('\\<', '<', $output); @@ -195,26 +196,27 @@ class OutputFormatter implements OutputFormatterInterface return $this->styles[$string]; } - if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, PREG_SET_ORDER)) { + if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, \PREG_SET_ORDER)) { return false; } $style = new OutputFormatterStyle(); foreach ($matches as $match) { array_shift($match); + $match[0] = strtolower($match[0]); if ('fg' == $match[0]) { - $style->setForeground($match[1]); + $style->setForeground(strtolower($match[1])); } elseif ('bg' == $match[0]) { - $style->setBackground($match[1]); + $style->setBackground(strtolower($match[1])); } elseif ('options' === $match[0]) { - preg_match_all('([^,;]+)', $match[1], $options); + preg_match_all('([^,;]+)', strtolower($match[1]), $options); $options = array_shift($options); foreach ($options as $option) { try { $style->setOption($option); } catch (\InvalidArgumentException $e) { - @trigger_error(sprintf('Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), E_USER_DEPRECATED); + @trigger_error(sprintf('Unknown style options are deprecated since Symfony 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), \E_USER_DEPRECATED); return false; } @@ -236,6 +238,6 @@ class OutputFormatter implements OutputFormatterInterface */ private function applyCurrentStyle($text) { - return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; + return $this->isDecorated() && \strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; } } diff --git a/api/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/api/vendor/symfony/console/Formatter/OutputFormatterStyle.php index c7c6b4a..7075c72 100644 --- a/api/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ b/api/vendor/symfony/console/Formatter/OutputFormatterStyle.php @@ -20,39 +20,39 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class OutputFormatterStyle implements OutputFormatterStyleInterface { - private static $availableForegroundColors = array( - 'black' => array('set' => 30, 'unset' => 39), - 'red' => array('set' => 31, 'unset' => 39), - 'green' => array('set' => 32, 'unset' => 39), - 'yellow' => array('set' => 33, 'unset' => 39), - 'blue' => array('set' => 34, 'unset' => 39), - 'magenta' => array('set' => 35, 'unset' => 39), - 'cyan' => array('set' => 36, 'unset' => 39), - 'white' => array('set' => 37, 'unset' => 39), - 'default' => array('set' => 39, 'unset' => 39), - ); - private static $availableBackgroundColors = array( - 'black' => array('set' => 40, 'unset' => 49), - 'red' => array('set' => 41, 'unset' => 49), - 'green' => array('set' => 42, 'unset' => 49), - 'yellow' => array('set' => 43, 'unset' => 49), - 'blue' => array('set' => 44, 'unset' => 49), - 'magenta' => array('set' => 45, 'unset' => 49), - 'cyan' => array('set' => 46, 'unset' => 49), - 'white' => array('set' => 47, 'unset' => 49), - 'default' => array('set' => 49, 'unset' => 49), - ); - private static $availableOptions = array( - 'bold' => array('set' => 1, 'unset' => 22), - 'underscore' => array('set' => 4, 'unset' => 24), - 'blink' => array('set' => 5, 'unset' => 25), - 'reverse' => array('set' => 7, 'unset' => 27), - 'conceal' => array('set' => 8, 'unset' => 28), - ); + private static $availableForegroundColors = [ + 'black' => ['set' => 30, 'unset' => 39], + 'red' => ['set' => 31, 'unset' => 39], + 'green' => ['set' => 32, 'unset' => 39], + 'yellow' => ['set' => 33, 'unset' => 39], + 'blue' => ['set' => 34, 'unset' => 39], + 'magenta' => ['set' => 35, 'unset' => 39], + 'cyan' => ['set' => 36, 'unset' => 39], + 'white' => ['set' => 37, 'unset' => 39], + 'default' => ['set' => 39, 'unset' => 39], + ]; + private static $availableBackgroundColors = [ + 'black' => ['set' => 40, 'unset' => 49], + 'red' => ['set' => 41, 'unset' => 49], + 'green' => ['set' => 42, 'unset' => 49], + 'yellow' => ['set' => 43, 'unset' => 49], + 'blue' => ['set' => 44, 'unset' => 49], + 'magenta' => ['set' => 45, 'unset' => 49], + 'cyan' => ['set' => 46, 'unset' => 49], + 'white' => ['set' => 47, 'unset' => 49], + 'default' => ['set' => 49, 'unset' => 49], + ]; + private static $availableOptions = [ + 'bold' => ['set' => 1, 'unset' => 22], + 'underscore' => ['set' => 4, 'unset' => 24], + 'blink' => ['set' => 5, 'unset' => 25], + 'reverse' => ['set' => 7, 'unset' => 27], + 'conceal' => ['set' => 8, 'unset' => 28], + ]; private $foreground; private $background; - private $options = array(); + private $options = []; /** * Initializes output formatter style. @@ -61,7 +61,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * @param string|null $background The style background color name * @param array $options The style options */ - public function __construct($foreground = null, $background = null, array $options = array()) + public function __construct($foreground = null, $background = null, array $options = []) { if (null !== $foreground) { $this->setForeground($foreground); @@ -69,17 +69,13 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface if (null !== $background) { $this->setBackground($background); } - if (count($options)) { + if (\count($options)) { $this->setOptions($options); } } /** - * Sets style foreground color. - * - * @param string|null $color The color name - * - * @throws InvalidArgumentException When the color name isn't defined + * {@inheritdoc} */ public function setForeground($color = null) { @@ -90,22 +86,14 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } if (!isset(static::$availableForegroundColors[$color])) { - throw new InvalidArgumentException(sprintf( - 'Invalid foreground color specified: "%s". Expected one of (%s)', - $color, - implode(', ', array_keys(static::$availableForegroundColors)) - )); + throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableForegroundColors)))); } $this->foreground = static::$availableForegroundColors[$color]; } /** - * Sets style background color. - * - * @param string|null $color The color name - * - * @throws InvalidArgumentException When the color name isn't defined + * {@inheritdoc} */ public function setBackground($color = null) { @@ -116,53 +104,33 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } if (!isset(static::$availableBackgroundColors[$color])) { - throw new InvalidArgumentException(sprintf( - 'Invalid background color specified: "%s". Expected one of (%s)', - $color, - implode(', ', array_keys(static::$availableBackgroundColors)) - )); + throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableBackgroundColors)))); } $this->background = static::$availableBackgroundColors[$color]; } /** - * Sets some specific style option. - * - * @param string $option The option name - * - * @throws InvalidArgumentException When the option name isn't defined + * {@inheritdoc} */ public function setOption($option) { if (!isset(static::$availableOptions[$option])) { - throw new InvalidArgumentException(sprintf( - 'Invalid option specified: "%s". Expected one of (%s)', - $option, - implode(', ', array_keys(static::$availableOptions)) - )); + throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions)))); } - if (!in_array(static::$availableOptions[$option], $this->options)) { + if (!\in_array(static::$availableOptions[$option], $this->options)) { $this->options[] = static::$availableOptions[$option]; } } /** - * Unsets some specific style option. - * - * @param string $option The option name - * - * @throws InvalidArgumentException When the option name isn't defined + * {@inheritdoc} */ public function unsetOption($option) { if (!isset(static::$availableOptions[$option])) { - throw new InvalidArgumentException(sprintf( - 'Invalid option specified: "%s". Expected one of (%s)', - $option, - implode(', ', array_keys(static::$availableOptions)) - )); + throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions)))); } $pos = array_search(static::$availableOptions[$option], $this->options); @@ -172,13 +140,11 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * Sets multiple style options at once. - * - * @param array $options + * {@inheritdoc} */ public function setOptions(array $options) { - $this->options = array(); + $this->options = []; foreach ($options as $option) { $this->setOption($option); @@ -186,16 +152,12 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * Applies the style to a given text. - * - * @param string $text The text to style - * - * @return string + * {@inheritdoc} */ public function apply($text) { - $setCodes = array(); - $unsetCodes = array(); + $setCodes = []; + $unsetCodes = []; if (null !== $this->foreground) { $setCodes[] = $this->foreground['set']; @@ -205,14 +167,14 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface $setCodes[] = $this->background['set']; $unsetCodes[] = $this->background['unset']; } - if (count($this->options)) { + if (\count($this->options)) { foreach ($this->options as $option) { $setCodes[] = $option['set']; $unsetCodes[] = $option['unset']; } } - if (0 === count($setCodes)) { + if (0 === \count($setCodes)) { return $text; } diff --git a/api/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/api/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php index c36fda8..af171c2 100644 --- a/api/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +++ b/api/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php @@ -21,7 +21,7 @@ interface OutputFormatterStyleInterface /** * Sets style foreground color. * - * @param string $color The color name + * @param string|null $color The color name */ public function setForeground($color = null); @@ -48,8 +48,6 @@ interface OutputFormatterStyleInterface /** * Sets multiple style options at once. - * - * @param array $options */ public function setOptions(array $options); diff --git a/api/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/api/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php index 0a531d2..5066649 100644 --- a/api/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ b/api/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php @@ -23,16 +23,8 @@ class OutputFormatterStyleStack */ private $styles; - /** - * @var OutputFormatterStyleInterface - */ private $emptyStyle; - /** - * Constructor. - * - * @param OutputFormatterStyleInterface|null $emptyStyle - */ public function __construct(OutputFormatterStyleInterface $emptyStyle = null) { $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle(); @@ -44,13 +36,11 @@ class OutputFormatterStyleStack */ public function reset() { - $this->styles = array(); + $this->styles = []; } /** * Pushes a style in the stack. - * - * @param OutputFormatterStyleInterface $style */ public function push(OutputFormatterStyleInterface $style) { @@ -60,8 +50,6 @@ class OutputFormatterStyleStack /** * Pops a style from the stack. * - * @param OutputFormatterStyleInterface|null $style - * * @return OutputFormatterStyleInterface * * @throws InvalidArgumentException When style tags incorrectly nested @@ -78,7 +66,7 @@ class OutputFormatterStyleStack foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { if ($style->apply('') === $stackedStyle->apply('')) { - $this->styles = array_slice($this->styles, 0, $index); + $this->styles = \array_slice($this->styles, 0, $index); return $stackedStyle; } @@ -98,12 +86,10 @@ class OutputFormatterStyleStack return $this->emptyStyle; } - return $this->styles[count($this->styles) - 1]; + return $this->styles[\count($this->styles) - 1]; } /** - * @param OutputFormatterStyleInterface $emptyStyle - * * @return $this */ public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) diff --git a/api/vendor/symfony/console/Helper/DebugFormatterHelper.php b/api/vendor/symfony/console/Helper/DebugFormatterHelper.php index 1119b79..16d1175 100644 --- a/api/vendor/symfony/console/Helper/DebugFormatterHelper.php +++ b/api/vendor/symfony/console/Helper/DebugFormatterHelper.php @@ -20,8 +20,8 @@ namespace Symfony\Component\Console\Helper; */ class DebugFormatterHelper extends Helper { - private $colors = array('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'); - private $started = array(); + private $colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']; + private $started = []; private $count = -1; /** @@ -35,7 +35,7 @@ class DebugFormatterHelper extends Helper */ public function start($id, $message, $prefix = 'RUN') { - $this->started[$id] = array('border' => ++$this->count % count($this->colors)); + $this->started[$id] = ['border' => ++$this->count % \count($this->colors)]; return sprintf("%s %s %s\n", $this->getBorder($id), $prefix, $message); } diff --git a/api/vendor/symfony/console/Helper/DescriptorHelper.php b/api/vendor/symfony/console/Helper/DescriptorHelper.php index 300e645..3055bae 100644 --- a/api/vendor/symfony/console/Helper/DescriptorHelper.php +++ b/api/vendor/symfony/console/Helper/DescriptorHelper.php @@ -16,8 +16,8 @@ use Symfony\Component\Console\Descriptor\JsonDescriptor; use Symfony\Component\Console\Descriptor\MarkdownDescriptor; use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Output\OutputInterface; /** * This class adds helper method to describe objects in various formats. @@ -29,11 +29,8 @@ class DescriptorHelper extends Helper /** * @var DescriptorInterface[] */ - private $descriptors = array(); + private $descriptors = []; - /** - * Constructor. - */ public function __construct() { $this @@ -51,18 +48,16 @@ class DescriptorHelper extends Helper * * format: string, the output format name * * raw_text: boolean, sets output type as raw * - * @param OutputInterface $output - * @param object $object - * @param array $options + * @param object $object * * @throws InvalidArgumentException when the given format is not supported */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { - $options = array_merge(array( + $options = array_merge([ 'raw_text' => false, 'format' => 'txt', - ), $options); + ], $options); if (!isset($this->descriptors[$options['format']])) { throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); @@ -75,8 +70,7 @@ class DescriptorHelper extends Helper /** * Registers a descriptor. * - * @param string $format - * @param DescriptorInterface $descriptor + * @param string $format * * @return $this */ diff --git a/api/vendor/symfony/console/Helper/FormatterHelper.php b/api/vendor/symfony/console/Helper/FormatterHelper.php index 6a48a77..d6eccee 100644 --- a/api/vendor/symfony/console/Helper/FormatterHelper.php +++ b/api/vendor/symfony/console/Helper/FormatterHelper.php @@ -45,21 +45,21 @@ class FormatterHelper extends Helper */ public function formatBlock($messages, $style, $large = false) { - if (!is_array($messages)) { - $messages = array($messages); + if (!\is_array($messages)) { + $messages = [$messages]; } $len = 0; - $lines = array(); + $lines = []; foreach ($messages as $message) { $message = OutputFormatter::escape($message); $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); - $len = max($this->strlen($message) + ($large ? 4 : 2), $len); + $len = max(self::strlen($message) + ($large ? 4 : 2), $len); } - $messages = $large ? array(str_repeat(' ', $len)) : array(); + $messages = $large ? [str_repeat(' ', $len)] : []; for ($i = 0; isset($lines[$i]); ++$i) { - $messages[] = $lines[$i].str_repeat(' ', $len - $this->strlen($lines[$i])); + $messages[] = $lines[$i].str_repeat(' ', $len - self::strlen($lines[$i])); } if ($large) { $messages[] = str_repeat(' ', $len); @@ -83,17 +83,13 @@ class FormatterHelper extends Helper */ public function truncate($message, $length, $suffix = '...') { - $computedLength = $length - $this->strlen($suffix); + $computedLength = $length - self::strlen($suffix); - if ($computedLength > $this->strlen($message)) { + if ($computedLength > self::strlen($message)) { return $message; } - if (false === $encoding = mb_detect_encoding($message, null, true)) { - return substr($message, 0, $length).$suffix; - } - - return mb_substr($message, 0, $length, $encoding).$suffix; + return self::substr($message, 0, $length).$suffix; } /** diff --git a/api/vendor/symfony/console/Helper/Helper.php b/api/vendor/symfony/console/Helper/Helper.php index 44bc2da..0ddddf6 100644 --- a/api/vendor/symfony/console/Helper/Helper.php +++ b/api/vendor/symfony/console/Helper/Helper.php @@ -23,9 +23,7 @@ abstract class Helper implements HelperInterface protected $helperSet = null; /** - * Sets the helper set associated with this helper. - * - * @param HelperSet $helperSet A HelperSet instance + * {@inheritdoc} */ public function setHelperSet(HelperSet $helperSet = null) { @@ -33,9 +31,7 @@ abstract class Helper implements HelperInterface } /** - * Gets the helper set associated with this helper. - * - * @return HelperSet|null + * {@inheritdoc} */ public function getHelperSet() { @@ -52,7 +48,7 @@ abstract class Helper implements HelperInterface public static function strlen($string) { if (false === $encoding = mb_detect_encoding($string, null, true)) { - return strlen($string); + return \strlen($string); } return mb_strwidth($string, $encoding); @@ -78,24 +74,24 @@ abstract class Helper implements HelperInterface public static function formatTime($secs) { - static $timeFormats = array( - array(0, '< 1 sec'), - array(1, '1 sec'), - array(2, 'secs', 1), - array(60, '1 min'), - array(120, 'mins', 60), - array(3600, '1 hr'), - array(7200, 'hrs', 3600), - array(86400, '1 day'), - array(172800, 'days', 86400), - ); + static $timeFormats = [ + [0, '< 1 sec'], + [1, '1 sec'], + [2, 'secs', 1], + [60, '1 min'], + [120, 'mins', 60], + [3600, '1 hr'], + [7200, 'hrs', 3600], + [86400, '1 day'], + [172800, 'days', 86400], + ]; foreach ($timeFormats as $index => $format) { if ($secs >= $format[0]) { if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0]) - || $index == count($timeFormats) - 1 + || $index == \count($timeFormats) - 1 ) { - if (2 == count($format)) { + if (2 == \count($format)) { return $format[1]; } diff --git a/api/vendor/symfony/console/Helper/HelperInterface.php b/api/vendor/symfony/console/Helper/HelperInterface.php index 5a923e0..1ce8235 100644 --- a/api/vendor/symfony/console/Helper/HelperInterface.php +++ b/api/vendor/symfony/console/Helper/HelperInterface.php @@ -20,8 +20,6 @@ interface HelperInterface { /** * Sets the helper set associated with this helper. - * - * @param HelperSet $helperSet A HelperSet instance */ public function setHelperSet(HelperSet $helperSet = null); diff --git a/api/vendor/symfony/console/Helper/HelperSet.php b/api/vendor/symfony/console/Helper/HelperSet.php index 6f12b39..c73fecd 100644 --- a/api/vendor/symfony/console/Helper/HelperSet.php +++ b/api/vendor/symfony/console/Helper/HelperSet.php @@ -24,18 +24,16 @@ class HelperSet implements \IteratorAggregate /** * @var Helper[] */ - private $helpers = array(); + private $helpers = []; private $command; /** - * Constructor. - * * @param Helper[] $helpers An array of helper */ - public function __construct(array $helpers = array()) + public function __construct(array $helpers = []) { foreach ($helpers as $alias => $helper) { - $this->set($helper, is_int($alias) ? null : $alias); + $this->set($helper, \is_int($alias) ? null : $alias); } } @@ -85,11 +83,6 @@ class HelperSet implements \IteratorAggregate return $this->helpers[$name]; } - /** - * Sets the command associated with this helper set. - * - * @param Command $command A Command instance - */ public function setCommand(Command $command = null) { $this->command = $command; diff --git a/api/vendor/symfony/console/Helper/InputAwareHelper.php b/api/vendor/symfony/console/Helper/InputAwareHelper.php index 4261767..0d0dba2 100644 --- a/api/vendor/symfony/console/Helper/InputAwareHelper.php +++ b/api/vendor/symfony/console/Helper/InputAwareHelper.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputAwareInterface; +use Symfony\Component\Console\Input\InputInterface; /** * An implementation of InputAwareInterface for Helpers. diff --git a/api/vendor/symfony/console/Helper/ProcessHelper.php b/api/vendor/symfony/console/Helper/ProcessHelper.php index 2c46a2c..6cafb1f 100644 --- a/api/vendor/symfony/console/Helper/ProcessHelper.php +++ b/api/vendor/symfony/console/Helper/ProcessHelper.php @@ -15,7 +15,6 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; -use Symfony\Component\Process\ProcessBuilder; /** * The ProcessHelper class provides helpers to run external processes. @@ -38,15 +37,17 @@ class ProcessHelper extends Helper */ public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE) { + if (!class_exists(Process::class)) { + throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".'); + } + if ($output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); } $formatter = $this->getHelperSet()->get('debug_formatter'); - if (is_array($cmd)) { - $process = ProcessBuilder::create($cmd)->getProcess(); - } elseif ($cmd instanceof Process) { + if ($cmd instanceof Process) { $process = $cmd; } else { $process = new Process($cmd); @@ -124,7 +125,7 @@ class ProcessHelper extends Helper $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type)); if (null !== $callback) { - call_user_func($callback, $type, $buffer); + \call_user_func($callback, $type, $buffer); } }; } diff --git a/api/vendor/symfony/console/Helper/ProgressBar.php b/api/vendor/symfony/console/Helper/ProgressBar.php index 31c49ef..4ee4912 100644 --- a/api/vendor/symfony/console/Helper/ProgressBar.php +++ b/api/vendor/symfony/console/Helper/ProgressBar.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Terminal; /** @@ -24,7 +24,6 @@ use Symfony\Component\Console\Terminal; */ final class ProgressBar { - // options private $barWidth = 28; private $barChar; private $emptyBarChar = '-'; @@ -32,10 +31,6 @@ final class ProgressBar private $format; private $internalFormat; private $redrawFreq = 1; - - /** - * @var OutputInterface - */ private $output; private $step = 0; private $max; @@ -43,7 +38,7 @@ final class ProgressBar private $stepWidth; private $percent = 0.0; private $formatLineCount; - private $messages = array(); + private $messages = []; private $overwrite = true; private $terminal; private $firstRun = true; @@ -471,19 +466,16 @@ final class ProgressBar { if ($this->overwrite) { if (!$this->firstRun) { - // Move the cursor to the beginning of the line - $this->output->write("\x0D"); - - // Erase the line - $this->output->write("\x1B[2K"); - // Erase previous lines if ($this->formatLineCount > 0) { - $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount)); + $message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount).$message; } + + // Move the cursor to the beginning of the line and erase the line + $message = "\x0D\x1B[2K$message"; } } elseif ($this->step > 0) { - $this->output->writeln(''); + $message = \PHP_EOL.$message; } $this->firstRun = false; @@ -508,8 +500,8 @@ final class ProgressBar private static function initPlaceholderFormatters() { - return array( - 'bar' => function (ProgressBar $bar, OutputInterface $output) { + return [ + 'bar' => function (self $bar, OutputInterface $output) { $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth()); $display = str_repeat($bar->getBarCharacter(), $completeBars); if ($completeBars < $bar->getBarWidth()) { @@ -519,10 +511,10 @@ final class ProgressBar return $display; }, - 'elapsed' => function (ProgressBar $bar) { + 'elapsed' => function (self $bar) { return Helper::formatTime(time() - $bar->getStartTime()); }, - 'remaining' => function (ProgressBar $bar) { + 'remaining' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); } @@ -535,7 +527,7 @@ final class ProgressBar return Helper::formatTime($remaining); }, - 'estimated' => function (ProgressBar $bar) { + 'estimated' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); } @@ -548,24 +540,24 @@ final class ProgressBar return Helper::formatTime($estimated); }, - 'memory' => function (ProgressBar $bar) { + 'memory' => function (self $bar) { return Helper::formatMemory(memory_get_usage(true)); }, - 'current' => function (ProgressBar $bar) { - return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT); + 'current' => function (self $bar) { + return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT); }, - 'max' => function (ProgressBar $bar) { + 'max' => function (self $bar) { return $bar->getMaxSteps(); }, - 'percent' => function (ProgressBar $bar) { + 'percent' => function (self $bar) { return floor($bar->getProgressPercent() * 100); }, - ); + ]; } private static function initFormats() { - return array( + return [ 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', 'normal_nomax' => ' %current% [%bar%]', @@ -577,7 +569,7 @@ final class ProgressBar 'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', 'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%', - ); + ]; } /** @@ -588,7 +580,7 @@ final class ProgressBar $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; $callback = function ($matches) { if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) { - $text = call_user_func($formatter, $this, $this->output); + $text = \call_user_func($formatter, $this, $this->output); } elseif (isset($this->messages[$matches[1]])) { $text = $this->messages[$matches[1]]; } else { diff --git a/api/vendor/symfony/console/Helper/ProgressIndicator.php b/api/vendor/symfony/console/Helper/ProgressIndicator.php index d441acc..60ca021 100644 --- a/api/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/api/vendor/symfony/console/Helper/ProgressIndicator.php @@ -34,10 +34,9 @@ class ProgressIndicator private static $formats; /** - * @param OutputInterface $output - * @param string|null $format Indicator format - * @param int $indicatorChangeInterval Change interval in milliseconds - * @param array|null $indicatorValues Animated indicator characters + * @param string|null $format Indicator format + * @param int $indicatorChangeInterval Change interval in milliseconds + * @param array|null $indicatorValues Animated indicator characters */ public function __construct(OutputInterface $output, $format = null, $indicatorChangeInterval = 100, $indicatorValues = null) { @@ -48,12 +47,12 @@ class ProgressIndicator } if (null === $indicatorValues) { - $indicatorValues = array('-', '\\', '|', '/'); + $indicatorValues = ['-', '\\', '|', '/']; } $indicatorValues = array_values($indicatorValues); - if (2 > count($indicatorValues)) { + if (2 > \count($indicatorValues)) { throw new InvalidArgumentException('Must have at least 2 indicator value characters.'); } @@ -196,7 +195,7 @@ class ProgressIndicator $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) { if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) { - return call_user_func($formatter, $self); + return \call_user_func($formatter, $self); } return $matches[0]; @@ -239,25 +238,25 @@ class ProgressIndicator private static function initPlaceholderFormatters() { - return array( - 'indicator' => function (ProgressIndicator $indicator) { - return $indicator->indicatorValues[$indicator->indicatorCurrent % count($indicator->indicatorValues)]; + return [ + 'indicator' => function (self $indicator) { + return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; }, - 'message' => function (ProgressIndicator $indicator) { + 'message' => function (self $indicator) { return $indicator->message; }, - 'elapsed' => function (ProgressIndicator $indicator) { + 'elapsed' => function (self $indicator) { return Helper::formatTime(time() - $indicator->startTime); }, 'memory' => function () { return Helper::formatMemory(memory_get_usage(true)); }, - ); + ]; } private static function initFormats() { - return array( + return [ 'normal' => ' %indicator% %message%', 'normal_no_ansi' => ' %message%', @@ -266,6 +265,6 @@ class ProgressIndicator 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', - ); + ]; } } diff --git a/api/vendor/symfony/console/Helper/QuestionHelper.php b/api/vendor/symfony/console/Helper/QuestionHelper.php index dd89105..ac6f2be 100644 --- a/api/vendor/symfony/console/Helper/QuestionHelper.php +++ b/api/vendor/symfony/console/Helper/QuestionHelper.php @@ -13,13 +13,15 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\StreamableInputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Terminal; /** * The QuestionHelper class provides helpers to interact with the user. @@ -30,15 +32,11 @@ class QuestionHelper extends Helper { private $inputStream; private static $shell; - private static $stty; + private static $stty = true; /** * Asks a question to the user. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * @param Question $question The question to ask - * * @return mixed The user answer * * @throws RuntimeException If there is no data to read in the input stream @@ -50,7 +48,29 @@ class QuestionHelper extends Helper } if (!$input->isInteractive()) { - return $question->getDefault(); + $default = $question->getDefault(); + + if (null === $default) { + return $default; + } + + if ($validator = $question->getValidator()) { + return \call_user_func($question->getValidator(), $default); + } elseif ($question instanceof ChoiceQuestion) { + $choices = $question->getChoices(); + + if (!$question->isMultiselect()) { + return isset($choices[$default]) ? $choices[$default] : $default; + } + + $default = explode(',', $default); + foreach ($default as $k => $v) { + $v = trim($v); + $default[$k] = isset($choices[$v]) ? $choices[$v] : $v; + } + } + + return $default; } if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) { @@ -82,9 +102,9 @@ class QuestionHelper extends Helper */ public function setInputStream($stream) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use %s::setStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.2 and will be removed in 4.0. Use %s::setStream() instead.', __METHOD__, StreamableInputInterface::class), \E_USER_DEPRECATED); - if (!is_resource($stream)) { + if (!\is_resource($stream)) { throw new InvalidArgumentException('Input stream must be a valid resource.'); } @@ -101,8 +121,8 @@ class QuestionHelper extends Helper */ public function getInputStream() { - if (0 === func_num_args() || func_get_arg(0)) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use %s::getStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED); + if (0 === \func_num_args() || func_get_arg(0)) { + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.2 and will be removed in 4.0. Use %s::getStream() instead.', __METHOD__, StreamableInputInterface::class), \E_USER_DEPRECATED); } return $this->inputStream; @@ -127,27 +147,28 @@ class QuestionHelper extends Helper /** * Asks the question to the user. * - * @param OutputInterface $output - * @param Question $question + * @return bool|mixed|string|null * - * @return bool|mixed|null|string - * - * @throws \Exception - * @throws \RuntimeException + * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden */ private function doAsk(OutputInterface $output, Question $question) { $this->writePrompt($output, $question); - $inputStream = $this->inputStream ?: STDIN; + $inputStream = $this->inputStream ?: \STDIN; $autocomplete = $question->getAutocompleterValues(); - if (null === $autocomplete || !$this->hasSttyAvailable()) { + if (\function_exists('sapi_windows_cp_set')) { + // Codepage used by cmd.exe on Windows to allow special characters (éàüñ). + @sapi_windows_cp_set(1252); + } + + if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) { $ret = false; if ($question->isHidden()) { try { $ret = trim($this->getHiddenResponse($output, $inputStream)); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { if (!$question->isHiddenFallback()) { throw $e; } @@ -157,15 +178,15 @@ class QuestionHelper extends Helper if (false === $ret) { $ret = fgets($inputStream, 4096); if (false === $ret) { - throw new RuntimeException('Aborted'); + throw new RuntimeException('Aborted.'); } $ret = trim($ret); } } else { - $ret = trim($this->autocomplete($output, $question, $inputStream)); + $ret = trim($this->autocomplete($output, $question, $inputStream, \is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false))); } - $ret = strlen($ret) > 0 ? $ret : $question->getDefault(); + $ret = \strlen($ret) > 0 ? $ret : $question->getDefault(); if ($normalizer = $question->getNormalizer()) { return $normalizer($ret); @@ -176,24 +197,15 @@ class QuestionHelper extends Helper /** * Outputs the question prompt. - * - * @param OutputInterface $output - * @param Question $question */ protected function writePrompt(OutputInterface $output, Question $question) { $message = $question->getQuestion(); if ($question instanceof ChoiceQuestion) { - $maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices()))); - - $messages = (array) $question->getQuestion(); - foreach ($question->getChoices() as $key => $value) { - $width = $maxWidth - $this->strlen($key); - $messages[] = ' ['.$key.str_repeat(' ', $width).'] '.$value; - } - - $output->writeln($messages); + $output->writeln(array_merge([ + $question->getQuestion(), + ], $this->formatChoiceQuestionChoices($question, 'info'))); $message = $question->getPrompt(); } @@ -202,10 +214,27 @@ class QuestionHelper extends Helper } /** - * Outputs an error message. + * @param string $tag * - * @param OutputInterface $output - * @param \Exception $error + * @return string[] + */ + protected function formatChoiceQuestionChoices(ChoiceQuestion $question, $tag) + { + $messages = []; + + $maxWidth = max(array_map('self::strlen', array_keys($choices = $question->getChoices()))); + + foreach ($choices as $key => $value) { + $padding = str_repeat(' ', $maxWidth - self::strlen($key)); + + $messages[] = sprintf(" [<$tag>%s$padding] %s", $key, $value); + } + + return $messages; + } + + /** + * Outputs an error message. */ protected function writeError(OutputInterface $output, \Exception $error) { @@ -221,21 +250,19 @@ class QuestionHelper extends Helper /** * Autocompletes a question. * - * @param OutputInterface $output - * @param Question $question - * @param resource $inputStream + * @param resource $inputStream * * @return string */ - private function autocomplete(OutputInterface $output, Question $question, $inputStream) + private function autocomplete(OutputInterface $output, Question $question, $inputStream, array $autocomplete) { - $autocomplete = $question->getAutocompleterValues(); + $fullChoice = ''; $ret = ''; $i = 0; $ofs = -1; $matches = $autocomplete; - $numMatches = count($matches); + $numMatches = \count($matches); $sttyMode = shell_exec('stty -g'); @@ -249,24 +276,28 @@ class QuestionHelper extends Helper while (!feof($inputStream)) { $c = fread($inputStream, 1); - // Backspace Character - if ("\177" === $c) { + // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false. + if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) { + shell_exec(sprintf('stty %s', $sttyMode)); + throw new RuntimeException('Aborted.'); + } elseif ("\177" === $c) { // Backspace Character if (0 === $numMatches && 0 !== $i) { --$i; + $fullChoice = self::substr($fullChoice, 0, $i); // Move cursor backwards $output->write("\033[1D"); } - if ($i === 0) { + if (0 === $i) { $ofs = -1; $matches = $autocomplete; - $numMatches = count($matches); + $numMatches = \count($matches); } else { $numMatches = 0; } // Pop the last character off the end of our string - $ret = substr($ret, 0, $i); + $ret = self::substr($ret, 0, $i); } elseif ("\033" === $c) { // Did we read an escape sequence? $c .= fread($inputStream, 2); @@ -284,13 +315,15 @@ class QuestionHelper extends Helper $ofs += ('A' === $c[2]) ? -1 : 1; $ofs = ($numMatches + $ofs) % $numMatches; } - } elseif (ord($c) < 32) { + } elseif (\ord($c) < 32) { if ("\t" === $c || "\n" === $c) { if ($numMatches > 0 && -1 !== $ofs) { $ret = $matches[$ofs]; // Echo out remaining chars for current match - $output->write(substr($ret, $i)); - $i = strlen($ret); + $remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)))); + $output->write($remainingCharacters); + $fullChoice .= $remainingCharacters; + $i = self::strlen($fullChoice); } if ("\n" === $c) { @@ -303,16 +336,27 @@ class QuestionHelper extends Helper continue; } else { + if ("\x80" <= $c) { + $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]); + } + $output->write($c); $ret .= $c; + $fullChoice .= $c; ++$i; + $tempRet = $ret; + + if ($question instanceof ChoiceQuestion && $question->isMultiselect()) { + $tempRet = $this->mostRecentlyEnteredValue($fullChoice); + } + $numMatches = 0; $ofs = 0; foreach ($autocomplete as $value) { // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) - if (0 === strpos($value, $ret) && $i !== strlen($value)) { + if (0 === strpos($value, $tempRet)) { $matches[$numMatches++] = $value; } } @@ -324,8 +368,9 @@ class QuestionHelper extends Helper if ($numMatches > 0 && -1 !== $ofs) { // Save cursor position $output->write("\0337"); - // Write highlighted text - $output->write(''.substr($matches[$ofs], $i).''); + // Write highlighted text, complete the partially entered response + $charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))); + $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).''); // Restore cursor position $output->write("\0338"); } @@ -334,7 +379,22 @@ class QuestionHelper extends Helper // Reset stty so it behaves normally again shell_exec(sprintf('stty %s', $sttyMode)); - return $ret; + return $fullChoice; + } + + private function mostRecentlyEnteredValue($entered) + { + // Determine the most recent value that the user entered + if (false === strpos($entered, ',')) { + return $entered; + } + + $choices = explode(',', $entered); + if (\strlen($lastChoice = trim($choices[\count($choices) - 1])) > 0) { + return $lastChoice; + } + + return $entered; } /** @@ -349,7 +409,7 @@ class QuestionHelper extends Helper */ private function getHiddenResponse(OutputInterface $output, $inputStream) { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; // handle code running from a phar @@ -369,7 +429,7 @@ class QuestionHelper extends Helper return $value; } - if ($this->hasSttyAvailable()) { + if (self::$stty && Terminal::hasSttyAvailable()) { $sttyMode = shell_exec('stty -g'); shell_exec('stty -echo'); @@ -377,7 +437,7 @@ class QuestionHelper extends Helper shell_exec(sprintf('stty %s', $sttyMode)); if (false === $value) { - throw new RuntimeException('Aborted'); + throw new RuntimeException('Aborted.'); } $value = trim($value); @@ -387,7 +447,7 @@ class QuestionHelper extends Helper } if (false !== $shell = $this->getShell()) { - $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; + $readCmd = 'csh' === $shell ? 'set mypassword = $<' : 'read -r mypassword'; $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); $value = rtrim(shell_exec($command)); $output->writeln(''); @@ -419,7 +479,7 @@ class QuestionHelper extends Helper } try { - return call_user_func($question->getValidator(), $interviewer()); + return \call_user_func($question->getValidator(), $interviewer()); } catch (RuntimeException $e) { throw $e; } catch (\Exception $error) { @@ -445,7 +505,7 @@ class QuestionHelper extends Helper if (file_exists('/usr/bin/env')) { // handle other OSs with bash/zsh/ksh/csh if available to hide the answer $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; - foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) { + foreach (['bash', 'zsh', 'ksh', 'csh'] as $sh) { if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { self::$shell = $sh; break; @@ -455,20 +515,4 @@ class QuestionHelper extends Helper return self::$shell; } - - /** - * Returns whether Stty is available or not. - * - * @return bool - */ - private function hasSttyAvailable() - { - if (null !== self::$stty) { - return self::$stty; - } - - exec('stty 2>&1', $output, $exitcode); - - return self::$stty = $exitcode === 0; - } } diff --git a/api/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/api/vendor/symfony/console/Helper/SymfonyQuestionHelper.php index 25e094a..86bebd9 100644 --- a/api/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ b/api/vendor/symfony/console/Helper/SymfonyQuestionHelper.php @@ -12,13 +12,13 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Console\Formatter\OutputFormatter; /** * Symfony Style Guide compliant question helper. @@ -29,6 +29,8 @@ class SymfonyQuestionHelper extends QuestionHelper { /** * {@inheritdoc} + * + * To be removed in 4.0 */ public function ask(InputInterface $input, OutputInterface $output, Question $question) { @@ -38,7 +40,9 @@ class SymfonyQuestionHelper extends QuestionHelper $value = $validator($value); } else { // make required - if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) { + if (!\is_array($value) && !\is_bool($value) && 0 === \strlen($value)) { + @trigger_error('The default question validator is deprecated since Symfony 3.3 and will not be used anymore in version 4.0. Set a custom question validator if needed.', \E_USER_DEPRECATED); + throw new LogicException('A value is required.'); } } @@ -82,7 +86,7 @@ class SymfonyQuestionHelper extends QuestionHelper case $question instanceof ChoiceQuestion: $choices = $question->getChoices(); - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default])); + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(isset($choices[$default]) ? $choices[$default] : $default)); break; @@ -92,15 +96,15 @@ class SymfonyQuestionHelper extends QuestionHelper $output->writeln($text); - if ($question instanceof ChoiceQuestion) { - $width = max(array_map('strlen', array_keys($question->getChoices()))); + $prompt = ' > '; - foreach ($question->getChoices() as $key => $value) { - $output->writeln(sprintf(" [%-${width}s] %s", $key, $value)); - } + if ($question instanceof ChoiceQuestion) { + $output->writeln($this->formatChoiceQuestionChoices($question, 'comment')); + + $prompt = $question->getPrompt(); } - $output->write(' > '); + $output->write($prompt); } /** diff --git a/api/vendor/symfony/console/Helper/Table.php b/api/vendor/symfony/console/Helper/Table.php index 574e9b4..e6dc6a8 100644 --- a/api/vendor/symfony/console/Helper/Table.php +++ b/api/vendor/symfony/console/Helper/Table.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Output\OutputInterface; /** * Provides helpers to display a table. @@ -26,29 +26,23 @@ class Table { /** * Table headers. - * - * @var array */ - private $headers = array(); + private $headers = []; /** * Table rows. - * - * @var array */ - private $rows = array(); + private $rows = []; /** * Column widths cache. - * - * @var array */ - private $effectiveColumnWidths = array(); + private $effectiveColumnWidths = []; /** * Number of columns cache. * - * @var array + * @var int */ private $numberOfColumns; @@ -65,14 +59,14 @@ class Table /** * @var array */ - private $columnStyles = array(); + private $columnStyles = []; /** * User set column widths. * * @var array */ - private $columnWidths = array(); + private $columnWidths = []; private static $styles; @@ -199,13 +193,11 @@ class Table /** * Sets the minimum width of all columns. * - * @param array $widths - * * @return $this */ public function setColumnWidths(array $widths) { - $this->columnWidths = array(); + $this->columnWidths = []; foreach ($widths as $index => $width) { $this->setColumnWidth($index, $width); } @@ -216,8 +208,8 @@ class Table public function setHeaders(array $headers) { $headers = array_values($headers); - if (!empty($headers) && !is_array($headers[0])) { - $headers = array($headers); + if (!empty($headers) && !\is_array($headers[0])) { + $headers = [$headers]; } $this->headers = $headers; @@ -227,7 +219,7 @@ class Table public function setRows(array $rows) { - $this->rows = array(); + $this->rows = []; return $this->addRows($rows); } @@ -249,7 +241,7 @@ class Table return $this; } - if (!is_array($row)) { + if (!\is_array($row)) { throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.'); } @@ -269,13 +261,14 @@ class Table * Renders table to output. * * Example: - * +---------------+-----------------------+------------------+ - * | ISBN | Title | Author | - * +---------------+-----------------------+------------------+ - * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | - * +---------------+-----------------------+------------------+ + * + * +---------------+-----------------------+------------------+ + * | ISBN | Title | Author | + * +---------------+-----------------------+------------------+ + * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | + * +---------------+-----------------------+------------------+ */ public function render() { @@ -309,7 +302,9 @@ class Table /** * Renders horizontal header separator. * - * Example: +-----+-----------+-------+ + * Example: + * + * +-----+-----------+-------+ */ private function renderRowSeparator() { @@ -340,9 +335,10 @@ class Table /** * Renders table row. * - * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * Example: + * + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * - * @param array $row * @param string $cellFormat */ private function renderRow(array $row, $cellFormat) @@ -362,7 +358,6 @@ class Table /** * Renders table cell with padding. * - * @param array $row * @param int $column * @param string $cellFormat */ @@ -379,7 +374,7 @@ class Table // str_pad won't work properly with multi-byte strings, we need to fix the padding if (false !== $encoding = mb_detect_encoding($cell, null, true)) { - $width += strlen($cell) - mb_strwidth($cell, $encoding); + $width += \strlen($cell) - mb_strwidth($cell, $encoding); } $style = $this->getColumnStyle($column); @@ -403,7 +398,7 @@ class Table return; } - $columns = array(0); + $columns = [0]; foreach (array_merge($this->headers, $this->rows) as $row) { if ($row instanceof TableSeparator) { continue; @@ -417,8 +412,8 @@ class Table private function buildTableRows($rows) { - $unmergedRows = array(); - for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) { + $unmergedRows = []; + for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) { $rows = $this->fillNextRows($rows, $rowKey); // Remove any new line breaks and replace it with a new line @@ -429,7 +424,7 @@ class Table $lines = explode("\n", str_replace("\n", "\n", $cell)); foreach ($lines as $lineKey => $line) { if ($cell instanceof TableCell) { - $line = new TableCell($line, array('colspan' => $cell->getColspan())); + $line = new TableCell($line, ['colspan' => $cell->getColspan()]); } if (0 === $lineKey) { $rows[$rowKey][$column] = $line; @@ -440,7 +435,7 @@ class Table } } - $tableRows = array(); + $tableRows = []; foreach ($rows as $rowKey => $row) { $tableRows[] = $this->fillCells($row); if (isset($unmergedRows[$rowKey])) { @@ -454,31 +449,35 @@ class Table /** * fill rows that contains rowspan > 1. * - * @param array $rows - * @param int $line + * @param int $line * * @return array + * + * @throws InvalidArgumentException */ - private function fillNextRows($rows, $line) + private function fillNextRows(array $rows, $line) { - $unmergedRows = array(); + $unmergedRows = []; foreach ($rows[$line] as $column => $cell) { + if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { + throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', \gettype($cell))); + } if ($cell instanceof TableCell && $cell->getRowspan() > 1) { $nbLines = $cell->getRowspan() - 1; - $lines = array($cell); + $lines = [$cell]; if (strstr($cell, "\n")) { $lines = explode("\n", str_replace("\n", "\n", $cell)); - $nbLines = count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; + $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; - $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan())); + $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan()]); unset($lines[0]); } // create a two dimensional array (rowspan x colspan) - $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows); + $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows); foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : ''; - $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan())); + $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan()]); if ($nbLines === $unmergedRowKey - $line) { break; } @@ -488,10 +487,10 @@ class Table foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { // we need to know if $unmergedRow will be merged or inserted into $rows - if (isset($rows[$unmergedRowKey]) && is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { + if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { foreach ($unmergedRow as $cellKey => $cell) { // insert cell into row at cellKey position - array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell)); + array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]); } } else { $row = $this->copyRow($rows, $unmergedRowKey - 1); @@ -500,7 +499,7 @@ class Table $row[$column] = $unmergedRow[$column]; } } - array_splice($rows, $unmergedRowKey, 0, array($row)); + array_splice($rows, $unmergedRowKey, 0, [$row]); } } @@ -510,13 +509,11 @@ class Table /** * fill cells for a row that contains colspan > 1. * - * @param array $row - * * @return array */ private function fillCells($row) { - $newRow = array(); + $newRow = []; foreach ($row as $column => $cell) { $newRow[] = $cell; if ($cell instanceof TableCell && $cell->getColspan() > 1) { @@ -531,18 +528,17 @@ class Table } /** - * @param array $rows - * @param int $line + * @param int $line * * @return array */ - private function copyRow($rows, $line) + private function copyRow(array $rows, $line) { $row = $rows[$line]; foreach ($row as $cellKey => $cellValue) { $row[$cellKey] = ''; if ($cellValue instanceof TableCell) { - $row[$cellKey] = new TableCell('', array('colspan' => $cellValue->getColspan())); + $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]); } } @@ -552,13 +548,11 @@ class Table /** * Gets number of columns by row. * - * @param array $row - * * @return int */ private function getNumberOfColumns(array $row) { - $columns = count($row); + $columns = \count($row); foreach ($row as $column) { $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0; } @@ -569,11 +563,9 @@ class Table /** * Gets list of columns for the given row. * - * @param array $row - * * @return array */ - private function getRowColumns($row) + private function getRowColumns(array $row) { $columns = range(0, $this->numberOfColumns - 1); foreach ($row as $cellKey => $cell) { @@ -588,13 +580,11 @@ class Table /** * Calculates columns widths. - * - * @param array $rows */ - private function calculateColumnsWidth($rows) + private function calculateColumnsWidth(array $rows) { for ($column = 0; $column < $this->numberOfColumns; ++$column) { - $lengths = array(); + $lengths = []; foreach ($rows as $row) { if ($row instanceof TableSeparator) { continue; @@ -616,7 +606,7 @@ class Table $lengths[] = $this->getCellWidth($row, $column); } - $this->effectiveColumnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2; + $this->effectiveColumnWidths[$column] = max($lengths) + Helper::strlen($this->style->getCellRowContentFormat()) - 2; } } @@ -627,14 +617,13 @@ class Table */ private function getColumnSeparatorWidth() { - return strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + return Helper::strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); } /** * Gets cell width. * - * @param array $row - * @param int $column + * @param int $column * * @return int */ @@ -657,7 +646,7 @@ class Table */ private function cleanup() { - $this->effectiveColumnWidths = array(); + $this->effectiveColumnWidths = []; $this->numberOfColumns = null; } @@ -686,12 +675,12 @@ class Table ->setCellHeaderFormat('%s') ; - return array( + return [ 'default' => new TableStyle(), 'borderless' => $borderless, 'compact' => $compact, 'symfony-style-guide' => $styleGuide, - ); + ]; } private function resolveStyle($name) diff --git a/api/vendor/symfony/console/Helper/TableCell.php b/api/vendor/symfony/console/Helper/TableCell.php index a3064fc..78e5d69 100644 --- a/api/vendor/symfony/console/Helper/TableCell.php +++ b/api/vendor/symfony/console/Helper/TableCell.php @@ -18,26 +18,18 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class TableCell { - /** - * @var string - */ private $value; - - /** - * @var array - */ - private $options = array( + private $options = [ 'rowspan' => 1, 'colspan' => 1, - ); + ]; /** * @param string $value - * @param array $options */ - public function __construct($value = '', array $options = array()) + public function __construct($value = '', array $options = []) { - if (is_numeric($value) && !is_string($value)) { + if (is_numeric($value) && !\is_string($value)) { $value = (string) $value; } diff --git a/api/vendor/symfony/console/Helper/TableSeparator.php b/api/vendor/symfony/console/Helper/TableSeparator.php index 8cc73e6..e541c53 100644 --- a/api/vendor/symfony/console/Helper/TableSeparator.php +++ b/api/vendor/symfony/console/Helper/TableSeparator.php @@ -18,10 +18,7 @@ namespace Symfony\Component\Console\Helper; */ class TableSeparator extends TableCell { - /** - * @param array $options - */ - public function __construct(array $options = array()) + public function __construct(array $options = []) { parent::__construct('', $options); } diff --git a/api/vendor/symfony/console/Helper/TableStyle.php b/api/vendor/symfony/console/Helper/TableStyle.php index 2999c76..98d8847 100644 --- a/api/vendor/symfony/console/Helper/TableStyle.php +++ b/api/vendor/symfony/console/Helper/TableStyle.php @@ -30,7 +30,7 @@ class TableStyle private $cellRowFormat = '%s'; private $cellRowContentFormat = ' %s '; private $borderFormat = '%s'; - private $padType = STR_PAD_RIGHT; + private $padType = \STR_PAD_RIGHT; /** * Sets padding character, used for cell padding. @@ -42,7 +42,7 @@ class TableStyle public function setPaddingChar($paddingChar) { if (!$paddingChar) { - throw new LogicException('The padding char must not be empty'); + throw new LogicException('The padding char must not be empty.'); } $this->paddingChar = $paddingChar; @@ -125,7 +125,7 @@ class TableStyle /** * Gets crossing character. * - * @return string $crossingChar + * @return string */ public function getCrossingChar() { @@ -237,7 +237,7 @@ class TableStyle */ public function setPadType($padType) { - if (!in_array($padType, array(STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH), true)) { + if (!\in_array($padType, [\STR_PAD_LEFT, \STR_PAD_RIGHT, \STR_PAD_BOTH], true)) { throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).'); } diff --git a/api/vendor/symfony/console/Input/ArgvInput.php b/api/vendor/symfony/console/Input/ArgvInput.php index 85cd779..fb2b358 100644 --- a/api/vendor/symfony/console/Input/ArgvInput.php +++ b/api/vendor/symfony/console/Input/ArgvInput.php @@ -44,16 +44,12 @@ class ArgvInput extends Input private $parsed; /** - * Constructor. - * * @param array|null $argv An array of parameters from the CLI (in the argv format) * @param InputDefinition|null $definition A InputDefinition instance */ public function __construct(array $argv = null, InputDefinition $definition = null) { - if (null === $argv) { - $argv = $_SERVER['argv']; - } + $argv = null !== $argv ? $argv : (isset($_SERVER['argv']) ? $_SERVER['argv'] : []); // strip the application name array_shift($argv); @@ -99,7 +95,7 @@ class ArgvInput extends Input { $name = substr($token, 1); - if (strlen($name) > 1) { + if (\strlen($name) > 1) { if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { // an option with a value (with no space) $this->addShortOption($name[0], substr($name, 1)); @@ -120,10 +116,11 @@ class ArgvInput extends Input */ private function parseShortOptionSet($name) { - $len = strlen($name); + $len = \strlen($name); for ($i = 0; $i < $len; ++$i) { if (!$this->definition->hasShortcut($name[$i])) { - throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); + $encoding = mb_detect_encoding($name, null, true); + throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding))); } $option = $this->definition->getOptionForShortcut($name[$i]); @@ -147,10 +144,10 @@ class ArgvInput extends Input $name = substr($token, 2); if (false !== $pos = strpos($name, '=')) { - if (0 === strlen($value = substr($name, $pos + 1))) { + if (0 === \strlen($value = substr($name, $pos + 1))) { // if no value after "=" then substr() returns "" since php7 only, false before - // see http://php.net/manual/fr/migration70.incompatible.php#119151 - if (PHP_VERSION_ID < 70000 && false === $value) { + // see https://php.net/migration70.incompatible.php#119151 + if (\PHP_VERSION_ID < 70000 && false === $value) { $value = ''; } array_unshift($this->parsed, $value); @@ -170,12 +167,12 @@ class ArgvInput extends Input */ private function parseArgument($token) { - $c = count($this->arguments); + $c = \count($this->arguments); // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { $arg = $this->definition->getArgument($c); - $this->arguments[$arg->getName()] = $arg->isArray() ? array($token) : $token; + $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; // if last argument isArray(), append token to last argument } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { @@ -185,7 +182,7 @@ class ArgvInput extends Input // unexpected argument } else { $all = $this->definition->getArguments(); - if (count($all)) { + if (\count($all)) { throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)))); } @@ -230,11 +227,11 @@ class ArgvInput extends Input throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); } - if (in_array($value, array('', null), true) && $option->acceptValue() && count($this->parsed)) { + if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) { // if option accepts an optional or mandatory argument // let's see if there is one provided $next = array_shift($this->parsed); - if ((isset($next[0]) && '-' !== $next[0]) || in_array($next, array('', null), true)) { + if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) { $value = $next; } else { array_unshift($this->parsed, $next); @@ -263,13 +260,34 @@ class ArgvInput extends Input */ public function getFirstArgument() { - foreach ($this->tokens as $token) { + $isOption = false; + foreach ($this->tokens as $i => $token) { if ($token && '-' === $token[0]) { + if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) { + continue; + } + + // If it's a long option, consider that everything after "--" is the option name. + // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator) + $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1); + if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) { + // noop + } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) { + $isOption = true; + } + + continue; + } + + if ($isOption) { + $isOption = false; continue; } return $token; } + + return null; } /** @@ -280,11 +298,15 @@ class ArgvInput extends Input $values = (array) $values; foreach ($this->tokens as $token) { - if ($onlyParams && $token === '--') { + if ($onlyParams && '--' === $token) { return false; } foreach ($values as $value) { - if ($token === $value || 0 === strpos($token, $value.'=')) { + // Options with values: + // For long options, test for '--option=' at beginning + // For short options, test for '-o' at beginning + $leading = 0 === strpos($value, '--') ? $value.'=' : $value; + if ($token === $value || '' !== $leading && 0 === strpos($token, $leading)) { return true; } } @@ -301,20 +323,23 @@ class ArgvInput extends Input $values = (array) $values; $tokens = $this->tokens; - while (0 < count($tokens)) { + while (0 < \count($tokens)) { $token = array_shift($tokens); - if ($onlyParams && $token === '--') { - return false; + if ($onlyParams && '--' === $token) { + return $default; } foreach ($values as $value) { - if ($token === $value || 0 === strpos($token, $value.'=')) { - if (false !== $pos = strpos($token, '=')) { - return substr($token, $pos + 1); - } - + if ($token === $value) { return array_shift($tokens); } + // Options with values: + // For long options, test for '--option=' at beginning + // For short options, test for '-o' at beginning + $leading = 0 === strpos($value, '--') ? $value.'=' : $value; + if ('' !== $leading && 0 === strpos($token, $leading)) { + return substr($token, \strlen($leading)); + } } } @@ -333,7 +358,7 @@ class ArgvInput extends Input return $match[1].$this->escapeToken($match[2]); } - if ($token && $token[0] !== '-') { + if ($token && '-' !== $token[0]) { return $this->escapeToken($token); } diff --git a/api/vendor/symfony/console/Input/ArrayInput.php b/api/vendor/symfony/console/Input/ArrayInput.php index 434ec02..b2ebc7c 100644 --- a/api/vendor/symfony/console/Input/ArrayInput.php +++ b/api/vendor/symfony/console/Input/ArrayInput.php @@ -19,7 +19,7 @@ use Symfony\Component\Console\Exception\InvalidOptionException; * * Usage: * - * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); + * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']); * * @author Fabien Potencier */ @@ -27,12 +27,6 @@ class ArrayInput extends Input { private $parameters; - /** - * Constructor. - * - * @param array $parameters An array of parameters - * @param InputDefinition|null $definition A InputDefinition instance - */ public function __construct(array $parameters, InputDefinition $definition = null) { $this->parameters = $parameters; @@ -45,13 +39,15 @@ class ArrayInput extends Input */ public function getFirstArgument() { - foreach ($this->parameters as $key => $value) { - if ($key && '-' === $key[0]) { + foreach ($this->parameters as $param => $value) { + if ($param && \is_string($param) && '-' === $param[0]) { continue; } return $value; } + + return null; } /** @@ -62,15 +58,15 @@ class ArrayInput extends Input $values = (array) $values; foreach ($this->parameters as $k => $v) { - if (!is_int($k)) { + if (!\is_int($k)) { $v = $k; } - if ($onlyParams && $v === '--') { + if ($onlyParams && '--' === $v) { return false; } - if (in_array($v, $values)) { + if (\in_array($v, $values)) { return true; } } @@ -86,15 +82,15 @@ class ArrayInput extends Input $values = (array) $values; foreach ($this->parameters as $k => $v) { - if ($onlyParams && ($k === '--' || (is_int($k) && $v === '--'))) { - return false; + if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) { + return $default; } - if (is_int($k)) { - if (in_array($v, $values)) { + if (\is_int($k)) { + if (\in_array($v, $values)) { return true; } - } elseif (in_array($k, $values)) { + } elseif (\in_array($k, $values)) { return $v; } } @@ -109,12 +105,18 @@ class ArrayInput extends Input */ public function __toString() { - $params = array(); + $params = []; foreach ($this->parameters as $param => $val) { - if ($param && '-' === $param[0]) { - $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); + if ($param && \is_string($param) && '-' === $param[0]) { + if (\is_array($val)) { + foreach ($val as $v) { + $params[] = $param.('' != $v ? '='.$this->escapeToken($v) : ''); + } + } else { + $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); + } } else { - $params[] = $this->escapeToken($val); + $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); } } @@ -127,12 +129,12 @@ class ArrayInput extends Input protected function parse() { foreach ($this->parameters as $key => $value) { - if ($key === '--') { + if ('--' === $key) { return; } if (0 === strpos($key, '--')) { $this->addLongOption(substr($key, 2), $value); - } elseif ('-' === $key[0]) { + } elseif (0 === strpos($key, '-')) { $this->addShortOption(substr($key, 1), $value); } else { $this->addArgument($key, $value); diff --git a/api/vendor/symfony/console/Input/Input.php b/api/vendor/symfony/console/Input/Input.php index 244e7d4..c122031 100644 --- a/api/vendor/symfony/console/Input/Input.php +++ b/api/vendor/symfony/console/Input/Input.php @@ -27,20 +27,12 @@ use Symfony\Component\Console\Exception\RuntimeException; */ abstract class Input implements InputInterface, StreamableInputInterface { - /** - * @var InputDefinition - */ protected $definition; protected $stream; - protected $options = array(); - protected $arguments = array(); + protected $options = []; + protected $arguments = []; protected $interactive = true; - /** - * Constructor. - * - * @param InputDefinition|null $definition A InputDefinition instance - */ public function __construct(InputDefinition $definition = null) { if (null === $definition) { @@ -56,8 +48,8 @@ abstract class Input implements InputInterface, StreamableInputInterface */ public function bind(InputDefinition $definition) { - $this->arguments = array(); - $this->options = array(); + $this->arguments = []; + $this->options = []; $this->definition = $definition; $this->parse(); @@ -77,10 +69,10 @@ abstract class Input implements InputInterface, StreamableInputInterface $givenArguments = $this->arguments; $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { - return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); + return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); }); - if (count($missingArguments) > 0) { + if (\count($missingArguments) > 0) { throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); } } @@ -158,7 +150,7 @@ abstract class Input implements InputInterface, StreamableInputInterface throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); } - return array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); + return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); } /** diff --git a/api/vendor/symfony/console/Input/InputArgument.php b/api/vendor/symfony/console/Input/InputArgument.php index 048ee4f..4c2b6a6 100644 --- a/api/vendor/symfony/console/Input/InputArgument.php +++ b/api/vendor/symfony/console/Input/InputArgument.php @@ -31,12 +31,10 @@ class InputArgument private $description; /** - * Constructor. - * - * @param string $name The argument name - * @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL - * @param string $description A description text - * @param mixed $default The default value (for self::OPTIONAL mode only) + * @param string $name The argument name + * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param string|string[]|null $default The default value (for self::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid */ @@ -44,7 +42,7 @@ class InputArgument { if (null === $mode) { $mode = self::OPTIONAL; - } elseif (!is_int($mode) || $mode > 7 || $mode < 1) { + } elseif (!\is_int($mode) || $mode > 7 || $mode < 1) { throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); } @@ -88,7 +86,7 @@ class InputArgument /** * Sets the default value. * - * @param mixed $default The default value + * @param string|string[]|null $default The default value * * @throws LogicException When incorrect default value is given */ @@ -100,8 +98,8 @@ class InputArgument if ($this->isArray()) { if (null === $default) { - $default = array(); - } elseif (!is_array($default)) { + $default = []; + } elseif (!\is_array($default)) { throw new LogicException('A default value for an array argument must be an array.'); } } @@ -112,7 +110,7 @@ class InputArgument /** * Returns the default value. * - * @return mixed The default value + * @return string|string[]|null The default value */ public function getDefault() { diff --git a/api/vendor/symfony/console/Input/InputAwareInterface.php b/api/vendor/symfony/console/Input/InputAwareInterface.php index d0f11e9..5a288de 100644 --- a/api/vendor/symfony/console/Input/InputAwareInterface.php +++ b/api/vendor/symfony/console/Input/InputAwareInterface.php @@ -21,8 +21,6 @@ interface InputAwareInterface { /** * Sets the Console Input. - * - * @param InputInterface */ public function setInput(InputInterface $input); } diff --git a/api/vendor/symfony/console/Input/InputDefinition.php b/api/vendor/symfony/console/Input/InputDefinition.php index 85b778b..d953f9b 100644 --- a/api/vendor/symfony/console/Input/InputDefinition.php +++ b/api/vendor/symfony/console/Input/InputDefinition.php @@ -19,10 +19,10 @@ use Symfony\Component\Console\Exception\LogicException; * * Usage: * - * $definition = new InputDefinition(array( - * new InputArgument('name', InputArgument::REQUIRED), - * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), - * )); + * $definition = new InputDefinition([ + * new InputArgument('name', InputArgument::REQUIRED), + * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), + * ]); * * @author Fabien Potencier */ @@ -36,24 +36,20 @@ class InputDefinition private $shortcuts; /** - * Constructor. - * * @param array $definition An array of InputArgument and InputOption instance */ - public function __construct(array $definition = array()) + public function __construct(array $definition = []) { $this->setDefinition($definition); } /** * Sets the definition of the input. - * - * @param array $definition The definition array */ public function setDefinition(array $definition) { - $arguments = array(); - $options = array(); + $arguments = []; + $options = []; foreach ($definition as $item) { if ($item instanceof InputOption) { $options[] = $item; @@ -71,9 +67,9 @@ class InputDefinition * * @param InputArgument[] $arguments An array of InputArgument objects */ - public function setArguments($arguments = array()) + public function setArguments($arguments = []) { - $this->arguments = array(); + $this->arguments = []; $this->requiredCount = 0; $this->hasOptional = false; $this->hasAnArrayArgument = false; @@ -85,7 +81,7 @@ class InputDefinition * * @param InputArgument[] $arguments An array of InputArgument objects */ - public function addArguments($arguments = array()) + public function addArguments($arguments = []) { if (null !== $arguments) { foreach ($arguments as $argument) { @@ -95,10 +91,6 @@ class InputDefinition } /** - * Adds an InputArgument object. - * - * @param InputArgument $argument An InputArgument object - * * @throws LogicException When incorrect argument is given */ public function addArgument(InputArgument $argument) @@ -143,7 +135,7 @@ class InputDefinition throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); } - $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; return $arguments[$name]; } @@ -157,7 +149,7 @@ class InputDefinition */ public function hasArgument($name) { - $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; return isset($arguments[$name]); } @@ -179,7 +171,7 @@ class InputDefinition */ public function getArgumentCount() { - return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); + return $this->hasAnArrayArgument ? \PHP_INT_MAX : \count($this->arguments); } /** @@ -199,7 +191,7 @@ class InputDefinition */ public function getArgumentDefaults() { - $values = array(); + $values = []; foreach ($this->arguments as $argument) { $values[$argument->getName()] = $argument->getDefault(); } @@ -212,10 +204,10 @@ class InputDefinition * * @param InputOption[] $options An array of InputOption objects */ - public function setOptions($options = array()) + public function setOptions($options = []) { - $this->options = array(); - $this->shortcuts = array(); + $this->options = []; + $this->shortcuts = []; $this->addOptions($options); } @@ -224,7 +216,7 @@ class InputDefinition * * @param InputOption[] $options An array of InputOption objects */ - public function addOptions($options = array()) + public function addOptions($options = []) { foreach ($options as $option) { $this->addOption($option); @@ -232,10 +224,6 @@ class InputDefinition } /** - * Adds an InputOption object. - * - * @param InputOption $option An InputOption object - * * @throws LogicException When option given already exist */ public function addOption(InputOption $option) @@ -318,7 +306,7 @@ class InputDefinition /** * Gets an InputOption by shortcut. * - * @param string $shortcut the Shortcut name + * @param string $shortcut The Shortcut name * * @return InputOption An InputOption object */ @@ -334,7 +322,7 @@ class InputDefinition */ public function getOptionDefaults() { - $values = array(); + $values = []; foreach ($this->options as $option) { $values[$option->getName()] = $option->getDefault(); } @@ -350,8 +338,10 @@ class InputDefinition * @return string The InputOption name * * @throws InvalidArgumentException When option given does not exist + * + * @internal */ - private function shortcutToName($shortcut) + public function shortcutToName($shortcut) { if (!isset($this->shortcuts[$shortcut])) { throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -369,7 +359,7 @@ class InputDefinition */ public function getSynopsis($short = false) { - $elements = array(); + $elements = []; if ($short && $this->getOptions()) { $elements[] = '[options]'; @@ -390,7 +380,7 @@ class InputDefinition } } - if (count($elements) && $this->getArguments()) { + if (\count($elements) && $this->getArguments()) { $elements[] = '[--]'; } @@ -399,7 +389,7 @@ class InputDefinition if (!$argument->isRequired()) { $element = '['.$element.']'; } elseif ($argument->isArray()) { - $element = $element.' ('.$element.')'; + $element .= ' ('.$element.')'; } if ($argument->isArray()) { diff --git a/api/vendor/symfony/console/Input/InputInterface.php b/api/vendor/symfony/console/Input/InputInterface.php index bc66466..b9bcf3b 100644 --- a/api/vendor/symfony/console/Input/InputInterface.php +++ b/api/vendor/symfony/console/Input/InputInterface.php @@ -24,7 +24,7 @@ interface InputInterface /** * Returns the first argument from the raw parameters (not parsed). * - * @return string The value of the first argument or null otherwise + * @return string|null The value of the first argument or null otherwise */ public function getFirstArgument(); @@ -33,6 +33,8 @@ interface InputInterface * * This method is to be used to introspect the input parameters * before they have been validated. It must be used carefully. + * Does not necessarily return the correct result for short options + * when multiple flags are combined in the same option. * * @param string|array $values The values to look for in the raw parameters (can be an array) * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal @@ -46,6 +48,8 @@ interface InputInterface * * This method is to be used to introspect the input parameters * before they have been validated. It must be used carefully. + * Does not necessarily return the correct result for short options + * when multiple flags are combined in the same option. * * @param string|array $values The value(s) to look for in the raw parameters (can be an array) * @param mixed $default The default value to return if no result is found @@ -58,7 +62,7 @@ interface InputInterface /** * Binds the current Input instance with the given arguments and options. * - * @param InputDefinition $definition A InputDefinition instance + * @throws RuntimeException */ public function bind(InputDefinition $definition); @@ -81,7 +85,7 @@ interface InputInterface * * @param string $name The argument name * - * @return mixed The argument value + * @return string|string[]|null The argument value * * @throws InvalidArgumentException When argument given doesn't exist */ @@ -90,8 +94,8 @@ interface InputInterface /** * Sets an argument value by name. * - * @param string $name The argument name - * @param string $value The argument value + * @param string $name The argument name + * @param string|string[]|null $value The argument value * * @throws InvalidArgumentException When argument given doesn't exist */ @@ -118,7 +122,7 @@ interface InputInterface * * @param string $name The option name * - * @return mixed The option value + * @return string|string[]|bool|null The option value * * @throws InvalidArgumentException When option given doesn't exist */ @@ -127,8 +131,8 @@ interface InputInterface /** * Sets an option value by name. * - * @param string $name The option name - * @param string|bool $value The option value + * @param string $name The option name + * @param string|string[]|bool|null $value The option value * * @throws InvalidArgumentException When option given doesn't exist */ diff --git a/api/vendor/symfony/console/Input/InputOption.php b/api/vendor/symfony/console/Input/InputOption.php index f08c5f2..b0bd28f 100644 --- a/api/vendor/symfony/console/Input/InputOption.php +++ b/api/vendor/symfony/console/Input/InputOption.php @@ -33,13 +33,11 @@ class InputOption private $description; /** - * Constructor. - * - * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int $mode The option mode: One of the VALUE_* constants - * @param string $description A description text - * @param mixed $default The default value (must be null for self::VALUE_NONE) + * @param string $name The option name + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the VALUE_* constants + * @param string $description A description text + * @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE) * * @throws InvalidArgumentException If option mode is invalid or incompatible */ @@ -58,7 +56,7 @@ class InputOption } if (null !== $shortcut) { - if (is_array($shortcut)) { + if (\is_array($shortcut)) { $shortcut = implode('|', $shortcut); } $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); @@ -72,7 +70,7 @@ class InputOption if (null === $mode) { $mode = self::VALUE_NONE; - } elseif (!is_int($mode) || $mode > 15 || $mode < 1) { + } elseif (!\is_int($mode) || $mode > 15 || $mode < 1) { throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); } @@ -91,7 +89,7 @@ class InputOption /** * Returns the option shortcut. * - * @return string The shortcut + * @return string|null The shortcut */ public function getShortcut() { @@ -151,7 +149,7 @@ class InputOption /** * Sets the default value. * - * @param mixed $default The default value + * @param string|string[]|int|bool|null $default The default value * * @throws LogicException When incorrect default value is given */ @@ -163,8 +161,8 @@ class InputOption if ($this->isArray()) { if (null === $default) { - $default = array(); - } elseif (!is_array($default)) { + $default = []; + } elseif (!\is_array($default)) { throw new LogicException('A default value for an array option must be an array.'); } } @@ -175,7 +173,7 @@ class InputOption /** * Returns the default value. * - * @return mixed The default value + * @return string|string[]|int|bool|null The default value */ public function getDefault() { @@ -195,11 +193,9 @@ class InputOption /** * Checks whether the given option equals this one. * - * @param InputOption $option option to compare - * * @return bool */ - public function equals(InputOption $option) + public function equals(self $option) { return $option->getName() === $this->getName() && $option->getShortcut() === $this->getShortcut() diff --git a/api/vendor/symfony/console/Input/StringInput.php b/api/vendor/symfony/console/Input/StringInput.php index 9ce0217..5032b34 100644 --- a/api/vendor/symfony/console/Input/StringInput.php +++ b/api/vendor/symfony/console/Input/StringInput.php @@ -28,13 +28,11 @@ class StringInput extends ArgvInput const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')'; /** - * Constructor. - * - * @param string $input An array of parameters from the CLI (in the argv format) + * @param string $input A string representing the parameters from the CLI */ public function __construct($input) { - parent::__construct(array()); + parent::__construct([]); $this->setTokens($this->tokenize($input)); } @@ -50,23 +48,23 @@ class StringInput extends ArgvInput */ private function tokenize($input) { - $tokens = array(); - $length = strlen($input); + $tokens = []; + $length = \strlen($input); $cursor = 0; while ($cursor < $length) { if (preg_match('/\s+/A', $input, $match, null, $cursor)) { } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) { - $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2))); + $tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, \strlen($match[3]) - 2))); } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) { - $tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2)); + $tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2)); } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { $tokens[] = stripcslashes($match[1]); } else { // should never happen - throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); + throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10))); } - $cursor += strlen($match[0]); + $cursor += \strlen($match[0]); } return $tokens; diff --git a/api/vendor/symfony/console/LICENSE b/api/vendor/symfony/console/LICENSE index 17d16a1..9e936ec 100644 --- a/api/vendor/symfony/console/LICENSE +++ b/api/vendor/symfony/console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2020 Fabien Potencier 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/api/vendor/symfony/console/Logger/ConsoleLogger.php b/api/vendor/symfony/console/Logger/ConsoleLogger.php index 208575c..6b1745e 100644 --- a/api/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/api/vendor/symfony/console/Logger/ConsoleLogger.php @@ -14,29 +14,23 @@ namespace Symfony\Component\Console\Logger; use Psr\Log\AbstractLogger; use Psr\Log\InvalidArgumentException; use Psr\Log\LogLevel; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; /** * PSR-3 compliant console logger. * * @author Kévin Dunglas * - * @see http://www.php-fig.org/psr/psr-3/ + * @see https://www.php-fig.org/psr/psr-3/ */ class ConsoleLogger extends AbstractLogger { const INFO = 'info'; const ERROR = 'error'; - /** - * @var OutputInterface - */ private $output; - /** - * @var array - */ - private $verbosityLevelMap = array( + private $verbosityLevelMap = [ LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, @@ -45,11 +39,8 @@ class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, - ); - /** - * @var array - */ - private $formatLevelMap = array( + ]; + private $formatLevelMap = [ LogLevel::EMERGENCY => self::ERROR, LogLevel::ALERT => self::ERROR, LogLevel::CRITICAL => self::ERROR, @@ -58,15 +49,10 @@ class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => self::INFO, LogLevel::INFO => self::INFO, LogLevel::DEBUG => self::INFO, - ); + ]; private $errored = false; - /** - * @param OutputInterface $output - * @param array $verbosityLevelMap - * @param array $formatLevelMap - */ - public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) + public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = []) { $this->output = $output; $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; @@ -76,7 +62,7 @@ class ConsoleLogger extends AbstractLogger /** * {@inheritdoc} */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (!isset($this->verbosityLevelMap[$level])) { throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); @@ -85,7 +71,7 @@ class ConsoleLogger extends AbstractLogger $output = $this->output; // Write to the error output if necessary and available - if ($this->formatLevelMap[$level] === self::ERROR) { + if (self::ERROR === $this->formatLevelMap[$level]) { if ($this->output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); } @@ -101,6 +87,8 @@ class ConsoleLogger extends AbstractLogger /** * Returns true when any messages have been logged at error levels. + * + * @return bool */ public function hasErrored() { @@ -113,21 +101,28 @@ class ConsoleLogger extends AbstractLogger * @author PHP Framework Interoperability Group * * @param string $message - * @param array $context * * @return string */ private function interpolate($message, array $context) { - // build a replacement array with braces around the context keys - $replace = array(); + if (false === strpos($message, '{')) { + return $message; + } + + $replacements = []; foreach ($context as $key => $val) { - if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { - $replace[sprintf('{%s}', $key)] = $val; + if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { + $replacements["{{$key}}"] = $val; + } elseif ($val instanceof \DateTimeInterface) { + $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); + } elseif (\is_object($val)) { + $replacements["{{$key}}"] = '[object '.\get_class($val).']'; + } else { + $replacements["{{$key}}"] = '['.\gettype($val).']'; } } - // interpolate replacement values into the message and return - return strtr($message, $replace); + return strtr($message, $replacements); } } diff --git a/api/vendor/symfony/console/Output/BufferedOutput.php b/api/vendor/symfony/console/Output/BufferedOutput.php index 205b02f..fefaac2 100644 --- a/api/vendor/symfony/console/Output/BufferedOutput.php +++ b/api/vendor/symfony/console/Output/BufferedOutput.php @@ -16,9 +16,6 @@ namespace Symfony\Component\Console\Output; */ class BufferedOutput extends Output { - /** - * @var string - */ private $buffer = ''; /** @@ -42,7 +39,7 @@ class BufferedOutput extends Output $this->buffer .= $message; if ($newline) { - $this->buffer .= PHP_EOL; + $this->buffer .= \PHP_EOL; } } } diff --git a/api/vendor/symfony/console/Output/ConsoleOutput.php b/api/vendor/symfony/console/Output/ConsoleOutput.php index 007f3f0..21a108f 100644 --- a/api/vendor/symfony/console/Output/ConsoleOutput.php +++ b/api/vendor/symfony/console/Output/ConsoleOutput.php @@ -29,14 +29,9 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; */ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface { - /** - * @var StreamOutput - */ private $stderr; /** - * Constructor. - * * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) @@ -126,11 +121,11 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface */ private function isRunningOS400() { - $checks = array( - function_exists('php_uname') ? php_uname('s') : '', + $checks = [ + \function_exists('php_uname') ? php_uname('s') : '', getenv('OSTYPE'), - PHP_OS, - ); + \PHP_OS, + ]; return false !== stripos(implode(';', $checks), 'OS400'); } diff --git a/api/vendor/symfony/console/Output/ConsoleOutputInterface.php b/api/vendor/symfony/console/Output/ConsoleOutputInterface.php index 5eb4fc7..b44ea7e 100644 --- a/api/vendor/symfony/console/Output/ConsoleOutputInterface.php +++ b/api/vendor/symfony/console/Output/ConsoleOutputInterface.php @@ -26,10 +26,5 @@ interface ConsoleOutputInterface extends OutputInterface */ public function getErrorOutput(); - /** - * Sets the OutputInterface used for errors. - * - * @param OutputInterface $error - */ public function setErrorOutput(OutputInterface $error); } diff --git a/api/vendor/symfony/console/Output/Output.php b/api/vendor/symfony/console/Output/Output.php index c12015c..c3856cc 100644 --- a/api/vendor/symfony/console/Output/Output.php +++ b/api/vendor/symfony/console/Output/Output.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Console\Output; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Formatter\OutputFormatterInterface; /** * Base class for output classes. @@ -33,8 +33,6 @@ abstract class Output implements OutputInterface private $formatter; /** - * Constructor. - * * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) * @param bool $decorated Whether to decorate messages * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) diff --git a/api/vendor/symfony/console/Output/OutputInterface.php b/api/vendor/symfony/console/Output/OutputInterface.php index a291ca7..ad785a4 100644 --- a/api/vendor/symfony/console/Output/OutputInterface.php +++ b/api/vendor/symfony/console/Output/OutputInterface.php @@ -33,7 +33,7 @@ interface OutputInterface /** * Writes a message to the output. * - * @param string|array $messages The message as an array of lines or a single string + * @param string|array $messages The message as an array of strings or a single string * @param bool $newline Whether to add a newline * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ @@ -42,7 +42,7 @@ interface OutputInterface /** * Writes a message to the output and adds a newline at the end. * - * @param string|array $messages The message as an array of lines of a single string + * @param string|array $messages The message as an array of strings or a single string * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ public function writeln($messages, $options = 0); @@ -103,11 +103,6 @@ interface OutputInterface */ public function isDecorated(); - /** - * Sets output formatter. - * - * @param OutputFormatterInterface $formatter - */ public function setFormatter(OutputFormatterInterface $formatter); /** diff --git a/api/vendor/symfony/console/Output/StreamOutput.php b/api/vendor/symfony/console/Output/StreamOutput.php index 22b29aa..451051d 100644 --- a/api/vendor/symfony/console/Output/StreamOutput.php +++ b/api/vendor/symfony/console/Output/StreamOutput.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Console\Output; use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Formatter\OutputFormatterInterface; /** @@ -20,11 +19,11 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; * * Usage: * - * $output = new StreamOutput(fopen('php://stdout', 'w')); + * $output = new StreamOutput(fopen('php://stdout', 'w')); * * As `StreamOutput` can use any stream, you can also use a file: * - * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); + * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); * * @author Fabien Potencier */ @@ -33,8 +32,6 @@ class StreamOutput extends Output private $stream; /** - * Constructor. - * * @param resource $stream A stream resource * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) @@ -44,7 +41,7 @@ class StreamOutput extends Output */ public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) { - if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { + if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); } @@ -72,11 +69,12 @@ class StreamOutput extends Output */ protected function doWrite($message, $newline) { - if (false === @fwrite($this->stream, $message) || ($newline && (false === @fwrite($this->stream, PHP_EOL)))) { - // should never happen - throw new RuntimeException('Unable to write output.'); + if ($newline) { + $message .= \PHP_EOL; } + @fwrite($this->stream, $message); + fflush($this->stream); } @@ -85,21 +83,38 @@ class StreamOutput extends Output * * Colorization is disabled if not supported by the stream: * - * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty - * - non tty consoles + * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo + * terminals via named pipes, so we can only check the environment. + * + * Reference: Composer\XdebugHandler\Process::supportsColor + * https://github.com/composer/xdebug-handler * * @return bool true if the stream supports colorization, false otherwise */ protected function hasColorSupport() { - if (DIRECTORY_SEPARATOR === '\\') { - return - '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + if ('Hyper' === getenv('TERM_PROGRAM')) { + return true; + } + + if (\DIRECTORY_SEPARATOR === '\\') { + return (\function_exists('sapi_windows_vt100_support') + && @sapi_windows_vt100_support($this->stream)) || false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } - return function_exists('posix_isatty') && @posix_isatty($this->stream); + if (\function_exists('stream_isatty')) { + return @stream_isatty($this->stream); + } + + if (\function_exists('posix_isatty')) { + return @posix_isatty($this->stream); + } + + $stat = @fstat($this->stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; } } diff --git a/api/vendor/symfony/console/Question/ChoiceQuestion.php b/api/vendor/symfony/console/Question/ChoiceQuestion.php index 5815e2b..6253284 100644 --- a/api/vendor/symfony/console/Question/ChoiceQuestion.php +++ b/api/vendor/symfony/console/Question/ChoiceQuestion.php @@ -26,8 +26,6 @@ class ChoiceQuestion extends Question private $errorMessage = 'Value "%s" is invalid'; /** - * Constructor. - * * @param string $question The question to ask to the user * @param array $choices The list of available choices * @param mixed $default The default answer to return @@ -136,30 +134,28 @@ class ChoiceQuestion extends Question $isAssoc = $this->isAssoc($choices); return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { - // Collapse all spaces. - $selectedChoices = str_replace(' ', '', $selected); - if ($multiselect) { // Check for a separated comma values - if (!preg_match('/^[^,]+(?:,[^,]+)*$/', $selectedChoices, $matches)) { + if (!preg_match('/^[^,]+(?:,[^,]+)*$/', $selected, $matches)) { throw new InvalidArgumentException(sprintf($errorMessage, $selected)); } - $selectedChoices = explode(',', $selectedChoices); + + $selectedChoices = array_map('trim', explode(',', $selected)); } else { - $selectedChoices = array($selected); + $selectedChoices = [trim($selected)]; } - $multiselectChoices = array(); + $multiselectChoices = []; foreach ($selectedChoices as $value) { - $results = array(); + $results = []; foreach ($choices as $key => $choice) { if ($choice === $value) { $results[] = $key; } } - if (count($results) > 1) { - throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results))); + if (\count($results) > 1) { + throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of "%s".', implode('" or "', $results))); } $result = array_search($value, $choices); diff --git a/api/vendor/symfony/console/Question/ConfirmationQuestion.php b/api/vendor/symfony/console/Question/ConfirmationQuestion.php index 29d9887..d871fb8 100644 --- a/api/vendor/symfony/console/Question/ConfirmationQuestion.php +++ b/api/vendor/symfony/console/Question/ConfirmationQuestion.php @@ -21,8 +21,6 @@ class ConfirmationQuestion extends Question private $trueAnswerRegex; /** - * Constructor. - * * @param string $question The question to ask to the user * @param bool $default The default answer to return, true or false * @param string $trueAnswerRegex A regex to match the "yes" answer @@ -46,7 +44,7 @@ class ConfirmationQuestion extends Question $regex = $this->trueAnswerRegex; return function ($answer) use ($default, $regex) { - if (is_bool($answer)) { + if (\is_bool($answer)) { return $answer; } @@ -55,7 +53,7 @@ class ConfirmationQuestion extends Question return $answer && $answerIsTrue; } - return !$answer || $answerIsTrue; + return '' === $answer || $answerIsTrue; }; } } diff --git a/api/vendor/symfony/console/Question/Question.php b/api/vendor/symfony/console/Question/Question.php index 6425cc5..7d016ec 100644 --- a/api/vendor/symfony/console/Question/Question.php +++ b/api/vendor/symfony/console/Question/Question.php @@ -31,8 +31,6 @@ class Question private $normalizer; /** - * Constructor. - * * @param string $question The question to ask to the user * @param mixed $default The default answer to return if the user enters nothing */ @@ -119,7 +117,7 @@ class Question /** * Gets values for the autocompleter. * - * @return null|array|\Traversable + * @return iterable|null */ public function getAutocompleterValues() { @@ -129,7 +127,7 @@ class Question /** * Sets values for the autocompleter. * - * @param null|array|\Traversable $values + * @param iterable|null $values * * @return $this * @@ -138,14 +136,12 @@ class Question */ public function setAutocompleterValues($values) { - if (is_array($values)) { + if (\is_array($values)) { $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); } - if (null !== $values && !is_array($values)) { - if (!$values instanceof \Traversable || !$values instanceof \Countable) { - throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.'); - } + if (null !== $values && !\is_array($values) && !$values instanceof \Traversable) { + throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.'); } if ($this->hidden) { @@ -160,8 +156,6 @@ class Question /** * Sets a validator for the question. * - * @param null|callable $validator - * * @return $this */ public function setValidator(callable $validator = null) @@ -174,7 +168,7 @@ class Question /** * Gets the validator for the question. * - * @return null|callable + * @return callable|null */ public function getValidator() { @@ -186,16 +180,19 @@ class Question * * Null means an unlimited number of attempts. * - * @param null|int $attempts + * @param int|null $attempts * * @return $this * - * @throws InvalidArgumentException In case the number of attempts is invalid. + * @throws InvalidArgumentException in case the number of attempts is invalid */ public function setMaxAttempts($attempts) { - if (null !== $attempts && $attempts < 1) { - throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); + if (null !== $attempts) { + $attempts = (int) $attempts; + if ($attempts < 1) { + throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); + } } $this->attempts = $attempts; @@ -208,7 +205,7 @@ class Question * * Null means an unlimited number of attempts. * - * @return null|int + * @return int|null */ public function getMaxAttempts() { @@ -220,8 +217,6 @@ class Question * * The normalizer can be a callable (a string), a closure or a class implementing __invoke. * - * @param callable $normalizer - * * @return $this */ public function setNormalizer(callable $normalizer) @@ -236,7 +231,7 @@ class Question * * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. * - * @return callable + * @return callable|null */ public function getNormalizer() { @@ -245,6 +240,6 @@ class Question protected function isAssoc($array) { - return (bool) count(array_filter(array_keys($array), 'is_string')); + return (bool) \count(array_filter(array_keys($array), 'is_string')); } } diff --git a/api/vendor/symfony/console/README.md b/api/vendor/symfony/console/README.md index 664a37c..3e2fc60 100644 --- a/api/vendor/symfony/console/README.md +++ b/api/vendor/symfony/console/README.md @@ -7,7 +7,7 @@ interfaces. Resources --------- - * [Documentation](https://symfony.com/doc/current/components/console/index.html) + * [Documentation](https://symfony.com/doc/current/components/console.html) * [Contributing](https://symfony.com/doc/current/contributing/index.html) * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) diff --git a/api/vendor/symfony/console/Style/OutputStyle.php b/api/vendor/symfony/console/Style/OutputStyle.php index 1274a98..14d2d60 100644 --- a/api/vendor/symfony/console/Style/OutputStyle.php +++ b/api/vendor/symfony/console/Style/OutputStyle.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Style; use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; /** * Decorates output to add console style guide helpers. @@ -25,9 +25,6 @@ abstract class OutputStyle implements OutputInterface, StyleInterface { private $output; - /** - * @param OutputInterface $output - */ public function __construct(OutputInterface $output) { $this->output = $output; @@ -38,7 +35,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface */ public function newLine($count = 1) { - $this->output->write(str_repeat(PHP_EOL, $count)); + $this->output->write(str_repeat(\PHP_EOL, $count)); } /** diff --git a/api/vendor/symfony/console/Style/StyleInterface.php b/api/vendor/symfony/console/Style/StyleInterface.php index 2448547..3b5b8af 100644 --- a/api/vendor/symfony/console/Style/StyleInterface.php +++ b/api/vendor/symfony/console/Style/StyleInterface.php @@ -34,8 +34,6 @@ interface StyleInterface /** * Formats a list. - * - * @param array $elements */ public function listing(array $elements); @@ -83,9 +81,6 @@ interface StyleInterface /** * Formats a table. - * - * @param array $headers - * @param array $rows */ public function table(array $headers, array $rows); @@ -96,7 +91,7 @@ interface StyleInterface * @param string|null $default * @param callable|null $validator * - * @return string + * @return mixed */ public function ask($question, $default = null, $validator = null); @@ -106,7 +101,7 @@ interface StyleInterface * @param string $question * @param callable|null $validator * - * @return string + * @return mixed */ public function askHidden($question, $validator = null); @@ -124,10 +119,9 @@ interface StyleInterface * Asks a choice question. * * @param string $question - * @param array $choices * @param string|int|null $default * - * @return string + * @return mixed */ public function choice($question, array $choices, $default = null); diff --git a/api/vendor/symfony/console/Style/SymfonyStyle.php b/api/vendor/symfony/console/Style/SymfonyStyle.php index a867961..4d83779 100644 --- a/api/vendor/symfony/console/Style/SymfonyStyle.php +++ b/api/vendor/symfony/console/Style/SymfonyStyle.php @@ -40,17 +40,13 @@ class SymfonyStyle extends OutputStyle private $lineLength; private $bufferedOutput; - /** - * @param InputInterface $input - * @param OutputInterface $output - */ public function __construct(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter()); // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not. $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH; - $this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); + $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); parent::__construct($output); } @@ -67,7 +63,7 @@ class SymfonyStyle extends OutputStyle */ public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true) { - $messages = is_array($messages) ? array_values($messages) : array($messages); + $messages = \is_array($messages) ? array_values($messages) : [$messages]; $this->autoPrependBlock(); $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape)); @@ -80,10 +76,10 @@ class SymfonyStyle extends OutputStyle public function title($message) { $this->autoPrependBlock(); - $this->writeln(array( + $this->writeln([ sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - )); + ]); $this->newLine(); } @@ -93,10 +89,10 @@ class SymfonyStyle extends OutputStyle public function section($message) { $this->autoPrependBlock(); - $this->writeln(array( + $this->writeln([ sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - )); + ]); $this->newLine(); } @@ -121,7 +117,7 @@ class SymfonyStyle extends OutputStyle { $this->autoPrependText(); - $messages = is_array($message) ? array_values($message) : array($message); + $messages = \is_array($message) ? array_values($message) : [$message]; foreach ($messages as $message) { $this->writeln(sprintf(' %s', $message)); } @@ -233,7 +229,7 @@ class SymfonyStyle extends OutputStyle { if (null !== $default) { $values = array_flip($choices); - $default = $values[$default]; + $default = isset($values[$default]) ? $values[$default] : $default; } return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); @@ -273,7 +269,7 @@ class SymfonyStyle extends OutputStyle { $progressBar = parent::createProgressBar($max); - if ('\\' !== DIRECTORY_SEPARATOR) { + if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) { $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591 $progressBar->setProgressCharacter(''); $progressBar->setBarCharacter('▓'); // dark shade character \u2593 @@ -283,9 +279,7 @@ class SymfonyStyle extends OutputStyle } /** - * @param Question $question - * - * @return string + * @return mixed */ public function askQuestion(Question $question) { @@ -358,10 +352,12 @@ class SymfonyStyle extends OutputStyle private function autoPrependBlock() { - $chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); + $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); if (!isset($chars[0])) { - return $this->newLine(); //empty history, so we should start with a new line. + $this->newLine(); //empty history, so we should start with a new line. + + return; } //Prepend new line for each non LF chars (This means no blank line was output before) $this->newLine(2 - substr_count($chars, "\n")); @@ -382,18 +378,18 @@ class SymfonyStyle extends OutputStyle // Preserve the last 4 chars inserted (PHP_EOL on windows is two chars) in the history buffer return array_map(function ($value) { return substr($value, -4); - }, array_merge(array($this->bufferedOutput->fetch()), (array) $messages)); + }, array_merge([$this->bufferedOutput->fetch()], (array) $messages)); } private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false) { $indentLength = 0; $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); - $lines = array(); + $lines = []; if (null !== $type) { $type = sprintf('[%s] ', $type); - $indentLength = strlen($type); + $indentLength = \strlen($type); $lineIndentation = str_repeat(' ', $indentLength); } @@ -403,9 +399,9 @@ class SymfonyStyle extends OutputStyle $message = OutputFormatter::escape($message); } - $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true))); + $lines = array_merge($lines, explode(\PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, \PHP_EOL, true))); - if (count($messages) > 1 && $key < count($messages) - 1) { + if (\count($messages) > 1 && $key < \count($messages) - 1) { $lines[] = ''; } } diff --git a/api/vendor/symfony/console/Terminal.php b/api/vendor/symfony/console/Terminal.php index 927dfc4..774c5f7 100644 --- a/api/vendor/symfony/console/Terminal.php +++ b/api/vendor/symfony/console/Terminal.php @@ -15,6 +15,7 @@ class Terminal { private static $width; private static $height; + private static $stty; /** * Gets the terminal width. @@ -54,20 +55,63 @@ class Terminal return self::$height ?: 50; } + /** + * @internal + * + * @return bool + */ + public static function hasSttyAvailable() + { + if (null !== self::$stty) { + return self::$stty; + } + + // skip check if exec function is disabled + if (!\function_exists('exec')) { + return false; + } + + exec('stty 2>&1', $output, $exitcode); + + return self::$stty = 0 === $exitcode; + } + private static function initDimensions() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { // extract [w, H] from "wxh (WxH)" // or [w, h] from "wxh" self::$width = (int) $matches[1]; self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2]; + } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) { + // only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash) + // testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT + self::initDimensionsUsingStty(); } elseif (null !== $dimensions = self::getConsoleMode()) { // extract [w, h] from "wxh" self::$width = (int) $dimensions[0]; self::$height = (int) $dimensions[1]; } - } elseif ($sttyString = self::getSttyColumns()) { + } else { + self::initDimensionsUsingStty(); + } + } + + /** + * Returns whether STDOUT has vt100 support (some Windows 10+ configurations). + */ + private static function hasVt100Support() + { + return \function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w')); + } + + /** + * Initializes dimensions using the output of an stty columns line. + */ + private static function initDimensionsUsingStty() + { + if ($sttyString = self::getSttyColumns()) { if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { // extract [w, h] from "rows h; columns w;" self::$width = (int) $matches[2]; @@ -87,25 +131,13 @@ class Terminal */ private static function getConsoleMode() { - if (!function_exists('proc_open')) { - return; + $info = self::readFromProcess('mode CON'); + + if (null === $info || !preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { + return null; } - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); - $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); - if (is_resource($process)) { - $info = stream_get_contents($pipes[1]); - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { - return array((int) $matches[2], (int) $matches[1]); - } - } + return [(int) $matches[2], (int) $matches[1]]; } /** @@ -115,23 +147,35 @@ class Terminal */ private static function getSttyColumns() { - if (!function_exists('proc_open')) { - return; + return self::readFromProcess('stty -a | grep columns'); + } + + /** + * @param string $command + * + * @return string|null + */ + private static function readFromProcess($command) + { + if (!\function_exists('proc_open')) { + return null; } - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); + $descriptorspec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; - $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); - if (is_resource($process)) { - $info = stream_get_contents($pipes[1]); - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - return $info; + $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); + if (!\is_resource($process)) { + return null; } + + $info = stream_get_contents($pipes[1]); + fclose($pipes[1]); + fclose($pipes[2]); + proc_close($process); + + return $info; } } diff --git a/api/vendor/symfony/console/Tester/ApplicationTester.php b/api/vendor/symfony/console/Tester/ApplicationTester.php index c0f8c72..355b07b 100644 --- a/api/vendor/symfony/console/Tester/ApplicationTester.php +++ b/api/vendor/symfony/console/Tester/ApplicationTester.php @@ -59,14 +59,14 @@ class ApplicationTester * * @return int The command exit code */ - public function run(array $input, $options = array()) + public function run(array $input, $options = []) { $this->input = new ArrayInput($input); if (isset($options['interactive'])) { $this->input->setInteractive($options['interactive']); } - $this->captureStreamsIndependently = array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; + $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; if (!$this->captureStreamsIndependently) { $this->output = new StreamOutput(fopen('php://memory', 'w', false)); if (isset($options['decorated'])) { @@ -114,7 +114,7 @@ class ApplicationTester $display = stream_get_contents($this->output->getStream()); if ($normalize) { - $display = str_replace(PHP_EOL, "\n", $display); + $display = str_replace(\PHP_EOL, "\n", $display); } return $display; @@ -138,7 +138,7 @@ class ApplicationTester $display = stream_get_contents($this->output->getErrorOutput()->getStream()); if ($normalize) { - $display = str_replace(PHP_EOL, "\n", $display); + $display = str_replace(\PHP_EOL, "\n", $display); } return $display; diff --git a/api/vendor/symfony/console/Tester/CommandTester.php b/api/vendor/symfony/console/Tester/CommandTester.php index 0bb1603..1229894 100644 --- a/api/vendor/symfony/console/Tester/CommandTester.php +++ b/api/vendor/symfony/console/Tester/CommandTester.php @@ -13,9 +13,9 @@ namespace Symfony\Component\Console\Tester; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\StreamOutput; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\StreamOutput; /** * Eases the testing of console commands. @@ -28,14 +28,9 @@ class CommandTester private $command; private $input; private $output; - private $inputs = array(); + private $inputs = []; private $statusCode; - /** - * Constructor. - * - * @param Command $command A Command instance to test - */ public function __construct(Command $command) { $this->command = $command; @@ -55,7 +50,7 @@ class CommandTester * * @return int The command exit code */ - public function execute(array $input, array $options = array()) + public function execute(array $input, array $options = []) { // set the command name automatically if the application requires // this argument and no command name was passed @@ -63,13 +58,12 @@ class CommandTester && (null !== $application = $this->command->getApplication()) && $application->getDefinition()->hasArgument('command') ) { - $input = array_merge(array('command' => $this->command->getName()), $input); + $input = array_merge(['command' => $this->command->getName()], $input); } $this->input = new ArrayInput($input); - if ($this->inputs) { - $this->input->setStream(self::createStream($this->inputs)); - } + // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN. + $this->input->setStream(self::createStream($this->inputs)); if (isset($options['interactive'])) { $this->input->setInteractive($options['interactive']); @@ -93,12 +87,16 @@ class CommandTester */ public function getDisplay($normalize = false) { + if (null === $this->output) { + throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?'); + } + rewind($this->output->getStream()); $display = stream_get_contents($this->output->getStream()); if ($normalize) { - $display = str_replace(PHP_EOL, "\n", $display); + $display = str_replace(\PHP_EOL, "\n", $display); } return $display; @@ -137,8 +135,8 @@ class CommandTester /** * Sets the user inputs. * - * @param array An array of strings representing each input - * passed to the command input stream. + * @param array $inputs An array of strings representing each input + * passed to the command input stream * * @return CommandTester */ @@ -153,7 +151,10 @@ class CommandTester { $stream = fopen('php://memory', 'r+', false); - fwrite($stream, implode(PHP_EOL, $inputs)); + foreach ($inputs as $input) { + fwrite($stream, $input.\PHP_EOL); + } + rewind($stream); return $stream; diff --git a/api/vendor/symfony/console/Tests/ApplicationTest.php b/api/vendor/symfony/console/Tests/ApplicationTest.php index 34d9cb0..16d856c 100644 --- a/api/vendor/symfony/console/Tests/ApplicationTest.php +++ b/api/vendor/symfony/console/Tests/ApplicationTest.php @@ -13,48 +13,73 @@ namespace Symfony\Component\Console\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; -use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; +use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; +use Symfony\Component\Console\Event\ConsoleCommandEvent; +use Symfony\Component\Console\Event\ConsoleErrorEvent; +use Symfony\Component\Console\Event\ConsoleExceptionEvent; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\StreamOutput; use Symfony\Component\Console\Tester\ApplicationTester; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\EventDispatcher\EventDispatcher; class ApplicationTest extends TestCase { protected static $fixturesPath; + private $colSize; + + protected function setUp() + { + $this->colSize = getenv('COLUMNS'); + } + + protected function tearDown() + { + putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); + putenv('SHELL_VERBOSITY'); + unset($_ENV['SHELL_VERBOSITY']); + unset($_SERVER['SHELL_VERBOSITY']); + } + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); require_once self::$fixturesPath.'/FooCommand.php'; + require_once self::$fixturesPath.'/FooOptCommand.php'; require_once self::$fixturesPath.'/Foo1Command.php'; require_once self::$fixturesPath.'/Foo2Command.php'; require_once self::$fixturesPath.'/Foo3Command.php'; require_once self::$fixturesPath.'/Foo4Command.php'; require_once self::$fixturesPath.'/Foo5Command.php'; + require_once self::$fixturesPath.'/FooSameCaseUppercaseCommand.php'; + require_once self::$fixturesPath.'/FooSameCaseLowercaseCommand.php'; require_once self::$fixturesPath.'/FoobarCommand.php'; require_once self::$fixturesPath.'/BarBucCommand.php'; require_once self::$fixturesPath.'/FooSubnamespaced1Command.php'; require_once self::$fixturesPath.'/FooSubnamespaced2Command.php'; + require_once self::$fixturesPath.'/TestAmbiguousCommandRegistering.php'; + require_once self::$fixturesPath.'/TestAmbiguousCommandRegistering2.php'; + require_once self::$fixturesPath.'/FooHiddenCommand.php'; } protected function normalizeLineBreaks($text) { - return str_replace(PHP_EOL, "\n", $text); + return str_replace(\PHP_EOL, "\n", $text); } /** @@ -74,7 +99,7 @@ class ApplicationTest extends TestCase $application = new Application('foo', 'bar'); $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument'); - $this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default'); + $this->assertEquals(['help', 'list'], array_keys($application->all()), '__construct() registered the help and list commands by default'); } public function testSetGetName() @@ -114,6 +139,25 @@ class ApplicationTest extends TestCase $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); } + public function testAllWithCommandLoader() + { + $application = new Application(); + $commands = $application->all(); + $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands'); + + $application->add(new \FooCommand()); + $commands = $application->all('foo'); + $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); + + $application->setCommandLoader(new FactoryCommandLoader([ + 'foo:bar1' => function () { return new \Foo1Command(); }, + ])); + $commands = $application->all('foo'); + $this->assertCount(2, $commands, '->all() takes a namespace as its first argument'); + $this->assertInstanceOf(\FooCommand::class, $commands['foo:bar'], '->all() returns the registered commands'); + $this->assertInstanceOf(\Foo1Command::class, $commands['foo:bar1'], '->all() returns the registered commands'); + } + public function testRegister() { $application = new Application(); @@ -121,6 +165,28 @@ class ApplicationTest extends TestCase $this->assertEquals('foo', $command->getName(), '->register() registers a new command'); } + public function testRegisterAmbiguous() + { + $code = function (InputInterface $input, OutputInterface $output) { + $output->writeln('It works!'); + }; + + $application = new Application(); + $application->setAutoExit(false); + $application + ->register('test-foo') + ->setAliases(['test']) + ->setCode($code); + + $application + ->register('test-bar') + ->setCode($code); + + $tester = new ApplicationTester($application); + $tester->run(['test']); + $this->assertStringContainsString('It works!', $tester->getDisplay(true)); + } + public function testAdd() { $application = new Application(); @@ -129,17 +195,15 @@ class ApplicationTest extends TestCase $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command'); $application = new Application(); - $application->addCommands(array($foo = new \FooCommand(), $foo1 = new \Foo1Command())); + $application->addCommands([$foo = new \FooCommand(), $foo1 = new \Foo1Command()]); $commands = $application->all(); - $this->assertEquals(array($foo, $foo1), array($commands['foo:bar'], $commands['foo:bar1']), '->addCommands() registers an array of commands'); + $this->assertEquals([$foo, $foo1], [$commands['foo:bar'], $commands['foo:bar1']], '->addCommands() registers an array of commands'); } - /** - * @expectedException \LogicException - * @expectedExceptionMessage Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor. - */ public function testAddCommandWithEmptyConstructor() { + $this->expectException('LogicException'); + $this->expectExceptionMessage('Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor.'); $application = new Application(); $application->add(new \Foo5Command()); } @@ -166,6 +230,30 @@ class ApplicationTest extends TestCase $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input'); } + public function testHasGetWithCommandLoader() + { + $application = new Application(); + $this->assertTrue($application->has('list'), '->has() returns true if a named command is registered'); + $this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered'); + + $application->add($foo = new \FooCommand()); + $this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered'); + $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); + $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); + + $application->setCommandLoader(new FactoryCommandLoader([ + 'foo:bar1' => function () { return new \Foo1Command(); }, + ])); + + $this->assertTrue($application->has('afoobar'), '->has() returns true if an instance is registered for an alias even with command loader'); + $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns an instance by name even with command loader'); + $this->assertEquals($foo, $application->get('afoobar'), '->get() returns an instance by alias even with command loader'); + $this->assertTrue($application->has('foo:bar1'), '->has() returns true for commands registered in the loader'); + $this->assertInstanceOf(\Foo1Command::class, $foo1 = $application->get('foo:bar1'), '->get() returns a command by name from the command loader'); + $this->assertTrue($application->has('afoobar1'), '->has() returns true for commands registered in the loader'); + $this->assertEquals($foo1, $application->get('afoobar1'), '->get() returns a command by name from the command loader'); + } + public function testSilentHelp() { $application = new Application(); @@ -173,17 +261,15 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(false); $tester = new ApplicationTester($application); - $tester->run(array('-h' => true, '-q' => true), array('decorated' => false)); + $tester->run(['-h' => true, '-q' => true], ['decorated' => false]); $this->assertEmpty($tester->getDisplay(true)); } - /** - * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException - * @expectedExceptionMessage The command "foofoo" does not exist. - */ public function testGetInvalidCommand() { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage('The command "foofoo" does not exist.'); $application = new Application(); $application->get('foofoo'); } @@ -193,7 +279,7 @@ class ApplicationTest extends TestCase $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo1Command()); - $this->assertEquals(array('foo'), $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); + $this->assertEquals(['foo'], $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); } public function testFindNamespace() @@ -223,32 +309,32 @@ class ApplicationTest extends TestCase $expectedMsg = "The namespace \"f\" is ambiguous.\nDid you mean one of these?\n foo\n foo1"; - if (method_exists($this, 'expectException')) { - $this->expectException(CommandNotFoundException::class); - $this->expectExceptionMessage($expectedMsg); - } else { - $this->setExpectedException(CommandNotFoundException::class, $expectedMsg); - } + $this->expectException(CommandNotFoundException::class); + $this->expectExceptionMessage($expectedMsg); $application->findNamespace('f'); } - /** - * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException - * @expectedExceptionMessage There are no commands defined in the "bar" namespace. - */ + public function testFindNonAmbiguous() + { + $application = new Application(); + $application->add(new \TestAmbiguousCommandRegistering()); + $application->add(new \TestAmbiguousCommandRegistering2()); + $this->assertEquals('test-ambiguous', $application->find('test')->getName()); + } + public function testFindInvalidNamespace() { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage('There are no commands defined in the "bar" namespace.'); $application = new Application(); $application->findNamespace('bar'); } - /** - * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException - * @expectedExceptionMessage Command "foo1" is not defined - */ public function testFindUniqueNameButNamespaceName() { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage('Command "foo1" is not defined'); $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo1Command()); @@ -269,17 +355,61 @@ class ApplicationTest extends TestCase $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); } + public function testFindCaseSensitiveFirst() + { + $application = new Application(); + $application->add(new \FooSameCaseUppercaseCommand()); + $application->add(new \FooSameCaseLowercaseCommand()); + + $this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:B'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:BAR'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation is the correct case'); + } + + public function testFindCaseInsensitiveAsFallback() + { + $application = new Application(); + $application->add(new \FooSameCaseLowercaseCommand()); + + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:B'), '->find() will fallback to case insensitivity'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will fallback to case insensitivity'); + } + + public function testFindCaseInsensitiveSuggestions() + { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage('Command "FoO:BaR" is ambiguous'); + $application = new Application(); + $application->add(new \FooSameCaseLowercaseCommand()); + $application->add(new \FooSameCaseUppercaseCommand()); + + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will find two suggestions with case insensitivity'); + } + + public function testFindWithCommandLoader() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader([ + 'foo:bar' => $f = function () { return new \FooCommand(); }, + ])); + + $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); + $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); + $this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists'); + $this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist'); + $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); + } + /** * @dataProvider provideAmbiguousAbbreviations */ public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExceptionMessage) { - if (method_exists($this, 'expectException')) { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage($expectedExceptionMessage); - } else { - $this->setExpectedException('Symfony\Component\Console\Exception\CommandNotFoundException', $expectedExceptionMessage); - } + putenv('COLUMNS=120'); + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage($expectedExceptionMessage); $application = new Application(); $application->add(new \FooCommand()); @@ -291,23 +421,23 @@ class ApplicationTest extends TestCase public function provideAmbiguousAbbreviations() { - return array( - array('f', 'Command "f" is not defined.'), - array( + return [ + ['f', 'Command "f" is not defined.'], + [ 'a', "Command \"a\" is ambiguous.\nDid you mean one of these?\n". " afoobar The foo:bar command\n". " afoobar1 The foo:bar1 command\n". ' afoobar2 The foo1:bar command', - ), - array( + ], + [ 'foo:b', "Command \"foo:b\" is ambiguous.\nDid you mean one of these?\n". " foo:bar The foo:bar command\n". " foo:bar1 The foo:bar1 command\n". ' foo1:bar The foo1:bar command', - ), - ); + ], + ]; } public function testFindCommandEqualNamespace() @@ -338,12 +468,12 @@ class ApplicationTest extends TestCase } /** - * @dataProvider provideInvalidCommandNamesSingle - * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException - * @expectedExceptionMessage Did you mean this + * @dataProvider provideInvalidCommandNamesSingle */ public function testFindAlternativeExceptionMessageSingle($name) { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage('Did you mean this'); $application = new Application(); $application->add(new \Foo3Command()); $application->find($name); @@ -351,14 +481,15 @@ class ApplicationTest extends TestCase public function provideInvalidCommandNamesSingle() { - return array( - array('foo3:baR'), - array('foO3:bar'), - ); + return [ + ['foo3:barr'], + ['fooo3:bar'], + ]; } public function testFindAlternativeExceptionMessageMultiple() { + putenv('COLUMNS=120'); $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo1Command()); @@ -370,9 +501,9 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/foo1:bar/', $e->getMessage()); - $this->assertRegExp('/foo:bar/', $e->getMessage()); + $this->assertMatchesRegularExpression('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertMatchesRegularExpression('/foo1:bar/', $e->getMessage()); + $this->assertMatchesRegularExpression('/foo:bar/', $e->getMessage()); } // Namespace + plural @@ -381,8 +512,8 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/foo1/', $e->getMessage()); + $this->assertMatchesRegularExpression('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertMatchesRegularExpression('/foo1/', $e->getMessage()); } $application->add(new \Foo3Command()); @@ -390,12 +521,12 @@ class ApplicationTest extends TestCase // Subnamespace + plural try { - $a = $application->find('foo3:'); + $application->find('foo3:'); $this->fail('->find() should throw an Symfony\Component\Console\Exception\CommandNotFoundException if a command is ambiguous because of a subnamespace, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e); - $this->assertRegExp('/foo3:bar/', $e->getMessage()); - $this->assertRegExp('/foo3:bar:toh/', $e->getMessage()); + $this->assertMatchesRegularExpression('/foo3:bar/', $e->getMessage()); + $this->assertMatchesRegularExpression('/foo3:bar:toh/', $e->getMessage()); } } @@ -412,7 +543,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(array(), $e->getAlternatives()); + $this->assertSame([], $e->getAlternatives()); $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without alternatives'); } @@ -423,20 +554,23 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(array('afoobar1', 'foo:bar1'), $e->getAlternatives()); - $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"'); - $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"'); - $this->assertNotRegExp('/foo:bar(?>!1)/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without "foo:bar" alternative'); + $this->assertSame(['afoobar1', 'foo:bar1'], $e->getAlternatives()); + $this->assertMatchesRegularExpression(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); + $this->assertMatchesRegularExpression('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"'); + $this->assertMatchesRegularExpression('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"'); + $this->assertDoesNotMatchRegularExpression('/foo:bar(?!1)/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without "foo:bar" alternative'); } } public function testFindAlternativeCommandsWithAnAlias() { $fooCommand = new \FooCommand(); - $fooCommand->setAliases(array('foo2')); + $fooCommand->setAliases(['foo2']); $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader([ + 'foo3' => static function () use ($fooCommand) { return $fooCommand; }, + ])); $application->add($fooCommand); $result = $application->find('foo'); @@ -458,7 +592,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); - $this->assertSame(array(), $e->getAlternatives()); + $this->assertSame([], $e->getAlternatives()); $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, without alternatives'); } @@ -471,10 +605,10 @@ class ApplicationTest extends TestCase $this->assertContains('foo', $e->getAlternatives()); $this->assertContains('foo1', $e->getAlternatives()); $this->assertContains('foo3', $e->getAlternatives()); - $this->assertRegExp('/There are no commands defined in the "foo2" namespace./', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative'); - $this->assertRegExp('/foo/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo"'); - $this->assertRegExp('/foo1/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo1"'); - $this->assertRegExp('/foo3/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo3"'); + $this->assertMatchesRegularExpression('/There are no commands defined in the "foo2" namespace./', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative'); + $this->assertMatchesRegularExpression('/foo/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo"'); + $this->assertMatchesRegularExpression('/foo1/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo1"'); + $this->assertMatchesRegularExpression('/foo3/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo3"'); } } @@ -486,8 +620,9 @@ class ApplicationTest extends TestCase $application->add(new \Foo1Command()); $application->add(new \Foo2Command()); $application->add(new \Foo3Command()); + $application->add(new \FooHiddenCommand()); - $expectedAlternatives = array( + $expectedAlternatives = [ 'afoobar', 'afoobar1', 'afoobar2', @@ -495,7 +630,7 @@ class ApplicationTest extends TestCase 'foo3:bar', 'foo:bar', 'foo:bar1', - ); + ]; try { $application->find('foo'); @@ -504,26 +639,24 @@ class ApplicationTest extends TestCase $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command is not defined'); $this->assertSame($expectedAlternatives, $e->getAlternatives()); - $this->assertRegExp('/Command "foo" is not defined\..*Did you mean one of these\?.*/Ums', $e->getMessage()); + $this->assertMatchesRegularExpression('/Command "foo" is not defined\..*Did you mean one of these\?.*/Ums', $e->getMessage()); } } public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getNamespaces'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getNamespaces'])->getMock(); $application->expects($this->once()) ->method('getNamespaces') - ->will($this->returnValue(array('foo:sublong', 'bar:sub'))); + ->willReturn(['foo:sublong', 'bar:sub']); $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); } - /** - * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException - * @expectedExceptionMessage Command "foo::bar" is not defined. - */ public function testFindWithDoubleColonInNameThrowsException() { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $this->expectExceptionMessage('Command "foo::bar" is not defined.'); $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo4Command()); @@ -540,16 +673,16 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(true); $this->assertTrue($application->areExceptionsCaught()); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->setCatchExceptions() sets the catch exception flag'); $this->assertSame('', $tester->getDisplay(true)); $application->setCatchExceptions(false); try { - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->fail('->setCatchExceptions() sets the catch exception flag'); } catch (\Exception $e) { $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag'); @@ -573,29 +706,29 @@ class ApplicationTest extends TestCase putenv('COLUMNS=120'); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception'); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true)); - $this->assertContains('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); + $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true]); + $this->assertStringContainsString('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); - $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'list', '--foo' => true], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); $application->add(new \Foo3Command()); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); - $this->assertRegExp('/\[Exception\]\s*First exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is default and verbosity is verbose'); - $this->assertRegExp('/\[Exception\]\s*Second exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is 0 and verbosity is verbose'); - $this->assertRegExp('/\[Exception \(404\)\]\s*Third exception/', $tester->getDisplay(), '->renderException() renders a pretty exception with code exception when code exception is 404 and verbosity is verbose'); + $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); + $this->assertMatchesRegularExpression('/\[Exception\]\s*First exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is default and verbosity is verbose'); + $this->assertMatchesRegularExpression('/\[Exception\]\s*Second exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is 0 and verbosity is verbose'); + $this->assertMatchesRegularExpression('/\[Exception \(404\)\]\s*Third exception/', $tester->getDisplay(), '->renderException() renders a pretty exception with code exception when code exception is 404 and verbosity is verbose'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => true, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); @@ -603,7 +736,7 @@ class ApplicationTest extends TestCase putenv('COLUMNS=32'); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -618,11 +751,11 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + $tester->run(['command' => 'foo'], ['decorated' => true, 'capture_stderr_separately' => true]); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); $application->setAutoExit(false); @@ -631,8 +764,8 @@ class ApplicationTest extends TestCase throw new \Exception('コマンドの実行中にエラーが発生しました。'); }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -646,18 +779,48 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); + $tester->run(['command' => 'foo'], ['decorated' => false]); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); putenv('COLUMNS=120'); } + public function testRenderExceptionLineBreaks() + { + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getTerminalWidth'])->getMock(); + $application->setAutoExit(false); + $application->expects($this->any()) + ->method('getTerminalWidth') + ->willReturn(120); + $application->register('foo')->setCode(function () { + throw new \InvalidArgumentException("\n\nline 1 with extra spaces \nline 2\n\nline 4\n"); + }); + $tester = new ApplicationTester($application); + + $tester->run(['command' => 'foo'], ['decorated' => false]); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); + } + + public function testRenderExceptionStackTraceContainsRootException() + { + $application = new Application(); + $application->setAutoExit(false); + $application->register('foo')->setCode(function () { + throw new \Exception('Verbose exception'); + }); + + $tester = new ApplicationTester($application); + $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); + + $this->assertStringContainsString(sprintf('() at %s:', __FILE__), $tester->getDisplay()); + } + public function testRun() { $application = new Application(); $application->setAutoExit(false); $application->setCatchExceptions(false); $application->add($command = new \Foo1Command()); - $_SERVER['argv'] = array('cli.php', 'foo:bar1'); + $_SERVER['argv'] = ['cli.php', 'foo:bar1']; ob_start(); $application->run(); @@ -673,63 +836,63 @@ class ApplicationTest extends TestCase $this->ensureStaticCommandHelp($application); $tester = new ApplicationTester($application); - $tester->run(array(), array('decorated' => false)); + $tester->run([], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed'); - $tester->run(array('--help' => true), array('decorated' => false)); + $tester->run(['--help' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed'); - $tester->run(array('-h' => true), array('decorated' => false)); + $tester->run(['-h' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed'); - $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false)); + $tester->run(['command' => 'list', '--help' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed'); - $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false)); + $tester->run(['command' => 'list', '-h' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed'); - $tester->run(array('--ansi' => true)); + $tester->run(['--ansi' => true]); $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); - $tester->run(array('--no-ansi' => true)); + $tester->run(['--no-ansi' => true]); $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); - $tester->run(array('--version' => true), array('decorated' => false)); + $tester->run(['--version' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed'); - $tester->run(array('-V' => true), array('decorated' => false)); + $tester->run(['-V' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed'); - $tester->run(array('command' => 'list', '--quiet' => true)); + $tester->run(['command' => 'list', '--quiet' => true]); $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if --quiet is passed'); - $tester->run(array('command' => 'list', '-q' => true)); + $tester->run(['command' => 'list', '-q' => true]); $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if -q is passed'); - $tester->run(array('command' => 'list', '--verbose' => true)); + $tester->run(['command' => 'list', '--verbose' => true]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); - $tester->run(array('command' => 'list', '--verbose' => 1)); + $tester->run(['command' => 'list', '--verbose' => 1]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose=1 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 2)); + $tester->run(['command' => 'list', '--verbose' => 2]); $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to very verbose if --verbose=2 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 3)); + $tester->run(['command' => 'list', '--verbose' => 3]); $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to debug if --verbose=3 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 4)); + $tester->run(['command' => 'list', '--verbose' => 4]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if unknown --verbose level is passed'); - $tester->run(array('command' => 'list', '-v' => true)); + $tester->run(['command' => 'list', '-v' => true]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - $tester->run(array('command' => 'list', '-vv' => true)); + $tester->run(['command' => 'list', '-vv' => true]); $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - $tester->run(array('command' => 'list', '-vvv' => true)); + $tester->run(['command' => 'list', '-vvv' => true]); $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); $application = new Application(); @@ -738,11 +901,24 @@ class ApplicationTest extends TestCase $application->add(new \FooCommand()); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false)); - $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); + $tester->run(['command' => 'foo:bar', '--no-interaction' => true], ['decorated' => false]); + $this->assertSame('called'.\PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); - $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false)); - $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); + $tester->run(['command' => 'foo:bar', '-n' => true], ['decorated' => false]); + $this->assertSame('called'.\PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); + } + + public function testRunWithGlobalOptionAndNoCommand() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->getDefinition()->addOption(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)); + + $output = new StreamOutput(fopen('php://memory', 'w', false)); + $input = new ArgvInput(['cli.php', '--foo', 'bar']); + + $this->assertSame(0, $application->run($input, $output)); } /** @@ -761,12 +937,12 @@ class ApplicationTest extends TestCase $output = new StreamOutput(fopen('php://memory', 'w', false)); - $input = new ArgvInput(array('cli.php', '-v', 'foo:bar')); + $input = new ArgvInput(['cli.php', '-v', 'foo:bar']); $application->run($input, $output); $this->addToAssertionCount(1); - $input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar')); + $input = new ArgvInput(['cli.php', '--verbose', 'foo:bar']); $application->run($input, $output); $this->addToAssertionCount(1); @@ -776,38 +952,84 @@ class ApplicationTest extends TestCase { $exception = new \Exception('', 4); - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') - ->will($this->throwException($exception)); + ->willThrowException($exception); - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + $exitCode = $application->run(new ArrayInput([]), new NullOutput()); $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); } + public function testRunDispatchesIntegerExitCode() + { + $passedRightValue = false; + + // We can assume here that some other test asserts that the event is dispatched at all + $dispatcher = new EventDispatcher(); + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) { + $passedRightValue = (4 === $event->getExitCode()); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) { + throw new \Exception('', 4); + }); + + $tester = new ApplicationTester($application); + $tester->run(['command' => 'test']); + + $this->assertTrue($passedRightValue, '-> exit code 4 was passed in the console.terminate event'); + } + public function testRunReturnsExitCodeOneForExceptionCodeZero() { $exception = new \Exception('', 0); - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') - ->will($this->throwException($exception)); + ->willThrowException($exception); - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + $exitCode = $application->run(new ArrayInput([]), new NullOutput()); $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); } - /** - * @expectedException \LogicException - * @expectedExceptionMessage An option with shortcut "e" already exists. - */ + public function testRunDispatchesExitCodeOneForExceptionCodeZero() + { + $passedRightValue = false; + + // We can assume here that some other test asserts that the event is dispatched at all + $dispatcher = new EventDispatcher(); + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) { + $passedRightValue = (1 === $event->getExitCode()); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) { + throw new \Exception(); + }); + + $tester = new ApplicationTester($application); + $tester->run(['command' => 'test']); + + $this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event'); + } + public function testAddingOptionWithDuplicateShortcut() { + $this->expectException('LogicException'); + $this->expectExceptionMessage('An option with shortcut "e" already exists.'); $dispatcher = new EventDispatcher(); $application = new Application(); $application->setAutoExit(false); @@ -818,44 +1040,44 @@ class ApplicationTest extends TestCase $application ->register('foo') - ->setAliases(array('f')) - ->setDefinition(array(new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.'))) + ->setAliases(['f']) + ->setDefinition([new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.')]) ->setCode(function (InputInterface $input, OutputInterface $output) {}) ; - $input = new ArrayInput(array('command' => 'foo')); + $input = new ArrayInput(['command' => 'foo']); $output = new NullOutput(); $application->run($input, $output); } /** - * @expectedException \LogicException * @dataProvider getAddingAlreadySetDefinitionElementData */ public function testAddingAlreadySetDefinitionElementData($def) { + $this->expectException('LogicException'); $application = new Application(); $application->setAutoExit(false); $application->setCatchExceptions(false); $application ->register('foo') - ->setDefinition(array($def)) + ->setDefinition([$def]) ->setCode(function (InputInterface $input, OutputInterface $output) {}) ; - $input = new ArrayInput(array('command' => 'foo')); + $input = new ArrayInput(['command' => 'foo']); $output = new NullOutput(); $application->run($input, $output); } public function getAddingAlreadySetDefinitionElementData() { - return array( - array(new InputArgument('command', InputArgument::REQUIRED)), - array(new InputOption('quiet', '', InputOption::VALUE_NONE)), - array(new InputOption('query', 'q', InputOption::VALUE_NONE)), - ); + return [ + [new InputArgument('command', InputArgument::REQUIRED)], + [new InputOption('quiet', '', InputOption::VALUE_NONE)], + [new InputOption('query', 'q', InputOption::VALUE_NONE)], + ]; } public function testGetDefaultHelperSetReturnsDefaultValues() @@ -875,7 +1097,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $application->setHelperSet(new HelperSet([new FormatterHelper()])); $helperSet = $application->getHelperSet(); @@ -892,7 +1114,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $application->setHelperSet(new HelperSet([new FormatterHelper()])); $helperSet = $application->getHelperSet(); @@ -950,7 +1172,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')))); + $application->setDefinition(new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')])); $inputDefinition = $application->getDefinition(); @@ -979,16 +1201,14 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertEquals('before.foo.after.'.PHP_EOL, $tester->getDisplay()); + $tester->run(['command' => 'foo']); + $this->assertEquals('before.foo.after.'.\PHP_EOL, $tester->getDisplay()); } - /** - * @expectedException \LogicException - * @expectedExceptionMessage error - */ public function testRunWithExceptionAndDispatcher() { + $this->expectException('LogicException'); + $this->expectExceptionMessage('error'); $application = new Application(); $application->setDispatcher($this->getDispatcher()); $application->setAutoExit(false); @@ -999,7 +1219,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); } public function testRunDispatchesAllEventsWithException() @@ -1015,8 +1235,8 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertContains('before.foo.error.after.', $tester->getDisplay()); + $tester->run(['command' => 'foo']); + $this->assertStringContainsString('before.foo.error.after.', $tester->getDisplay()); } public function testRunDispatchesAllEventsWithExceptionInListener() @@ -1035,10 +1255,13 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertContains('before.error.after.', $tester->getDisplay()); + $tester->run(['command' => 'foo']); + $this->assertStringContainsString('before.error.after.', $tester->getDisplay()); } + /** + * @requires PHP 7 + */ public function testRunWithError() { $application = new Application(); @@ -1054,7 +1277,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('Error expected.'); } catch (\Error $e) { $this->assertSame('dymerr', $e->getMessage()); @@ -1083,8 +1306,8 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertContains('before.error.silenced.after.', $tester->getDisplay()); + $tester->run(['command' => 'foo']); + $this->assertStringContainsString('before.error.silenced.after.', $tester->getDisplay()); $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $tester->getStatusCode()); } @@ -1102,8 +1325,8 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'unknown')); - $this->assertContains('silenced command not found', $tester->getDisplay()); + $tester->run(['command' => 'unknown']); + $this->assertStringContainsString('silenced command not found', $tester->getDisplay()); $this->assertEquals(1, $tester->getStatusCode()); } @@ -1129,9 +1352,9 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertContains('before.caught.error.after.', $tester->getDisplay()); - $this->assertContains('replaced in caught.', $tester->getDisplay()); + $tester->run(['command' => 'foo']); + $this->assertStringContainsString('before.caught.error.after.', $tester->getDisplay()); + $this->assertStringContainsString('replaced in caught.', $tester->getDisplay()); } /** @@ -1144,26 +1367,27 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(false); $application->setDispatcher(new EventDispatcher()); - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - new \UnknownClass(); + $application->register('dym')->setCode(function () { + throw new \Error('Something went wrong.'); }); $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); } catch (\Error $e) { - $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); + $this->assertSame('Something went wrong.', $e->getMessage()); } } /** - * @expectedException \LogicException - * @expectedExceptionMessage error + * @requires PHP 7 */ public function testRunWithErrorAndDispatcher() { + $this->expectException('LogicException'); + $this->expectExceptionMessage('error'); $application = new Application(); $application->setDispatcher($this->getDispatcher()); $application->setAutoExit(false); @@ -1176,10 +1400,13 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dym')); - $this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); + $tester->run(['command' => 'dym']); + $this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); } + /** + * @requires PHP 7 + */ public function testRunDispatchesAllEventsWithError() { $application = new Application(); @@ -1193,10 +1420,13 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dym')); - $this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); + $tester->run(['command' => 'dym']); + $this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); } + /** + * @requires PHP 7 + */ public function testRunWithErrorFailingStatusCode() { $application = new Application(); @@ -1210,7 +1440,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dus')); + $tester->run(['command' => 'dus']); $this->assertSame(1, $tester->getStatusCode(), 'Status code should be 1'); } @@ -1225,8 +1455,8 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $exitCode = $tester->run(array('command' => 'foo')); - $this->assertContains('before.after.', $tester->getDisplay()); + $exitCode = $tester->run(['command' => 'foo']); + $this->assertStringContainsString('before.after.', $tester->getDisplay()); $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode); } @@ -1252,7 +1482,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo', '--no-interaction' => true)); + $tester->run(['command' => 'foo', '--no-interaction' => true]); $this->assertTrue($noInteractionValue); $this->assertFalse($quietValue); @@ -1282,7 +1512,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo', '--extra' => 'some test value')); + $tester->run(['command' => 'foo', '--extra' => 'some test value']); $this->assertEquals('some test value', $extraValue); } @@ -1302,7 +1532,7 @@ class ApplicationTest extends TestCase } $application->setTerminalDimensions($width, 80); - $this->assertSame(array($width, 80), $application->getTerminalDimensions()); + $this->assertSame([$width, 80], $application->getTerminalDimensions()); } public function testSetRunCustomDefaultCommand() @@ -1315,16 +1545,31 @@ class ApplicationTest extends TestCase $application->setDefaultCommand($command->getName()); $tester = new ApplicationTester($application); - $tester->run(array()); - $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + $tester->run([], ['interactive' => false]); + $this->assertEquals('called'.\PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); $application = new CustomDefaultCommandApplication(); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array()); + $tester->run([], ['interactive' => false]); - $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + $this->assertEquals('called'.\PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + } + + public function testSetRunCustomDefaultCommandWithOption() + { + $command = new \FooOptCommand(); + + $application = new Application(); + $application->setAutoExit(false); + $application->add($command); + $application->setDefaultCommand($command->getName()); + + $tester = new ApplicationTester($application); + $tester->run(['--fooopt' => 'opt'], ['interactive' => false]); + + $this->assertEquals('called'.\PHP_EOL.'opt'.\PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); } public function testSetRunCustomSingleCommand() @@ -1338,28 +1583,88 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); - $tester->run(array()); - $this->assertContains('called', $tester->getDisplay()); + $tester->run([]); + $this->assertStringContainsString('called', $tester->getDisplay()); - $tester->run(array('--help' => true)); - $this->assertContains('The foo:bar command', $tester->getDisplay()); + $tester->run(['--help' => true]); + $this->assertStringContainsString('The foo:bar command', $tester->getDisplay()); } - /** - * @requires function posix_isatty - */ - public function testCanCheckIfTerminalIsInteractive() + public function testRunLazyCommandService() { - $application = new CustomDefaultCommandApplication(); + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddConsoleCommandPass()); + $container + ->register('lazy-command', LazyCommand::class) + ->addTag('console.command', ['command' => 'lazy:command']) + ->addTag('console.command', ['command' => 'lazy:alias']) + ->addTag('console.command', ['command' => 'lazy:alias2']); + $container->compile(); + + $application = new Application(); + $application->setCommandLoader($container->get('console.command_loader')); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'help')); - $this->assertFalse($tester->getInput()->hasParameterOption(array('--no-interaction', '-n'))); + $tester->run(['command' => 'lazy:command']); + $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - $inputStream = $tester->getInput()->getStream(); - $this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream)); + $tester->run(['command' => 'lazy:alias']); + $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); + + $tester->run(['command' => 'lazy:alias2']); + $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); + + $command = $application->get('lazy:command'); + $this->assertSame(['lazy:alias', 'lazy:alias2'], $command->getAliases()); + } + + public function testGetDisabledLazyCommand() + { + $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); + $application->get('disabled'); + } + + public function testHasReturnsFalseForDisabledLazyCommand() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); + $this->assertFalse($application->has('disabled')); + } + + public function testAllExcludesDisabledLazyCommand() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); + $this->assertArrayNotHasKey('disabled', $application->all()); + } + + public function testFindAlternativesDoesNotLoadSameNamespaceCommandsOnExactMatch() + { + $application = new Application(); + $application->setAutoExit(false); + + $loaded = []; + + $application->setCommandLoader(new FactoryCommandLoader([ + 'foo:bar' => function () use (&$loaded) { + $loaded['foo:bar'] = true; + + return (new Command('foo:bar'))->setCode(function () {}); + }, + 'foo' => function () use (&$loaded) { + $loaded['foo'] = true; + + return (new Command('foo'))->setCode(function () {}); + }, + ])); + + $application->run(new ArrayInput(['command' => 'foo']), new NullOutput()); + + $this->assertSame(['foo' => true], $loaded); } protected function getDispatcher($skipCommand = false) @@ -1397,19 +1702,33 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setDispatcher(new EventDispatcher()); - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - new \UnknownClass(); + $application->register('dym')->setCode(function () { + throw new \Error('Something went wrong.'); }); $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); } catch (\Error $e) { - $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); + $this->assertSame('Something went wrong.', $e->getMessage()); } } + + public function testCommandNameMismatchWithCommandLoaderKeyThrows() + { + $this->expectException(CommandNotFoundException::class); + $this->expectExceptionMessage('The "test" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".'); + + $app = new Application(); + $loader = new FactoryCommandLoader([ + 'test' => static function () { return new Command('test-command'); }, + ]); + + $app->setCommandLoader($loader); + $app->get('test'); + } } class CustomApplication extends Application @@ -1421,7 +1740,7 @@ class CustomApplication extends Application */ protected function getDefaultInputDefinition() { - return new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))); + return new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')]); } /** @@ -1431,7 +1750,7 @@ class CustomApplication extends Application */ protected function getDefaultHelperSet() { - return new HelperSet(array(new FormatterHelper())); + return new HelperSet([new FormatterHelper()]); } } @@ -1449,3 +1768,19 @@ class CustomDefaultCommandApplication extends Application $this->setDefaultCommand($command->getName()); } } + +class LazyCommand extends Command +{ + public function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln('lazy-command called'); + } +} + +class DisabledCommand extends Command +{ + public function isEnabled() + { + return false; + } +} diff --git a/api/vendor/symfony/console/Tests/Command/CommandTest.php b/api/vendor/symfony/console/Tests/Command/CommandTest.php index a8048ae..7421c09 100644 --- a/api/vendor/symfony/console/Tests/Command/CommandTest.php +++ b/api/vendor/symfony/console/Tests/Command/CommandTest.php @@ -12,16 +12,16 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\CommandTester; class CommandTest extends TestCase @@ -40,13 +40,11 @@ class CommandTest extends TestCase $this->assertEquals('foo:bar', $command->getName(), '__construct() takes the command name as its first argument'); } - /** - * @expectedException \LogicException - * @expectedExceptionMessage The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name. - */ public function testCommandNameCannotBeEmpty() { - new Command(); + $this->expectException('LogicException'); + $this->expectExceptionMessage('The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name.'); + (new Application())->add(new Command()); } public function testSetApplication() @@ -71,7 +69,7 @@ class CommandTest extends TestCase $ret = $command->setDefinition($definition = new InputDefinition()); $this->assertEquals($command, $ret, '->setDefinition() implements a fluent interface'); $this->assertEquals($definition, $command->getDefinition(), '->setDefinition() sets the current InputDefinition instance'); - $command->setDefinition(array(new InputArgument('foo'), new InputOption('bar'))); + $command->setDefinition([new InputArgument('foo'), new InputOption('bar')]); $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); $this->assertTrue($command->getDefinition()->hasOption('bar'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); $command->setDefinition(new InputDefinition()); @@ -117,12 +115,8 @@ class CommandTest extends TestCase */ public function testInvalidCommandNames($name) { - if (method_exists($this, 'expectException')) { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage(sprintf('Command name "%s" is invalid.', $name)); - } else { - $this->setExpectedException('InvalidArgumentException', sprintf('Command name "%s" is invalid.', $name)); - } + $this->expectException('InvalidArgumentException'); + $this->expectExceptionMessage(sprintf('Command name "%s" is invalid.', $name)); $command = new \TestCommand(); $command->setName($name); @@ -130,10 +124,10 @@ class CommandTest extends TestCase public function provideInvalidCommandNames() { - return array( - array(''), - array('foo:'), - ); + return [ + [''], + ['foo:'], + ]; } public function testGetSetDescription() @@ -160,27 +154,35 @@ class CommandTest extends TestCase { $command = new \TestCommand(); $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); - $this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly'); - $this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%'); + $this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly'); + $this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%'); $command = new \TestCommand(); $command->setHelp(''); - $this->assertContains('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); + $this->assertStringContainsString('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); + + $command = new \TestCommand(); + $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); + $application = new Application(); + $application->add($command); + $application->setDefaultCommand('namespace:name', true); + $this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly in single command applications'); + $this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name% in single command applications'); } public function testGetSetAliases() { $command = new \TestCommand(); - $this->assertEquals(array('name'), $command->getAliases(), '->getAliases() returns the aliases'); - $ret = $command->setAliases(array('name1')); + $this->assertEquals(['name'], $command->getAliases(), '->getAliases() returns the aliases'); + $ret = $command->setAliases(['name1']); $this->assertEquals($command, $ret, '->setAliases() implements a fluent interface'); - $this->assertEquals(array('name1'), $command->getAliases(), '->setAliases() sets the aliases'); + $this->assertEquals(['name1'], $command->getAliases(), '->setAliases() sets the aliases'); } public function testSetAliasesNull() { $command = new \TestCommand(); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $this->expectException('InvalidArgumentException'); $command->setAliases(null); } @@ -210,12 +212,10 @@ class CommandTest extends TestCase $this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->getHelper() returns the correct helper'); } - /** - * @expectedException \LogicException - * @expectedExceptionMessage Cannot retrieve helper "formatter" because there is no HelperSet defined. - */ public function testGetHelperWithoutHelperSet() { + $this->expectException('LogicException'); + $this->expectExceptionMessage('Cannot retrieve helper "formatter" because there is no HelperSet defined.'); $command = new \TestCommand(); $command->getHelper('formatter'); } @@ -223,11 +223,11 @@ class CommandTest extends TestCase public function testMergeApplicationDefinition() { $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $application1->getDefinition()->addArguments([new InputArgument('foo')]); + $application1->getDefinition()->addOptions([new InputOption('bar')]); $command = new \TestCommand(); $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array(new InputArgument('bar'), new InputOption('foo')))); + $command->setDefinition($definition = new InputDefinition([new InputArgument('bar'), new InputOption('foo')])); $r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); @@ -245,11 +245,11 @@ class CommandTest extends TestCase public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs() { $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $application1->getDefinition()->addArguments([new InputArgument('foo')]); + $application1->getDefinition()->addOptions([new InputOption('bar')]); $command = new \TestCommand(); $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array())); + $command->setDefinition($definition = new InputDefinition([])); $r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); @@ -269,39 +269,35 @@ class CommandTest extends TestCase { $tester = new CommandTester(new \TestCommand()); - $tester->execute(array(), array('interactive' => true)); + $tester->execute([], ['interactive' => true]); - $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); + $this->assertEquals('interact called'.\PHP_EOL.'execute called'.\PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); } public function testRunNonInteractive() { $tester = new CommandTester(new \TestCommand()); - $tester->execute(array(), array('interactive' => false)); + $tester->execute([], ['interactive' => false]); - $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); + $this->assertEquals('execute called'.\PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); } - /** - * @expectedException \LogicException - * @expectedExceptionMessage You must override the execute() method in the concrete command class. - */ public function testExecuteMethodNeedsToBeOverridden() { + $this->expectException('LogicException'); + $this->expectExceptionMessage('You must override the execute() method in the concrete command class.'); $command = new Command('foo'); $command->run(new StringInput(''), new NullOutput()); } - /** - * @expectedException \Symfony\Component\Console\Exception\InvalidOptionException - * @expectedExceptionMessage The "--bar" option does not exist. - */ public function testRunWithInvalidOption() { + $this->expectException('Symfony\Component\Console\Exception\InvalidOptionException'); + $this->expectExceptionMessage('The "--bar" option does not exist.'); $command = new \TestCommand(); $tester = new CommandTester($command); - $tester->execute(array('--bar' => true)); + $tester->execute(['--bar' => true]); } public function testRunReturnsIntegerExitCode() @@ -310,10 +306,10 @@ class CommandTest extends TestCase $exitCode = $command->run(new StringInput(''), new NullOutput()); $this->assertSame(0, $exitCode, '->run() returns integer exit code (treats null as 0)'); - $command = $this->getMockBuilder('TestCommand')->setMethods(array('execute'))->getMock(); + $command = $this->getMockBuilder('TestCommand')->setMethods(['execute'])->getMock(); $command->expects($this->once()) ->method('execute') - ->will($this->returnValue('2.3')); + ->willReturn('2.3'); $exitCode = $command->run(new StringInput(''), new NullOutput()); $this->assertSame(2, $exitCode, '->run() returns integer exit code (casts numeric to int)'); } @@ -340,8 +336,8 @@ class CommandTest extends TestCase $command->setApplication(new Application()); $command->setProcessTitle('foo'); $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); - if (function_exists('cli_set_process_title')) { - if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) { + if (\function_exists('cli_set_process_title')) { + if (null === @cli_get_process_title() && 'Darwin' === \PHP_OS) { $this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); } $this->assertEquals('foo', cli_get_process_title()); @@ -356,16 +352,16 @@ class CommandTest extends TestCase }); $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); $tester = new CommandTester($command); - $tester->execute(array()); - $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); + $tester->execute([]); + $this->assertEquals('interact called'.\PHP_EOL.'from the code...'.\PHP_EOL, $tester->getDisplay()); } public function getSetCodeBindToClosureTests() { - return array( - array(true, 'not bound to the command'), - array(false, 'bound to the command'), - ); + return [ + [true, 'not bound to the command'], + [false, 'bound to the command'], + ]; } /** @@ -381,8 +377,8 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setCode($code); $tester = new CommandTester($command); - $tester->execute(array()); - $this->assertEquals('interact called'.PHP_EOL.$expected.PHP_EOL, $tester->getDisplay()); + $tester->execute([]); + $this->assertEquals('interact called'.\PHP_EOL.$expected.\PHP_EOL, $tester->getDisplay()); } public function testSetCodeWithStaticClosure() @@ -390,14 +386,14 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setCode(self::createClosure()); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); - if (PHP_VERSION_ID < 70000) { + if (\PHP_VERSION_ID < 70000) { // Cannot bind static closures in PHP 5 - $this->assertEquals('interact called'.PHP_EOL.'not bound'.PHP_EOL, $tester->getDisplay()); + $this->assertEquals('interact called'.\PHP_EOL.'not bound'.\PHP_EOL, $tester->getDisplay()); } else { // Can bind static closures in PHP 7 - $this->assertEquals('interact called'.PHP_EOL.'bound'.PHP_EOL, $tester->getDisplay()); + $this->assertEquals('interact called'.\PHP_EOL.'bound'.\PHP_EOL, $tester->getDisplay()); } } @@ -411,11 +407,11 @@ class CommandTest extends TestCase public function testSetCodeWithNonClosureCallable() { $command = new \TestCommand(); - $ret = $command->setCode(array($this, 'callableMethodCommand')); + $ret = $command->setCode([$this, 'callableMethodCommand']); $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); $tester = new CommandTester($command); - $tester->execute(array()); - $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); + $tester->execute([]); + $this->assertEquals('interact called'.\PHP_EOL.'from the code...'.\PHP_EOL, $tester->getDisplay()); } public function callableMethodCommand(InputInterface $input, OutputInterface $output) diff --git a/api/vendor/symfony/console/Tests/Command/HelpCommandTest.php b/api/vendor/symfony/console/Tests/Command/HelpCommandTest.php index 4d618ac..5b25550 100644 --- a/api/vendor/symfony/console/Tests/Command/HelpCommandTest.php +++ b/api/vendor/symfony/console/Tests/Command/HelpCommandTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\HelpCommand; use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; class HelpCommandTest extends TestCase { @@ -24,10 +24,10 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $command->setApplication(new Application()); $commandTester = new CommandTester($command); - $commandTester->execute(array('command_name' => 'li'), array('decorated' => false)); - $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); - $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); - $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + $commandTester->execute(['command_name' => 'li'], ['decorated' => false]); + $this->assertStringContainsString('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + $this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + $this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); } public function testExecuteForCommand() @@ -35,10 +35,10 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); - $commandTester->execute(array(), array('decorated' => false)); - $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $commandTester->execute([], ['decorated' => false]); + $this->assertStringContainsString('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); } public function testExecuteForCommandWithXmlOption() @@ -46,26 +46,26 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); - $commandTester->execute(array('--format' => 'xml')); - $this->assertContains('getDisplay(), '->execute() returns an XML help text if --xml is passed'); + $commandTester->execute(['--format' => 'xml']); + $this->assertStringContainsString('getDisplay(), '->execute() returns an XML help text if --xml is passed'); } public function testExecuteForApplicationCommand() { $application = new Application(); $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list')); - $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $commandTester->execute(['command_name' => 'list']); + $this->assertStringContainsString('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); } public function testExecuteForApplicationCommandWithXmlOption() { $application = new Application(); $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list', '--format' => 'xml')); - $this->assertContains('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertContains('getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); + $commandTester->execute(['command_name' => 'list', '--format' => 'xml']); + $this->assertStringContainsString('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); + $this->assertStringContainsString('getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); } } diff --git a/api/vendor/symfony/console/Tests/Command/ListCommandTest.php b/api/vendor/symfony/console/Tests/Command/ListCommandTest.php index 64478ec..3908ca5 100644 --- a/api/vendor/symfony/console/Tests/Command/ListCommandTest.php +++ b/api/vendor/symfony/console/Tests/Command/ListCommandTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; class ListCommandTest extends TestCase { @@ -21,24 +21,24 @@ class ListCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); + $commandTester->execute(['command' => $command->getName()], ['decorated' => false]); - $this->assertRegExp('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); + $this->assertMatchesRegularExpression('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); } public function testExecuteListsCommandsWithXmlOption() { $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName(), '--format' => 'xml')); - $this->assertRegExp('/